ipq806x: convert mtd-mac-address to nvmem implementation
authorAnsuel Smith <ansuelsmth@gmail.com>
Fri, 2 Apr 2021 21:38:11 +0000 (23:38 +0200)
committerPetr Štetiar <ynezz@true.cz>
Mon, 19 Jul 2021 12:51:22 +0000 (14:51 +0200)
Define nvmem-cells and convert mtd-mac-address to nvmem implementation.
The conversion is done with an automated script.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8062-wg2600hp3.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts

index 3e04618d5782cb4dd3127c4dba8dcf2b670e2059..c6feb71a8ef6861f067a54330a1f94b986f89400 100644 (file)
        phy-mode = "rgmii";
        qcom,id = <1>;
        mdiobus = <&mdio0>;
-       mtd-mac-address = <&factory 0x0>;
+       nvmem-cells = <&macaddr_factory_0>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
        phy-mode = "sgmii";
        qcom,id = <2>;
        mdiobus = <&mdio0>;
-       mtd-mac-address = <&factory 0x6>;
+       nvmem-cells = <&macaddr_factory_6>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
                full-duplex;
        };
 };
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_factory_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+};
index bbecdb7f0c1e0a24aad3dc00398d34995592d44b..daa7b148ccbd5371ba490532cd7ffa64b4509fac 100644 (file)
        pinctrl-0 = <&rgmii2_pins>;
        pinctrl-names = "default";
 
-       mtd-mac-address = <&defaultmac 0x8>;
+       nvmem-cells = <&macaddr_defaultmac_8>;
+       nvmem-cell-names = "mac-address";
        mac-address-increment = <1>;
 
        fixed-link {
        phy-mode = "sgmii";
        qcom,id = <2>;
 
-       mtd-mac-address = <&defaultmac 0x8>;
+       nvmem-cells = <&macaddr_defaultmac_8>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
 &adm_dma {
        status = "okay";
 };
+
+&defaultmac {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_defaultmac_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index 82535cc86bf5c0a68831a5932df48e28b598c562..6e022cece066a0b03b8f702be02b4e6058cfdbb9 100644 (file)
        pinctrl-0 = <&rgmii2_pins>;
        pinctrl-names = "default";
 
-       mtd-mac-address = <&art 6>;
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
        phy-mode = "sgmii";
        qcom,id = <2>;
 
-       mtd-mac-address = <&art 0>;
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
 &adm_dma {
        status = "okay";
 };
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_art_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+};
index 1dd45631532b1817fa7c4b1f86de95f32128bdc4..c7d26a0772fc96451a2d7fd9f77f59efb27cddf3 100644 (file)
        pinctrl-0 = <&rgmii2_pins>;
        pinctrl-names = "default";
 
-       mtd-mac-address = <&art 6>;
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
        phy-mode = "sgmii";
        qcom,id = <2>;
 
-       mtd-mac-address = <&art 0>;
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
 &adm_dma {
        status = "okay";
 };
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_art_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+};
index 71c4c3b1a3e8bd33176a238d3d444c6b8be33494..0f224804344b11670cbc0916bba4bc9d754a8f60 100644 (file)
        pinctrl-0 = <&rgmii2_pins>;
        pinctrl-names = "default";
 
-       mtd-mac-address = <&art 6>;
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
        phy-mode = "sgmii";
        qcom,id = <2>;
 
-       mtd-mac-address = <&art 0>;
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
                full-duplex;
        };
-};
\ No newline at end of file
+};
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_art_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+};
index d6ac1fef1de164ff37ea7a237d9bfdca84c8800c..a50204fee14674cb5dccfff6f68d4109df4200b2 100644 (file)
        phy-mode = "sgmii";
        qcom,id = <1>;
 
-       mtd-mac-address = <&eeprom 0x6>;
+       nvmem-cells = <&macaddr_eeprom_6>;
+       nvmem-cell-names = "mac-address";
 };
 
 &gmac2 {
        phy-mode = "sgmii";
        qcom,id = <2>;
 
-       mtd-mac-address = <&eeprom 0x0>;
+       nvmem-cells = <&macaddr_eeprom_0>;
+       nvmem-cell-names = "mac-address";
 };
 
 &pcie0 {
 &usb3_1 {
        status = "okay";
 };
+
+&eeprom {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_eeprom_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_eeprom_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+};
index 79b22ff0c361401dcc2d1222386fe37b93f75999..54ae07590af8041ff713284fb4eb83a5270ddaca 100644 (file)
        pinctrl-0 = <&rgmii2_pins>;
        pinctrl-names = "default";
 
-       mtd-mac-address = <&defaultmac 0>;
+       nvmem-cells = <&macaddr_defaultmac_0>;
+       nvmem-cell-names = "mac-address";
        mac-address-increment = <1>;
 
        fixed-link {
        phy-mode = "sgmii";
        qcom,id = <2>;
 
-       mtd-mac-address = <&defaultmac 0>;
+       nvmem-cells = <&macaddr_defaultmac_0>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
 &adm_dma {
        status = "okay";
 };
+
+&defaultmac {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_defaultmac_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+};
index 635e9fc8f944257afe64664240b7d670b2983742..7148fdf14317562e06a48744267b00a256283bc9 100644 (file)
        pinctrl-0 = <&rgmii2_pins>;
        pinctrl-names = "default";
 
-       mtd-mac-address = <&PRODUCTDATA 6>;
+       nvmem-cells = <&macaddr_PRODUCTDATA_6>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
        phy-mode = "sgmii";
        qcom,id = <2>;
 
-       mtd-mac-address = <&PRODUCTDATA 0>;
+       nvmem-cells = <&macaddr_PRODUCTDATA_0>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
                };
        };
 };
+
+&PRODUCTDATA {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_PRODUCTDATA_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_PRODUCTDATA_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+};
index 8c4e3b71e36e6ecbcbac24732b0cb834493f314e..1cf5e3452f98eaa55f713ac5ad4aa8f047948b89 100644 (file)
        pinctrl-0 = <&rgmii2_pins>;
        pinctrl-names = "default";
 
-       mtd-mac-address = <&ART 6>;
+       nvmem-cells = <&macaddr_ART_6>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
        phy-mode = "sgmii";
        qcom,id = <2>;
 
-       mtd-mac-address = <&ART 0>;
+       nvmem-cells = <&macaddr_ART_0>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
                        output-high;
                };
        };
-};
\ No newline at end of file
+};
+
+&ART {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_ART_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_ART_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+};
index 94442351730ec3fd3b6030d1722566eb763baa1f..b12e3481458454ee749b8021a962ee5228c698a2 100644 (file)
        pinctrl-0 = <&rgmii2_pins>;
        pinctrl-names = "default";
 
-       mtd-mac-address = <&art 6>;
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
        qcom,irq = <258>;
        mdiobus = <&mdio0>;
 
-       mtd-mac-address = <&art 0>;
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
                        compatible = "pci168c,0046";
                        reg = <0x00010000 0 0 0 0>;
 
-                       mtd-mac-address = <&art 6>;
+                       nvmem-cells = <&macaddr_art_6>;
+                       nvmem-cell-names = "mac-address";
                        mac-address-increment = <(1)>;
                };
        };
                        compatible = "pci168c,0046";
                        reg = <0x00010000 0 0 0 0>;
 
-                       mtd-mac-address = <&art 6>;
+                       nvmem-cells = <&macaddr_art_6>;
+                       nvmem-cell-names = "mac-address";
                        mac-address-increment = <(2)>;
                };
        };
 };
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_art_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+};
index 7342de4bec8e0de64f6c4979fe8c7f137b0c27ba..54356e2ff189ea43077fea76e3ca9662042870b5 100644 (file)
        phy-mode = "rgmii";
        qcom,id = <0>;
 
-       mtd-mac-address = <&ART 0x0>;
+       nvmem-cells = <&macaddr_ART_0>;
+       nvmem-cell-names = "mac-address";
 
        pinctrl-0 = <&rgmii2_pins>;
        pinctrl-names = "default";
        phy-mode = "sgmii";
        qcom,id = <1>;
 
-       mtd-mac-address = <&ART 0x6>;
+       nvmem-cells = <&macaddr_ART_6>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
        /delete-property/ perst-gpios;
        force_gen1 = <1>;
 };
+
+&ART {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_ART_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_ART_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+};