ramips: clean up useless dts partition labels
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7620a_xiaomi_miwifi-mini.dts
index e8ff02f2abc99dec0c0ad7a761b7448fd5ac19fd..c0141b196dabbfdbfe3de43e396800f504b46d15 100644 (file)
@@ -1,19 +1,19 @@
-/dts-v1/;
-
 #include "mt7620a.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
        compatible = "xiaomi,miwifi-mini", "ralink,mt7620a-soc";
        model = "Xiaomi MiWiFi Mini";
 
        aliases {
-               led-boot = &led_blue;
-               led-failsafe = &led_blue;
+               led-boot = &led_yellow;
+               led-failsafe = &led_red;
                led-running = &led_blue;
                led-upgrade = &led_blue;
+               label-mac-device = &ethernet;
        };
 
        chosen {
                compatible = "gpio-leds";
 
                led_blue: blue {
-                       label = "miwifi-mini:blue:status";
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_BLUE>;
                        gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
-                       default-state = "on";
                };
 
-               yellow {
-                       label = "miwifi-mini:yellow:status";
+               led_yellow: yellow {
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_YELLOW>;
                        gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
                };
 
-               red {
-                       label = "miwifi-mini:red:status";
+               led_red: red {
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_RED>;
                        gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
                };
+
+               wan {
+                       function = LED_FUNCTION_WAN;
+                       color = <LED_COLOR_ID_GREEN>;
+                       gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+               };
+
+               lan1 {
+                       label = "green:lan1";
+                       gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+               };
+
+               lan2 {
+                       label = "green:lan2";
+                       gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+               };
        };
 
        keys {
-               compatible = "gpio-keys-polled";
-               poll-interval = <20>;
+               compatible = "gpio-keys";
 
                reset {
                        label = "reset";
        };
 };
 
-&gpio0 {
-       status = "okay";
-};
-
 &gpio1 {
        status = "okay";
 };
 &spi0 {
        status = "okay";
 
-       m25p80@0 {
+       flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
-               spi-max-frequency = <10000000>;
+               spi-max-frequency = <70000000>;
+               m25p,fast-read;
 
                partitions {
                        compatible = "fixed-partitions";
                        partition@0 {
                                label = "u-boot";
                                reg = <0x0 0x30000>;
+                               read-only;
                        };
 
                        partition@30000 {
                                label = "u-boot-env";
                                reg = <0x30000 0x10000>;
-                               read-only;
                        };
 
-                       factory: partition@40000 {
+                       partition@40000 {
                                label = "factory";
                                reg = <0x40000 0x10000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       eeprom_factory_0: eeprom@0 {
+                                               reg = <0x0 0x200>;
+                                       };
+
+                                       eeprom_factory_8000: eeprom@8000 {
+                                               reg = <0x8000 0x200>;
+                                       };
+
+                                       macaddr_factory_28: macaddr@28 {
+                                               reg = <0x28 0x6>;
+                                       };
+                               };
                        };
 
                        partition@50000 {
 };
 
 &ethernet {
-       pinctrl-names = "default";
-       pinctrl-0 = <&ephy_pins>;
-       mtd-mac-address = <&factory 0x28>;
+       nvmem-cells = <&macaddr_factory_28>;
+       nvmem-cell-names = "mac-address";
+
        mediatek,portmap = "llllw";
 };
 
 &wmac {
-       ralink,mtd-eeprom = <&factory 0>;
-       pinctrl-names = "default";
+       pinctrl-names = "default", "pa_gpio";
        pinctrl-0 = <&pa_pins>;
+       pinctrl-1 = <&pa_gpio_pins>;
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };
 
 &pcie {
 &pcie0 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
+               nvmem-cells = <&eeprom_factory_8000>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
 
-&pinctrl {
-       state_default: pinctrl0 {
-               gpio {
-                       ralink,group = "i2c", "rgmii1";
-                       ralink,function = "gpio";
-               };
+&state_default {
+       gpio {
+               groups = "ephy", "i2c", "rgmii1";
+               function = "gpio";
        };
 };