ramips: convert mtd-mac-address to nvmem for UniElec devices
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Thu, 19 Aug 2021 22:18:12 +0000 (00:18 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Fri, 20 Aug 2021 16:13:55 +0000 (18:13 +0200)
Convert this series by moving the definitions to the individual
devices.

Now all devices on ramips are converted.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts
target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi
target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts
target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts
target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi
target/linux/ramips/dts/mt7628an_unielec_u7628-01-16m.dts
target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi

index d063f08711b095118b0367d6eed54db67317ba7d..84172cdd175a9da23a401ba2c96b13580d8f67be 100644 (file)
                };
        };
 };
+
+&gmac0 {
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wan {
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_e000: macaddr@e000 {
+               reg = <0xe000 0x6>;
+       };
+};
index b9b16fbb4bbc72289c2659c124db7f810640a99f..1d070c7909f9290aaed6c915aed6a1d35779f21f 100644 (file)
        };
 };
 
-&gmac0 {
-       mtd-mac-address = <&factory 0xe000>;
-};
-
 &switch0 {
        ports {
-               port@0 {
+               wan: port@0 {
                        status = "okay";
                        label = "wan";
-                       mtd-mac-address = <&factory 0xe000>;
-                       mac-address-increment = <1>;
                };
 
                port@1 {
index e9789cff5d44c41eb8595743d11d0ee20c95338d..41aa2dce5e6c60fc2884ecd46db65d3c9b1a7c50 100644 (file)
                };
        };
 };
+
+&gmac0 {
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wan {
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_e000: macaddr@e000 {
+               reg = <0xe000 0x6>;
+       };
+};
index 74e4d6625b54d1b9a6e45707fc9f21bfc0b45c6c..a66969a8035c6614b4a090361649fc51f94901f4 100644 (file)
                };
        };
 };
+
+&gmac0 {
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wan {
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_e000: macaddr@e000 {
+               reg = <0xe000 0x6>;
+       };
+};
index 29e62517214791a5145940904add1b73c219b9a9..8dad53812f1ee41ceb4a64df0912ec292012a287 100644 (file)
        status = "okay";
 };
 
-&gmac0 {
-       mtd-mac-address = <&factory 0xe000>;
-};
-
 &switch0 {
        ports {
                port@0 {
                        label = "lan4";
                };
 
-               port@4 {
+               wan: port@4 {
                        status = "okay";
                        label = "wan";
-                       mtd-mac-address = <&factory 0xe000>;
-                       mac-address-increment = <1>;
                };
        };
 };
index c25a31f0abcbaa2f327c2d61b17c44570f3b5685..8037b3a304aff21b547188e6f35d43ad104ac7d7 100644 (file)
                };
        };
 };
+
+&ethernet {
+       nvmem-cells = <&macaddr_factory_28>;
+       nvmem-cell-names = "mac-address";
+};
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_28: macaddr@28 {
+               reg = <0x28 0x6>;
+       };
+};
index 805d5debf58e42b6d04ce4164e2e6245c411b658..f25e28abd818654c93e03b3ad2c66cef5583572b 100644 (file)
        status = "okay";
 };
 
-&ethernet {
-       mtd-mac-address = <&factory 0x28>;
-};
-
 &wmac {
        status = "okay";