how to make ethernet eqos connect to PHY

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

how to make ethernet eqos connect to PHY

771 Views
Cyriactoms
Contributor II
&eqos {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_eqos>;
phy-mode = "rgmii-id";
phy-handle = <&ethphy0>;
snps,force_thresh_dma_mode;
snps,mtl-tx-config = <&mtl_tx_setup>;
snps,mtl-rx-config = <&mtl_rx_setup>;
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>;
reset-gpios = <&gpio4 23 GPIO_ACTIVE_LOW>;
eee-broken-1000t;
realtek,clkout-disable;
};
};
 
 
pinctrl_eqos: eqosgrp {
fsl,pins = <
MX8MP_IOMUXC_ENET_MDC__ENET_QOS_MDC 0x2
MX8MP_IOMUXC_ENET_MDIO__ENET_QOS_MDIO 0x2
MX8MP_IOMUXC_ENET_RD0__ENET_QOS_RGMII_RD0 0x90
MX8MP_IOMUXC_ENET_RD1__ENET_QOS_RGMII_RD1 0x90
MX8MP_IOMUXC_ENET_RD2__ENET_QOS_RGMII_RD2 0x90
MX8MP_IOMUXC_ENET_RD3__ENET_QOS_RGMII_RD3 0x90
MX8MP_IOMUXC_ENET_RXC__CCM_ENET_QOS_CLOCK_GENERATE_RX_CLK 0x90
MX8MP_IOMUXC_ENET_RX_CTL__ENET_QOS_RGMII_RX_CTL 0x90
MX8MP_IOMUXC_ENET_TD0__ENET_QOS_RGMII_TD0 0x16
MX8MP_IOMUXC_ENET_TD1__ENET_QOS_RGMII_TD1 0x16
MX8MP_IOMUXC_ENET_TD2__ENET_QOS_RGMII_TD2 0x16
MX8MP_IOMUXC_ENET_TD3__ENET_QOS_RGMII_TD3 0x16
MX8MP_IOMUXC_ENET_TX_CTL__ENET_QOS_RGMII_TX_CTL 0x16
MX8MP_IOMUXC_ENET_TXC__CCM_ENET_QOS_CLOCK_GENERATE_TX_CLK 0x16
MX8MP_IOMUXC_SAI2_RXD0__GPIO4_IO23 0x00000106
>;
};
 
imx-dwmac 30bf0000.ethernet eth0: validation of with support 0000000,00000000,00006000 and advertisement 0000000,00000000,00006000 failed: -22
[ 6.727068] imx-dwmac 30bf0000.ethernet eth0: no phy at addr -1
[ 6.748105] imx-dwmac 30bf0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
 
 I am getting the error like what is the cause of it
 
Labels (1)
0 Kudos
Reply
5 Replies

746 Views
Cyriactoms
Contributor II

i am using imx8mp processor i have used the default devicetree configuration only but its not connecting. Fec is detecting the phy controller but when i connect rj45 its not detecting

0 Kudos
Reply

684 Views
joanxie
NXP TechSupport
NXP TechSupport

what PHY do you use as your board? the same as imx8mpevk, use RTL8211FDI? and did your board use gpio4_IO23 as reset pin? and how do you define mtl_tx_setup and mtl_rx_setup?

0 Kudos
Reply

662 Views
Cyriactoms
Contributor II
i am using ti DP83867IRRGZ, I am using a reset pin MX8MP_IOMUXC_SAI2_RXD0__GPIO4_IO23 0x00000106. I just kept the mtl_tx and mtl_rx as default what should be need to do.
0 Kudos
Reply

637 Views
joanxie
NXP TechSupport
NXP TechSupport

the default dts settings are for realtek, since you use your own PHY, you need change the dts based the spec of your own phy and your own HW design, like reset pins or delay time request, 

0 Kudos
Reply

751 Views
joanxie
NXP TechSupport
NXP TechSupport

what processor do you use? you can refer to the default dts file as reference

0 Kudos
Reply