diff options
author | Ansuel Smith <ansuelsmth@gmail.com> | 2021-04-02 23:38:11 +0200 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2021-07-19 14:51:22 +0200 |
commit | 0458a8993ca1c1594bc19d247909324f157abeef (patch) | |
tree | 5e3fb05301150bdfc0062656c8449defec6363c9 | |
parent | d284e6ef0f06551bad5696f16f26e6ff27b065d4 (diff) | |
download | upstream-0458a8993ca1c1594bc19d247909324f157abeef.tar.gz upstream-0458a8993ca1c1594bc19d247909324f157abeef.tar.bz2 upstream-0458a8993ca1c1594bc19d247909324f157abeef.zip |
ipq806x: convert mtd-mac-address to nvmem implementation
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>
11 files changed, 196 insertions, 26 deletions
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8062-wg2600hp3.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8062-wg2600hp3.dts index 3e04618d57..c6feb71a8e 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8062-wg2600hp3.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8062-wg2600hp3.dts @@ -416,7 +416,8 @@ 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>; @@ -429,10 +430,25 @@ 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>; + }; +}; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi index bbecdb7f0c..daa7b148cc 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi @@ -288,7 +288,8 @@ 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 { @@ -302,7 +303,8 @@ 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>; @@ -313,3 +315,13 @@ &adm_dma { status = "okay"; }; + +&defaultmac { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_defaultmac_8: macaddr@8 { + reg = <0x8 0x6>; + }; +}; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts index 82535cc86b..6e022cece0 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts @@ -297,7 +297,8 @@ 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>; @@ -310,7 +311,8 @@ 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>; @@ -321,3 +323,17 @@ &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>; + }; +}; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts index 1dd4563153..c7d26a0772 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts @@ -269,7 +269,8 @@ 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>; @@ -282,7 +283,8 @@ 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>; @@ -298,3 +300,17 @@ &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>; + }; +}; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts index 71c4c3b1a3..0f22480434 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts @@ -299,7 +299,8 @@ 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>; @@ -312,10 +313,25 @@ 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>; + }; +}; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts index d6ac1fef1d..a50204fee1 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts @@ -250,7 +250,8 @@ phy-mode = "sgmii"; qcom,id = <1>; - mtd-mac-address = <&eeprom 0x6>; + nvmem-cells = <&macaddr_eeprom_6>; + nvmem-cell-names = "mac-address"; }; &gmac2 { @@ -261,7 +262,8 @@ phy-mode = "sgmii"; qcom,id = <2>; - mtd-mac-address = <&eeprom 0x0>; + nvmem-cells = <&macaddr_eeprom_0>; + nvmem-cell-names = "mac-address"; }; &pcie0 { @@ -299,3 +301,17 @@ &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>; + }; +}; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts index 79b22ff0c3..54ae07590a 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts @@ -323,7 +323,8 @@ 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 { @@ -337,7 +338,8 @@ 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>; @@ -348,3 +350,13 @@ &adm_dma { status = "okay"; }; + +&defaultmac { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_defaultmac_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts index 635e9fc8f9..7148fdf143 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts @@ -167,7 +167,8 @@ 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>; @@ -181,7 +182,8 @@ 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>; @@ -380,3 +382,17 @@ }; }; }; + +&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>; + }; +}; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts index 8c4e3b71e3..1cf5e3452f 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts @@ -229,7 +229,8 @@ 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>; @@ -243,7 +244,8 @@ 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>; @@ -463,4 +465,18 @@ 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>; + }; +}; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts index 9444235173..b12e348145 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts @@ -358,7 +358,8 @@ 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>; @@ -378,7 +379,8 @@ qcom,irq = <258>; mdiobus = <&mdio0>; - mtd-mac-address = <&art 0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; fixed-link { speed = <1000>; @@ -425,7 +427,8 @@ 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)>; }; }; @@ -445,8 +448,23 @@ 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>; + }; +}; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts index 7342de4bec..54356e2ff1 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts @@ -251,7 +251,8 @@ 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"; @@ -267,7 +268,8 @@ 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>; @@ -301,3 +303,17 @@ /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>; + }; +}; |