Facing Issue with integrating LAN8720a with imx8mn

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Facing Issue with integrating LAN8720a with imx8mn

2,184 次查看
sunil_embex
Contributor I

Hello Team,

We are working on imx-android-10.0.0_2.0.0 BSP using LAN8720a with our custom board based on imx8mn. For that we have done below changes:

1. In imx8mn-evk.dts

&fec1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fec1>;
phy-mode = "rmii";
phy-handle = <&ethphy0>;
fsl,magic-packet;
phy-reset-gpios = <&gpio5 4 GPIO_ACTIVE_LOW>;
phy-reset-duration = <25>;
phy-reset-active-high;
//phy-supply = <&reg_3v3_p>;
status = "okay";

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

ethphy0: ethernet-phy@0{
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
//smsc,disable-energy-detect;
//reset-gpios = <&gpio5 4 GPIO_ACTIVE_LOW>;
//reset-assert-us = <12000>;
//reset-deassert-us = <13000>;
max-speed = <100>;
};
};
};

pinctrl_fec1: fec1grp {

fsl,pins = < MX8MN_IOMUXC_ENET_MDC_ENET1_MDC 0x3 /* ENET_MDC */ MX8MN_IOMUXC_ENET_MDIO_ENET1_MDIO 0x23 /* ENET_MDIO */ MX8MN_IOMUXC_ENET_TD2_ENET1_TX_CLK 0x4000001f /* ENET_TX_CLK */ MX8MN_IOMUXC_ENET_TD1_ENET1_RGMII_TD1 0x56 /* ENET_TXD1 */ MX8MN_IOMUXC_ENET_TD0_ENET1_RGMII_TD0 0x56 /* ENET_TXD0 */ MX8MN_IOMUXC_ENET_RD1_ENET1_RGMII_RD1 0x56 /* ENET_RXD1 */ MX8MN_IOMUXC_ENET_RD0_ENET1_RGMII_RD0 0x56 /* ENET_RXD0 */ MX8MN_IOMUXC_ENET_RXC_ENET1_RX_ER 0x56 /* ENET_RXERR */ MX8MN_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL 0x56 /* ENET_CRS_DV */ MX8MN_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL 0x56 /* ENET_TX_EN */ MX8MN_IOMUXC_SPDIF_RX_GPIO5_IO4 0x41 /* ENET1_nRST */ >; };

2. In imx_v8_android_defconfig ==> CONFIG_SMSC_PHY=y

After these changes I am getting issue "MDIO device at address 1 is missing" . I think mdio is not able to read the physical address of the phy.

Please see attached screenshot for phy address.

Please suggest what could be wrong here.

Regards,

Sunil

 

0 项奖励
回复
2 回复数

2,175 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Sunil

 

one can check MDIO signals with oscilloscope to verify that it is properly working.

 

Best regards
igor

0 项奖励
回复

2,145 次查看
sunil_embex
Contributor I

Hi Igor,

Thanks for reply.

I have did the modification in dtsi and not eth0 is detecting but its not getting ip even not detecting LAN cable.

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: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 TX bytes:0

dummy0 Link encap:Ethernet HWaddr f6:b5:9a:85:da:ec
inet6 addr: fe80::f4b5:9aff:fe85:daec/64 Scope: Link
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 TX bytes:630

I have assigned static IP but its not detecting  LAN cable.

eth0 Link encap:Ethernet HWaddr 6e:80:17:c2:98:a7 Driver fec
inet addr:192.6.94.200 Bcast:192.6.94.255 Mask:255.255.255.0
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 TX bytes:0

 

Below is my device tree configuration.

pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fec1>;
phy-mode = "rmii";
phy-handle = <&ethphy0>;
fsl,magic-packet;
phy-reset-gpios = <&gpio5 4 GPIO_ACTIVE_LOW>;
phy-reset-duration = <5>;
phy-reset-active-low;
//phy-supply = <&reg_3v3_p>;
status = "okay";

 

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

ethphy0: ethernet-phy@0{
compatible = "ethernet-phy-ieee802.3-c45";
reg = <0>;
//smsc,disable-energy-detect;
//reset-gpios = <&gpio5 4 GPIO_ACTIVE_LOW>;
//reset-assert-us = <12000>;
//reset-deassert-us = <13000>;
max-speed = <100>;
};

0 项奖励
回复