ramips: express diag led handling via devicetree
[openwrt/openwrt.git] / target / linux / ramips / dts / DIR-645.dts
index 0afa87a0774de99a35ff30c2d4a37220f2f42eda..1728cb25cf877591db74622b30edc662030f68f1 100644 (file)
@@ -9,6 +9,10 @@
        compatible = "dlink,dir-645", "ralink,rt3883-soc";
        model = "D-Link DIR-645";
 
+       aliases {
+               led-status = &led_wps;
+       };
+
        rtl8367b {
                compatible = "realtek,rtl8367b";
                gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
@@ -18,8 +22,6 @@
 
        gpio-keys-polled {
                compatible = "gpio-keys-polled";
-               #address-cells = <1>;
-               #size-cells = <0>;
                poll-interval = <100>;
 
                reset {
@@ -43,7 +45,7 @@
                        gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
                };
 
-               wps {
+               led_wps: wps {
                        label = "dir-645:green:wps";
                        gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
                };
        status = "okay";
 
        m25p80@0 {
-               #address-cells = <1>;
-               #size-cells = <1>;
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <25000000>;
 
-               partition@0 {
-                       label = "uboot";
-                       reg = <0x0 0x30000>;
-                       read-only;
-               };
-
-               partition@30000 {
-                       label = "uboot-env";
-                       reg = <0x30000 0x4000>;
-                       read-only;
-               };
-
-               factory: partition@34000 {
-                       label = "factory";
-                       reg = <0x34000 0x4000>;
-                       read-only;
-               };
-
-               partition@38000 {
-                       label = "nvram";
-                       reg = <0x38000 0x8000>;
-                       read-only;
-               };
-
-               partition@40000 {
-                       label = "devdata";
-                       reg = <0x40000 0x10000>;
-               };
-
-               partition@50000 {
-                       label = "firmware";
-                       reg = <0x50000 0x7b0000>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "uboot";
+                               reg = <0x0 0x30000>;
+                               read-only;
+                       };
+
+                       partition@30000 {
+                               label = "uboot-env";
+                               reg = <0x30000 0x4000>;
+                               read-only;
+                       };
+
+                       factory: partition@34000 {
+                               label = "factory";
+                               reg = <0x34000 0x4000>;
+                               read-only;
+                       };
+
+                       partition@38000 {
+                               label = "nvram";
+                               reg = <0x38000 0x8000>;
+                               read-only;
+                       };
+
+                       partition@40000 {
+                               label = "devdata";
+                               reg = <0x40000 0x10000>;
+                       };
+
+                       partition@50000 {
+                               label = "firmware";
+                               reg = <0x50000 0x7b0000>;
+                       };
                };
        };
 };