incompatible device trees between u-boot and linux
Vladimir Oltean
olteanv at gmail.com
Thu Aug 26 18:32:33 CEST 2021
On Thu, Aug 26, 2021 at 09:35:12AM +0200, Michael Walle wrote:
> Am 2021-08-26 01:03, schrieb Vladimir Oltean:
> > On Wed, Aug 25, 2021 at 04:09:50PM -0400, Tom Rini wrote:
> > In any case, it doesn't sound absurd at all, with a bit of passion it
> > could be done on all Layerscapes. I would be absolutely glad to help on
> > the Ethernet / DSA side of things (which I believe is the reason why
> > Michael summoned me into this thread),
>
> ;) and because I thought you might be interested in the answer to the
> initial question. After all, you also worked on the device trees in linux
> and u-boot.
>
> > but I don't believe that's where
> > the problem is right now. When I added the DM_DSA uclass to U-Boot I did
> > my best to pick a reasonable subset of Linux DSA, and with compatible
> > device tree bindings. Also maintaining the Linux side of things, I did
> > provide feedback to Tim Harvey for the Microchip KSZ switches as to
> > what is the subset supported by U-Boot that would also be DT-compatible
> > with Linux. If it turns out that I failed at that, I am willing to
> > rework what we have.
>
> I started to convert the u-boot device tree yesterday - and it doesn't
> look too bad for now. I was already able to copy the kernel soc dtsi
> and u-boot is still booting and working.
>
> Theres still one catch at the moment, AFAIK in linux you can put the
> PHYs either in the mdio controller node or in a "mdio" subnode within
> the ethernet controller node. I'm not sure wether the latter works in
> u-boot, but [1] looks promising. At least, linux dtbs are using the
> mdio subnodes and u-boot put the phys into the mdio controller node.
Please change Linux for that, move the PHYs from the per-port MDIO node
to the PF 3 central MDIO controller node. Due to hardware reasons, the
per-port MDIO controller registers are in fact de-featured and should be
hidden from new LS1028A reference manuals.
> Maybe sharing the device tree between linux and u-boot isn't that hard
> for the ls1028a after all and its just that nobody did it for now.
> Renaming the reference here and there and introducing the linux
> compatible strings may do it. I'll come back to you if there are
> problems with ethernet (or DSA).
>
> -michael
>
> > I have been known on a few occasions to say "U-Boot does not parse this
> > part of the device tree, you can just strip it away", but I will keep my
> > mouth shut from now on.
>
> [1] https://lists.denx.de/pipermail/u-boot/2020-May/410169.html
More information about the U-Boot
mailing list