Re: [PATCH v2 3/3] riscv: dts: thead: Add TH1520 ethernet nodes

Andrew Lunn
2024-09-27T12:00:29Z

> I tried to setup an nfs server with a rootfs on my local network. I can
> mount it okay from my laptop so I think it is working okay. However, it
> does not seem to work on the lpi4a [3]. It appears the rgmii-id
> validation fails and the dwmac driver can not open the phy:
>
> thead-dwmac ffe7060000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
> thead-dwmac ffe7060000.ethernet eth0: validation of rgmii-id with support \
> 00,00000000,00000000,00006280 and advertisementa \
> 00,00000000,00000000,00006280 failed: -EINVAL
> thead-dwmac ffe7060000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -22)

Given what Emil said, i would suggest flipping the MDIO busses
around. Put the PHYs on gmac1's MDIO bus, and set the pinmux so that
its MDIO bus controller is connected to the outside world. Then, when
gmac1 probes first, its MDIO bus will be probed at the same time, and
its PHY found.

Andrew