octeon: convert to new LED color/function format where possible
[openwrt/staging/nbd.git] / target / linux / octeon / files / arch / mips / boot / dts / cavium-octeon / cn7130_ubnt_edgerouter-e300.dtsi
index 7d4c7f0de9d2e57ace4e26ea32a844bbe7c11943..0da92abca8b54193502301940266c1e52c3306e0 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
        compatible = "ubnt,edgerouter-e300", "cavium,cn7130";
                compatible = "gpio-leds";
 
                led_power_blue: power_blue {
-                       label = "blue:power";
-                       gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_BLUE>;
+                       gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
                };
 
                led_power_white: power_white {
-                       label = "white:power";
-                       gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_WHITE>;
+                       gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
                };
        };
 
                reg = <0>;
                spi-max-frequency = <25000000>;
 
-               partition@0 {
-                       label = "boot0";
-                       read-only;
-                       reg = <0x000000 0x300000>;
-               };
-
-               partition@300000 {
-                       label = "dummy";
-                       read-only;
-                       reg = <0x300000 0x100000>;
-               };
-
-               eeprom: partition@400000 {
-                       label = "eeprom";
-                       read-only;
-                       reg = <0x400000 0x10000>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "boot0";
+                               read-only;
+                               reg = <0x000000 0x300000>;
+                       };
+
+                       partition@300000 {
+                               label = "dummy";
+                               read-only;
+                               reg = <0x300000 0x100000>;
+                       };
+
+                       partition@400000 {
+                               label = "eeprom";
+                               read-only;
+                               reg = <0x400000 0x10000>;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_eeprom_0: macaddr@0 {
+                                               compatible = "mac-base";
+                                               reg = <0x0 0x6>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+                               };
+                       };
                };
        };
 };
                        status = "okay";
                        phy-mode = "sgmii";
                        phy-handle = <&phy5>;
-                       mtd-mac-address = <&eeprom 0>;
-                       mtd-mac-address-increment = <(1)>;
+                       nvmem-cells = <&macaddr_eeprom_0 1>;
+                       nvmem-cell-names = "mac-address";
                };
 
                ethernet@2 {
                        status = "okay";
                        phy-mode = "sgmii";
                        phy-handle = <&phy6>;
-                       mtd-mac-address = <&eeprom 0>;
-                       mtd-mac-address-increment = <(2)>;
+                       nvmem-cells = <&macaddr_eeprom_0 2>;
+                       nvmem-cell-names = "mac-address";
                };
 
                ethernet@3 {
                        status = "okay";
                        phy-mode = "sgmii";
                        phy-handle = <&phy7>;
-                       mtd-mac-address = <&eeprom 0>;
-                       mtd-mac-address-increment = <(3)>;
+                       nvmem-cells = <&macaddr_eeprom_0 3>;
+                       nvmem-cell-names = "mac-address";
                };
        };
 };