How to configure the phy reset pin for imx93x

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

How to configure the phy reset pin for imx93x

1,505 Views
gongyaxuan
Contributor I

I want to configure phy reset pin in the device tree, but I refer to some of your documents and posts for configuration, but it doesn't work, can you tell me how to configure correctly

i.MX93 RMII debug tips - NXP Community

This is my device tree configuration


&eqos {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_eqos>;
    phy-mode = "rgmii-id";
    phy-handle = <&ethphy1>;
    fsl,magic-packet;
    phy-reset-gpios = <&gpio3 22 GPIO_ACTIVE_HIGH>;
    phy-reset-duration = <200>;
    phy-reset-post-delay=<20>;
    status = "okay";

    mdio {
        compatible = "snps,dwmac-mdio";
        #address-cells = <1>;
        #size-cells = <0>;
        clock-frequency = <5000000>;
        // snps,reset-gpios = <&gpio3 22 GPIO_ACTIVE_HIGH>;
       

        ethphy1: ethernet-phy@1 {
            compatible = "ethernet-phy-ieee802.3-c22";
            reg = <4>;
            eee-broken-1000t;
            // reset-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>;
            // reset-assert-us = <10000>;
            // reset-deassert-us = <20000>;
        };
    };
};

&fec {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_fec>;
    phy-mode = "rgmii-id";
    phy-handle = <&ethphy2>;
    fsl,magic-packet;
    phy-reset-duration = <20>;
    phy-reset-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>;
    phy-reset-post-delay=<20>;
    status = "okay";

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

        ethphy2: ethernet-phy@2 {
            compatible = "ethernet-phy-ieee802.3-c22";
            reg = <6>;
            eee-broken-1000t;
            // reset-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>;
            // reset-assert-us = <10000>;
            // reset-deassert-us = <20000>;
        };
    };
};
0 Kudos
Reply
3 Replies

1,494 Views
gongyaxuan
Contributor I

The fec is reset properly, but the eqos network port is not reset

0 Kudos
Reply

1,466 Views
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @gongyaxuan 

 

Could you please share the steps to replicate the issue?

 

Best regards!

0 Kudos
Reply

1,445 Views
gongyaxuan
Contributor I

I modified the driver of eqos and added the phy reset code of eqos by referring to fec

0 Kudos
Reply