ramips: use fixed layout cell "mac-base" for Ubiquiti EdgeRouter X
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_alfa-network_quad-e4g.dts
index 6ac9e337fcbe7ab60fb38a305f9d95ff17f7e63d..cc048d44879be639d42477eacc36dc8410e0be75 100644 (file)
@@ -1,5 +1,4 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-/dts-v1/;
 
 #include "mt7621.dtsi"
 
                compatible = "gpio-leds";
 
                led_system: system {
-                       label = "quad-e4g:red:system";
+                       label = "red:system";
                        gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
                        default-state = "keep";
                };
 
                m2 {
-                       label = "quad-e4g:orange:m2";
+                       label = "orange:m2";
                        gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
                };
 
                minipcie0 {
-                       label = "quad-e4g:orange:minipcie0";
+                       label = "orange:minipcie0";
                        gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
                };
 
                minipcie1 {
-                       label = "quad-e4g:orange:minipcie1";
+                       label = "orange:minipcie1";
                        gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
                };
 
                minipcie2 {
-                       label = "quad-e4g:orange:minipcie2";
+                       label = "orange:minipcie2";
                        gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
                };
        };
        };
 };
 
+&ethernet {
+       pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
+};
+
 &gmac0 {
-       mtd-mac-address = <&factory 0xe000>;
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
                port@4 {
                        status = "okay";
                        label = "wan";
-                       mtd-mac-address = <&factory 0xe006>;
+                       nvmem-cells = <&macaddr_factory_e006>;
+                       nvmem-cell-names = "mac-address";
                };
        };
 };
 &uartlite3 {
        status = "okay";
 };
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_e000: macaddr@e000 {
+               reg = <0xe000 0x6>;
+       };
+
+       macaddr_factory_e006: macaddr@e006 {
+               reg = <0xe006 0x6>;
+       };
+};