ramips: move partitions into partition table node
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / AI-BR100.dts
index b21e4c25ca003a29e34abb994a5d3d06e44dec1b..1068179a28464beb11279b18e116dce245bc4167 100644 (file)
@@ -2,35 +2,38 @@
 
 #include "mt7620a.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
 / {
-       compatible = "AI-BR100", "ralink,mt7620a-soc";
+       compatible = "aigale,ai-br100", "ralink,mt7620a-soc";
        model = "Aigale Ai-BR100";
 
+       aliases {
+               led-status = &led_wlan;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
 
                wan {
                        label = "ai-br100:blue:wan";
-                       gpios = <&gpio2 4 1>;
+                       gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
                };
 
-               wlan {
+               led_wlan: wlan {
                        label = "ai-br100:blue:wlan";
-                       gpios = <&gpio3 0 1>;
+                       gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
                };
        };
 
        gpio-keys-polled {
                compatible = "gpio-keys-polled";
-               #address-cells = <1>;
-               #size-cells = <0>;
                poll-interval = <20>;
 
                reset {
                        label = "reset";
-                       gpios = <&gpio0 12 1>;
+                       gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };
        };
        status = "okay";
 
        m25p80@0 {
-               #address-cells = <1>;
-               #size-cells = <1>;
                compatible = "jedec,spi-nor";
                reg = <0 0>;
                spi-max-frequency = <10000000>;
 
-               partition@0 {
-                       label = "u-boot";
-                       reg = <0x0 0x20000>;
-                       read-only;
-               };
-
-               partition@20000 {
-                       label = "u-boot-env";
-                       reg = <0x20000 0x10000>;
-                       read-only;
-               };
-
-               factory: partition@30000 {
-                       label = "factory";
-                       reg = <0x30000 0x10000>;
-                       read-only;
-               };
-
-               partition@40000 {
-                       label = "firmware";
-                       reg = <0x40000 0x7c0000>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "u-boot";
+                               reg = <0x0 0x20000>;
+                               read-only;
+                       };
+
+                       partition@20000 {
+                               label = "u-boot-env";
+                               reg = <0x20000 0x10000>;
+                               read-only;
+                       };
+
+                       factory: partition@30000 {
+                               label = "factory";
+                               reg = <0x30000 0x10000>;
+                               read-only;
+                       };
+
+                       partition@40000 {
+                               label = "firmware";
+                               reg = <0x40000 0x7c0000>;
+                       };
                };
        };
 };
 };
 
 &ethernet {
-       pinctrl-names = "default";
-       pinctrl-0 = <&ephy_pins>;
        mtd-mac-address = <&factory 0x4>;
        mediatek,portmap = "llllw";
 };