[OpenWrt-Devel] [PATCH 3/3] ramips: rearrange LEDs for ZBT-WE826 devices to prevent delete-node
Adrian Schmutzler
freifunk at adrianschmutzler.de
Tue Sep 17 08:22:23 EDT 2019
So far, for the ZBT-WE826-E the leds pulled from the DTSI are
deleted and then redefined. The config in the DTSI is then used
in two other DTSes for the ZBT-WE826 flash variants.
Since the block is effectively only used for two devices, this
moves led definitions to the device DTSes to prevent the use of
delete-node.
This seems more logical than created the config and then deleting
it again.
Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
.../dts/mt7620a_zbtlink_zbt-we826-16m.dts | 21 +++++++++++++++++++
.../dts/mt7620a_zbtlink_zbt-we826-32m.dts | 21 +++++++++++++++++++
.../dts/mt7620a_zbtlink_zbt-we826-e.dts | 2 --
.../ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi | 21 -------------------
4 files changed, 42 insertions(+), 23 deletions(-)
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-16m.dts b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-16m.dts
index 7f2b2646b2..ff72640399 100644
--- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-16m.dts
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-16m.dts
@@ -5,6 +5,27 @@
/ {
compatible = "zbtlink,zbt-we826-16m", "zbtlink,zbt-we826", "ralink,mt7620a-soc";
model = "ZBT-WE826 (16M)";
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "zbt-we826:green:power";
+ gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
+ };
+
+ usb {
+ label = "zbt-we826:green:usb";
+ gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ air {
+ label = "zbt-we826:green:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
};
&spi0 {
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-32m.dts b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-32m.dts
index e7cdcab5e9..27613d54d6 100644
--- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-32m.dts
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-32m.dts
@@ -5,6 +5,27 @@
/ {
compatible = "zbtlink,zbt-we826-32m", "zbtlink,zbt-we826", "ralink,mt7620a-soc";
model = "ZBT-WE826 (32M)";
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "zbt-we826:green:power";
+ gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
+ };
+
+ usb {
+ label = "zbt-we826:green:usb";
+ gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ air {
+ label = "zbt-we826:green:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
};
&spi0 {
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-e.dts b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-e.dts
index 243126125b..d8f51f6692 100644
--- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-e.dts
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-e.dts
@@ -7,8 +7,6 @@
compatible = "zbtlink,zbt-we826-e", "zbtlink,zbt-we826", "ralink,mt7620a-soc";
model = "ZBT-WE826-E";
- /delete-node/ leds;
-
leds {
compatible = "gpio-leds";
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi
index 41c6b07dbd..d66a7baddd 100644
--- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi
@@ -17,27 +17,6 @@
bootargs = "console=ttyS0,115200";
};
- leds {
- compatible = "gpio-leds";
-
- led_power: power {
- label = "zbt-we826:green:power";
- gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
- };
-
- usb {
- label = "zbt-we826:green:usb";
- gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
- trigger-sources = <&ohci_port1>, <&ehci_port1>;
- linux,default-trigger = "usbport";
- };
-
- air {
- label = "zbt-we826:green:wifi";
- gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
- };
- };
-
keys {
compatible = "gpio-keys";
--
2.20.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list