Re: delete-node without label or address from overlay dts
David Gibson <[email protected]> Fri, 16 Jan 2026 11:03:17 +1100
| Newsgroups | org.kernel.vger.devicetree-compiler |
|---|---|
| Message-ID | <aWmARb6Rj0GL-Kky@zatzit> |
On Thu, Jan 15, 2026 at 12:00:13PM +0000, Phil Dawson wrote:
> 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?
No. /delete-node/ has no representation within overlay files. One of
several examples of how plugin/overlays are misleading in that they
sort of resemble dtc's older build-time overlays, but not really.
> 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.
Hm, we probably should make this generate an error. I'm unlikely to
get to that any time soon, though.
> 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
>
--
David Gibson (he or they) | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you, not the other way
| around.
http://www.ozlabs.org/~dgibson
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmlpgDYACgkQzQJF27ox 2Ge4UQ//bYIfo8suTjHORYJSdpLx7k2TphKAQ4oKQkAOu1Loe6jhgzjc6aVILQuT okFPkPzjwfI29Y8Xr+kooXapb6E/WgqtzuXu6NIn5SZu2gRrhvS4PiDOCkmbz34y lSA3h641ZtWcjOOwIhLKiu7xRZMkZn/iSJGhaAwbbUzho6YRTCeKFqH1yF2T4P8Y 6qPKpcDYBUHBBM/7LExp46TOR/zCXCY2YyXdCU29/vBTyJl7uMgEU2Y0Qd4UYkJ/ VLuNoX1t2UMSAnp3Z921CxhVNk+vT03HnTuRZLbo6+YyVYZD43YcxImOJiNImYGF GL7+ATqzRyNot0lci9M37J4AvDfBEHZ2Pl5isieNUDrq2PADs8zRt+C3LuLlwc1j y8KlaMCZHsQwfhoOtqy/zERPBiiFEiEhSYNcFCRk4dprLo8cfdHw+aXBg+L27I9w P+5GxRVu3PFKY9LAj1FwxIh0hSt3PDikAcz3a+5QJgSpK1cFW14B44RCpASrl/ba Y8Ww1jO3XZVceDq80RYh0AinPI4fJrFVde6SsJJyvustpoiuwLjOR3WFJ2cACYog VMRZFDdWeKrnC45QplwM0Z1gILT7PJmyFvR8EQ4KoGM9o3O48t+YyC+88fK0QV1z e8FQSLas5pZz4laAFTJ7UDiIflWe/v9Y03jn5Xl2wYeo5GD4wk8= =sNyJ -----END PGP SIGNATURE-----