I have made some more changes as below.
- We have RMII interface between iMX8 and SJA1105.
- We don't have the oscillator connected to ref clock so we have to generate the ref clock.
- Found that SJA1105 in PHY can't provide the clock to imx8.
- so now generated the clock of 50 MHZ from imx8 SJA1105.
After making these changes now I see ARP packets are going to connected device in my case I have connected PC at KSZ8873.
I check in Wireshark and found the ARP packets are reaching PC and PC is responding back with MAC address.
But looks like these packets are dropped below are ethtool outputs
root@imx8-ccomgx2-base:~# ethtool -S eth0 | grep -v ': 0'
NIC statistics:
mmc_tx_octetcount_gb: 2224
mmc_tx_framecount_gb: 26
mmc_tx_broadcastframe_g: 1
mmc_tx_multicastframe_g: 16
mmc_tx_64_octets_gb: 2
mmc_tx_65_to_127_octets_gb: 24
mmc_tx_unicast_gb: 9
mmc_tx_multicast_gb: 16
mmc_tx_broadcast_gb: 1
mmc_tx_octetcount_g: 2224
mmc_tx_framecount_g: 26
mmc_rx_framecount_gb: 4117
mmc_rx_octetcount_gb: 459131
mmc_rx_octetcount_g: 459131
mmc_rx_broadcastframe_g: 4086
mmc_rx_multicastframe_g: 21
mmc_rx_64_octets_gb: 3339
mmc_rx_65_to_127_octets_gb: 92
mmc_rx_128_to_255_octets_gb: 5
mmc_rx_256_to_511_octets_gb: 681
mmc_rx_unicast_g: 10
mmc_rx_ipc_intr_mask: 1073692671
mmc_rx_ipv4_gd: 777
mmc_rx_ipv4_gd_octets: 231359
mmc_rx_ipv6_gd_octets: 72
mmc_rx_ipv6_gd: 1
mmc_rx_udp_gd: 769
mmc_rx_icmp_gd: 9
mmc_rx_udp_gd_octets: 215307
mmc_rx_icmp_gd_octets: 544
threshold: 1
tx_pkt_n: 26
rx_pkt_n: 4117
normal_irq_n: 4100
rx_normal_irq_n: 4099
napi_poll: 8224
tx_normal_irq_n: 4100
tx_clean: 4125
tx_set_ic_bit: 1
ip_csum_bypassed: 3339
ipv4_pkt_rcvd: 777
ipv6_pkt_rcvd: 1
no_ptp_rx_msg_type_ext: 4117
root@imx8-ccomgx2-base:~# ethtool -S swp4 | grep -v ': 0'
NIC statistics:
tx_packets: 3301
tx_bytes: 139186
n_rxfrm: 2973
n_rxbyte: 312110
n_txfrm: 3904
n_txbyte: 420158
n_egr_disabled: 5
qlevel_hwm_0: 1
root@imx8-ccomgx2-base:~#
Questions
- When I load the SJA1105 driver I see the following message, based on below message I understand that swp2 and swp4 are not initialized. Why am I getting this error?
[ 103.534901] sja1105 spi1.0 swp4 (uninitialized PHY [30be0000.ethernet-1:01] driver [Micrel KSZ8873MLL Switch]
[ 103.560539] sja1105 spi1.0 swp4 (uninitialized phy: setting supported 00,00000000,0000024a advertising 00,00000000,0000024a
[ 102.452530] sja1105 spi1.0 swp2 (uninitialized PHY [30be0000.ethernet-1:00] driver [NXP TJA1101]
[ 102.477021] sja1105 spi1.0 swp2 (uninitialized phy: setting supported 00,00000000,0000024a advertising 00,00000000,00000000
- is the SJA1105 driver provided is compatible with imx8mp?
- Do I need to worry about the VLAN id here?
How am I testing
ifconfig eth0 up (Not assigning the IP address, just making interface up )
ifconfig swp4 192.168.1.20 up (This port is were KSZ8873 phy is connected)
ping 192.168.1.103 (PC IP address)