Skip to content

Commit

Permalink
ramips: mt7621: nix mac-address-increment
Browse files Browse the repository at this point in the history
nvmem-layout allows removal

Signed-off-by: Rosen Penev <rosenp@gmail.com>
  • Loading branch information
neheb authored and Ansuel committed Nov 26, 2023
1 parent f4c33d0 commit 3395184
Show file tree
Hide file tree
Showing 72 changed files with 319 additions and 331 deletions.
7 changes: 4 additions & 3 deletions target/linux/ramips/dts/mt7621_adslr_g7.dts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@
};

macaddr_factory_e00c: macaddr@e00c {
compatible = "mac-base";
reg = <0xe00c 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
Expand Down Expand Up @@ -121,7 +123,7 @@
};

&gmac0 {
nvmem-cells = <&macaddr_factory_e00c>;
nvmem-cells = <&macaddr_factory_e00c 0>;
nvmem-cell-names = "mac-address";
};

Expand All @@ -130,9 +132,8 @@
label = "wan";
phy-handle = <&ethphy4>;

nvmem-cells = <&macaddr_factory_e00c>;
nvmem-cells = <&macaddr_factory_e00c 1>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};

&mdio {
Expand Down
7 changes: 4 additions & 3 deletions target/linux/ramips/dts/mt7621_afoundry_ew1200.dts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@
};

macaddr_factory_e000: macaddr@e000 {
compatible = "mac-base";
reg = <0xe000 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
Expand Down Expand Up @@ -138,7 +140,7 @@
};

&gmac0 {
nvmem-cells = <&macaddr_factory_e000>;
nvmem-cells = <&macaddr_factory_e000 0>;
nvmem-cell-names = "mac-address";
};

Expand All @@ -147,9 +149,8 @@
label = "wan";
phy-handle = <&ethphy4>;

nvmem-cells = <&macaddr_factory_e000>;
nvmem-cells = <&macaddr_factory_e000 1>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};

&mdio {
Expand Down
16 changes: 0 additions & 16 deletions target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,6 @@
model = "AsiaRF AP7621-001";
};

&gmac1 {
status = "okay";
label = "wan";
phy-handle = <&ethphy4>;

nvmem-cells = <&macaddr_factory_e000>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};

&mdio {
ethphy4: ethernet-phy@4 {
reg = <4>;
};
};

&switch0 {
ports {
port@0 {
Expand Down
16 changes: 0 additions & 16 deletions target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,6 @@
model = "AsiaRF AP7621-NV1";
};

&gmac1 {
status = "okay";
label = "wan";
phy-handle = <&ethphy0>;

nvmem-cells = <&macaddr_factory_e000>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};

&mdio {
ethphy0: ethernet-phy@0 {
reg = <0>;
};
};

&switch0 {
ports {
port@2 {
Expand Down
19 changes: 18 additions & 1 deletion target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@
#size-cells = <1>;

macaddr_factory_e000: macaddr@e000 {
compatible = "mac-base";
reg = <0xe000 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
Expand All @@ -109,8 +111,23 @@
status = "okay";
};

&mdio {
ethphy4: ethernet-phy@4 {
reg = <4>;
};
};

&gmac0 {
nvmem-cells = <&macaddr_factory_e000>;
nvmem-cells = <&macaddr_factory_e000 0>;
nvmem-cell-names = "mac-address";
};

&gmac1 {
status = "okay";
label = "wan";
phy-handle = <&ethphy4>;

nvmem-cells = <&macaddr_factory_e000 1>;
nvmem-cell-names = "mac-address";
};

Expand Down
13 changes: 6 additions & 7 deletions target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@
};

macaddr_factory_21000: macaddr@21000 {
compatible = "mac-base";
reg = <0x21000 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
Expand Down Expand Up @@ -187,9 +189,8 @@
reg = <0x0000 0 0 0 0>;
ieee80211-freq-limit = <5000000 6000000>;

nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_21000>;
nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_21000 5>;
nvmem-cell-names = "eeprom", "mac-address";
mac-address-increment = <(5)>;
};
};

Expand All @@ -199,14 +200,13 @@
reg = <0x0000 0 0 0 0>;
ieee80211-freq-limit = <2400000 2500000>;

nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_21000>;
nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_21000 4>;
nvmem-cell-names = "eeprom", "mac-address";
mac-address-increment = <(4)>;
};
};

&gmac0 {
nvmem-cells = <&macaddr_factory_21000>;
nvmem-cells = <&macaddr_factory_21000 0>;
nvmem-cell-names = "mac-address";
};

Expand All @@ -215,9 +215,8 @@
label = "wan";
phy-handle = <&ethphy0>;

nvmem-cells = <&macaddr_factory_21000>;
nvmem-cells = <&macaddr_factory_21000 1>;
nvmem-cell-names = "mac-address";
mac-address-increment = <(1)>;
};

&mdio {
Expand Down
11 changes: 11 additions & 0 deletions target/linux/ramips/dts/mt7621_beeline_smartbox-pro.dts
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,14 @@
* 0x10000000-0xfc00000=0x400000
*/
};

&pcie1 {
wlan_2g: wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
ieee80211-freq-limit = <2400000 2500000>;

nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_1000 0>;
nvmem-cell-names = "eeprom", "mac-address";
};
};
13 changes: 6 additions & 7 deletions target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@
};

macaddr_factory_21000: macaddr@21000 {
compatible = "mac-base";
reg = <0x21000 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
Expand Down Expand Up @@ -180,9 +182,8 @@
reg = <0x0000 0 0 0 0>;
ieee80211-freq-limit = <5000000 6000000>;

nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_21000>;
nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_21000 5>;
nvmem-cell-names = "eeprom", "mac-address";
mac-address-increment = <(5)>;
};
};

Expand All @@ -192,14 +193,13 @@
reg = <0x0000 0 0 0 0>;
ieee80211-freq-limit = <2400000 2500000>;

nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_21000>;
nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_21000 4>;
nvmem-cell-names = "eeprom", "mac-address";
mac-address-increment = <(4)>;
};
};

&gmac0 {
nvmem-cells = <&macaddr_factory_21000>;
nvmem-cells = <&macaddr_factory_21000 0>;
nvmem-cell-names = "mac-address";
};

Expand All @@ -208,9 +208,8 @@
label = "wan";
phy-handle = <&ethphy0>;

nvmem-cells = <&macaddr_factory_21000>;
nvmem-cells = <&macaddr_factory_21000 1>;
nvmem-cell-names = "mac-address";
mac-address-increment = <(1)>;
};

&mdio {
Expand Down
9 changes: 3 additions & 6 deletions target/linux/ramips/dts/mt7621_beeline_smartbox-turbo.dts
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,19 @@

&pcie0 {
wifi@0,0 {
nvmem-cells = <&macaddr_factory_21000>;
nvmem-cells = <&macaddr_factory_21000 5>;
nvmem-cell-names = "mac-address";
mac-address-increment = <(5)>;
};
};

&pcie1 {
wifi@0,0 {
nvmem-cells = <&macaddr_factory_21000>;
nvmem-cells = <&macaddr_factory_21000 4>;
nvmem-cell-names = "mac-address";
mac-address-increment = <(4)>;
};
};

&gmac1 {
nvmem-cells = <&macaddr_factory_21000>;
nvmem-cells = <&macaddr_factory_21000 1>;
nvmem-cell-names = "mac-address";
mac-address-increment = <(1)>;
};
7 changes: 4 additions & 3 deletions target/linux/ramips/dts/mt7621_bolt_arion.dts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@
};

macaddr_factory_28: macaddr@28 {
compatible = "mac-base";
reg = <0x28 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
Expand Down Expand Up @@ -157,9 +159,8 @@
};

&gmac0 {
nvmem-cells = <&macaddr_factory_28>;
nvmem-cells = <&macaddr_factory_28 3>;
nvmem-cell-names = "mac-address";
mac-address-increment = <3>;
};

&switch0 {
Expand All @@ -172,7 +173,7 @@
wan: port@1 {
status = "okay";
label = "wan";
nvmem-cells = <&macaddr_factory_28>;
nvmem-cells = <&macaddr_factory_28 0>;
nvmem-cell-names = "mac-address";
};

Expand Down
8 changes: 4 additions & 4 deletions target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@
};

macaddr_factory_4: macaddr@4 {
compatible = "mac-base";
reg = <0x4 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
Expand Down Expand Up @@ -182,19 +184,17 @@
};

&gmac0 {
nvmem-cells = <&macaddr_factory_4>;
nvmem-cells = <&macaddr_factory_4 (-1)>;
nvmem-cell-names = "mac-address";
mac-address-increment = <(-1)>;
};

&gmac1 {
status = "okay";
label = "wan";
phy-handle = <&ethphy0>;

nvmem-cells = <&macaddr_factory_4>;
nvmem-cells = <&macaddr_factory_4 (-1)>;
nvmem-cell-names = "mac-address";
mac-address-increment = <(-1)>;
};

&mdio {
Expand Down
7 changes: 4 additions & 3 deletions target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@
#size-cells = <1>;

macaddr_factory_e000: macaddr@e000 {
compatible = "mac-base";
reg = <0xe000 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
Expand All @@ -112,7 +114,7 @@
};

&gmac0 {
nvmem-cells = <&macaddr_factory_e000>;
nvmem-cells = <&macaddr_factory_e000 0>;
nvmem-cell-names = "mac-address";
};

Expand All @@ -121,9 +123,8 @@
port@0 {
status = "okay";
label = "wan";
nvmem-cells = <&macaddr_factory_e000>;
nvmem-cells = <&macaddr_factory_e000 1>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};

port@4 {
Expand Down
Loading

0 comments on commit 3395184

Please sign in to comment.