ramips: set usb led trigger via devicetree
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / kn_rc.dts
index e25783f68550ea2604335df5387428431815f491..8780dd77e55825ba458e9822bbe53211d0cf8146 100644 (file)
@@ -6,27 +6,34 @@
 #include <dt-bindings/input/input.h>
 
 / {
+       compatible = "zyxel,keenetic-omni", "ralink,mt7620n-soc";
        model = "ZyXEL Keenetic Omni";
 
+       aliases {
+               led-status = &led_power;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
 
                wan {
                        label = "kn_rc:green:wan";
-                       gpios = <&gpio0 38 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
                };
 
                usb {
                        label = "kn_rc:green:usb";
-                       gpios = <&gpio0 39 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+                       trigger-sources = <&ohci_port1>, <&ehci_port1>;
+                       linux,default-trigger = "usbport";
                };
 
                wifi {
                        label = "kn_rc:green:wifi";
-                       gpios = <&gpio0 72 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
                };
 
-               power {
+               led_power: power {
                        label = "kn_rc:green:power";
                        gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
                };
@@ -34,8 +41,6 @@
 
        gpio-keys-polled {
                compatible = "gpio-keys";
-               #address-cells = <1>;
-               #size-cells = <0>;
                poll-interval = <20>;
 
                reset {
        };
 };
 
+&gpio1 {
+       status = "okay";
+};
+
+&gpio3 {
+       status = "okay";
+};
+
 &spi0 {
        status = "okay";
 
        m25p80@0 {
-               #address-cells = <1>;
-               #size-cells = <1>;
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <10000000>;
 
-               partition@0 {
-                       label = "u-boot";
-                       reg = <0x0 0x30000>;
-                       read-only;
-               };
-
-               partition@30000 {
-                       label = "u-boot-env";
-                       reg = <0x30000 0x10000>;
-                       read-only;
-               };
-
-               factory: partition@40000 {
-                       label = "factory";
-                       reg = <0x40000 0x10000>;
-                       read-only;
-               };
-
-               partition@50000 {
-                       label = "firmware";
-                       reg = <0x50000 0x7b0000>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "u-boot";
+                               reg = <0x0 0x30000>;
+                               read-only;
+                       };
+
+                       partition@30000 {
+                               label = "u-boot-env";
+                               reg = <0x30000 0x10000>;
+                               read-only;
+                       };
+
+                       factory: partition@40000 {
+                               label = "factory";
+                               reg = <0x40000 0x10000>;
+                               read-only;
+                       };
+
+                       partition@50000 {
+                               label = "firmware";
+                               reg = <0x50000 0x7b0000>;
+                       };
                };
        };
 };
 
 &ethernet {
        mtd-mac-address = <&factory 0x4>;
-       mediatek,portmap = "wllll";
+       mediatek,portmap = "llllw";
 };
 
 &wmac {