[source] ramips: improve edimax 6200n/nl support

LEDE Commits lede-commits at lists.infradead.org
Sat Oct 15 02:06:38 PDT 2016


mkresin pushed a commit to source.git, branch master:
https://git.lede-project.org/6391af2f1fd451fcd3e4169dd1d7aa7fbe53fbda

commit 6391af2f1fd451fcd3e4169dd1d7aa7fbe53fbda
Author: Mathias Kresin <dev at kresin.me>
AuthorDate: Tue Sep 27 07:16:16 2016 +0200

    ramips: improve edimax 6200n/nl support
    
    Assign the reset functionality to the wps/reset buttons. Use the wlan
    switch of the 6200n to enable/disable wlan.
    
    Add the internet led of the 6200nl and use the led for boot status
    indication
    
    Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 target/linux/ramips/base-files/etc/board.d/01_leds |  6 +++---
 target/linux/ramips/base-files/etc/diag.sh         |  3 +++
 target/linux/ramips/dts/3G-6200N.dts               | 10 +++++-----
 target/linux/ramips/dts/3G-6200NL.dts              | 13 +++++++++----
 4 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index e3b2177..e14448e 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -26,6 +26,9 @@ case $board in
 	set_usb_led "$board:blue:3g"
 	;;
 3g-6200nl|\
+wnce2001)
+	set_wifi_led "$board:green:wlan"
+	;;
 br-6475nd|\
 mzk-w300nh2)
 	set_wifi_led "$board:amber:wlan"
@@ -306,9 +309,6 @@ whr-600d)
 	ucidef_set_led_default "power" "power" "$board:green:power" "1"
 	ucidef_set_led_default "router" "router" "$board:green:router" "1"
 	;;
-wnce2001)
-	set_wifi_led "$board:green:wlan"
-	;;
 wrh-300cr)
 	set_wifi_led "$board:green:wlan"
 	ucidef_set_led_netdev "lan" "lan" "$board:green:ethernet" "eth0"
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 2f092b0..67dcf99 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -36,6 +36,9 @@ get_status_led() {
 	xdxrn502j)
 		status_led="$board:green:power"
 		;;
+	3g-6200nl)
+		status_led="$board:green:internet"
+		;;
 	a5-v11|\
 	cs-qr10|\
 	d105|\
diff --git a/target/linux/ramips/dts/3G-6200N.dts b/target/linux/ramips/dts/3G-6200N.dts
index cd2ba51..a8032c5 100644
--- a/target/linux/ramips/dts/3G-6200N.dts
+++ b/target/linux/ramips/dts/3G-6200N.dts
@@ -69,16 +69,16 @@
 		#size-cells = <0>;
 		poll-interval = <20>;
 
-		wps {
-			label = "wps";
+		reset {
+			label = "reset";
 			gpios = <&gpio0 12 1>;
-			linux,code = <0x211>;
+			linux,code = <0x198>;
 		};
 
-		wlanswitch {
+		rfkill {
 			label = "wlanswitch";
 			gpios = <&gpio0 13 1>;
-			linux,code = <0x100>;
+			linux,code = <0xf7>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/3G-6200NL.dts b/target/linux/ramips/dts/3G-6200NL.dts
index 7ef7618..453e45b 100644
--- a/target/linux/ramips/dts/3G-6200NL.dts
+++ b/target/linux/ramips/dts/3G-6200NL.dts
@@ -47,8 +47,13 @@
 	gpio-leds {
 		compatible = "gpio-leds";
 
+		internet {
+			label = "3g-6200nl:green:internet";
+			gpios = <&gpio0 9 1>;
+		};
+
 		wlan {
-			label = "3g-6200nl:amber:wlan";
+			label = "3g-6200nl:green:wlan";
 			gpios = <&gpio0 14 1>;
 		};
 	};
@@ -59,10 +64,10 @@
 		#size-cells = <0>;
 		poll-interval = <20>;
 
-		wps {
-			label = "wps";
+		reset {
+			label = "reset";
 			gpios = <&gpio0 12 1>;
-			linux,code = <0x211>;
+			linux,code = <0x198>;
 		};
 	};
 };



More information about the lede-commits mailing list