From 939c0030dba2742e17e18b68999e23317796ace8 Mon Sep 17 00:00:00 2001 From: Ansuel Smith Date: Fri, 2 Apr 2021 23:40:10 +0200 Subject: [PATCH] lantiq: 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 --- .../mips/boot/dts/lantiq/ar9_avm_fritz7312.dts | 13 ++++++++++++- .../mips/boot/dts/lantiq/ar9_avm_fritz7320.dts | 13 ++++++++++++- .../dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts | 13 ++++++++++++- .../dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi | 13 ++++++++++++- .../dts/lantiq/danube_arcadyan_arv4519pw.dts | 13 ++++++++++++- .../dts/lantiq/danube_arcadyan_arv4520pw.dts | 13 ++++++++++++- .../dts/lantiq/danube_arcadyan_arv4525pw.dts | 13 ++++++++++++- .../dts/lantiq/danube_arcadyan_arv452cqw.dts | 13 ++++++++++++- .../dts/lantiq/danube_arcadyan_arv7506pw11.dts | 16 ++++++++++++++-- .../dts/lantiq/danube_arcadyan_arv7510pw22.dts | 13 ++++++++++++- .../dts/lantiq/danube_arcadyan_arv7518pw.dts | 16 ++++++++++++++-- .../dts/lantiq/danube_arcadyan_arv7519pw.dts | 13 ++++++++++++- .../dts/lantiq/danube_arcadyan_arv7525pw.dts | 13 ++++++++++++- .../dts/lantiq/danube_arcadyan_arv752dpw.dts | 16 ++++++++++++++-- .../dts/lantiq/danube_arcadyan_arv752dpw22.dts | 16 ++++++++++++++-- .../dts/lantiq/danube_arcadyan_arv8539pw22.dts | 16 ++++++++++++++-- .../boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts | 13 ++++++++++++- .../dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi | 16 ++++++++++++++-- .../boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi | 16 ++++++++++++++-- .../mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi | 16 ++++++++++++++-- .../mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi | 16 ++++++++++++++-- 21 files changed, 270 insertions(+), 30 deletions(-) diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts index 19cb54db6ba..8d3d686f463 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts @@ -96,7 +96,8 @@ &gsw { phy-mode = "rmii"; phy-handle = <&phy0>; - mtd-mac-address = <&ath9k_cal 0xa91>; + nvmem-cells = <&macaddr_ath9k_cal_a91>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-2)>; mdio-bus { @@ -166,3 +167,13 @@ qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */ }; }; + +&ath9k_cal { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_ath9k_cal_a91: macaddr@a91 { + reg = <0xa91 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts index 4d7986f0a57..f3b4e5e4f53 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts @@ -97,7 +97,8 @@ &gsw { phy-mode = "mii"; - mtd-mac-address = <&ath9k_cal 0xa91>; + nvmem-cells = <&macaddr_ath9k_cal_a91>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-2)>; }; @@ -193,3 +194,13 @@ status = "okay"; vbus-supply = <&usb1_vbus>; }; + +&ath9k_cal { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_ath9k_cal_a91: macaddr@a91 { + reg = <0xa91 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts index e240f0c5763..8eaf566b261 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts @@ -135,7 +135,8 @@ &gsw { phy-mode = "rgmii"; - mtd-mac-address = <&boardconfig 0x10024>; + nvmem-cells = <&macaddr_boardconfig_10024>; + nvmem-cell-names = "mac-address"; }; &pci0 { @@ -193,3 +194,13 @@ status = "okay"; vbus-supply = <&usb_vbus>; }; + +&boardconfig { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_boardconfig_10024: macaddr@10024 { + reg = <0x10024 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi index 48fe88fea82..b5e4537838b 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi @@ -124,7 +124,8 @@ &gsw { phy-mode = "mii"; - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; }; &localbus { @@ -198,3 +199,13 @@ status = "okay"; gpios = <&gpio 31 GPIO_ACTIVE_HIGH>; }; + +&boardconfig { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_boardconfig_16: macaddr@16 { + reg = <0x16 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts index 18a2bfbe83d..35caf647a71 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts @@ -132,7 +132,8 @@ &gsw { phy-mode = "mii"; - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; }; &localbus { @@ -201,3 +202,13 @@ status = "okay"; gpios = <&gpio 31 GPIO_ACTIVE_HIGH>; }; + +&boardconfig { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_boardconfig_16: macaddr@16 { + reg = <0x16 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts index 4c76350bdcf..9a1c8b1bcb2 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts @@ -144,7 +144,8 @@ &gsw { /* gpiomm 10 - switch */ phy-mode = "rmii"; - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; }; &localbus { @@ -218,3 +219,13 @@ gpios = <&gpio 31 GPIO_ACTIVE_HIGH &gpiomm 7 GPIO_ACTIVE_HIGH>; }; + +&boardconfig { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_boardconfig_16: macaddr@16 { + reg = <0x16 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts index df44abf92f5..650c8872c95 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts @@ -93,7 +93,8 @@ /* #define ARV4525PW_PHYRESET 13 */ &gsw { phy-mode = "mii"; - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; }; &localbus { @@ -147,3 +148,13 @@ status = "okay"; gpios = <&gpio 31 GPIO_ACTIVE_HIGH>; }; + +&boardconfig { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_boardconfig_16: macaddr@16 { + reg = <0x16 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts index bc04677d46d..dddf904af4c 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts @@ -162,7 +162,8 @@ */ &gsw { phy-mode = "rmii"; - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; }; &localbus { @@ -236,3 +237,13 @@ gpios = <&gpio 31 GPIO_ACTIVE_HIGH &gpiomm 7 GPIO_ACTIVE_HIGH>; }; + +&boardconfig { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_boardconfig_16: macaddr@16 { + reg = <0x16 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts index f0b288c6ba9..bb82da0870f 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts @@ -100,7 +100,8 @@ /* GPIO 19: switch reset */ &gsw { phy-mode = "rmii"; - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; }; &localbus { @@ -154,7 +155,18 @@ reg = <0x7000 0 0 0 0>; ralink,mtd-eeprom = <&boardconfig 0x410>; ralink,mtd-eeprom-swap; - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; + +&boardconfig { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_boardconfig_16: macaddr@16 { + reg = <0x16 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts index 120dca1834f..9d5595b6075 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts @@ -117,7 +117,8 @@ &gsw { /* Switch reset 19 */ phy-mode = "mii"; - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; }; &localbus { @@ -194,3 +195,13 @@ status = "okay"; gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; }; + +&boardconfig { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_boardconfig_16: macaddr@16 { + reg = <0x16 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts index ca0cf107dd0..a327635c331 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts @@ -149,7 +149,8 @@ */ &gsw { phy-mode = "mii"; - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; }; &localbus { @@ -212,7 +213,8 @@ compatible = "pci168c,0029"; reg = <0x7000 0 0 0 0>; qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */ - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -229,3 +231,13 @@ &vmmc { status = "okay"; }; + +&boardconfig { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_boardconfig_16: macaddr@16 { + reg = <0x16 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts index 839af437739..c48c9c0e7ba 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts @@ -144,7 +144,8 @@ &gsw { phy-mode = "mii"; - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; }; &localbus { @@ -213,3 +214,13 @@ &vmmc { status = "okay"; }; + +&boardconfig { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_boardconfig_16: macaddr@16 { + reg = <0x16 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts index 1f1adc4738b..12de92ec530 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts @@ -86,7 +86,8 @@ &gsw { phy-mode = "mii"; - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; }; &localbus { @@ -145,3 +146,13 @@ status = "okay"; gpios = <&gpio 31 GPIO_ACTIVE_HIGH>; }; + +&boardconfig { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_boardconfig_16: macaddr@16 { + reg = <0x16 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts index d0f5c38b392..e91c291e9a7 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts @@ -156,7 +156,8 @@ &gsw { phy-mode = "rmii"; - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; }; &localbus { @@ -220,7 +221,8 @@ wifi0: wifi@1814,0601 { compatible = "pci1814,0601"; reg = <0x7000 0 0 0 0>; - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; ralink,mtd-eeprom = <&boardconfig 0x410>; ralink,mtd-eeprom-swap; }; @@ -239,3 +241,13 @@ status = "okay"; gpios = <&gpiomm 1 GPIO_ACTIVE_HIGH>; }; + +&boardconfig { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_boardconfig_16: macaddr@16 { + reg = <0x16 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts index 00ac016a426..ea932d44b65 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts @@ -171,7 +171,8 @@ &gsw { phy-mode = "mii"; - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; }; &localbus { @@ -242,7 +243,8 @@ reg = <0x7000 0 0 0 0>; ralink,mtd-eeprom = <&boardconfig 0x410>; ralink,mtd-eeprom-swap; - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; }; usb@0f,0 { @@ -283,3 +285,13 @@ status = "okay"; gpios = <&gpiomm 1 GPIO_ACTIVE_HIGH>; }; + +&boardconfig { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_boardconfig_16: macaddr@16 { + reg = <0x16 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts index 3b9f6c24618..83a303b9e82 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts @@ -107,7 +107,8 @@ &gsw { phy-mode = "mii"; - mtd-mac-address = <&art 0x16>; + nvmem-cells = <&macaddr_art_16>; + nvmem-cell-names = "mac-address"; }; &localbus { @@ -159,7 +160,8 @@ compatible = "pci168c,0029"; reg = <0x7000 0 0 0 0>; qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */ - mtd-mac-address = <&art 0x16>; + nvmem-cells = <&macaddr_art_16>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -177,3 +179,13 @@ status = "okay"; gpios = <&gpio 31 GPIO_ACTIVE_HIGH>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_16: macaddr@16 { + reg = <0x16 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts index 4b7343207ee..343f3533d8b 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts @@ -94,7 +94,8 @@ }; ð0 { - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; }; &gphy0 { @@ -233,3 +234,13 @@ status = "okay"; vbus-supply = <&usb_vbus>; }; + +&boardconfig { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_boardconfig_16: macaddr@16 { + reg = <0x16 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi index 7a277892bbb..1158aa371ec 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi @@ -107,7 +107,8 @@ }; ð0 { - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; }; &gphy0 { @@ -219,7 +220,8 @@ reg = <0x7000 0 0 0 0>; ralink,mtd-eeprom = <&boardconfig 0x410>; ralink,mtd-eeprom-swap; - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -243,3 +245,13 @@ &gpio 31 GPIO_ACTIVE_HIGH //still unknown &gpio 3 GPIO_ACTIVE_HIGH>; //reset_slic? }; + +&boardconfig { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_boardconfig_16: macaddr@16 { + reg = <0x16 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi index c8dd817b6c8..381c3fc27e2 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi @@ -127,7 +127,8 @@ }; ð0 { - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -238,7 +239,8 @@ reg = <0x7000 0 0 0 0>; ralink,mtd-eeprom = <&boardconfig 0x410>; ralink,mtd-eeprom-swap; - mtd-mac-address = <&boardconfig 0x16>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -278,3 +280,13 @@ &gpio 31 GPIO_ACTIVE_HIGH //still unknown &gpio 3 GPIO_ACTIVE_HIGH>; //reset_slic? }; + +&boardconfig { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_boardconfig_16: macaddr@16 { + reg = <0x16 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi index 77494108160..bdf98fe98e4 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi @@ -110,7 +110,8 @@ }; ð0 { - mtd-mac-address = <&ath9k_cal 0xf100>; + nvmem-cells = <&macaddr_ath9k_cal_f100>; + nvmem-cell-names = "mac-address"; }; &gphy0 { @@ -203,7 +204,8 @@ gpio-controller; qca,no-eeprom; qca,disable-5ghz; - mtd-mac-address = <&ath9k_cal 0xf100>; + nvmem-cells = <&macaddr_ath9k_cal_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; @@ -266,3 +268,13 @@ status = "okay"; vbus-supply = <&usb_vbus>; }; + +&ath9k_cal { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_ath9k_cal_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi index 67edc01d90b..e37f1ab37c8 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi @@ -100,7 +100,8 @@ }; ð0 { - mtd-mac-address = <&romfile 0xf100>; + nvmem-cells = <&macaddr_romfile_f100>; + nvmem-cell-names = "mac-address"; }; &gphy0 { @@ -191,7 +192,8 @@ mediatek,mtd-eeprom = <&radio 0x0000>; big-endian; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&romfile 0xf100>; + nvmem-cells = <&macaddr_romfile_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; @@ -277,3 +279,13 @@ status = "okay"; vbus-supply = <&usb_vbus>; }; + +&romfile { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_romfile_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; -- 2.30.2