Re: [PATCH v3 net-next 05/10] net: dsa: microchip: add DSA support for microchip lan937x

From: Vladimir Oltean
Date: Tue Aug 03 2021 - 11:05:37 EST


On Tue, Aug 03, 2021 at 04:43:12PM +0200, Andrew Lunn wrote:
> There are good reasons to use an explicit phy-handle, and i would
> never block such code. However, implicit is historically how it was
> done. There are many DT blobs which assume it works. So implicit is
> not going away.
>
> If you want to only support explicit in U-Boot, that is fine. I would
> suggest making this clear in the U-Boot documentation.

I am happy that Prasanna made it possible for OF-based descriptions of
the internal PHYs to be written for the lan937x generation. I did take a
look at the bindings that Prasanna proposed and I think they would work
with what DM_DSA can parse too. The work that Tim Harvey did was for
ksz9897, and it is slightly different: the MDIO controller node has a
compatible string of "microchip,ksz-mdio", and a parent container node
of "mdios".
https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/imx8mm-venice-gw7901.dts#L634
However, since the lan937x would probably have a different driver even
in U-Boot, 100% binding consistency between lan937x and ksz9897 is
probably not necessary, since some of that can boil down to driver
author choice too. As long as an OF based choice is available I'm
absolutely fine.