cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157 mdio can not get ethernet phy

Jliu.21
Associate II

the kernel log is : mdio_bus stmmac-0: MDIO device at address 7 is missing.

phy chip is : ksz9031

mpu is : stm32mp157cac3

my dts config is :

&ethernet0 { status = "okay"; pinctrl-0 = <&ethernet0_rgmii_pins_a>; pinctrl-1 = <&ethernet0_rgmii_pins_sleep_a>; pinctrl-names = "default", "sleep"; clock-names = "stmmaceth", "mac-clk-tx", "mac-clk-rx", "ethstp", "eth-ck"; clocks = <&rcc ETHMAC>, <&rcc ETHTX>, <&rcc ETHRX>, <&rcc ETHSTP>, <&rcc ETHCK_K>; assigned-clocks = <&rcc ETHCK_K>; assigned-clock-parents = <&rcc PLL4_P>; assigned-clock-rates = <125000000>; phy-mode = "rgmii"; max-speed = <1000>; phy-handle = <&phy0>; st,eth_clk_sel; mdio0 { #address-cells = <1>; #size-cells = <0>; compatible = "snps,dwmac-mdio"; reset-gpios = <&gpiog 0 GPIO_ACTIVE_LOW>;phy0: ethernet-phy@7 { reg = <7>; /* * These skews assume the STM32MP1 has no internal delay. * * All skews are offset since hardware skew values for the ksz9031 * range from a negative skew to a positive skew. * See the micrel-ksz90x1.txt Documentation file for details. */ /* REG 0x0008, 5 bits per skew */ txc-skew-ps = <1800>;/* 900ps */ rxc-skew-ps = <1320>;/* 420ps */ /* REG 0x0004, 4 bits per skew */ txen-skew-ps = <420>; /* 0ps */ rxdv-skew-ps = <420>; /* 0ps */ /* REG 0x0005, 4 bits per skew */ rxd0-skew-ps = <720>; /* 300ps */ rxd1-skew-ps = <780>; /* 360ps */ rxd2-skew-ps = <840>; /* 420ps */ rxd3-skew-ps = <900>; /* 480ps */ /* REG 0x0006, 4 bits per skew */ txd0-skew-ps = <0>; /* -420ps */ txd1-skew-ps = <60>; /* -360ps */ txd2-skew-ps = <120>; /* -300ps */ txd3-skew-ps = <180>; /* -240ps */ micrel,force-master; }; };};

the dts config is copied from a runnable dts config which is using a linux4.19 ,but my ver is 5.4

This discussion is locked. Please start a new topic to ask your question.
3 REPLIES 3
allard
Senior

Is the PHY configured for address 7?

Yes. I got the adress from another dts which makes it work well. But the version of that kernel is 4.x

OlivierK
ST Employee

​Hi Jliu.2 (Community Member)

I suggest to not to mix kernel versions since you will face lots of potential issues. (TFA/U-boot/Kernel+DT) should be homogenous from the same OpenSTLinux version.

The DT you describe here doesn't tell anything strange. MDIO device at address 7 can be seen in kernel 5.4 version also.

Regards,


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.