ramips: convert mtd-mac-address to nvmem implementation
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_netgear_ex3x00_ex61xx.dtsi
index 1f255c76b2bd2a7c2152e8cd03fc61958545f51a..6884bf7943af86de1f0f4ac3f26ab7da21a69bf8 100644 (file)
@@ -1,11 +1,14 @@
+#include "mt7620a.dtsi"
+
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
-#include "mt7620a.dtsi"
-
 / {
-       chosen {
-               bootargs = "console=ttyS0,57600";
+       aliases {
+               led-boot = &led_power_amber;
+               led-failsafe = &led_power_amber;
+               led-running = &led_power_green;
+               led-upgrade = &led_power_green;
        };
 
        keys {
                        linux,code = <KEY_WPS_BUTTON>;
                };
        };
-};
 
-&gpio0 {
-       status = "okay";
+       leds {
+               compatible = "gpio-leds";
+
+               led_power_green: power_green {
+                       label = "green:power";
+                       gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
+                       default-state = "on";
+               };
+
+               led_power_amber: power_amber {
+                       label = "amber:power";
+                       gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
+               };
+
+               router_green {
+                       label = "green:router";
+                       gpios = <&gpio2 25 GPIO_ACTIVE_LOW>;
+               };
+
+               router_red {
+                       label = "red:router";
+                       gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
+               };
+
+               device_green {
+                       label = "green:device";
+                       gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
+               };
+
+               device_red {
+                       label = "red:device";
+                       gpios = <&gpio2 21 GPIO_ACTIVE_LOW>;
+               };
+
+               wps {
+                       label = "green:wps";
+                       gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
+               };
+       };
 };
 
 &gpio2 {
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x28>;
+       nvmem-cells = <&macaddr_factory_28>;
+       nvmem-cell-names = "mac-address";
 };
 
 &wmac {
                function = "gpio";
        };
 };
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_28: macaddr@28 {
+               reg = <0x28 0x6>;
+       };
+};