ramips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7620n_zbtlink_zbt-wa05.dts
index f441e0fcb501f4ecb96a378cfbe84c5f734eda0b..c24c60abacd55157244c93dd5e7efdee7da0cf72 100644 (file)
@@ -1,9 +1,8 @@
-/dts-v1/;
-
 #include "mt7620n.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
        compatible = "zbtlink,zbt-wa05", "ralink,mt7620n-soc";
                compatible = "gpio-leds";
 
                led_power: power {
-                       label = "zbt-wa05:blue:power";
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_BLUE>;
                        gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
                };
 
                usb {
-                       label = "zbt-wa05:blue:usb";
+                       function = LED_FUNCTION_USB;
+                       color = <LED_COLOR_ID_BLUE>;
                        gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
                        trigger-sources = <&ohci_port1>, <&ehci_port1>;
                        linux,default-trigger = "usbport";
                };
 
                air {
-                       label = "zbt-wa05:blue:air";
+                       label = "blue:air";
                        gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
                };
        };
        status = "okay";
 };
 
-&gpio2 {
-       status = "okay";
-};
-
 &gpio3 {
        status = "okay";
 };
@@ -67,7 +64,7 @@
 &spi0 {
        status = "okay";
 
-       en25q64@0 {
+       flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <10000000>;
                                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>;
+                                       };
+
+                                       macaddr_factory_4: macaddr@4 {
+                                               reg = <0x4 0x6>;
+                                       };
+                               };
                        };
 
                        partition@50000 {
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x4>;
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+
        mediatek,portmap = "wllll";
 };
 
 &wmac {
-       ralink,mtd-eeprom = <&factory 0>;
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };
 
 &state_default {