Re: How delete node or property in overlayd dts?
From: Frank Rowand
Date: Sun Aug 19 2018 - 02:13:05 EST
On 08/18/18 03:38, Zhang Bo wrote:
>
> å 2018/8/18 1:47, Rob Herring åé:
>> On Tue, Aug 14, 2018 at 7:26 PM Frank Rowand <frowand.list@xxxxxxxxx> wrote:
>>> On 08/14/18 07:46, åæ wrote:
>>>> /delete-node/ /delete-prop/ could be used in dtsi files without device
>>>> tree overlay.
>>>>
>>>> but with device tree overlay, /delete-node/ and /delete-prop/ are not work.
>>>> How to delete property and node in overlay dts?
>>>>
>>>> for example,
>>>> in basel.dts have following node
>>>> node1 {
>>>> ÂÂÂÂ property1;
>>>> ÂÂÂÂ property3;
>>>> ÂÂÂÂ node2 {
>>>> ÂÂÂÂÂÂÂÂ property2;
>>>> ÂÂÂÂ }
>>>> }
>>>>
>>>> in overlay.dts as following
>>>> Â node1 {
>>>> ÂÂÂÂ /delete-property/ property1;
>>>> ÂÂÂÂ /delete-node/ node2;
>>>> }
>>>>
>>>> after overlay, property1 and node2 is not deleted.
>>>>
>>> The /delete-node/ and /delete-prop/ directives are only used by the
>>> dtc compiler within a single compilation.
>>>
>>> There is nothing in the format of a devicetree blob to represent the
>>> notion of deleting a property or a node.
>>>
>>> You can not delete a property or a node in an overlay dtb.
>> Though you can add/override 'status' with 'status = "disabled";' which
>> should be treated very similar to a node not being present. I say
>> similar because it's a source of bugs for the OS to fail to pay
>> attention to status property.
>
> there is document in https://android.googlesource.com/kernel/msm/+/android-7.0.0_r0.11/Documentation/devicetree/overlay-notes.txt>
> In above document, remove node or property by adding - operator before node or property. but I didn't find it in released kernel source code, Is there any update plan about this problem?
>
> {
>
> ÂÂÂ property-a; Â Â Â /* add property-a to the target */
>
> ÂÂÂ -proptery-b;ÂÂÂÂ /* remove property-b from the target */
>
> ÂÂÂ -node-b {ÂÂÂÂÂÂÂÂÂ /* remove an exiting node-b */
>
> ÂÂÂ ÂÂÂ ...
>
> ÂÂÂ }
>
> }
>
>
As far as I can tell, this version of overlay-notes.txt has never been
in the mainline kernel source.
There is no plan to support such a syntax.
-Frank