ramips: convert mtd-mac-address to nvmem implementation
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / mt7628an_asus_rt-n1x.dtsi
index 7e16f097ef1caeb4d3cdb5ad8f2780e1ac911074..3a2de12f6a875f74a8a515b91c52a57b44768e3d 100644 (file)
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: GPL-2.0-or-later
 
 #include "mt7628an.dtsi"
 
                        linux,code = <KEY_RESTART>;
                };
        };
+
+       leds {
+               compatible = "gpio-leds";
+
+               led_power: power {
+                       label = "green:power";
+                       gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+               };
+
+               wlan {
+                       label = "green:wlan";
+                       gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "phy0tpt";
+               };
+
+               wan {
+                       label = "green:wan";
+                       gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+               };
+
+               lan {
+                       label = "green:lan";
+                       gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+               };
+       };
 };
 
 &spi0 {
@@ -65,7 +90,8 @@
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x4>;
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
 };
 
 &esw {
 &ohci {
        status = "disabled";
 };
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_4: macaddr@4 {
+               reg = <0x4 0x6>;
+       };
+};