diff options
Diffstat (limited to 'target/linux/ramips')
319 files changed, 4213 insertions, 434 deletions
diff --git a/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts b/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts index ba251c2656..1142746c7a 100644 --- a/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts +++ b/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts @@ -103,7 +103,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -111,3 +112,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts b/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts index 752a940cd8..19b6d5fdfb 100644 --- a/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts +++ b/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts @@ -55,7 +55,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -148,3 +149,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts b/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts index 0991ae8447..09afc018e8 100644 --- a/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts +++ b/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts @@ -126,7 +126,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &gpio1 { @@ -209,3 +210,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts b/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts index ca58d780f4..a90f9b2775 100644 --- a/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts +++ b/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts @@ -103,7 +103,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &gpio1 { @@ -178,3 +179,13 @@ &wmac { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi b/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi index 423b4edc6b..f61843095d 100644 --- a/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi +++ b/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi @@ -122,7 +122,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -134,3 +135,13 @@ &pcie { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts b/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts index fc2b74db2a..b95a428656 100644 --- a/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts +++ b/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts @@ -117,7 +117,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -144,3 +145,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts index 93a09f99c3..f71545815d 100644 --- a/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts +++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts @@ -139,7 +139,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &mdio_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@5 { status = "okay"; @@ -173,3 +174,13 @@ ieee80211-freq-limit = <5000000 6000000>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts index 95152bc41a..7c8caa5066 100644 --- a/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts +++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts @@ -139,7 +139,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -149,3 +150,13 @@ pinctrl-names = "default"; pinctrl-0 = <&pa_pins>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts index 226967763b..d943e3abef 100644 --- a/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts +++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts @@ -139,7 +139,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -159,3 +160,13 @@ ralink,mtd-eeprom = <&factory 0x8000>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi index b1a50bb711..3174b98bbf 100644 --- a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi +++ b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi @@ -127,7 +127,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -141,7 +142,8 @@ pinctrl-0 = <&pa_pins>; ralink,mtd-eeprom = <&factory 0x0>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &pcie { @@ -153,7 +155,18 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts b/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts index 0c9f56875e..68b733cade 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts @@ -168,7 +168,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -176,3 +177,13 @@ pinctrl-names = "default"; pinctrl-0 = <&pa_pins>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts index 5b8d883dd5..2b8ad2759c 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts @@ -114,7 +114,8 @@ &pcie0 { mt76x0e@0,0 { reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&config 0xe490>; + nvmem-cells = <&macaddr_config_e490>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(2)>; mediatek,mtd-eeprom = <&config 0xe05d>; }; @@ -126,3 +127,13 @@ function = "gpio"; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_e490: macaddr@e490 { + reg = <0xe490 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts index 2e755b6620..c63a85dd88 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts @@ -142,7 +142,8 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&config 0xe496>; + nvmem-cells = <&macaddr_config_e496>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(2)>; mediatek,mtd-eeprom = <&config 0xe083>; @@ -188,3 +189,13 @@ mediatek,port4-gmac; mediatek,ephy-base = /bits/ 8 <8>; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_e496: macaddr@e496 { + reg = <0xe496 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts index eec4969ff3..711f9f7c9a 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts @@ -140,7 +140,8 @@ wifi@0,0 { reg = <0x0000 0 0 0 0>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&config 0xe4a8>; + nvmem-cells = <&macaddr_config_e4a8>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(2)>; led { @@ -176,3 +177,13 @@ mediatek,port4-gmac; mediatek,ephy-base = /bits/ 8 <2>; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_e4a8: macaddr@e4a8 { + reg = <0xe4a8 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts index eed57f7f68..e80719a4e7 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts @@ -175,7 +175,8 @@ reg = <0x0000 0 0 0 0>; ieee80211-freq-limit = <5000000 6000000>; mediatek,mtd-eeprom = <&config 0xe08e>; - mtd-mac-address = <&config 0xe50e>; + nvmem-cells = <&macaddr_config_e50e>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; @@ -186,3 +187,13 @@ function = "gpio"; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_e50e: macaddr@e50e { + reg = <0xe50e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts index 03a4c96f6b..cc902888ba 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts +++ b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts @@ -132,7 +132,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; @@ -204,3 +205,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts b/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts index 986b047e47..bc73c197c0 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts +++ b/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts @@ -124,7 +124,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; @@ -196,3 +197,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi index 6060fd99a6..1d77c27f5f 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi +++ b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi @@ -153,7 +153,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &mdio_pins &phy_reset_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; phy-reset-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; phy-reset-duration = <30>; @@ -218,3 +219,13 @@ mediatek,2ghz = <0>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_engenius_esr600.dts b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts index ea895ac6ea..267525a0fc 100644 --- a/target/linux/ramips/dts/mt7620a_engenius_esr600.dts +++ b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts @@ -134,7 +134,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &mdio_pins>; - mtd-mac-address = <&iNIC_rf 0x4>; + nvmem-cells = <&macaddr_iNIC_rf_4>; + nvmem-cell-names = "mac-address"; port@5 { status = "okay"; @@ -193,3 +194,13 @@ &ohci { status = "okay"; }; + +&iNIC_rf { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_iNIC_rf_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts index 373205e725..69ddea589b 100644 --- a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts +++ b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts @@ -117,7 +117,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@4 { status = "okay"; @@ -165,3 +166,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts index 545e11a83f..9c9b3d3bf9 100644 --- a/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts +++ b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts @@ -127,7 +127,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4000>; + nvmem-cells = <&macaddr_factory_4000>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -142,3 +143,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4000: macaddr@4000 { + reg = <0x4000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts index 575566c5fa..70d0827ed2 100644 --- a/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts +++ b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts @@ -118,7 +118,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4000>; + nvmem-cells = <&macaddr_factory_4000>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -133,3 +134,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4000: macaddr@4000 { + reg = <0x4000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts b/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts index 75823787bf..9ee19686b7 100644 --- a/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts +++ b/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts @@ -122,7 +122,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4000>; + nvmem-cells = <&macaddr_factory_4000>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -148,3 +149,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4000: macaddr@4000 { + reg = <0x4000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts b/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts index 7d807bff4b..10c9958e0a 100644 --- a/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts +++ b/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts @@ -120,7 +120,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@4 { status = "okay"; @@ -182,3 +183,13 @@ &uart { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts index d77df2158c..6222efcca5 100644 --- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts +++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts @@ -72,7 +72,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &mdio_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; @@ -109,3 +110,13 @@ pinctrl-names = "default"; pinctrl-0 = <&pa_pins>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi index 42a59f285b..4c24857df1 100644 --- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi +++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi @@ -85,7 +85,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -104,3 +105,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_hnet_c108.dts b/target/linux/ramips/dts/mt7620a_hnet_c108.dts index 4035139ed1..4c241a84de 100644 --- a/target/linux/ramips/dts/mt7620a_hnet_c108.dts +++ b/target/linux/ramips/dts/mt7620a_hnet_c108.dts @@ -136,7 +136,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -153,3 +154,13 @@ &pcie { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts b/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts index d59b481a61..5eca06fcb9 100644 --- a/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts +++ b/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts @@ -139,7 +139,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &mdio_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@5 { status = "okay"; @@ -210,3 +211,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts b/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts index e29431dc8d..9997e5cecf 100644 --- a/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts +++ b/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts @@ -147,7 +147,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@5 { status = "okay"; @@ -188,3 +189,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_iptime.dtsi b/target/linux/ramips/dts/mt7620a_iptime.dtsi index c7c90ca722..3e2378aa60 100644 --- a/target/linux/ramips/dts/mt7620a_iptime.dtsi +++ b/target/linux/ramips/dts/mt7620a_iptime.dtsi @@ -49,7 +49,8 @@ }; ðernet { - mtd-mac-address = <&uboot 0x1fc20>; + nvmem-cells = <&macaddr_uboot_1fc20>; + nvmem-cell-names = "mac-address"; }; &ehci { @@ -84,3 +85,13 @@ ralink,mtd-eeprom = <&uboot 0x1f400>; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc20: macaddr@1fc20 { + reg = <0x1fc20 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts b/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts index 218dd7a761..87e6222c53 100644 --- a/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts +++ b/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts @@ -96,7 +96,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -109,3 +110,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts index 2f882b3b50..1966e4cffd 100644 --- a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts +++ b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts @@ -140,7 +140,8 @@ &pcie0 { mt76x0e@0,0 { reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&config 0xe07e>; + nvmem-cells = <&macaddr_config_e07e>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(2)>; mediatek,mtd-eeprom = <&config 0xe08a>; }; @@ -152,3 +153,13 @@ function = "gpio"; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_e07e: macaddr@e07e { + reg = <0xe07e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts b/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts index 9e0b817163..5368f939a2 100644 --- a/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts +++ b/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts @@ -90,7 +90,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; @@ -168,3 +169,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts index 2bea987b42..bff117b729 100644 --- a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts +++ b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts @@ -53,7 +53,18 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts index 0544550bf9..2b59351bd8 100644 --- a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts +++ b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts @@ -79,7 +79,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; @@ -114,3 +115,13 @@ mediatek,port4-gmac; mediatek,ephy-base = /bits/ 8 <8>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_linksys_e1700.dts b/target/linux/ramips/dts/mt7620a_linksys_e1700.dts index c38ea8082c..862f28e399 100644 --- a/target/linux/ramips/dts/mt7620a_linksys_e1700.dts +++ b/target/linux/ramips/dts/mt7620a_linksys_e1700.dts @@ -101,7 +101,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; port@5 { status = "okay"; @@ -151,3 +152,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts b/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts index 4307d51424..ceecafa066 100644 --- a/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts +++ b/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts @@ -80,7 +80,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -95,3 +96,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi b/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi index 11e8f7fce6..6884bf7943 100644 --- a/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi +++ b/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi @@ -137,7 +137,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -150,3 +151,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_netis_wf2770.dts b/target/linux/ramips/dts/mt7620a_netis_wf2770.dts index f839048865..2a0e52cee2 100644 --- a/target/linux/ramips/dts/mt7620a_netis_wf2770.dts +++ b/target/linux/ramips/dts/mt7620a_netis_wf2770.dts @@ -99,7 +99,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &mdio_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@5 { status = "okay"; @@ -162,3 +163,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts b/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts index 7dabbed9ba..a691f4203f 100644 --- a/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts +++ b/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts @@ -98,7 +98,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -118,3 +119,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts b/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts index a153520e2f..fd6cc7f82b 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts @@ -23,7 +23,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; @@ -47,3 +48,13 @@ pinctrl-names = "default"; pinctrl-0 = <&pa_pins>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts index 27c4ec31dc..4e123c32bd 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts @@ -99,7 +99,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -119,3 +120,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts index d5aa159498..3a9a57d90b 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts @@ -14,7 +14,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -23,3 +24,13 @@ pinctrl-names = "default"; pinctrl-0 = <&pa_pins>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts index 4143d5e4d6..916479c252 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts @@ -14,5 +14,16 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + 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>; + }; }; diff --git a/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts b/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts index 3edc41ac0d..e095401c4e 100644 --- a/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts +++ b/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts @@ -117,7 +117,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -137,3 +138,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts b/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts index 8f8f173de3..7d875c24fc 100644 --- a/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts +++ b/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts @@ -89,7 +89,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -97,3 +98,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts index e1c5568ed8..bfa4dac6f1 100644 --- a/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts +++ b/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts @@ -109,7 +109,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -128,3 +129,13 @@ mediatek,mtd-eeprom = <&factory 0x8000>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts index 5459886a3a..ab53f678f5 100644 --- a/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts +++ b/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts @@ -129,7 +129,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -137,3 +138,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts index 457d4fd552..6fc95214a2 100644 --- a/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts +++ b/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts @@ -134,7 +134,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -153,3 +154,13 @@ mediatek,mtd-eeprom = <&factory 0x8000>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts b/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts index 6cff557fcd..6b1edabc1a 100644 --- a/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts +++ b/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts @@ -140,7 +140,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -173,3 +174,13 @@ &pcie { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts index cfd55ea221..63643927d5 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts @@ -130,7 +130,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; port@5 { status = "okay"; @@ -164,7 +165,8 @@ &wmac { ralink,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; }; &ehci { @@ -183,7 +185,18 @@ mt76@0,0 { reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; }; + +&rom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts index 89f48dc7d3..2248da5b10 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts @@ -72,11 +72,23 @@ pinctrl-names = "default"; pinctrl-0 = <&pa_pins>; - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-2)>; }; &wifi { - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; + +&rom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts index c4fb98c467..ba9bf1db99 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts @@ -53,10 +53,22 @@ }; &wmac { - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; }; &wifi { - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; + +&rom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts index 8de87caecc..db92af7e37 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts @@ -72,11 +72,23 @@ pinctrl-names = "default"; pinctrl-0 = <&pa_pins>; - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-2)>; }; &wifi { - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; + +&rom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts index 4212a70dc3..1222ff2fcd 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts @@ -167,7 +167,8 @@ }; ðernet { - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; }; &ehci { @@ -192,3 +193,13 @@ mediatek,mtd-eeprom = <&radio 0x8000>; }; }; + +&rom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi b/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi index d2fb891433..743d1e8db6 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi +++ b/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi @@ -92,7 +92,8 @@ ðernet { pinctrl-names = "default"; - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -120,3 +121,13 @@ ieee80211-freq-limit = <5000000 6000000>; }; }; + +&rom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi b/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi index 7b3025e8b4..e6d9b8576d 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi +++ b/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi @@ -72,12 +72,14 @@ }; ðernet { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; }; &wmac { ralink,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; }; &pcie { @@ -88,8 +90,19 @@ mt76@0,0 { reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; ieee80211-freq-limit = <5000000 6000000>; }; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts index 27fd2e2450..b0522de7d0 100644 --- a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts +++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts @@ -97,7 +97,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; @@ -135,3 +136,13 @@ ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts index bfec806c12..ce617198ce 100644 --- a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts +++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts @@ -163,7 +163,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; @@ -209,3 +210,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts index 11b1aa38d6..49ef40827b 100644 --- a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts +++ b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts @@ -121,7 +121,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -150,3 +151,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi index db9bacefe8..937a41d54b 100644 --- a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi +++ b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi @@ -105,7 +105,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -125,3 +126,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_yukai_bocco.dts b/target/linux/ramips/dts/mt7620a_yukai_bocco.dts index 347c246e2e..96ef110bda 100644 --- a/target/linux/ramips/dts/mt7620a_yukai_bocco.dts +++ b/target/linux/ramips/dts/mt7620a_yukai_bocco.dts @@ -136,7 +136,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -144,3 +145,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts index 28ae7c3f98..6fcda971a6 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts +++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts @@ -98,7 +98,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -127,3 +128,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi index 91bbd4a044..cdbdfbd38c 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi +++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi @@ -87,7 +87,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -100,3 +101,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_zte_q7.dts b/target/linux/ramips/dts/mt7620a_zte_q7.dts index 550f750c5a..c2dc111008 100644 --- a/target/linux/ramips/dts/mt7620a_zte_q7.dts +++ b/target/linux/ramips/dts/mt7620a_zte_q7.dts @@ -91,7 +91,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -111,3 +112,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts b/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts index 1a5ff2d0df..a79578aa01 100644 --- a/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts +++ b/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts @@ -137,7 +137,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@4 { status = "okay"; @@ -172,3 +173,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts b/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts index 24a8779b27..be1f9ee026 100644 --- a/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts +++ b/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts @@ -106,7 +106,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -121,3 +122,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts b/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts index ce51ff89b3..ee68ebb2d2 100644 --- a/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts +++ b/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts @@ -119,7 +119,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -134,3 +135,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts b/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts index 26803c0c2a..4ecd3204c6 100644 --- a/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts +++ b/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts @@ -95,7 +95,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -110,3 +111,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts b/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts index c458f8724f..b87e5a3530 100644 --- a/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts +++ b/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts @@ -101,7 +101,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -114,3 +115,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts b/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts index 19d2f63694..9d66b191cb 100644 --- a/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts +++ b/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts @@ -112,7 +112,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -127,3 +128,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_kimax_u35wf.dts b/target/linux/ramips/dts/mt7620n_kimax_u35wf.dts index 7d6d80038c..14e328842b 100644 --- a/target/linux/ramips/dts/mt7620n_kimax_u35wf.dts +++ b/target/linux/ramips/dts/mt7620n_kimax_u35wf.dts @@ -96,7 +96,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -109,3 +110,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_kingston_mlw221.dts b/target/linux/ramips/dts/mt7620n_kingston_mlw221.dts index 1186b83f06..1e8fe0d833 100644 --- a/target/linux/ramips/dts/mt7620n_kingston_mlw221.dts +++ b/target/linux/ramips/dts/mt7620n_kingston_mlw221.dts @@ -107,7 +107,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -122,3 +123,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_kingston_mlwg2.dts b/target/linux/ramips/dts/mt7620n_kingston_mlwg2.dts index eba7fabff6..5a30dee05f 100644 --- a/target/linux/ramips/dts/mt7620n_kingston_mlwg2.dts +++ b/target/linux/ramips/dts/mt7620n_kingston_mlwg2.dts @@ -107,7 +107,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -122,3 +123,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_netgear_n300.dtsi b/target/linux/ramips/dts/mt7620n_netgear_n300.dtsi index 6f5be57ec7..1fe2cbaabc 100644 --- a/target/linux/ramips/dts/mt7620n_netgear_n300.dtsi +++ b/target/linux/ramips/dts/mt7620n_netgear_n300.dtsi @@ -66,7 +66,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -81,3 +82,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi b/target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi index 20ff2dbd1c..cd9e6cacce 100644 --- a/target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi +++ b/target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi @@ -123,7 +123,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -136,3 +137,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_vonets_var11n-300.dts b/target/linux/ramips/dts/mt7620n_vonets_var11n-300.dts index 97ed206f56..88a968d33b 100644 --- a/target/linux/ramips/dts/mt7620n_vonets_var11n-300.dts +++ b/target/linux/ramips/dts/mt7620n_vonets_var11n-300.dts @@ -75,7 +75,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -90,3 +91,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts b/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts index 144591d48a..4ab1b81810 100644 --- a/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts +++ b/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts @@ -76,7 +76,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -91,3 +92,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts index 6d018b9e58..8a3e96ff26 100644 --- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts +++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts @@ -99,7 +99,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -114,3 +115,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts index b29c034140..69d5474bf6 100644 --- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts +++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts @@ -107,7 +107,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -122,3 +123,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts index fe1799885a..7c92f45e7b 100644 --- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts +++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts @@ -92,7 +92,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -107,3 +108,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts index af3ac4b009..2ac2415736 100644 --- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts +++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts @@ -106,7 +106,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -121,3 +122,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts index 4e5c68ef3f..917a1934bd 100644 --- a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts +++ b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts @@ -130,7 +130,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -146,3 +147,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts index e43f1357dd..9cea6ad667 100644 --- a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts +++ b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts @@ -130,7 +130,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -146,3 +147,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_adslr_g7.dts b/target/linux/ramips/dts/mt7621_adslr_g7.dts index 84c0d3b282..95f2ac3a20 100644 --- a/target/linux/ramips/dts/mt7621_adslr_g7.dts +++ b/target/linux/ramips/dts/mt7621_adslr_g7.dts @@ -101,7 +101,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe00c>; + nvmem-cells = <&macaddr_factory_e00c>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -129,7 +130,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe00c>; + nvmem-cells = <&macaddr_factory_e00c>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -141,3 +143,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e00c: macaddr@e00c { + reg = <0xe00c 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts index 0a4971d06c..2ed9f716ab 100644 --- a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts +++ b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts @@ -106,7 +106,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -134,7 +135,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -146,3 +148,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts b/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts index e457dfcdbe..8c6fdab04f 100644 --- a/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts +++ b/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts @@ -148,7 +148,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -176,7 +177,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -257,3 +259,17 @@ &uartlite3 { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts index 0e66057fa5..8af4d2cc08 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts @@ -17,8 +17,19 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + 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>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts index 4088b8137d..4900e8db66 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts @@ -12,7 +12,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -27,3 +28,13 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi b/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi index b011c7ae2a..bea0b79df5 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi @@ -100,7 +100,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &state_default { @@ -109,3 +110,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts b/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts index 78f5584b4c..2c6b3f53e6 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts @@ -130,7 +130,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -138,7 +139,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -169,3 +171,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi index b5e8655cb9..0ccc3c7ecc 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi +++ b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi @@ -131,7 +131,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -169,3 +170,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts index b78e594ffd..63ab424b88 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts @@ -140,7 +140,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x8004>; + nvmem-cells = <&macaddr_factory_8004>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -168,7 +169,8 @@ wan: port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -179,3 +181,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + macaddr_factory_8004: macaddr@8004 { + reg = <0x8004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts index 9244c8368b..789edca6df 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts @@ -164,7 +164,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; @@ -229,3 +230,13 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts index 7392b1d7c1..5d20b6e28a 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts @@ -173,7 +173,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -208,3 +209,13 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300.dts b/target/linux/ramips/dts/mt7621_cudy_wr1300.dts index e943c04069..3fd67c967a 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr1300.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr1300.dts @@ -127,7 +127,8 @@ compatible = "pci14c3,7603"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x0000>; - mtd-mac-address = <&bdinfo 0xde00>; + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; ieee80211-freq-limit = <2400000 2500000>; led { @@ -141,7 +142,8 @@ compatible = "pci14c3,7662"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x8000>; - mtd-mac-address = <&bdinfo 0xde00>; + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; ieee80211-freq-limit = <5000000 6000000>; @@ -153,7 +155,8 @@ }; &gmac0 { - mtd-mac-address = <&bdinfo 0xde00>; + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -181,7 +184,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&bdinfo 0xde00>; + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -193,3 +197,13 @@ function = "gpio"; }; }; + +&bdinfo { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_bdinfo_de00: macaddr@de00 { + reg = <0xde00 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts index 692c94da55..21d03322a7 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts @@ -78,7 +78,8 @@ }; &gmac0 { - mtd-mac-address = <&bdinfo 0xde00>; + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; }; &pcie { @@ -194,8 +195,19 @@ status = "okay"; label = "wan"; - mtd-mac-address = <&bdinfo 0xde00>; - mtd-mac-address-increment = <1>; + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; }; }; }; + +&bdinfo { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_bdinfo_de00: macaddr@de00 { + reg = <0xde00 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts b/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts index 5622855f48..c04fe9e245 100644 --- a/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts +++ b/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts @@ -149,7 +149,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -177,7 +178,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -188,3 +190,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts index 2fcdce5f19..d30e4d1953 100644 --- a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts +++ b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts @@ -175,7 +175,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -203,7 +204,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -214,3 +216,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts index fd11768ce6..82ba8cf3f7 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts @@ -17,11 +17,23 @@ }; &wifi0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; &wifi1 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts index b19f70f7c9..14a79cef51 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts @@ -24,11 +24,23 @@ }; &wifi0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; &wifi1 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts index a4d72876ab..a90856c0b6 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts @@ -24,11 +24,23 @@ }; &wifi0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; &wifi1 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts index f843f62801..26f142dcff 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts @@ -109,7 +109,8 @@ }; &gmac0 { - mtd-mac-address = <&radio 0x4>; + nvmem-cells = <&macaddr_radio_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -170,3 +171,13 @@ function = "gpio"; }; }; + +&radio { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_radio_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi index a54b2be4f0..a1550cfb40 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi @@ -152,7 +152,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -180,7 +181,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -191,3 +193,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_edimax_re23s.dts b/target/linux/ramips/dts/mt7621_edimax_re23s.dts index 9b96573446..1a3181e4e3 100644 --- a/target/linux/ramips/dts/mt7621_edimax_re23s.dts +++ b/target/linux/ramips/dts/mt7621_edimax_re23s.dts @@ -137,7 +137,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x8004>; + nvmem-cells = <&macaddr_factory_8004>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -159,3 +160,13 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_8004: macaddr@8004 { + reg = <0x8004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi index 3f3bae43f1..f9a6c375c2 100644 --- a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi +++ b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi @@ -118,7 +118,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -160,3 +161,13 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts index f8ea5dbbbf..8e87fd06bc 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts @@ -67,7 +67,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -75,7 +76,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -168,7 +170,8 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x0>; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -176,3 +179,17 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts index becd2a9f9d..97e0ab2956 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts @@ -8,11 +8,13 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xfff4>; + nvmem-cells = <&macaddr_factory_fff4>; + nvmem-cell-names = "mac-address"; }; &wan { - mtd-mac-address = <&factory 0xfffa>; + nvmem-cells = <&macaddr_factory_fffa>; + nvmem-cell-names = "mac-address"; }; &partitions { @@ -48,6 +50,25 @@ }; &wifi { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + macaddr_factory_fff4: macaddr@fff4 { + reg = <0xfff4 0x6>; + }; + + macaddr_factory_fffa: macaddr@fffa { + reg = <0xfffa 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts index 5cc8ff27f6..dfc58c1ff6 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts @@ -8,11 +8,13 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &wan { - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; &partitions { @@ -48,6 +50,21 @@ }; &wifi { - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + 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>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi index 642724da10..547d1b1641 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi @@ -3,11 +3,13 @@ #include "mt7621_elecom_wrc-gs.dtsi" &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &wan { - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; &state_default { @@ -44,3 +46,17 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts index 9689326570..9da515f017 100644 --- a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts +++ b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts @@ -105,7 +105,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -133,7 +134,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -145,3 +147,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts index f0152e8db3..4f652b90bb 100644 --- a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts +++ b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts @@ -107,7 +107,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -130,7 +131,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -142,3 +144,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts index 629a9a2439..8c1d2788c1 100644 --- a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts +++ b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts @@ -115,7 +115,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4000>; + nvmem-cells = <&macaddr_factory_4000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -134,7 +135,8 @@ wan: port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x4000>; + nvmem-cells = <&macaddr_factory_4000>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -149,3 +151,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4000: macaddr@4000 { + reg = <0x4000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts index c218521c03..db760381a4 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts @@ -100,7 +100,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -123,3 +124,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts index 613524d1da..a3ef3a0104 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts @@ -110,7 +110,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -133,3 +134,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts index c549bbb518..cc6446b75c 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts @@ -128,7 +128,8 @@ }; &gmac0 { - mtd-mac-address = <&iNIC_rf 0x4>; + nvmem-cells = <&macaddr_iNIC_rf_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -136,7 +137,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -191,3 +193,23 @@ &xhci { status = "disabled"; }; + +&iNIC_rf { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_iNIC_rf_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts index 055c1abde0..b63b4783b8 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts @@ -127,7 +127,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x1e000>; + nvmem-cells = <&macaddr_factory_1e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -135,7 +136,8 @@ wan: port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x1e006>; + nvmem-cells = <&macaddr_factory_1e006>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -194,3 +196,17 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_1e000: macaddr@1e000 { + reg = <0x1e000 0x6>; + }; + + macaddr_factory_1e006: macaddr@1e006 { + reg = <0x1e006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts index 91f30f8721..398a84117c 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts @@ -128,7 +128,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -136,7 +137,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -183,3 +185,13 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi index ff9e525ae2..1dd3d77878 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi +++ b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi @@ -118,7 +118,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -126,7 +127,8 @@ wan: port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -165,3 +167,17 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts index 0e808f6894..6af6bdce7a 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts @@ -120,7 +120,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -184,3 +185,13 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts b/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts index 4ebd980521..b3efe557e2 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts @@ -111,7 +111,8 @@ }; &gmac0 { - mtd-mac-address = <&uboot 0x1fc20>; + nvmem-cells = <&macaddr_uboot_1fc20>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -119,7 +120,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&uboot 0x1fc40>; + nvmem-cells = <&macaddr_uboot_1fc40>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -165,3 +167,17 @@ ieee80211-freq-limit = <2400000 2500000>; }; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc20: macaddr@1fc20 { + reg = <0x1fc20 0x6>; + }; + + macaddr_uboot_1fc40: macaddr@1fc40 { + reg = <0x1fc40 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts index df6aed664e..a00e921a49 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts @@ -95,7 +95,8 @@ }; &gmac0 { - mtd-mac-address = <&uboot 0x1fc20>; + nvmem-cells = <&macaddr_uboot_1fc20>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -103,7 +104,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&uboot 0x1fc40>; + nvmem-cells = <&macaddr_uboot_1fc40>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -156,3 +158,17 @@ function = "gpio"; }; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc20: macaddr@1fc20 { + reg = <0x1fc20 0x6>; + }; + + macaddr_uboot_1fc40: macaddr@1fc40 { + reg = <0x1fc40 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts index ae312fcc52..da832d6df5 100644 --- a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts +++ b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts @@ -129,7 +129,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -156,7 +157,8 @@ wan: port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -167,3 +169,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_jcg_q20.dts b/target/linux/ramips/dts/mt7621_jcg_q20.dts index f0e829393c..c9bf648a31 100644 --- a/target/linux/ramips/dts/mt7621_jcg_q20.dts +++ b/target/linux/ramips/dts/mt7621_jcg_q20.dts @@ -144,7 +144,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x3fff4>; + nvmem-cells = <&macaddr_factory_3fff4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -152,7 +153,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x3fffa>; + nvmem-cells = <&macaddr_factory_3fffa>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -173,3 +175,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_3fff4: macaddr@3fff4 { + reg = <0x3fff4 0x6>; + }; + + macaddr_factory_3fffa: macaddr@3fffa { + reg = <0x3fffa 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_jcg_y2.dts b/target/linux/ramips/dts/mt7621_jcg_y2.dts index 06d6579aaa..5de6ba6d95 100644 --- a/target/linux/ramips/dts/mt7621_jcg_y2.dts +++ b/target/linux/ramips/dts/mt7621_jcg_y2.dts @@ -89,7 +89,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -117,7 +118,8 @@ wan: port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -128,3 +130,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts index fa26900720..ddd46befe6 100644 --- a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts +++ b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts @@ -132,7 +132,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -150,7 +151,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -161,3 +163,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_linksys_re6500.dts b/target/linux/ramips/dts/mt7621_linksys_re6500.dts index 319d0d7fb2..680bc863cd 100644 --- a/target/linux/ramips/dts/mt7621_linksys_re6500.dts +++ b/target/linux/ramips/dts/mt7621_linksys_re6500.dts @@ -113,7 +113,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -143,3 +144,13 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts index ec9be40ce4..73dfbef27f 100644 --- a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts +++ b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts @@ -113,7 +113,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x5>; + nvmem-cells = <&macaddr_factory_5>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -141,7 +142,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x5>; + nvmem-cells = <&macaddr_factory_5>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -150,3 +152,13 @@ &pcie { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_5: macaddr@5 { + reg = <0x5 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts index 130193c171..cb6310df18 100644 --- a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts +++ b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts @@ -80,7 +80,8 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; }; @@ -89,12 +90,14 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x0000>; ieee80211-freq-limit = <2400000 2500000>; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -122,7 +125,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -134,3 +138,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts index cfa0e6af24..b1b020b3a8 100644 --- a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts +++ b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts @@ -99,7 +99,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -127,7 +128,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -173,3 +175,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts index 0da8f6b30c..360bcbb77d 100644 --- a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts +++ b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts @@ -228,7 +228,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -246,3 +247,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi index 3ed8bc55e9..2be3f87869 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi @@ -162,7 +162,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -190,7 +191,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; @@ -258,3 +260,13 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi index 61cb522dfd..c2dc987871 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi @@ -96,7 +96,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -124,7 +125,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; @@ -186,3 +188,13 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_netgear_wac104.dts b/target/linux/ramips/dts/mt7621_netgear_wac104.dts index fbedeb2645..61ab0574a7 100644 --- a/target/linux/ramips/dts/mt7621_netgear_wac104.dts +++ b/target/linux/ramips/dts/mt7621_netgear_wac104.dts @@ -61,7 +61,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &nand { @@ -164,3 +165,13 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_netis_wf2881.dts b/target/linux/ramips/dts/mt7621_netis_wf2881.dts index 7dfd133a44..56a2647638 100644 --- a/target/linux/ramips/dts/mt7621_netis_wf2881.dts +++ b/target/linux/ramips/dts/mt7621_netis_wf2881.dts @@ -122,7 +122,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -150,7 +151,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -161,3 +163,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts index ec24c713ea..a5060a1aee 100644 --- a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts +++ b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts @@ -103,7 +103,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -131,7 +132,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -142,3 +144,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_planex_vr500.dts b/target/linux/ramips/dts/mt7621_planex_vr500.dts index 5f8f190a91..fb6a42166f 100644 --- a/target/linux/ramips/dts/mt7621_planex_vr500.dts +++ b/target/linux/ramips/dts/mt7621_planex_vr500.dts @@ -75,7 +75,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -103,7 +104,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -114,3 +116,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts index 9561c97b7e..929c2a8f26 100644 --- a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts +++ b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts @@ -106,7 +106,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -134,7 +135,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -145,3 +147,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_sercomm_na502.dts b/target/linux/ramips/dts/mt7621_sercomm_na502.dts index af55d1058f..ee77e30362 100644 --- a/target/linux/ramips/dts/mt7621_sercomm_na502.dts +++ b/target/linux/ramips/dts/mt7621_sercomm_na502.dts @@ -96,7 +96,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &nand { @@ -170,8 +171,9 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x8000>; - mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; ieee80211-freq-limit = <5000000 6000000>; }; }; @@ -181,8 +183,9 @@ compatible = "mediatek,mt76"; reg = <0x0 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x0000>; - mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <2>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <2>; ieee80211-freq-limit = <2400000 2500000>; }; }; @@ -210,3 +213,13 @@ &uartlite3 { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts index 6ecf71895c..19eb11111d 100644 --- a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts +++ b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts @@ -102,7 +102,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -130,7 +131,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -142,3 +144,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts index 0386a3cdd2..51c1d868cb 100644 --- a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts +++ b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts @@ -121,7 +121,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -149,7 +150,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -186,3 +188,13 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts b/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts index ef0d48b8c4..6e5f5772be 100644 --- a/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts +++ b/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts @@ -109,7 +109,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -117,7 +118,8 @@ wan_port: port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -194,3 +196,17 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_thunder_timecloud.dts b/target/linux/ramips/dts/mt7621_thunder_timecloud.dts index fe11f4f487..917a6beb51 100644 --- a/target/linux/ramips/dts/mt7621_thunder_timecloud.dts +++ b/target/linux/ramips/dts/mt7621_thunder_timecloud.dts @@ -94,7 +94,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -112,3 +113,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts index 4b53e60cd5..e817278728 100644 --- a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts +++ b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts @@ -100,7 +100,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -128,7 +129,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -140,3 +142,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts index ef491087ef..8066340c5d 100644 --- a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts +++ b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts @@ -97,7 +97,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -125,7 +126,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -136,3 +138,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts index 7d38b7b096..93ceeb08f4 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts @@ -145,7 +145,8 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&config 0x8>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; ieee80211-freq-limit = <2400000 2500000>; }; }; @@ -155,8 +156,9 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; - mtd-mac-address = <&config 0x8>; - mtd-mac-address-increment = <(-1)>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(-1)>; ieee80211-freq-limit = <5000000 6000000>; }; }; @@ -167,7 +169,8 @@ }; &gmac0 { - mtd-mac-address = <&config 0x8>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -175,8 +178,9 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&config 0x8>; - mtd-mac-address-increment = <1>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; }; port@1 { @@ -211,3 +215,13 @@ &xhci { vbus-supply = <®_usb_vbus>; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_8: macaddr@8 { + reg = <0x8 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi b/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi index 76d9908fb9..3cc738530c 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi +++ b/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi @@ -134,8 +134,9 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&config 0x8>; - mtd-mac-address-increment = <1>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; ieee80211-freq-limit = <2400000 2500000>; }; }; @@ -145,14 +146,16 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; - mtd-mac-address = <&config 0x8>; - mtd-mac-address-increment = <2>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <2>; ieee80211-freq-limit = <5000000 6000000>; }; }; &gmac0 { - mtd-mac-address = <&config 0x8>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -183,3 +186,13 @@ }; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_8: macaddr@8 { + reg = <0x8 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts index cf63e6b989..b40448791a 100644 --- a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts @@ -137,7 +137,8 @@ wifi@0,0 { reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; }; }; @@ -146,13 +147,15 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; &gmac0 { - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -178,3 +181,13 @@ }; }; }; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts index 0a810b0195..3df4bc5d64 100644 --- a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts @@ -130,7 +130,8 @@ mt76@0,0 { reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -140,13 +141,15 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; &gmac0 { - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -164,3 +167,13 @@ function = "gpio"; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_10008: macaddr@10008 { + reg = <0x10008 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi index 0ec83fa389..6cb6c0e460 100644 --- a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi +++ b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi @@ -148,7 +148,8 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; ieee80211-freq-limit = <2400000 2500000>; }; @@ -159,14 +160,16 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; ieee80211-freq-limit = <5000000 6000000>; }; }; &gmac0 { - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -177,3 +180,13 @@ }; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_10008: macaddr@10008 { + reg = <0x10008 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts index 536180be10..8f97ba3353 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts @@ -66,8 +66,19 @@ label = "eth5"; phy-handle = <&ephy7>; phy-mode = "rgmii-rxid"; - mtd-mac-address = <&factory 0x22>; + nvmem-cells = <&macaddr_factory_22>; + nvmem-cell-names = "mac-address"; mac-address-increment = <5>; }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_22: macaddr@22 { + reg = <0x22 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi index b92dc8f3f0..e968c4e685 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi @@ -20,7 +20,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x22>; + nvmem-cells = <&macaddr_factory_22>; + nvmem-cell-names = "mac-address"; label = "dsa"; }; @@ -34,28 +35,32 @@ port@1 { status = "okay"; label = "eth1"; - mtd-mac-address = <&factory 0x22>; + nvmem-cells = <&macaddr_factory_22>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; port@2 { status = "okay"; label = "eth2"; - mtd-mac-address = <&factory 0x22>; + nvmem-cells = <&macaddr_factory_22>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; port@3 { status = "okay"; label = "eth3"; - mtd-mac-address = <&factory 0x22>; + nvmem-cells = <&macaddr_factory_22>; + nvmem-cell-names = "mac-address"; mac-address-increment = <3>; }; port@4 { status = "okay"; label = "eth4"; - mtd-mac-address = <&factory 0x22>; + nvmem-cells = <&macaddr_factory_22>; + nvmem-cell-names = "mac-address"; mac-address-increment = <4>; }; }; @@ -141,3 +146,13 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_22: macaddr@22 { + reg = <0x22 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts index d374fd3dde..1265a92123 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts @@ -74,11 +74,27 @@ }; &wlan_2g { - mtd-mac-address = <&eeprom 0x0>; + nvmem-cells = <&macaddr_eeprom_0>; + nvmem-cell-names = "mac-address"; }; &wlan_5g { mediatek,mtd-eeprom = <&factory 0x20000>; - mtd-mac-address = <&eeprom 0x6>; + nvmem-cells = <&macaddr_eeprom_6>; + nvmem-cell-names = "mac-address"; ieee80211-freq-limit = <5000000 6000000>; }; + +&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/ramips/dts/mt7621_wavlink_wl-wn531a6.dts b/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts index 04f656d0f6..252ade4854 100644 --- a/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts +++ b/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts @@ -138,7 +138,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -166,7 +167,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -181,3 +183,17 @@ &uartlite2 { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi index ffa86a4810..06b301ba0b 100644 --- a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi +++ b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi @@ -98,7 +98,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -125,7 +126,8 @@ wan: port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -136,3 +138,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts index 803bf5cf24..af6181b6d0 100644 --- a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts +++ b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts @@ -119,7 +119,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -127,7 +128,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -147,3 +149,17 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts index e8f3a50dbe..e9bd6e1cab 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts @@ -176,7 +176,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -199,7 +200,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -210,3 +212,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts index 40ea6625d4..1a19579208 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts @@ -86,7 +86,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -94,7 +95,8 @@ port@1 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; port@2 { @@ -115,3 +117,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts index 18cbe0c013..67a44dad11 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts @@ -65,7 +65,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -83,7 +84,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -94,3 +96,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi index cc5abf09b6..4c469a2836 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi @@ -131,7 +131,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -149,7 +150,8 @@ wan: port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -160,3 +162,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi index 7e6b3afcdf..7faf9b3e89 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi @@ -25,7 +25,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -33,7 +34,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; port@2 { @@ -59,3 +61,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts index ee1a452fa9..c1f10ac55e 100644 --- a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts +++ b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts @@ -85,7 +85,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -113,7 +114,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -125,3 +127,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts index afee235ac7..6e04f9a493 100644 --- a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts +++ b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts @@ -153,7 +153,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -181,7 +182,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -193,3 +195,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts index a77d13c71c..6813a2cf05 100644 --- a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts +++ b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts @@ -125,7 +125,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -133,7 +134,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -164,3 +166,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts index 627188873d..19ba7c08de 100644 --- a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts +++ b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts @@ -133,7 +133,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -161,7 +162,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -172,3 +174,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts index cd71166f4d..80166158b2 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts @@ -74,7 +74,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -102,7 +103,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -130,3 +132,17 @@ &sdhci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts index 10e08cd3d0..b156b12fc8 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts @@ -96,7 +96,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -124,7 +125,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -135,3 +137,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts index b1fbf53931..e33fac8db1 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts @@ -107,7 +107,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -135,7 +136,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -147,3 +149,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi index 2fe855abd5..87f9e2243c 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi @@ -111,7 +111,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -139,7 +140,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -151,3 +153,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts b/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts index ef3306caa7..2a0bc6f8fd 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts @@ -144,7 +144,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -162,3 +163,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts b/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts index 0596dc71d6..a467236640 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts @@ -128,7 +128,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &gmac1 { @@ -171,3 +172,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts b/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts index d4f6a093d4..2e01b974a8 100644 --- a/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts +++ b/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts @@ -58,7 +58,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &ohci { @@ -130,3 +131,13 @@ &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi b/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi index 239bb08230..3a2de12f6a 100644 --- a/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi +++ b/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi @@ -90,7 +90,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -119,3 +120,13 @@ &ohci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts b/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts index adc9988600..5a2962a315 100644 --- a/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts +++ b/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts @@ -134,9 +134,20 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { mediatek,portmap = <0x2f>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts b/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts index e5c52322b6..5a0aeaf5f2 100644 --- a/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts +++ b/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts @@ -152,10 +152,21 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &sdhci { status = "okay"; mediatek,cd-high; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_duzun_dm06.dts b/target/linux/ramips/dts/mt7628an_duzun_dm06.dts index f0d3dcb62a..b9a105b0e3 100644 --- a/target/linux/ramips/dts/mt7628an_duzun_dm06.dts +++ b/target/linux/ramips/dts/mt7628an_duzun_dm06.dts @@ -66,7 +66,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -129,3 +130,13 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts b/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts index aa60b8a2c6..e4b5f31ada 100644 --- a/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts +++ b/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts @@ -132,7 +132,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &ohci { @@ -162,3 +163,13 @@ &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts b/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts index c5e0c2e02b..e0445c61dd 100644 --- a/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts +++ b/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts @@ -81,7 +81,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -131,3 +132,13 @@ &uart1 { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi b/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi index 738968d1f9..6e3f64632d 100644 --- a/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi +++ b/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi @@ -53,7 +53,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -102,3 +103,13 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts b/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts index 2ef0422925..945f680618 100644 --- a/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts +++ b/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts @@ -116,9 +116,20 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts b/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts index 87dff72c40..97acb3ff3f 100644 --- a/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts +++ b/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts @@ -82,9 +82,20 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts b/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts index 969488e416..8e07dff0f1 100644 --- a/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts +++ b/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts @@ -103,7 +103,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -113,3 +114,13 @@ &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts b/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts index 326c412b0e..08bdcd73ad 100644 --- a/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts +++ b/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts @@ -43,7 +43,8 @@ wifi@0,0 { reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x8000>; - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; ieee80211-freq-limit = <5000000 6000000>; led { @@ -52,3 +53,13 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi b/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi index 7bd394c346..dcdf0cddc7 100644 --- a/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi +++ b/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi @@ -90,9 +90,20 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_iptime.dtsi b/target/linux/ramips/dts/mt7628an_iptime.dtsi index 8a33c37f7a..bc8965ca27 100644 --- a/target/linux/ramips/dts/mt7628an_iptime.dtsi +++ b/target/linux/ramips/dts/mt7628an_iptime.dtsi @@ -85,7 +85,8 @@ }; ðernet { - mtd-mac-address = <&uboot 0x1fc20>; + nvmem-cells = <&macaddr_uboot_1fc20>; + nvmem-cell-names = "mac-address"; }; &pcie { @@ -104,3 +105,13 @@ &wmac { status = "okay"; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc20: macaddr@1fc20 { + reg = <0x1fc20 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi b/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi index 3fd173914e..8e73767dc2 100644 --- a/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi +++ b/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi @@ -112,7 +112,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &sdhci { @@ -123,3 +124,13 @@ &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts b/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts index cbec8c9d40..7beda75806 100644 --- a/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts +++ b/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts @@ -147,7 +147,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &sdhci { @@ -158,3 +159,13 @@ &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts b/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts index 7aa678a1ad..f79d2d2641 100644 --- a/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts +++ b/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts @@ -75,7 +75,8 @@ ðernet { pinctrl-names = "default"; - mtd-mac-address = <&factory 0xd>; + nvmem-cells = <&macaddr_factory_d>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -98,3 +99,13 @@ ieee80211-freq-limit = <5000000 6000000>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_d: macaddr@d { + reg = <0xd 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_minew_g1-c.dts b/target/linux/ramips/dts/mt7628an_minew_g1-c.dts index 12cf47f5a7..e741d2182c 100644 --- a/target/linux/ramips/dts/mt7628an_minew_g1-c.dts +++ b/target/linux/ramips/dts/mt7628an_minew_g1-c.dts @@ -125,7 +125,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -140,3 +141,13 @@ status = "okay"; mediatek,cd-high; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6120.dts b/target/linux/ramips/dts/mt7628an_netgear_r6120.dts index c70db4989b..02a22b7495 100644 --- a/target/linux/ramips/dts/mt7628an_netgear_r6120.dts +++ b/target/linux/ramips/dts/mt7628an_netgear_r6120.dts @@ -44,6 +44,17 @@ }; &wifi5 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(2)>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi index c3d7da2f09..f811466c16 100644 --- a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi +++ b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi @@ -99,7 +99,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &pcie { @@ -113,3 +114,13 @@ ieee80211-freq-limit = <5000000 6000000>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi b/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi index b6d2df4756..d4de7fe6a4 100644 --- a/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi +++ b/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi @@ -152,7 +152,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &sdhci { @@ -163,3 +164,13 @@ &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts b/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts index 63c4901ec2..bf5fbcc64e 100644 --- a/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts +++ b/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts @@ -87,9 +87,20 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts index 859568b1c1..4775f8f076 100644 --- a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts +++ b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts @@ -185,5 +185,16 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; diff --git a/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts b/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts index 6e1cb396b8..4ceccde06d 100644 --- a/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts +++ b/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts @@ -47,7 +47,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -97,3 +98,13 @@ &uart1 { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_tama_w06.dts b/target/linux/ramips/dts/mt7628an_tama_w06.dts index 2be5f3fc88..def722832d 100644 --- a/target/linux/ramips/dts/mt7628an_tama_w06.dts +++ b/target/linux/ramips/dts/mt7628an_tama_w06.dts @@ -38,7 +38,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &state_default { @@ -97,3 +98,13 @@ &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts b/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts index ab5fdd3246..ef60f01002 100644 --- a/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts +++ b/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts @@ -110,7 +110,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &spi0 { @@ -152,3 +153,13 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi b/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi index b6ce7b1f56..bbd66e113c 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi +++ b/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi @@ -74,14 +74,26 @@ &wmac { status = "okay"; - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mediatek,mtd-eeprom = <&radio 0x0>; }; ðernet { - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; }; &esw { mediatek,portmap = <0x3e>; }; + +&rom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi b/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi index 2faf8a87fe..8372f057cd 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi +++ b/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi @@ -55,10 +55,22 @@ &wmac { status = "okay"; - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; mediatek,mtd-eeprom = <&factory 0x20000>; }; ðernet { - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts index 55f39db680..c2c6e922b7 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts @@ -101,7 +101,18 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x28000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts index 38879d70e6..4f5faf2ee0 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts @@ -96,7 +96,18 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; }; + +&rom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts index bb13bac8c8..8fc2334ae2 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts @@ -96,7 +96,18 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x28000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts index 34170547a4..2a6963ab1c 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts @@ -94,7 +94,18 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; }; + +&rom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi index 633950f287..d221a5c7c8 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi +++ b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi @@ -130,14 +130,16 @@ }; ðernet { - mtd-mac-address = <&config 0x2008>; + nvmem-cells = <&macaddr_config_2008>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mediatek,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&config 0x2008>; + nvmem-cells = <&macaddr_config_2008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -150,7 +152,18 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&config 0x2008>; + nvmem-cells = <&macaddr_config_2008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_2008: macaddr@2008 { + reg = <0x2008 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts b/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts index 300ea3bb29..6ac3730194 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts @@ -127,7 +127,8 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; @@ -136,10 +137,22 @@ status = "okay"; mediatek,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; ðernet { - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; +}; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_10008: macaddr@10008 { + reg = <0x10008 0x6>; + }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts index 5bc12758d4..496f8db2ca 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts @@ -123,10 +123,22 @@ &wmac { status = "okay"; - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; mediatek,mtd-eeprom = <&factory 0x20000>; }; ðernet { - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts index a142be7870..1dfb89d528 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts @@ -83,9 +83,21 @@ }; &wmac { - mtd-mac-address = <&factory 0x1f100>; + nvmem-cells = <&macaddr_factory_1f100>; + nvmem-cell-names = "mac-address"; }; ðernet { - mtd-mac-address = <&factory 0x1f100>; + nvmem-cells = <&macaddr_factory_1f100>; + nvmem-cell-names = "mac-address"; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_1f100: macaddr@1f100 { + reg = <0x1f100 0x6>; + }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts index 7ab19632e8..408f12aeae 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts @@ -83,9 +83,21 @@ }; &wmac { - mtd-mac-address = <&factory 0x1f100>; + nvmem-cells = <&macaddr_factory_1f100>; + nvmem-cell-names = "mac-address"; }; ðernet { - mtd-mac-address = <&factory 0x1f100>; + nvmem-cells = <&macaddr_factory_1f100>; + nvmem-cell-names = "mac-address"; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_1f100: macaddr@1f100 { + reg = <0x1f100 0x6>; + }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts index bce34045c6..2141abc442 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts @@ -49,5 +49,16 @@ }; ðernet { - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts index 1f8f7f4bab..ad65152a95 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts @@ -88,11 +88,13 @@ &wmac { status = "okay"; - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; }; ðernet { - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -105,3 +107,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts index a1a83bf237..9f1d667070 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts @@ -100,11 +100,13 @@ &wmac { status = "okay"; - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; }; ðernet { - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -125,3 +127,13 @@ output-high; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts index d3558547b8..fe10600cb9 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts @@ -92,7 +92,18 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x28000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts index 9cea8b43f3..eb74c2ae51 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts @@ -117,9 +117,20 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &esw { mediatek,portmap = <0x2f>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts index d6d418f1b9..b12e1f7106 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts @@ -112,9 +112,20 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { mediatek,portmap = <0x2f>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts index b5f8ff03a8..5e19e331c8 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts @@ -116,7 +116,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -134,3 +135,13 @@ &ohci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts index d7238e17c6..96633c062e 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts @@ -146,7 +146,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -164,3 +165,13 @@ &ohci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts b/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts index 1246651204..a25f4d8d28 100644 --- a/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts +++ b/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts @@ -143,7 +143,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -159,3 +160,13 @@ &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi index a3330fb2eb..7158101ab7 100644 --- a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi +++ b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi @@ -70,7 +70,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -88,3 +89,13 @@ &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts index ff562cbff4..626b36366d 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts @@ -35,7 +35,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; @@ -43,3 +44,13 @@ mediatek,portmap = <0x3e>; mediatek,portdisable = <0x2a>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts index 4389a9daf4..e3aae273a9 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts @@ -38,10 +38,21 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { mediatek,portmap = <0x3d>; mediatek,portdisable = <0x29>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts index ae6a72ebc3..37f409eee9 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts @@ -74,7 +74,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &spi0 { @@ -115,3 +116,13 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts b/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts index ac2a01eaba..fef199ac34 100644 --- a/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts +++ b/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts @@ -105,9 +105,20 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &esw { mediatek,portmap = <0x2f>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts b/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts index 5e92cd2126..f3650dc6ae 100644 --- a/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts +++ b/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts @@ -168,7 +168,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -197,3 +198,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts b/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts index 9d78ca142c..52d5646610 100644 --- a/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts +++ b/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts @@ -85,7 +85,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x2004>; + nvmem-cells = <&macaddr_factory_2004>; + nvmem-cell-names = "mac-address"; port@0 { phy-handle = <&phy0>; @@ -106,3 +107,13 @@ status = "okay"; ralink,mtd-eeprom = <&factory 0x2000>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2004: macaddr@2004 { + reg = <0x2004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts b/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts index 7038fc6590..bb3795aafa 100644 --- a/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts +++ b/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts @@ -95,7 +95,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@0 { phy-handle = <&phy0>; @@ -116,3 +117,13 @@ status = "okay"; ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt2880_asus_rt-n15.dts b/target/linux/ramips/dts/rt2880_asus_rt-n15.dts index 4b832faaf1..3bf3e21a47 100644 --- a/target/linux/ramips/dts/rt2880_asus_rt-n15.dts +++ b/target/linux/ramips/dts/rt2880_asus_rt-n15.dts @@ -95,7 +95,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@0 { mediatek,fixed-link = <1000 1 1 1>; @@ -114,3 +115,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt2880_belkin_f5d8235-v1.dts b/target/linux/ramips/dts/rt2880_belkin_f5d8235-v1.dts index cbaa3e832f..59cc965f23 100644 --- a/target/linux/ramips/dts/rt2880_belkin_f5d8235-v1.dts +++ b/target/linux/ramips/dts/rt2880_belkin_f5d8235-v1.dts @@ -196,7 +196,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@0 { mediatek,fixed-link = <1000 1 1 1>; @@ -235,3 +236,13 @@ status = "okay"; ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts b/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts index a1f10ae45d..1bab37fc5e 100644 --- a/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts +++ b/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts @@ -98,7 +98,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@0 { mediatek,fixed-link = <100 1 1 1>; @@ -117,3 +118,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt2880_buffalo_wzr-agl300nh.dts b/target/linux/ramips/dts/rt2880_buffalo_wzr-agl300nh.dts index cd9e918404..b3ada11220 100644 --- a/target/linux/ramips/dts/rt2880_buffalo_wzr-agl300nh.dts +++ b/target/linux/ramips/dts/rt2880_buffalo_wzr-agl300nh.dts @@ -116,7 +116,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@0 { mediatek,fixed-link = <1000 1 1 1>; @@ -139,3 +140,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts b/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts index 3de9dc755c..ff714d1273 100644 --- a/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts +++ b/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts @@ -120,7 +120,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x2004>; + nvmem-cells = <&macaddr_factory_2004>; + nvmem-cell-names = "mac-address"; port@0 { mediatek,fixed-link = <1000 1 1 1>; @@ -139,3 +140,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x2000>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2004: macaddr@2004 { + reg = <0x2004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_8devices_carambola.dts b/target/linux/ramips/dts/rt3050_8devices_carambola.dts index 4ad23ff26d..820bbd3e99 100644 --- a/target/linux/ramips/dts/rt3050_8devices_carambola.dts +++ b/target/linux/ramips/dts/rt3050_8devices_carambola.dts @@ -63,7 +63,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -77,3 +78,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_arcwireless_freestation5.dts b/target/linux/ramips/dts/rt3050_arcwireless_freestation5.dts index 44b2ad4185..036d310561 100644 --- a/target/linux/ramips/dts/rt3050_arcwireless_freestation5.dts +++ b/target/linux/ramips/dts/rt3050_arcwireless_freestation5.dts @@ -94,7 +94,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -108,3 +109,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_asus_rt-g32-b1.dts b/target/linux/ramips/dts/rt3050_asus_rt-g32-b1.dts index 0baa2feac9..0d4d8f4cfd 100644 --- a/target/linux/ramips/dts/rt3050_asus_rt-g32-b1.dts +++ b/target/linux/ramips/dts/rt3050_asus_rt-g32-b1.dts @@ -73,7 +73,8 @@ }; ðernet { - mtd-mac-address = <&devconf 0x4>; + nvmem-cells = <&macaddr_devconf_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -83,3 +84,13 @@ &wmac { ralink,mtd-eeprom = <&devconf 0x0>; }; + +&devconf { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_devconf_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts b/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts index 5c1975595f..af6ebf0062 100644 --- a/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts +++ b/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts @@ -79,7 +79,8 @@ }; ðernet { - mtd-mac-address = <&devconf 0x4>; + nvmem-cells = <&macaddr_devconf_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -89,3 +90,13 @@ &wmac { ralink,mtd-eeprom = <&devconf 0x0>; }; + +&devconf { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_devconf_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_asus_wl-330n.dts b/target/linux/ramips/dts/rt3050_asus_wl-330n.dts index cc6cd38246..2202cf3127 100644 --- a/target/linux/ramips/dts/rt3050_asus_wl-330n.dts +++ b/target/linux/ramips/dts/rt3050_asus_wl-330n.dts @@ -94,7 +94,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -104,3 +105,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts b/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts index c2513c5dd5..4b9add1fda 100644 --- a/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts +++ b/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts @@ -99,7 +99,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -113,3 +114,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts b/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts index ff01fe2709..6620b1e858 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts @@ -96,7 +96,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -110,3 +111,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts b/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts index 7699dcaabb..e1397d92f9 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts @@ -106,7 +106,8 @@ }; ðernet { - mtd-mac-address = <&devdata 0x4004>; + nvmem-cells = <&macaddr_devdata_4004>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -116,3 +117,13 @@ &wmac { ralink,mtd-eeprom = <&devdata 0x4000>; }; + +&devdata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_devdata_4004: macaddr@4004 { + reg = <0x4004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts b/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts index 21f0a73212..b0f734e4e0 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts @@ -106,7 +106,8 @@ }; ðernet { - mtd-mac-address = <&devdata 0x4004>; + nvmem-cells = <&macaddr_devdata_4004>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -116,3 +117,13 @@ &wmac { ralink,mtd-eeprom = <&devdata 0x4000>; }; + +&devdata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_devdata_4004: macaddr@4004 { + reg = <0x4004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts b/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts index c134803f67..4580a07063 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts @@ -111,7 +111,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -125,3 +126,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts b/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts index 07ff8bc9bc..c8f3951384 100644 --- a/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts +++ b/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts @@ -107,7 +107,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -121,3 +122,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts b/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts index f339b7ebe8..3767afb452 100644 --- a/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts +++ b/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts @@ -94,7 +94,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -108,3 +109,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_huawei_d105.dts b/target/linux/ramips/dts/rt3050_huawei_d105.dts index 2784b0c580..05d3847e71 100644 --- a/target/linux/ramips/dts/rt3050_huawei_d105.dts +++ b/target/linux/ramips/dts/rt3050_huawei_d105.dts @@ -87,7 +87,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -101,3 +102,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_jcg_jhr-n805r.dts b/target/linux/ramips/dts/rt3050_jcg_jhr-n805r.dts index 581edc6dfc..f449b0d0f8 100644 --- a/target/linux/ramips/dts/rt3050_jcg_jhr-n805r.dts +++ b/target/linux/ramips/dts/rt3050_jcg_jhr-n805r.dts @@ -83,7 +83,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -93,3 +94,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_netcore_nw718.dts b/target/linux/ramips/dts/rt3050_netcore_nw718.dts index 124a2ba13c..f9fda94ec0 100644 --- a/target/linux/ramips/dts/rt3050_netcore_nw718.dts +++ b/target/linux/ramips/dts/rt3050_netcore_nw718.dts @@ -101,7 +101,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -115,3 +116,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts b/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts index e457491906..c00feb4288 100644 --- a/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts +++ b/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts @@ -93,7 +93,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -107,3 +108,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts b/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts index 742edbb11d..cfdb4d6b4b 100644 --- a/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts +++ b/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts @@ -83,7 +83,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -97,3 +98,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_tenda_w150m.dts b/target/linux/ramips/dts/rt3050_tenda_w150m.dts index 2826993a9a..b921b7d178 100644 --- a/target/linux/ramips/dts/rt3050_tenda_w150m.dts +++ b/target/linux/ramips/dts/rt3050_tenda_w150m.dts @@ -111,7 +111,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -121,3 +122,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts b/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts index 7df592bebd..36171ae591 100644 --- a/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts +++ b/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts @@ -91,7 +91,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -101,3 +102,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_accton_wr6202.dts b/target/linux/ramips/dts/rt3052_accton_wr6202.dts index fac721cd76..a1c179c286 100644 --- a/target/linux/ramips/dts/rt3052_accton_wr6202.dts +++ b/target/linux/ramips/dts/rt3052_accton_wr6202.dts @@ -99,7 +99,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -113,3 +114,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts b/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts index d88df8ca25..97b37706fb 100644 --- a/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts +++ b/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts @@ -97,7 +97,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -111,3 +112,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_argus_atp-52b.dts b/target/linux/ramips/dts/rt3052_argus_atp-52b.dts index 39afaa582e..dffa5beefa 100644 --- a/target/linux/ramips/dts/rt3052_argus_atp-52b.dts +++ b/target/linux/ramips/dts/rt3052_argus_atp-52b.dts @@ -89,7 +89,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -103,3 +104,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts b/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts index a67a839dcc..cbd586232e 100644 --- a/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts +++ b/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts @@ -91,7 +91,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -105,3 +106,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts b/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts index 2d5f07746f..ada957fc52 100644 --- a/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts +++ b/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts @@ -108,7 +108,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -123,3 +124,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts b/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts index f58a519b11..c547c9df69 100644 --- a/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts +++ b/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts @@ -109,7 +109,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -123,3 +124,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_belkin_f5d8235-v2.dts b/target/linux/ramips/dts/rt3052_belkin_f5d8235-v2.dts index a9db2882f3..444a5af4f5 100644 --- a/target/linux/ramips/dts/rt3052_belkin_f5d8235-v2.dts +++ b/target/linux/ramips/dts/rt3052_belkin_f5d8235-v2.dts @@ -115,7 +115,8 @@ }; ðernet { - mtd-mac-address = <&uboot 0x40004>; + nvmem-cells = <&macaddr_uboot_40004>; + nvmem-cell-names = "mac-address"; pinctrl-names = "default"; pinctrl-0 = <&rgmii_pins>; }; @@ -140,3 +141,13 @@ &otg { status = "okay"; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_40004: macaddr@40004 { + reg = <0x40004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_buffalo_whr-g300n.dts b/target/linux/ramips/dts/rt3052_buffalo_whr-g300n.dts index ca6259d303..5d61c75775 100644 --- a/target/linux/ramips/dts/rt3052_buffalo_whr-g300n.dts +++ b/target/linux/ramips/dts/rt3052_buffalo_whr-g300n.dts @@ -113,7 +113,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -123,3 +124,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts b/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts index a2584e005e..e33a7ef5b5 100644 --- a/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts +++ b/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts @@ -118,7 +118,8 @@ }; ðernet { - mtd-mac-address = <&devdata 0x2e>; + nvmem-cells = <&macaddr_devdata_2e>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -132,3 +133,13 @@ &otg { status = "okay"; }; + +&devdata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_devdata_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts b/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts index 4566e7a166..4501a44c41 100644 --- a/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts +++ b/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts @@ -91,7 +91,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -101,3 +102,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts b/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts index 9d89c6e2f9..b9fb232aa1 100644 --- a/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts +++ b/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts @@ -99,7 +99,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -151,3 +152,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_hauppauge_broadway.dts b/target/linux/ramips/dts/rt3052_hauppauge_broadway.dts index 6734f5b336..9d5d4ceb1e 100644 --- a/target/linux/ramips/dts/rt3052_hauppauge_broadway.dts +++ b/target/linux/ramips/dts/rt3052_hauppauge_broadway.dts @@ -80,7 +80,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -94,3 +95,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_huawei_hg255d.dts b/target/linux/ramips/dts/rt3052_huawei_hg255d.dts index 92ea59bc4c..1cb19d0184 100644 --- a/target/linux/ramips/dts/rt3052_huawei_hg255d.dts +++ b/target/linux/ramips/dts/rt3052_huawei_hg255d.dts @@ -125,7 +125,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -139,3 +140,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts b/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts index 7b71af402f..0641a4e796 100644 --- a/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts +++ b/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts @@ -78,7 +78,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -88,3 +89,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts b/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts index 543144394f..6573159985 100644 --- a/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts +++ b/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts @@ -124,7 +124,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -134,3 +135,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts b/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts index e5d70bd803..c65fc100d8 100644 --- a/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts +++ b/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts @@ -137,9 +137,20 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_nexaira_bc2.dts b/target/linux/ramips/dts/rt3052_nexaira_bc2.dts index d3d5afe64b..c72d9372a5 100644 --- a/target/linux/ramips/dts/rt3052_nexaira_bc2.dts +++ b/target/linux/ramips/dts/rt3052_nexaira_bc2.dts @@ -75,7 +75,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -89,3 +90,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts b/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts index bc3dd5ee56..4399467b29 100644 --- a/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts +++ b/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts @@ -85,7 +85,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -99,3 +100,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts b/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts index b17097cb45..ec46584381 100644 --- a/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts +++ b/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts @@ -84,7 +84,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -98,3 +99,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts b/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts index ff199f890b..779443e70e 100644 --- a/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts +++ b/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts @@ -108,7 +108,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -118,3 +119,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_planex_mzk-wdpr.dts b/target/linux/ramips/dts/rt3052_planex_mzk-wdpr.dts index 7f660d61d5..7e6d47cc02 100644 --- a/target/linux/ramips/dts/rt3052_planex_mzk-wdpr.dts +++ b/target/linux/ramips/dts/rt3052_planex_mzk-wdpr.dts @@ -73,7 +73,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -87,3 +88,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_poray_ip2202.dts b/target/linux/ramips/dts/rt3052_poray_ip2202.dts index f3dab80073..2f340c4c31 100644 --- a/target/linux/ramips/dts/rt3052_poray_ip2202.dts +++ b/target/linux/ramips/dts/rt3052_poray_ip2202.dts @@ -85,7 +85,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -95,3 +96,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts b/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts index f4aa24ec5a..13f1ae4e59 100644 --- a/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts +++ b/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts @@ -102,7 +102,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; pinctrl-names = "default"; pinctrl-0 = <&rgmii_pins>; }; @@ -127,3 +128,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_skyline_sl-r7205.dts b/target/linux/ramips/dts/rt3052_skyline_sl-r7205.dts index 89e6c9ed71..c897aac7c4 100644 --- a/target/linux/ramips/dts/rt3052_skyline_sl-r7205.dts +++ b/target/linux/ramips/dts/rt3052_skyline_sl-r7205.dts @@ -86,7 +86,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -100,3 +101,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_tenda_3g300m.dts b/target/linux/ramips/dts/rt3052_tenda_3g300m.dts index dcebe64af4..4ae42d71a5 100644 --- a/target/linux/ramips/dts/rt3052_tenda_3g300m.dts +++ b/target/linux/ramips/dts/rt3052_tenda_3g300m.dts @@ -116,7 +116,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -130,3 +131,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts b/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts index f6c1b2d2b5..8a60184959 100644 --- a/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts +++ b/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts @@ -85,7 +85,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -95,3 +96,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts b/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts index d94da95029..1067e5cf8b 100644 --- a/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts +++ b/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts @@ -85,7 +85,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -99,3 +100,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts b/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts index fc71437b48..211db1cbab 100644 --- a/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts +++ b/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts @@ -106,7 +106,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4004>; + nvmem-cells = <&macaddr_factory_4004>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -120,3 +121,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4004: macaddr@4004 { + reg = <0x4004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts b/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts index 2c00ca8945..735f59f067 100644 --- a/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts +++ b/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts @@ -106,7 +106,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4004>; + nvmem-cells = <&macaddr_factory_4004>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -120,3 +121,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4004: macaddr@4004 { + reg = <0x4004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts b/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts index 6c65d34f16..c2f44ee565 100644 --- a/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts +++ b/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts @@ -105,7 +105,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -119,3 +120,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts b/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts index db4f8d4a31..c5990977dc 100644 --- a/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts +++ b/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts @@ -91,7 +91,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -101,3 +102,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3352_allnet_all5002.dts b/target/linux/ramips/dts/rt3352_allnet_all5002.dts index 3aa132a727..28c677041a 100644 --- a/target/linux/ramips/dts/rt3352_allnet_all5002.dts +++ b/target/linux/ramips/dts/rt3352_allnet_all5002.dts @@ -91,7 +91,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -109,3 +110,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts b/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts index 2233c9018c..01393c2383 100644 --- a/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts +++ b/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts @@ -111,7 +111,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; pinctrl-names = "default"; pinctrl-0 = <&rgmii_pins &mdio_pins>; }; @@ -123,3 +124,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts b/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts index 50b762ce5a..bb36279016 100644 --- a/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts +++ b/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts @@ -88,7 +88,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; pinctrl-names = "default"; pinctrl-0 = <&rgmii_pins &mdio_pins>; }; @@ -108,3 +109,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3352_zte_mf283plus.dts b/target/linux/ramips/dts/rt3352_zte_mf283plus.dts index a91d0e6ea9..b733d68586 100644 --- a/target/linux/ramips/dts/rt3352_zte_mf283plus.dts +++ b/target/linux/ramips/dts/rt3352_zte_mf283plus.dts @@ -111,7 +111,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -129,3 +130,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts b/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts index 84bb645c5a..8b7c47e88b 100644 --- a/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts +++ b/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts @@ -105,7 +105,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -123,3 +124,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts b/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts index 98426b86f0..38191d2643 100644 --- a/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts +++ b/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts @@ -111,7 +111,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@0 { mediatek,fixed-link = <1000 1 1 1>; @@ -145,3 +146,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3662_dlink_dir-645.dts b/target/linux/ramips/dts/rt3662_dlink_dir-645.dts index 23313759c7..b02c6b692a 100644 --- a/target/linux/ramips/dts/rt3662_dlink_dir-645.dts +++ b/target/linux/ramips/dts/rt3662_dlink_dir-645.dts @@ -127,7 +127,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@0 { mediatek,fixed-link = <1000 1 1 0>; @@ -146,3 +147,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts b/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts index 56d9dc0894..fc3a5549f2 100644 --- a/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts +++ b/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts @@ -139,7 +139,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&devdata 0xd>; + nvmem-cells = <&macaddr_devdata_d>; + nvmem-cell-names = "mac-address"; port@0 { mediatek,fixed-link = <1000 1 1 1>; @@ -173,3 +174,13 @@ &ohci { status = "okay"; }; + +&devdata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_devdata_d: macaddr@d { + reg = <0xd 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3662_omnima_hpm.dts b/target/linux/ramips/dts/rt3662_omnima_hpm.dts index c0f30ec6c7..84ca468e3d 100644 --- a/target/linux/ramips/dts/rt3662_omnima_hpm.dts +++ b/target/linux/ramips/dts/rt3662_omnima_hpm.dts @@ -134,7 +134,8 @@ ðernet { phy-handle = <&phy0>; phy-mode = "rgmii"; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mdio-bus { status = "okay"; @@ -156,3 +157,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts b/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts index 6bed6f57bc..fc437c1f62 100644 --- a/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts +++ b/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts @@ -64,7 +64,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x8004>; + nvmem-cells = <&macaddr_factory_8004>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; port@0 { @@ -180,3 +181,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_8004: macaddr@8004 { + reg = <0x8004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts b/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts index b5cae66732..fe503289a3 100644 --- a/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts +++ b/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts @@ -95,7 +95,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@0 { phy-handle = <&phy0>; @@ -116,6 +117,17 @@ status = "okay"; ralink,mtd-eeprom = <&factory 0x0>; ralink,5ghz = <0>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts b/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts index 39fb3d1c78..26c8dfe2f2 100644 --- a/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts +++ b/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts @@ -95,7 +95,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@0 { phy-handle = <&phy0>; @@ -142,6 +143,17 @@ status = "okay"; ralink,mtd-eeprom = <&factory 0x0>; ralink,5ghz = <0>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <3>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_airlive_air3gii.dts b/target/linux/ramips/dts/rt5350_airlive_air3gii.dts index 0a62c755e6..0082af958d 100644 --- a/target/linux/ramips/dts/rt5350_airlive_air3gii.dts +++ b/target/linux/ramips/dts/rt5350_airlive_air3gii.dts @@ -83,7 +83,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -93,3 +94,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_allnet_all5003.dts b/target/linux/ramips/dts/rt5350_allnet_all5003.dts index 96dde0fbf1..e4e0ef1b62 100644 --- a/target/linux/ramips/dts/rt5350_allnet_all5003.dts +++ b/target/linux/ramips/dts/rt5350_allnet_all5003.dts @@ -91,7 +91,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -101,3 +102,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts b/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts index 58a8407301..5b504bea65 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts @@ -94,7 +94,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -104,3 +105,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts b/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts index bcc02f3cda..62c68a3fc2 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts @@ -94,7 +94,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -107,3 +108,13 @@ ralink,led-polarity = <1>; ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts b/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts index 7d9bb0e359..5c5517ccb2 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts @@ -116,7 +116,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -127,3 +128,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts b/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts index 5bd87190a5..261346ce86 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts @@ -94,7 +94,8 @@ }; ðernet { - mtd-mac-address = <&devdata 0x4004>; + nvmem-cells = <&macaddr_devdata_4004>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -108,3 +109,13 @@ ralink,led-polarity = <1>; ralink,mtd-eeprom = <&devdata 0x4000>; }; + +&devdata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_devdata_4004: macaddr@4004 { + reg = <0x4004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts b/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts index 48fb1d4ffd..a7fc4765b7 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts @@ -135,11 +135,23 @@ }; ðernet { - mtd-mac-address = <&config 0xe07e>; + nvmem-cells = <&macaddr_config_e07e>; + nvmem-cell-names = "mac-address"; }; &wmac { ralink,mtd-eeprom = <&config 0xe08a>; ralink,led-polarity = <1>; - mtd-mac-address = <&config 0xe07e>; + nvmem-cells = <&macaddr_config_e07e>; + nvmem-cell-names = "mac-address"; +}; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_e07e: macaddr@e07e { + reg = <0xe07e 0x6>; + }; }; diff --git a/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts b/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts index 3b1fdd4a8e..1b80382f68 100644 --- a/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts +++ b/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts @@ -53,7 +53,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -63,3 +64,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts b/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts index 1386ec920b..a246c22c21 100644 --- a/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts +++ b/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts @@ -105,7 +105,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -115,3 +116,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts b/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts index f9365d5700..710fd2d6be 100644 --- a/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts +++ b/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts @@ -105,7 +105,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -116,3 +117,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_hilink_hlk-rm04.dts b/target/linux/ramips/dts/rt5350_hilink_hlk-rm04.dts index 83b1fb2a6d..7dc56673a0 100644 --- a/target/linux/ramips/dts/rt5350_hilink_hlk-rm04.dts +++ b/target/linux/ramips/dts/rt5350_hilink_hlk-rm04.dts @@ -103,9 +103,20 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts b/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts index 543fda74b7..387e4adfdc 100644 --- a/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts +++ b/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts @@ -95,7 +95,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -106,3 +107,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_intenso_memory2move.dts b/target/linux/ramips/dts/rt5350_intenso_memory2move.dts index 8ab2a87304..8df91594b7 100644 --- a/target/linux/ramips/dts/rt5350_intenso_memory2move.dts +++ b/target/linux/ramips/dts/rt5350_intenso_memory2move.dts @@ -98,7 +98,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -108,3 +109,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi b/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi index 8a8e5a92e1..2d5d86ee1b 100644 --- a/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi +++ b/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi @@ -60,7 +60,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -80,3 +81,13 @@ &uart { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts b/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts index 499b555da4..0e69cf8919 100644 --- a/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts +++ b/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts @@ -101,7 +101,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -111,3 +112,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts b/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts index d3d1ebe26f..89a774a060 100644 --- a/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts +++ b/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts @@ -91,7 +91,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -102,3 +103,13 @@ ralink,mtd-eeprom = <&factory 0x0>; ralink,led-polarity = <1>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_poray_m3.dts b/target/linux/ramips/dts/rt5350_poray_m3.dts index b6bad0ab77..f02e7b024d 100644 --- a/target/linux/ramips/dts/rt5350_poray_m3.dts +++ b/target/linux/ramips/dts/rt5350_poray_m3.dts @@ -90,7 +90,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -102,3 +103,13 @@ ralink,mtd-eeprom = <&factory 0x0>; ralink,led-polarity = <1>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_poray_x5.dts b/target/linux/ramips/dts/rt5350_poray_x5.dts index 9c00da82ed..20e2a5257f 100644 --- a/target/linux/ramips/dts/rt5350_poray_x5.dts +++ b/target/linux/ramips/dts/rt5350_poray_x5.dts @@ -122,7 +122,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -134,3 +135,13 @@ ralink,mtd-eeprom = <&factory 0x0>; ralink,led-polarity = <1>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_poray_x8.dts b/target/linux/ramips/dts/rt5350_poray_x8.dts index b60bb99ee9..e84f28f783 100644 --- a/target/linux/ramips/dts/rt5350_poray_x8.dts +++ b/target/linux/ramips/dts/rt5350_poray_x8.dts @@ -83,7 +83,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -95,3 +96,13 @@ ralink,mtd-eeprom = <&factory 0x0>; ralink,led-polarity = <1>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_tenda_3g150b.dts b/target/linux/ramips/dts/rt5350_tenda_3g150b.dts index 35ccee1584..19b6d78009 100644 --- a/target/linux/ramips/dts/rt5350_tenda_3g150b.dts +++ b/target/linux/ramips/dts/rt5350_tenda_3g150b.dts @@ -101,7 +101,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -112,3 +113,13 @@ ralink,mtd-eeprom = <&factory 0x0>; ralink,led-polarity = <1>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts b/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts index 13d1a16741..a03f33f3fc 100644 --- a/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts +++ b/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts @@ -104,7 +104,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -115,3 +116,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts b/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts index 089b85629b..502ac60211 100644 --- a/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts +++ b/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts @@ -106,7 +106,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -117,3 +118,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_wansview_ncs601w.dts b/target/linux/ramips/dts/rt5350_wansview_ncs601w.dts index adb4034e8a..911e3e44ed 100644 --- a/target/linux/ramips/dts/rt5350_wansview_ncs601w.dts +++ b/target/linux/ramips/dts/rt5350_wansview_ncs601w.dts @@ -53,7 +53,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -63,3 +64,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts b/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts index 2cb6101184..12d41e305e 100644 --- a/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts +++ b/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts @@ -130,7 +130,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -140,3 +141,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts b/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts index 0879c11206..4ff2d57f72 100644 --- a/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts +++ b/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts @@ -88,7 +88,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -98,3 +99,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts b/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts index bc16e2c5c1..d044be395a 100644 --- a/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts +++ b/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts @@ -95,7 +95,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -107,3 +108,13 @@ ralink,led-polarity = <1>; ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts b/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts index eb7d7ed46b..69a1759f36 100644 --- a/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts +++ b/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts @@ -97,7 +97,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -110,3 +111,13 @@ ralink,led-polarity = <1>; ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; |