Imx6ull KSZ8041NL ethernet issue Hello There , To utilize dule ethernet for one of our potential project , We have connected 2 Ethernet phy with Imx6ull processor , One phy is KSZ8081 and one phy is KSZ8041 , below is our DTS configuration : &fec1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet1>; phy-mode = "rmii"; phy-handle = <ðphy0>; phy-reset-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>; phy-reset-duration = <26>; phy-reset-post-delay=<20>; phy-supply = <®_peri_3v3>; status = "okay"; }; &fec2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet2>; phy-mode = "rmii"; phy-handle = <ðphy1>; phy-reset-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; //phy-reset-gpios = <&gpio5 6 GPIO_ACTIVE_LOW>; phy-reset-duration = <26>; phy-reset-post-delay=<20>; phy-supply = <®_peri_3v3>; status = "okay"; mdio { #address-cells = <1>; #size-cells = <0>; ethphy0: ethernet-phy@1 { reg = <1>; micrel,led-mode = <1>; clocks = <&clks IMX6UL_CLK_ENET_REF>; clock-names = "rmii-ref"; }; ethphy1: ethernet-phy@3 { reg = <3>; micrel,led-mode = <1>; clocks = <&clks IMX6UL_CLK_ENET2_REF>; clock-names = "rmii-ref"; }; }; }; pinctrl_enet1: enet1grp { fsl,pins = < MX6UL_PAD_ENET1_RX_EN__ENET1_RX_EN 0x1b0b0 MX6UL_PAD_ENET1_RX_ER__ENET1_RX_ER 0x1b0b0 MX6UL_PAD_ENET1_RX_DATA0__ENET1_RDATA00 0x1b0b0 MX6UL_PAD_ENET1_RX_DATA1__ENET1_RDATA01 0x1b0b0 MX6UL_PAD_ENET1_TX_EN__ENET1_TX_EN 0x1b0b0 MX6UL_PAD_ENET1_TX_DATA0__ENET1_TDATA00 0x1b0b0 MX6UL_PAD_ENET1_TX_DATA1__ENET1_TDATA01 0x1b0b0 MX6UL_PAD_ENET1_TX_CLK__ENET1_REF_CLK1 0x4001b031 >; }; pinctrl_enet2: enet2grp { fsl,pins = < MX6UL_PAD_GPIO1_IO07__ENET2_MDC 0x1b0b0 MX6UL_PAD_GPIO1_IO06__ENET2_MDIO 0x1b0b0 MX6UL_PAD_ENET2_RX_EN__ENET2_RX_EN 0x1b0b0 MX6UL_PAD_ENET2_RX_ER__ENET2_RX_ER 0x1b0b0 MX6UL_PAD_ENET2_RX_DATA0__ENET2_RDATA00 0x1b0b0 MX6UL_PAD_ENET2_RX_DATA1__ENET2_RDATA01 0x1b0b0 MX6UL_PAD_ENET2_TX_EN__ENET2_TX_EN 0x1b0b0 MX6UL_PAD_ENET2_TX_DATA0__ENET2_TDATA00 0x1b0b0 MX6UL_PAD_ENET2_TX_DATA1__ENET2_TDATA01 0x1b0b0 MX6UL_PAD_ENET2_TX_CLK__ENET2_REF_CLK2 0x4001b031 >; }; Both The Ethernet Phys are getting detected in kernel logs and also when we connect ethernet cable , link is also getting detected on both. but Ip is arriving on ethernet which is connected to KSZ8081 phy , the IP is not getting assigned with the Ethernet which is connected to KSZ8084NL. and there is rx errors are observed in KSZ8041NL Ethernet which is eth0 , below are the logs : root@sls-imx6ull14x14evk:~# ifconfig eth0 Link encap:Ethernet HWaddr BA:9C:69:1F:76:3A UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:1065 dropped:0 overruns:0 frame:1065 TX packets:65 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:12024 (11.7 KiB) eth1 Link encap:Ethernet HWaddr 42:19:11:7F:5E:89 inet addr:10.20.0.184 Bcast:10.20.1.255 Mask:255.255.254.0 inet6 addr: fe80::8248:9837:9647:2a00/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:18 errors:0 dropped:0 overruns:0 frame:0 TX packets:23 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2494 (2.4 KiB) TX bytes:3162 (3.0 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:17 errors:0 dropped:0 overruns:0 frame:0 TX packets:17 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2011 (1.9 KiB) TX bytes:2011 (1.9 KiB) root@sls-imx6ull14x14evk:~# ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supported pause frame use: Symmetric Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised pause frame use: Symmetric Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Link partner advertised pause frame use: No Link partner advertised auto-negotiation: Yes Link partner advertised FEC modes: Not reported Speed: 100Mb/s Duplex: Full Auto-negotiation: on Port: Twisted Pair PHYAD: 3 Transceiver: external MDI-X: Unknown Supports Wake-on: g Wake-on: d Link detected: yes We have also checked the clock which is 50MHz , which is generated properly and also coming into phy KSZ8041NL. In short 1 Ethernet with KSZ8081 is working properly but 2nd Ethernet not working with KSZ8041NL. Please suggest us solution. we have also attached screenshot of both Ethernet phy Hardware for your reference . image (1).png image (2).jpg i.MX6 All i.MX6UL Re: Imx6ull KSZ8041NL ethernet issue Hello NXP Team , Is there any update for us for our asked query ? Re: Imx6ull KSZ8041NL ethernet issue Hello NXP Support Team, We have already shared details about Ethernet issue which we are facing at our end. So, would you please check it from your end and let us know resolution if anything from your end? If needed then we will be available over call to discuss issue with your team as well. Waiting for positive feedback from your team end. Regards, Ritesh Prajapati Re: Imx6ull KSZ8041NL ethernet issue Hello @HarshilSoni434 @ritesh_prajapat
Hope you are doing very well.
Looking at your KSZ8041 schematic's Strapping Option:
Manuel_Salas_0-1785172670273.png
Isolate Mode: Pull-up (Default) = Enable
Pull-Down = Disable
The PHY disconnects its RMII data pins (RXD0, RXD1, CRS/DV, RX_ER, TXD0, TXD1, TX_EN) from the MAC.
MDIO/MDC remains fully functional and PHY is discovered, link pulse is still generated and maybe this is why the PHY appears detected and link is UP.
Can you please try Changing R37 from pull-up to a pull-down resistor (~4.7kΩ to GND) on the ISOLATE pin?
The second thing to check is the Reset Pin. Can you please confirm that the reset is properly asserted?
And check the reset_n signal is according connected to the:
phy-reset-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
//phy-reset-gpios = <&gpio5 6 GPIO_ACTIVE_LOW>;
Then, please check the CONFIG[2:0] Strapping for RMII are physically well asserted.
Also, in the KSZ8041 schematic's signal mapping table:
Manuel_Salas_1-1785173206995.png
The net names appear swapped (MDC labeled as enet_mdio and vice versa).
Best regards,
Salas. Re: Imx6ull KSZ8041NL ethernet issue Hello @Manuel_Salas , Thank you for your response , As per your suggestion , We have done the pull-down resistor change and checked the Ethernet communication , Unfortunately the behavior is same. We are getting RX-errors during IP Negotiation. We have also verified the below points : - The reset pin is proper based on imx6ull pin connection. we have also applied manual pulse on reset line , the phy (KSZ8041NL) is getting reset but the behavior is same. - The MDIO and MDC pin swap is the schematic issue , the connection is proper in actual hardware . So the behavior is same after changes , Both Phy is getting detected but IP is coming with KSZ8081 only not with KSZ8041NL. below is the updated log : root@sls-imx6ull14x14evk:~# dmesg | grep fec [ 2.124528] fec 20b4000.ethernet eth0: registered PHC device 0 [ 2.207221] fec 2188000.ethernet eth1: registered PHC device 1 [ 72.966866] fec 20b4000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off root@sls-imx6ull14x14evk:~# dmesg | grep eth0 [ 2.124528] fec 20b4000.ethernet eth0: registered PHC device 0 [ 72.966866] fec 20b4000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off root@sls-imx6ull14x14evk:~# ifconfig eth0 Link encap:Ethernet HWaddr 26:F5:A6:8C:73:42 inet6 addr: fe80::f2af:2d7a:228c:2038/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:63 dropped:0 overruns:0 frame:63 TX packets:12 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:2093 (2.0 KiB) eth1 Link encap:Ethernet HWaddr 22:81:A6:66:8C:3A UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:91 errors:0 dropped:0 overruns:0 frame:0 TX packets:91 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:7797 (7.6 KiB) TX bytes:7797 (7.6 KiB) root@sls-imx6ull14x14evk:~# ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supported pause frame use: Symmetric Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised pause frame use: Symmetric Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Link partner advertised pause frame use: No Link partner advertised auto-negotiation: Yes Link partner advertised FEC modes: Not reported Speed: 100Mb/s Duplex: Full Auto-negotiation: on Port: Twisted Pair PHYAD: 0 Transceiver: external MDI-X: Unknown Supports Wake-on: g Wake-on: d Link detected: yes Please provide us the your suggestion for the same. Re: Imx6ull KSZ8041NL ethernet issue Thanks @Manuel_Salas for providing suggestions from your end. We will check all things suggested from your end and will post results mostly by today. Regards, Ritesh Prajapati Re: Imx6ull KSZ8041NL ethernet issue Hello @Manuel_Salas we have done further debugging into ethernet fec driver fec_main.c for identifying the rx error root-case. So we found that driver is ignoring all the rx-packets due to CRC mismatch error BD_ENET_RX_CR. so based on this , please provide your suggestion for issue resolution . Re: Imx6ull KSZ8041NL ethernet issue Hello @Manuel_Salas , Based on our last observation , is there any update for us .? just updating you again that all the rx-packets are ignored due to CRC error. so what can be the cause of it ? Re: Imx6ull KSZ8041NL ethernet issue Hello @Manuel_Salas , Good Morning, Did you get a chance to review last couple of updates regarding issue which @HarshilSoni434 has already shared to you? Can you please look into it and let us know if you have any clue or any further findings from your end to narrow down exact issue of CRC mismatch failed for receive packet? Let us know if need any information from our end. Regards, Ritesh Prajapati
查看全文