u-boot.dtsi also possible for dtso?
Frank Wunderlich
frank-w at public-files.de
Tue Jan 13 21:26:27 CET 2026
Hi
Am 13.01.26 um 17:41 schrieb Quentin Schulz:
> Hi Frank,
>
> On 1/3/26 11:55 AM, Frank Wunderlich wrote:
>> Hi,
>>
>> i make new attempt to change mediatek boards to OF_UPSTREAM because i
>> found out, that dtbo merging is now possible.
>>
>> but i faced a problem:
>>
>> e.g. BPI-R3 has 2 SPI-devices (nand,nor) on same spi switchable via
>> hw. i need both in dts to probe the right
>> device for linux and to allow install from sdmmc to both of these
>> devices based on hw switch.
>>
>> currently in uboot the nor is device 0 (unit-address and reg) and
>> nand is 1. this does not work in linux, so i need a
>> way to overwrite the dtso from linux with the new values in uboot.
>>
>> for dts there is a way using -u-boot.dtsi files...do they also work
>> for dtso? where do they need to be placed?
>>
>
> I don't understand the issue. Is there code we can look at?
the issue is that in linux there is only one device at address 0 (1 does
not work).
in uboot i can and have to add both devices with different
unit-address/reg property to check which one is available.
this is the current used file:
https://github.com/frank-w/u-boot/blob/2026-01-bpi-ofupstream/arch/arm/dts/mt7986a-bpi-r3-sd.dts#L196
and i want to move to OF_UPSTREAM to use linux dts synced in uboot.
https://github.com/frank-w/u-boot/commits/2026-01-bpi-ofupstream/
currently i put both nodes manually in the board u-boot.dtsi
https://github.com/frank-w/u-boot/blob/2026-01-bpi-ofupstream/arch/arm/dts/mt7986a-bananapi-bpi-r3-u-boot.dtsi#L67
but it would be better to merge the linux oberlays
https://github.com/frank-w/u-boot/blob/2026-01-bpi-ofupstream/dts/upstream/src/arm64/mediatek/mt7986a-bananapi-bpi-r3-nand.dtso
and
https://github.com/frank-w/u-boot/blob/2026-01-bpi-ofupstream/dts/upstream/src/arm64/mediatek/mt7986a-bananapi-bpi-r3-nor.dtso
but they cannot have both reg=0 in uboot...then no device will be
detected. that's why i want to change one to reg=1 (and unit-address to
1). to have same result as i did in the override file.
regards Frank
> Are you planning on using the exact same DT binary in U-Boot and Linux
> kernel? Why does it matter to Linux that the NOR in U-Boot is device 0?
not the binary, but source dts to have devicetrees defined only once. It
was mentioned a requirement for adding new nodes in uboot.
in linux only one overlay will be applied and both need to be 0 as
defined in linux. but in uboot i need both nodes and they must not be
same reg/unit-address.
> Cheers,
> Quentin
More information about the U-Boot
mailing list