incompatible device trees between u-boot and linux

Michael Walle michael at walle.cc
Thu Aug 26 09:35:12 CEST 2021


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.

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