ath79: fix GL.iNet AR300M family GPIOs/LEDs
authorJeff Kletsky <git-commits@allycomm.com>
Sun, 20 Jan 2019 22:48:09 +0000 (14:48 -0800)
committerMathias Kresin <dev@kresin.me>
Sat, 26 Jan 2019 09:40:06 +0000 (10:40 +0100)
Change the "status" LED to proper GPIO 12 and "red" naming.

Remove GPIO 2 from definition as a USB LED.

GPIO 2 is used to control power to the USB socket, not an LED.
As such, PWM on the line or typical LED triggers are inappropriate.

Users who wish to control the USB power for custom applications
can manipulate the GPIO through code, or for example, export it
through /sys/class/gpio/export.

Runtime-tested:  GL.iNet AR300M-Lite

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi

index 2a0c4385cdd17d9604a1e5efa1c170ebeafa1752..fe986bdde0b5c12d923e5fd289ab5932265e7e23 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               usb {
-                       label = "gl-ar300m:green:usb";
-                       gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
-                       trigger-sources = <&hub_port>;
-                       linux,default-trigger = "usbport";
-               };
-
                wlan {
                        label = "gl-ar300m:green:wlan";
                        gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
@@ -60,8 +53,8 @@
                };
 
                led_status: status {
-                       label = "gl-ar300m:green:status";
-                       gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+                       label = "gl-ar300m:red:status";
+                       gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
                };
        };
 };
        #address-cells = <1>;
        #size-cells = <0>;
        status = "okay";
-
-       hub_port: port@1 {
-               reg = <1>;
-               #trigger-source-cells = <0>;
-       };
 };
 
 &usb_phy {