ramips: add support for Sercomm CPJ routers
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_ubnt_edgerouter-x.dtsi
index 04eb49bfa359fa5feaf1280466de924ac6fb1f0b..411bf6a85ac6e5b7219651aee6ade3a67e8cf310 100644 (file)
@@ -20,7 +20,8 @@
 };
 
 &gmac0 {
-       mtd-mac-address = <&factory 0x22>;
+       nvmem-cells = <&macaddr_factory_22 0>;
+       nvmem-cell-names = "mac-address";
        label = "dsa";
 };
 
                port@1 {
                        status = "okay";
                        label = "eth1";
-                       mtd-mac-address = <&factory 0x22>;
-                       mtd-mac-address-increment = <1>;
+                       nvmem-cells = <&macaddr_factory_22 1>;
+                       nvmem-cell-names = "mac-address";
                };
 
                port@2 {
                        status = "okay";
                        label = "eth2";
-                       mtd-mac-address = <&factory 0x22>;
-                       mtd-mac-address-increment = <2>;
+                       nvmem-cells = <&macaddr_factory_22 2>;
+                       nvmem-cell-names = "mac-address";
                };
 
                port@3 {
                        status = "okay";
                        label = "eth3";
-                       mtd-mac-address = <&factory 0x22>;
-                       mtd-mac-address-increment = <3>;
+                       nvmem-cells = <&macaddr_factory_22 3>;
+                       nvmem-cell-names = "mac-address";
                };
 
                port@4 {
                        status = "okay";
                        label = "eth4";
-                       mtd-mac-address = <&factory 0x22>;
-                       mtd-mac-address-increment = <4>;
+                       nvmem-cells = <&macaddr_factory_22 4>;
+                       nvmem-cell-names = "mac-address";
                };
        };
 };
                };
 
                factory: partition@e0000 {
+                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0xe0000 0x60000>;
+
+                       nvmem-layout {
+                               compatible = "fixed-layout";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               macaddr_factory_22: macaddr@22 {
+                                       compatible = "mac-base";
+                                       reg = <0x22 0x6>;
+                                       #nvmem-cell-cells = <1>;
+                               };
+                       };
                };
 
                partition@140000 {
 
 &state_default {
        gpio {
-               groups = "uart2", "uart3", "pcie", "rgmii2", "jtag";
+               groups = "uart2", "uart3", "pcie", "jtag";
                function = "gpio";
        };
 };