[openwrt/openwrt] ramips: enable power LED and second uart on GL-MT300N-V2
LEDE Commits
lede-commits at lists.infradead.org
Thu Feb 22 22:57:32 PST 2018
mkresin pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/2d8eeca842d5c024961b93af221123a0aa8b3e4a
commit 2d8eeca842d5c024961b93af221123a0aa8b3e4a
Author: Benjamin Valentin <benjamin.valentin at volatiles.de>
AuthorDate: Tue Feb 20 18:39:16 2018 +0100
ramips: enable power LED and second uart on GL-MT300N-V2
The device has a second uart accessible via pin headers, so enable it.
There is also a green power led which was not enabled previously.
Enable it too and use it as status LED.
Signed-off-by: Benjamin Valentin <benjamin.valentin at volatiles.de>
---
target/linux/ramips/base-files/etc/diag.sh | 2 +-
target/linux/ramips/dts/GL-MT300N-V2.dts | 12 +++++++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 6038804..2e326af 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -191,7 +191,7 @@ get_status_led() {
status_led="$boardname:blue:wifi"
;;
gl-mt300n-v2)
- status_led="$boardname:red:wlan"
+ status_led="$boardname:green:power"
;;
m4-4M|\
m4-8M)
diff --git a/target/linux/ramips/dts/GL-MT300N-V2.dts b/target/linux/ramips/dts/GL-MT300N-V2.dts
index 8db3d4b..ada618f 100644
--- a/target/linux/ramips/dts/GL-MT300N-V2.dts
+++ b/target/linux/ramips/dts/GL-MT300N-V2.dts
@@ -21,6 +21,12 @@
gpio-leds {
compatible = "gpio-leds";
+ power {
+ label = "gl-mt300n-v2:green:power";
+ default-state = "on";
+ gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
+ };
+
wan {
label = "gl-mt300n-v2:blue:wan";
gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
@@ -73,7 +79,7 @@
&pinctrl {
state_default: pinctrl0 {
gpio {
- ralink,group = "wdt", "gpio", "wled_an", "p0led_an", "i2s";
+ ralink,group = "wdt", "gpio", "wled_an", "p0led_an", "p1led_an", "i2s";
ralink,function = "gpio";
};
};
@@ -124,6 +130,10 @@
};
};
+&uart1 {
+ status = "okay";
+};
+
&ehci {
status = "okay";
};
More information about the lede-commits
mailing list