Subject: Re: [PATCH v2 3/3] ARM: dts: imx6qdl-sr-som: update phy configuration for som revision 1.9

From: "Russell King (Oracle)" <[email-masked]>
Date: Mon, 9 May 2022 17:01:39 +0100

On Wed, Apr 27, 2022 at 10:15:31AM +0300, Josua Mayer wrote:
> Hi Russell,
> 
> Am 21.04.22 um 17:20 schrieb Russell King (Oracle):
> > On Thu, Apr 21, 2022 at 03:30:38PM +0200, Andrew Lunn wrote:
> > > > The only other ways around this that I can see would be to have some
> > > > way to flag in DT that the PHYs are "optional" - if they're not found
> > > > while probing the hardware, then don't whinge about them. Or have
> > > > u-boot discover which address the PHY is located, and update the DT
> > > > blob passed to the kernel to disable the PHY addresses that aren't
> > > > present. Or edit the DT to update the node name and reg property. Or
> > > > something along those lines.
> > > uboot sounds like the best option. I don't know if we currently
> > > support the status property for PHYs. Maybe the .dtsi file should have
> > > them all status = "disabled"; and uboot can flip the populated ones to
> > > "okay". Or maybe the other way around to handle older bootloaders.
> > ... which would immediately regress the networking on all SolidRun iMX6
> > platforms when booting "new" DT with existing u-boot, so clearly that
> > isn't a possible solution.
> 
> So to summarize - you don't want to see a third phy spamming the console
> with probe errors ...

Exactly - it's bad enough that we have to list two PHYs because the PHY
could appear at either address 0 or address 4 depending on the direction
of the wind on any given day - and all because the PHY uses the LED pin
to determine its address, and which doesn't give a strong enough pull
that the address can be reliably determined. Every time the PHY gets a
hardware reset, it can change its address.

> I think a combination of the suggestions would be doable:
> - Add the new phy to dt, with status disabled
> - keep the existing phys unchanged
> - after probing in u-boot, disable the two old entries, and enable the new
> one

Exactly.

> It is not very convenient since that means changes to u-boot are necessary,
> but it can be done - and won't break existing users only updating Linux.

We wouldn't have the first problem of needing two PHYs if the hardware
had been fixed after I reported the problem...

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!