Bug or feature? /somenode overwrites /somenode@17 in fdt-overlay

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


TL;DR: The node &{/somenode} in my overlay overwrites &{/somenode@27}.
Is this expected?

I have the following base and overlay dts files:

	uwe@taurus:~/tmp/fdtoverlay$ cat base.dts

	/ {
		somenode@12 {
			property = <0x2a>;

		somenode@27 {
			property = <0x20>;
	uwe@taurus:~/tmp/fdtoverlay$ cat overlay.dts

	&{/somenode} {
		property = <0x17>;

When compiling these and using them with fdtoverlay I see that
/somenode@12 is overwritten(. And if I swap the order of /somenode@12
and /somenode@27 in base.dts, the latter is overwritten instead):

uwe@taurus:~/tmp/fdtoverlay$ dtc -I dts -O dtb -o base.dtb base.dts && dtc -I dts -O dtb -o overlay.dtb overlay.dts && fdtoverlay -i base.dtb -o base+overlay.dtb overlay.dtb && fdtdump base+overlay.dtb
base.dts:4.14-6.4: Warning (unit_address_vs_reg): /somenode@12: node has a unit name, but no reg or ranges property
base.dts:8.14-10.4: Warning (unit_address_vs_reg): /somenode@27: node has a unit name, but no reg or ranges property

**** fdtdump is a low-level debugging tool, not meant for general use.
**** If you want to decompile a dtb, you probably want
****     dtc -I dtb -O dts <filename>

// magic:		0xd00dfeed
// totalsize:		0x99 (153)
// off_dt_struct:	0x38
// off_dt_strings:	0x90
// off_mem_rsvmap:	0x28
// version:		17
// last_comp_version:	16
// boot_cpuid_phys:	0x0
// size_dt_strings:	0x9
// size_dt_struct:	0x58

/ {
    somenode@12 {
        property = <0x00000017>;
    somenode@27 {
        property = <0x00000020>;

I was surprised and wonder if this is as designed or if this is a bug
that should be fixed. Any insights?

Best regards

Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature

[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux