From c4143505e0c0ef39a4254888397c801b5dab455c Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Tue, 24 Aug 2021 15:46:16 +0200 Subject: [PATCH] ramips: mt7620: move Phicomm MAC address setup to DTSI The setup is the same for all devices, so move it up one level. Signed-off-by: Adrian Schmutzler --- target/linux/ramips/dts/mt7620a_phicomm_k2g.dts | 13 ------------- target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi | 15 +++++++++++++++ .../linux/ramips/dts/mt7620a_phicomm_psg1218a.dts | 13 ------------- .../linux/ramips/dts/mt7620a_phicomm_psg1218b.dts | 15 --------------- 4 files changed, 15 insertions(+), 41 deletions(-) diff --git a/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts b/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts index fd6cc7f82b..d113edc19f 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts @@ -23,9 +23,6 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii2_pins &mdio_pins>; - nvmem-cells = <&macaddr_factory_28>; - nvmem-cell-names = "mac-address"; - mediatek,portmap = "llllw"; port@5 { @@ -48,13 +45,3 @@ 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_k2x.dtsi b/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi index c7728e0442..a8a900eac1 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi +++ b/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi @@ -96,6 +96,21 @@ }; }; +ðernet { + 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/mt7620a_phicomm_psg1218a.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts index 3a9a57d90b..cda05173b1 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts @@ -14,9 +14,6 @@ }; ðernet { - nvmem-cells = <&macaddr_factory_28>; - nvmem-cell-names = "mac-address"; - mediatek,portmap = "llllw"; }; @@ -24,13 +21,3 @@ 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 916479c252..704be2b5d7 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts @@ -12,18 +12,3 @@ reg = <0x50000 0x7b0000>; }; }; - -ðernet { - 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>; - }; -};