Skip to content
Snippets Groups Projects
Commit 06bb4a50 authored by Ansuel Smith's avatar Ansuel Smith Committed by Petr Štetiar
Browse files

ramips: convert mtd-mac-address to nvmem implementation


Define nvmem-cells and convert mtd-mac-address to nvmem implementation.
The conversion is done with an automated script.

Signed-off-by: default avatarAnsuel Smith <ansuelsmth@gmail.com>
parent abc17bf3
No related branches found
No related tags found
No related merge requests found
Showing
with 244 additions and 22 deletions
......@@ -103,7 +103,8 @@
};
&ethernet {
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>;
};
};
......@@ -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>;
};
};
......@@ -126,7 +126,8 @@
};
&ethernet {
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>;
};
};
......@@ -103,7 +103,8 @@
};
&ethernet {
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>;
};
};
......@@ -122,7 +122,8 @@
};
&ethernet {
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>;
};
};
......@@ -117,7 +117,8 @@
};
&ethernet {
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>;
};
};
......@@ -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>;
};
};
......@@ -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>;
};
};
......@@ -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>;
};
};
......@@ -127,7 +127,8 @@
};
&ethernet {
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>;
};
};
......@@ -168,7 +168,8 @@
};
&ethernet {
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>;
};
};
......@@ -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>;
};
};
......@@ -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>;
};
};
......@@ -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>;
};
};
......@@ -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>;
};
};
......@@ -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>;
};
};
......@@ -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>;
};
};
......@@ -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>;
};
};
......@@ -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>;
};
};
......@@ -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>;
};
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment