Ethernet failing to lease in RMII mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ethernet failing to lease in RMII mode

Jump to solution
2,036 Views
michaelworster
Contributor IV

I have a setup with a i.MX6DL attached to an external PHY (TLK105), the processor and the PHY should communicative over MDIO on address 1, however from the kernel logs I'm not seeing the ethernet functioning.

dmesg:

fec 2188000.ethernet eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr= 2188000.ethernet:01, irq=-1)

IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
udhcpc (v1.23.1) started
Sending discover...
libphy: 2188000.ethernet:01 - Link is Up - 100/Full
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Sending discover...
Sending discover...
No lease, forking to background

Executing "ping" commands never seem to send any data and no IPV4 address is ever assigned:

root@imx6dlicomv2cib:~# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:02:99:13:A8:6A
          inet6 addr: fe80::202:99ff:fe13:a86a/64 Scope:Link
          UP BROADCAST RUNNING 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)

My ethernet is setup in the tree as such:

&fec {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_enet>;
    phy-mode = "rmii";
    phy-handle = <&ethphy0>;
    phy-reset-gpios = <&gpio5 14 0>;
    fsl,magic-packet;
    status = "okay";

    mdio {
        #address-cells = <1>;
        #size-cells = <0>;

        ethphy0: ethernet-phy@1 {
            compatible = "ethernet-phy-ieee802.3-c22";
            reg = <1>;
        };

    };
};

Labels (2)
0 Kudos
1 Solution
1,147 Views
igorpadykov
NXP Employee
NXP Employee

Hi Michael

one can check MX6_enet_RMII patch.zip for L3.0.35 kernel on
https://community.nxp.com/thread/336857
also rmii is used on karo tx6 board, imx6qdl-tx6.dtsi:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/arch/arm/boot/dts/imx6qdl-tx6.dtsi?...
compared with sabre configuration seems some pins changed, like
MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID
also may be useful to check imx6dl-sabresd-enetirq.dts
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/arch/arm/boot/dts/imx6dl-sabresd-en...
check if correct mac address is set, this is described in attached Linux Manual sect.43.3.2
Getting a MAC Address

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

2 Replies
1,147 Views
末班车上的乘客
Contributor II

Hi Michael

Have sovled your rmii phy problem?could your share your solution?I‘m facing the same problem。I‘m use dp83838 phy device。here is my device tree.

&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet1>;
phy-mode = "rmii";
// phy-handle = <&ethphy0>;
// phy-reset-gpios = <&gpio1 25 0>;
fsl,magic-packet;
status = "okay";

};

dp83848 using an external 50Mhz osc,no other MX6QDL_PAD_ENET defined except pinctr_enet1

pinctrl_enet1: enetgrp1 {
fsl,pins = <
MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0b0 //0x4001b0a8
MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0
MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0
MX6QDL_PAD_ENET_TXD0__ENET_TX_DATA0 0x1b0b0
MX6QDL_PAD_ENET_TXD1__ENET_TX_DATA1 0x1b0b0
MX6QDL_PAD_ENET_TX_EN__ENET_TX_EN 0x1b0b0
MX6QDL_PAD_ENET_RX_ER__ENET_RX_ER 0x1b0b0
MX6QDL_PAD_ENET_RXD0__ENET_RX_DATA0 0x1b0b0
MX6QDL_PAD_ENET_RXD1__ENET_RX_DATA1 0x1b0b0
MX6QDL_PAD_ENET_CRS_DV__ENET_RX_EN 0x1b0b0
>;
};

pinctrl_enet_irq: enetirqgrp {
fsl,pins = <
// MX6QDL_PAD_GPIO_6__ENET_IRQ 0x000b1
>;
};

0 Kudos
1,148 Views
igorpadykov
NXP Employee
NXP Employee

Hi Michael

one can check MX6_enet_RMII patch.zip for L3.0.35 kernel on
https://community.nxp.com/thread/336857
also rmii is used on karo tx6 board, imx6qdl-tx6.dtsi:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/arch/arm/boot/dts/imx6qdl-tx6.dtsi?...
compared with sabre configuration seems some pins changed, like
MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID
also may be useful to check imx6dl-sabresd-enetirq.dts
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/arch/arm/boot/dts/imx6dl-sabresd-en...
check if correct mac address is set, this is described in attached Linux Manual sect.43.3.2
Getting a MAC Address

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------