apm821xx: use nested fixed-partitions
[openwrt/staging/chunkeey.git] / target / linux / apm821xx / dts / netgear-wndap6x0.dtsi
index 88284d0237a562f73c41f8cccf4a0a48665a13fb..8a15a78dce6ea70ed96250c80fe27449d6337965 100644 (file)
@@ -3,15 +3,12 @@
  * Device Tree Source for Netgear WNDAP620 and WNDAP660
  */
 
+#include <dt-bindings/leds/common.h>
 #include "apm82181.dtsi"
 
 / {
        aliases {
                serial0 = &UART0;
-               led-boot = &status;
-               led-failsafe = &failsafe;
-               led-running = &status;
-               led-upgrade = &status;
        };
 
        chosen {
        status = "okay";
 };
 
-&EBC0 {
-       ndfc@1,0 {
-               status = "okay";
-               /* 32 MiB SLC NAND Flash */
-               nand {
-                       nand-is-boot-medium;
+&ndfc {
+       status = "okay";
+       /* 32 MiB SLC NAND Flash */
+
+       nand {
+               nand-is-boot-medium;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
 
                        partition@0 {
                                label = "u-boot";
                                read-only;
                        };
 
-                       partition@110000,0 {
+                       partition@110000 {
                                label = "firmware";
                                reg = <0x00110000 0x01ac0000>;
-                       };
-
-                       partition@110000,1 {
-                               /*
-                                * The u-boot bootloader will look at this
-                                * offset (0x110000) for an uImage binary.
-                                */
-                               label = "kernel";
-                               reg = <0x00110000 0x005f0000>;
-                       };
 
-                       partition@700000 {
-                               label = "ubi";
-                               reg = <0x00700000 0x014d0000>;
+                               compatible = "fixed-partitions";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               partition@0 {
+                                       /*
+                                        * The u-boot bootloader will look at this
+                                        * offset (0x110000) for an uImage binary.
+                                        */
+                                       label = "kernel";
+                                       reg = <0x00000000 0x005f0000>;
+                               };
+
+                               partition@5f0000 {
+                                       label = "ubi";
+                                       reg = <0x005f0000 0x014d0000>;
+                               };
                        };
 
                        partition@1bd0000 {
        LEDS: leds {
                compatible = "gpio-leds";
 
-               status: power {
-                       label = "wndap6x0:green:power";
+               led-0 {
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_POWER;
                        gpios = <&GPIO0 18 GPIO_ACTIVE_HIGH>;
                };
 
-               failsafe: test {
-                       label = "wndap6x0:amber:test";
+               led-1 {
+                       color = <LED_COLOR_ID_AMBER>;
+                       function = LED_FUNCTION_FAULT;
                        gpios = <&GPIO0 17 GPIO_ACTIVE_HIGH>;
                        panic-indicator;
                };
 
-               activity {
-                       label = "wndap6x0:green:activity";
+               led-2 {
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <0>;
                        gpios = <&GPIO0 21 GPIO_ACTIVE_HIGH>;
                };
 
-               wlan2g {
-                       label = "wndap6x0:green:wlan2g";
+               led-3 {
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_WLAN;
+                       function-enumerator = <0>;
                        gpios = <&GPIO0 19 GPIO_ACTIVE_HIGH>;
                };
 
-               wlan5g {
-                       label = "wndap6x0:green:wlan5g";
+               led-4 {
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_WLAN;
+                       function-enumerator = <1>;
                        gpios = <&GPIO0 20 GPIO_ACTIVE_HIGH>;
                };
        };
        status = "okay";
 };
 
-&MSI {
-       status = "okay";
-};
-
 &IIC0 {
        status = "okay";
 
                read-only;
        };
 };
-