Re: [PATCH net-next] net: dsa: bcm_sf2: Ensure that MDIO diversion is used

From: Andrew Lunn
Date: Thu Sep 03 2020 - 18:03:07 EST


> The firmware provides the Device Tree but here is the relevant section for
> you pasted below. The problematic device is a particular revision of the
> silicon (D0) which got later fixed (E0) however the Device Tree was created
> after the fixed platform, not the problematic one. Both revisions of the
> silicon are in production.
>
> There should have been an internal MDIO bus created for that chip revision
> such that we could have correctly parented phy@0 (bcm53125 below) as child
> node of the internal MDIO bus, but you have to realize that this was done
> back in 2014 when DSA was barely revived as an active subsystem. The
> BCM53125 node should have have been converted to an actual switch node at
> some point, I use a mdio_boardinfo overlay downstream to support the switch
> as a proper b53/DSA switch, anyway.

I was expecting something like that. I think this patch needs a
comment in the code explaining it is a workaround for a DT blob which
cannot be changed. Maybe also make it conditional on the board
compatible string?

Thanks
Andrew