ramips: use fixed layout cell "mac-base" for Ubiquiti EdgeRouter X
authorRafał Miłecki <rafal@milecki.pl>
Fri, 14 Jul 2023 08:49:04 +0000 (10:49 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Fri, 14 Jul 2023 09:38:12 +0000 (11:38 +0200)
This drops a use of downstream "mac-address-increment".

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts
target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi

index c00eb52c7cc48ba04f3e74987b19b70979ac10c5..50a77c3877a055d39c1a14267dfb89aa62f0c781 100644 (file)
@@ -72,9 +72,8 @@
                        label = "eth5";
                        phy-handle = <&ephy7>;
                        phy-mode = "rgmii-rxid";
-                       nvmem-cells = <&macaddr_factory_22>;
+                       nvmem-cells = <&macaddr_factory_22 5>;
                        nvmem-cell-names = "mac-address";
-                       mac-address-increment = <5>;
                };
        };
 };
index 95cf3d2ccdecaff00a6be3e4db56f83dcd90090b..411bf6a85ac6e5b7219651aee6ade3a67e8cf310 100644 (file)
@@ -20,7 +20,7 @@
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_22>;
+       nvmem-cells = <&macaddr_factory_22 0>;
        nvmem-cell-names = "mac-address";
        label = "dsa";
 };
                port@1 {
                        status = "okay";
                        label = "eth1";
-                       nvmem-cells = <&macaddr_factory_22>;
+                       nvmem-cells = <&macaddr_factory_22 1>;
                        nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
                };
 
                port@2 {
                        status = "okay";
                        label = "eth2";
-                       nvmem-cells = <&macaddr_factory_22>;
+                       nvmem-cells = <&macaddr_factory_22 2>;
                        nvmem-cell-names = "mac-address";
-                       mac-address-increment = <2>;
                };
 
                port@3 {
                        status = "okay";
                        label = "eth3";
-                       nvmem-cells = <&macaddr_factory_22>;
+                       nvmem-cells = <&macaddr_factory_22 3>;
                        nvmem-cell-names = "mac-address";
-                       mac-address-increment = <3>;
                };
 
                port@4 {
                        status = "okay";
                        label = "eth4";
-                       nvmem-cells = <&macaddr_factory_22>;
+                       nvmem-cells = <&macaddr_factory_22 4>;
                        nvmem-cell-names = "mac-address";
-                       mac-address-increment = <4>;
                };
        };
 };
                };
 
                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 {
 &xhci {
        status = "disabled";
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_22: macaddr@22 {
-               reg = <0x22 0x6>;
-       };
-};