u-boot.dtsi also possible for dtso?

E Shattow e at freeshell.de
Tue Jan 13 19:13:15 CET 2026


Hi Frank,

On 1/3/26 02:55, 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?
> 
> regards Frank

Define compile time DEVICE_TREE_DEBUG=1 for verbose output, however the
output is not very helpful. You might be interested in the patch v2 I
posted "scripts/Makefile.lib: increase detail for dtsi debug output":

https://lore.kernel.org/u-boot/20250901094506.647427-1-e@freeshell.de/

The strategy I settled on for contributions toward OF_UPSTREAM enabled
starfive_visionfive2_defconfig is to avoid that automatic selection so
that it is reserved for local development use, and to explicitly bring
in binman and U-Boot specific override dtsi snippets via the
CONFIG_DEVICE_TREE_INCLUDES symbol:

https://lore.kernel.org/u-boot/20250917000254.1134031-5-e@freeshell.de/

For context of the order of how these things are implemented, firstly is
the automatic inclusion iterating over the first match of any of:
[active make target]-u-boot.dtsi,
{CONFIG_SYS_SOC,CONFIG_SYS_CPU,CONFIG_SYS_VENDOR}-u-boot.dtsi,
u-boot.dtsi  (these are around line 200 of scripts/Makefile.lib)

and then followed by the list from CONFIG_DEVICE_TREE_INCLUDES symbol in
addition to the former. That, when there is not usually any user of the
automatic inclusion, permits the developer to insert (as automatic
include) some devicetree nodes or include statements referring to local
Linux kernel source tree i.e., while preserving any binman configuration
that gets brought in by the CONFIG_DEVICE_TREE_INCLUDES list following
it. I've sent several RFC patch series this way to just touch an empty
placeholder file in dts/upstream/src/... so the build system will see
that as a target and adopt the automatic inclusion dtsi for that target
name; later when upstream changes filter down to devicetree-rebasing I
send a new revision dropping the RFC prefix for the series and drop the
patches responsible for the placeholder file and any corresponding
automatic inclusion dtsi file with the now-redundant content.

I don't know specifically anything to do with dtbo, yet, but I hope this
helps you in your search for answers. I'm interested in what you may
figure out as it may also be applicable to the many possible
configurations of Milk-V Mars CM system-on-module boards (in Raspberry
Pi CM4 compatible form-factor).

-E


More information about the U-Boot mailing list