Devicetree Compiler
 help / color / mirror / Atom feed
* delete-node without label or address from overlay dts
@ 2026-01-15 12:00 Phil Dawson
  2026-01-16  0:03 ` David Gibson
  0 siblings, 1 reply; 5+ messages in thread
From: Phil Dawson @ 2026-01-15 12:00 UTC (permalink / raw)
  To: devicetree-compiler@vger.kernel.org

Hi,

Apologies if this is covered in documentation that I've missed.
Is there a way to use /delete-node/ to remove a node with no label or
address from a plugin/overlay dts file?

I have a device tree overlay file pl.dtsi that is auto generated by
vendor tools. Unfortunately many nodes in this file are generated
wrong and the overlay fails to apply.
I've been removing the broken nodes with /delete-node/ &label; syntax
in a second dtsi file and then compiling the two together with a
wrapper dts file and the commands:
gcc -E -nostdinc -undef -D__DTS__ -x assembler-with-cpp -o pl.dts.pp
<path redacted>/pl.dts
dtc -R 8 -b 0 -p 0 -@ -H epapr -o pl.dtbo -I dts -O dtb pl.dts.pp
(These are run as part of a larger yocto build so there may be some
other work around this I'm missing!)

The auto generated pl.dtsi also has a few broken nodes without labels
or addresses like this:

/dts-v1/;
/plugin/;
&amba {
    vcap_hdmi_input_1_v_proc_ss_1 {
    <contents removed for brevity>
    };
};

I am unable to figure out the syntax to remove these nodes with
/delete-node/, should this be possible?

I've tried using the below syntax:
&amba {
    /delete-node/ vcap_hdmi_input_1_v_proc_ss_1;
};

But while dtc doesn't complain, the nodes are not removed from the
resulting dtbo.

I also can't remove using the full path as there is no root node/full
path in the generated dtsi file.

According to this discussion on an unrelated project
(https://github.com/zephyrproject-rtos/zephyr/discussions/67228)
trying to delete a node with a name and address without using the
address won't work. But in my case the node has no address.

I can work around my issue by hacking the auto generated files (while
I try to persuade the vendor to fix them!) to add a label for these
nodes and then removing them using the label. But is there a correct
way of doing this just using my separate dtsi file and dtc?

Best Regards,
Phil Dawson

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-01-20 11:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-15 12:00 delete-node without label or address from overlay dts Phil Dawson
2026-01-16  0:03 ` David Gibson
2026-01-16 14:39   ` Phil Dawson
2026-01-19  6:36     ` David Gibson
2026-01-20 11:10       ` Phil Dawson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox