IMX8MP: Ethernet Phy: Eth1(eqos) cannot work.

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

IMX8MP: Ethernet Phy: Eth1(eqos) cannot work.

2,974 Views
shadow-L
Contributor I

Hi,

=> We designed a custom i.MX8MP board and change ethernet phy.

eth0 : fec : RTL8211FI-VD-CG
eth1 : eqos : RTL9010ARG (Base-T1)

=> Add reset-gpio to dts,
================================================
&eqos {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_eqos>;
    phy-mode = "rgmii-id";
    phy-handle = <&ethphy0>;
+    snps,reset-gpios = <&gpio4 20 GPIO_ACTIVE_HIGH>;
+    snps,reset-delays-us = <0 15000 6000>;
    status = "okay";

    mdio {
        compatible = "snps,dwmac-mdio";
        #address-cells = <1>;
        #size-cells = <0>;

        ethphy0: ethernet-phy@1 {
            compatible = "ethernet-phy-ieee802.3-c22";
            reg = <1>;
            eee-broken-1000t;
            rtl821x,aldps-disable;
            rtl821x,clkout-disable;
        };
    };
};

&fec {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_fec>;
    phy-mode = "rgmii-id";
    phy-handle = <&ethphy1>;
    fsl,magic-packet;
    status = "okay";

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

        ethphy1: ethernet-phy@1 {
            compatible = "ethernet-phy-ieee802.3-c22";
            reg = <1>;
            eee-broken-1000t;
            rtl821x,clkout-disable;
        };
    };
};

pinctrl_eqos: eqosgrp {
    fsl,pins = <
    ...
+    MX8MP_IOMUXC_SAI1_MCLK__GPIO4_IO20 0x16
    >;
};

=============================================

=> Eth0(fec) can work but eth1 imx-dwmac have some error lead to cannot work. (dmesg.log)
==========================================================================
...
[ 8.900743] imx-dwmac 30bf0000.ethernet eth1: no phy at addr -1
[ 8.900754] imx-dwmac 30bf0000.ethernet eth1: stmmac_open: Cannot attach to PHY (error: -19)
...
==========================================================================

=> Informance :
==========================================================
NXP-imx8mp
OS : yocto-3.3-imx_8m (kernel-version : 5.10)
Ethernet PHY : eth0 (fec-RTL8211FI-VD-CG) , eth1 (eqos-RTL9010ARG)
RTL9010ARG-PHYRSTB : MX8MP_IOMUXC_SAI1_MCLK__GPIO4_IO20
Phy-Reset : 

RTL9010-phy-reset.png

Phy-address : RTL8211F = 001 , RTL9010ARG = 01
==========================================================

=> Any help will be appreciated.

4 Replies

2,538 Views
tzeng015
Contributor II

hi 

My platform : imx8mm

Linux version : 4.19

I also want to port the RTL9010 driver on my target board. Can you share me the reference codes ?

thank you

tzeng015

0 Kudos
Reply

2,915 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @gary_gen 

Please raise new ticket for your query.

Thanks & Regards

Sanket Parekh

0 Kudos
Reply

2,916 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @shadow-L 

As per the mentioned snapshot, Reset pin must be asserted low for 10ms.

Please change the code like below.

snps,reset-delays-us = <0 10000 6000>;

Thanks & Regards

Sanket Parekh

0 Kudos
Reply

2,968 Views
gary_gen
Contributor I

I have the same problem. Can somebody help us please.

0 Kudos
Reply