I want to remove device node on overlay dts , but it doesn't work.
sample code as belows:
a.dtsi:
&soc {
gpio_keys {
compatible = "gpio-keys";
label = "gpio-keys";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&gpio_key_active>;
pinctrl-1 = <&gpio_key_suspend>;
vol_up {
label = "volume_up";
gpios = <&tlmm 85 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
linux,code = <115>;
gpio-key,wakeup;
debounce-interval = <15>;
linux,can-disable;
};
};
};
b.dts
#include "a.dtsi"
&soc {
/delete-node/ gpio_keys;
};
I want to remove gpio_keys node on b.dts. But it doesn't work.
Any fellows can explain the reason ?
I have just achieved it using the exact syntax you did, based on what is stated here: Device Tree Source Undocumented
So by simply adding my own dts (as below), I was able to swipe out the unwanted nodes, and achieve the configuration I wanted.
#include "am335x-nand-eeprom-rtc.dtsi"
#include "am335x-pcm-953.dtsi"
//Remove ecap node
/delete-node/ &ecap0_pins;
/delete-node/ &ecap0;
// Remove touchscreen related nodes
/delete-node/ &i2c_ts;
/delete-node/ &ts_irq_pin;
/delete-node/ &backlight;
/delete-node/ &lcd_pins;
/delete-node/ &lcdc;
/delete-node/ &lcd_3v3;
/delete-node/ &panel;
&sound {
status = "disabled";
};
according to the source below, it is not possible:
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.
https://lore.kernel.org/lkml/[email protected]/T/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With