From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D60B1BA45 for ; Fri, 16 Jan 2026 00:05:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=150.107.74.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768521947; cv=none; b=MCXxP/pqCsmUln+xcTOzG5jKdPP0JV/BfTHdV4eIjUtTvXfCqXN+UM9yL2LPuwjeiBqcrw9lA0UcCEFENgsXXVCR+9os1Nq0MPBC5jCLx6E+fBLL0tBFgBttGe/HNvgFN7ljg2t4FAucoihzNySF4uGRBqN/Pq+JWXJTg5XnSCw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768521947; c=relaxed/simple; bh=Jysc52UiCtIWckMfTzQA8yWPPDBTu1M4HHyPyJsgUXM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Fu/b4kNcIvTkjz8hec3hD0hofWqPx7WbkGyMAeMLjMSXhHjEGps+6VkKn3PKUw0hYs4Q/RU9XHRddCJMmxar7c1RizgdKIlv06mzCT3Bj1S6PJD9AtnhV6xpH0a/BrnLKCtI2fqJie0yP1bYDNHXgnTZcb7t5ECHbiOHwkdui+8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au; spf=pass smtp.mailfrom=gandalf.ozlabs.org; dkim=pass (2048-bit key) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.b=UFgp67TL; arc=none smtp.client-ip=150.107.74.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gandalf.ozlabs.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.b="UFgp67TL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202512; t=1768521934; bh=m7HYwcrU9hWlYjNLVRBAKVMO/3GK5Kk/90ZRTK0ODvc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UFgp67TLYuvYEmiQZ7+KSpIEiWIW8seqtnWVV2QoOSuBmjfddLH+izIReFzEm1TfR UY8nTfyowXjHPjG5k6Wp6BPXfQZVvPNmxEz74TKGaTTlPiAkeJQF+uA76GGZ84EYoS AhLERog5kqrIbRUfWqtvRv6WXJ5cWcz+ammi9P91HZvYG62ZzB6HC+MnvKt4LrwVA0 DFp+baMvxau7L9wRPNN4Cu8ZqvMndnFOINNA9a1Nzx3KzzUy8SjCsmY95XOFag++xM ULd0IjlzZBZDKIUJMPMfdlsfNzt2ZFoyId0m+KTwkNu0j3fkTG8PQWx17TceKyso7R Bpnkf/i8zHw/w== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4dsg9B5YfLz4wCJ; Fri, 16 Jan 2026 11:05:34 +1100 (AEDT) Date: Fri, 16 Jan 2026 11:03:17 +1100 From: David Gibson To: Phil Dawson Cc: "devicetree-compiler@vger.kernel.org" Subject: Re: delete-node without label or address from overlay dts Message-ID: References: Precedence: bulk X-Mailing-List: devicetree-compiler@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WnANtK53yiwj4Y2M" Content-Disposition: inline In-Reply-To: --WnANtK53yiwj4Y2M Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 15, 2026 at 12:00:13PM +0000, Phil Dawson wrote: > Hi, >=20 > 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 > /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!) >=20 > The auto generated pl.dtsi also has a few broken nodes without labels > or addresses like this: >=20 > /dts-v1/; > /plugin/; > &amba { > vcap_hdmi_input_1_v_proc_ss_1 { > =E2=80=82=E2=80=82=E2=80=82=E2=80=82 > }; > }; >=20 > I am unable to figure out the syntax to remove these nodes with > /delete-node/, should this be possible? >=20 > I've tried using the below syntax: > &amba { > /delete-node/ vcap_hdmi_input_1_v_proc_ss_1; > }; >=20 > 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. >=20 > 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. >=20 > 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? >=20 > Best Regards, > Phil Dawson >=20 --=20 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 --WnANtK53yiwj4Y2M Content-Type: application/pgp-signature; name=signature.asc -----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----- --WnANtK53yiwj4Y2M--