Skip to content

Commit

Permalink
ramips: convert mtd-mac-address to nvmem implementation
Browse files Browse the repository at this point in the history
Define nvmem-cells and convert mtd-mac-address to nvmem implementation.
The conversion is done with an automated script.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
  • Loading branch information
Ansuel authored and ynezz committed Jul 19, 2021
1 parent abc17bf commit 06bb4a5
Show file tree
Hide file tree
Showing 319 changed files with 4,213 additions and 434 deletions.
13 changes: 12 additions & 1 deletion target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts
Expand Up @@ -103,11 +103,22 @@
};

&ethernet {
mtd-mac-address = <&factory 0x4>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";

mediatek,portmap = "llllw";
};

&wmac {
ralink,mtd-eeprom = <&factory 0x0>;
};

&factory {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
13 changes: 12 additions & 1 deletion target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts
Expand Up @@ -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";
};
Expand Down Expand Up @@ -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>;
};
};
13 changes: 12 additions & 1 deletion target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts
Expand Up @@ -126,7 +126,8 @@
};

&ethernet {
mtd-mac-address = <&factory 0x28>;
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";
};

&gpio1 {
Expand Down Expand Up @@ -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>;
};
};
13 changes: 12 additions & 1 deletion target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts
Expand Up @@ -103,7 +103,8 @@
};

&ethernet {
mtd-mac-address = <&factory 0x28>;
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";
};

&gpio1 {
Expand Down Expand Up @@ -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>;
};
};
13 changes: 12 additions & 1 deletion target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi
Expand Up @@ -122,7 +122,8 @@
};

&ethernet {
mtd-mac-address = <&factory 0x28>;
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";

mediatek,portmap = "wllll";
};
Expand All @@ -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>;
};
};
13 changes: 12 additions & 1 deletion target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts
Expand Up @@ -117,7 +117,8 @@
};

&ethernet {
mtd-mac-address = <&factory 0x4>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";

mediatek,portmap = "wllll";
};
Expand All @@ -144,3 +145,13 @@
function = "gpio";
};
};

&factory {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
13 changes: 12 additions & 1 deletion target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts
Expand Up @@ -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";
Expand Down Expand Up @@ -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>;
};
};
13 changes: 12 additions & 1 deletion target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts
Expand Up @@ -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";
};
Expand All @@ -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>;
};
};
13 changes: 12 additions & 1 deletion target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts
Expand Up @@ -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";
};
Expand All @@ -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>;
};
};
19 changes: 16 additions & 3 deletions target/linux/ramips/dts/mt7620a_cameo_810.dtsi
Expand Up @@ -127,7 +127,8 @@
};

&ethernet {
mtd-mac-address = <&factory 0x28>;
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";

mediatek,portmap = "llllw";
};
Expand All @@ -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 {
Expand All @@ -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>;
};
};
13 changes: 12 additions & 1 deletion target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts
Expand Up @@ -168,11 +168,22 @@
};

&ethernet {
mtd-mac-address = <&factory 0x4>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
};

&wmac {
ralink,mtd-eeprom = <&factory 0x0>;
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>;
};
};
13 changes: 12 additions & 1 deletion target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts
Expand Up @@ -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>;
};
Expand All @@ -126,3 +127,13 @@
function = "gpio";
};
};

&config {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

macaddr_config_e490: macaddr@e490 {
reg = <0xe490 0x6>;
};
};
13 changes: 12 additions & 1 deletion target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts
Expand Up @@ -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>;

Expand Down Expand Up @@ -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>;
};
};
13 changes: 12 additions & 1 deletion target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts
Expand Up @@ -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 {
Expand Down Expand Up @@ -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>;
};
};
13 changes: 12 additions & 1 deletion target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts
Expand Up @@ -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>;
};
};
Expand All @@ -186,3 +187,13 @@
function = "gpio";
};
};

&config {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

macaddr_config_e50e: macaddr@e50e {
reg = <0xe50e 0x6>;
};
};
13 changes: 12 additions & 1 deletion target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts
Expand Up @@ -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";

Expand Down Expand Up @@ -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>;
};
};

0 comments on commit 06bb4a5

Please sign in to comment.