Thread (16 messages) 16 messages, 5 authors, 2025-05-27

Re: [PATCH v1 2/3] net: stmmac: dwmac-sun8i: Allow runtime AC200/AC300 phy selection

From: James Hilliard <hidden>
Date: 2025-05-26 21:09:07
Also in: linux-arm-kernel, linux-sunxi, lkml

On Mon, May 26, 2025 at 1:56 PM Andrew Lunn [off-list ref] wrote:
On Mon, May 26, 2025 at 12:29:35PM -0600, James Hilliard wrote:
quoted
The Allwinner H616 ships with two different on-die phy variants, in
order to determine the phy being used we need to read an efuse and
then select the appropriate PHY based on the AC300 bit.

By defining an emac node without a phy-handle we can override the
default PHY selection logic in stmmac by passing a specific phy_node
selected based on the ac200 and ac300 names in a phys list.
The normal way to do this is phy_find_first().
Sure, but there are problems with that approach here.

The initialization sequences are rather different and the devices
won't be visible on the mdio bus until after they are initialized.

The resets will be specific to either the AC200 or AC300 so we
need to choose the correct PHY based on the efuse value rather
than a mdio bus scan to avoid a circular dependency essentially.

AC200: i2c based reset/init sequence
AC300: mdio based reset/init sequence
    Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help