How to use CONFIG_DM_ETH

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

How to use CONFIG_DM_ETH

1,995 Views
mohamed-ali_fod
Contributor I

Hello,

The ethernet interface is working fine with U-boot-2019.04 without CONFIG_DM_ETH on IMX6S. Following APIs are already implemented in the board file: board_phy_config, setup_iomux_enet and board_eth_init.

Below are the mii info: (Micrel phy is used)

PHY 0x01: OUI = 0x0885, Model = 0x16, Rev = 0x00, 10baseT, HDX

But If I use the CONFIG_DM_ETH, I got the following error:

Could not get PHY for FEC0: addr 1

Below is the device tree:

&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet>;
phy-mode = "mii";
phy-reset-gpios = <&gpio4 8 0>;
phy-handle = <&ethphy1>;
phy-reset-duration = <10>;
status = "okay";
mdio {
#address-cells = <1>;
#size-cells = <0>;
ethphy1: ethernet-phy@1 {
reg = <1>;
};
};
};

Is there any additional setup to add?

Thanks

0 Kudos
2 Replies

1,974 Views
jimmychan
NXP TechSupport
NXP TechSupport

In the defconfig file of i.mx6s board, the CONFIG_DM_ETH=y.

 

Which version of BSP are you using?

 

For your reference, below is the Linux BSP web page.

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

(If the BSP version support i.MX6DL, it also support i.MX6S.)

 

For howto build the BSP, please read the Yocto User's Guide in the corresponding BSP documentation.

For your reference: (source code location and how to rebuild the source code)

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Create-an-Ubuntu-VM-environment-to-build...

 

(reference for porting the PHY to Yocto BSP)

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Porting-KSZ9031-to-i-MX-BSP/ta-p/1112601

 

0 Kudos

1,962 Views
mohamed-ali_fod
Contributor I

The solution is to invert the gpio polarity in device tree

phy-reset-gpios = <&gpio4 8 1>; instead of  phy-reset-gpios = <&gpio4 8 0>;

It seems that there is a gpio polarity inversion in NXP driver.

0 Kudos