lantiq: 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: Ansuel Smith <ansuelsmth@gmail.com>
This commit is contained in:
Ansuel Smith 2021-04-02 23:40:10 +02:00 committed by Petr Štetiar
parent 0458a8993c
commit 939c0030db
21 changed files with 270 additions and 30 deletions

View File

@ -96,7 +96,8 @@
&gsw {
phy-mode = "rmii";
phy-handle = <&phy0>;
mtd-mac-address = <&ath9k_cal 0xa91>;
nvmem-cells = <&macaddr_ath9k_cal_a91>;
nvmem-cell-names = "mac-address";
mac-address-increment = <(-2)>;
mdio-bus {
@ -166,3 +167,13 @@
qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
};
};
&ath9k_cal {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_ath9k_cal_a91: macaddr@a91 {
reg = <0xa91 0x6>;
};
};

View File

@ -97,7 +97,8 @@
&gsw {
phy-mode = "mii";
mtd-mac-address = <&ath9k_cal 0xa91>;
nvmem-cells = <&macaddr_ath9k_cal_a91>;
nvmem-cell-names = "mac-address";
mac-address-increment = <(-2)>;
};
@ -193,3 +194,13 @@
status = "okay";
vbus-supply = <&usb1_vbus>;
};
&ath9k_cal {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_ath9k_cal_a91: macaddr@a91 {
reg = <0xa91 0x6>;
};
};

View File

@ -135,7 +135,8 @@
&gsw {
phy-mode = "rgmii";
mtd-mac-address = <&boardconfig 0x10024>;
nvmem-cells = <&macaddr_boardconfig_10024>;
nvmem-cell-names = "mac-address";
};
&pci0 {
@ -193,3 +194,13 @@
status = "okay";
vbus-supply = <&usb_vbus>;
};
&boardconfig {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_boardconfig_10024: macaddr@10024 {
reg = <0x10024 0x6>;
};
};

View File

@ -124,7 +124,8 @@
&gsw {
phy-mode = "mii";
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
};
&localbus {
@ -198,3 +199,13 @@
status = "okay";
gpios = <&gpio 31 GPIO_ACTIVE_HIGH>;
};
&boardconfig {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_boardconfig_16: macaddr@16 {
reg = <0x16 0x6>;
};
};

View File

@ -132,7 +132,8 @@
&gsw {
phy-mode = "mii";
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
};
&localbus {
@ -201,3 +202,13 @@
status = "okay";
gpios = <&gpio 31 GPIO_ACTIVE_HIGH>;
};
&boardconfig {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_boardconfig_16: macaddr@16 {
reg = <0x16 0x6>;
};
};

View File

@ -144,7 +144,8 @@
&gsw {
/* gpiomm 10 - switch */
phy-mode = "rmii";
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
};
&localbus {
@ -218,3 +219,13 @@
gpios = <&gpio 31 GPIO_ACTIVE_HIGH
&gpiomm 7 GPIO_ACTIVE_HIGH>;
};
&boardconfig {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_boardconfig_16: macaddr@16 {
reg = <0x16 0x6>;
};
};

View File

@ -93,7 +93,8 @@
/* #define ARV4525PW_PHYRESET 13 */
&gsw {
phy-mode = "mii";
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
};
&localbus {
@ -147,3 +148,13 @@
status = "okay";
gpios = <&gpio 31 GPIO_ACTIVE_HIGH>;
};
&boardconfig {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_boardconfig_16: macaddr@16 {
reg = <0x16 0x6>;
};
};

View File

@ -162,7 +162,8 @@
*/
&gsw {
phy-mode = "rmii";
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
};
&localbus {
@ -236,3 +237,13 @@
gpios = <&gpio 31 GPIO_ACTIVE_HIGH
&gpiomm 7 GPIO_ACTIVE_HIGH>;
};
&boardconfig {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_boardconfig_16: macaddr@16 {
reg = <0x16 0x6>;
};
};

View File

@ -100,7 +100,8 @@
/* GPIO 19: switch reset */
&gsw {
phy-mode = "rmii";
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
};
&localbus {
@ -154,7 +155,18 @@
reg = <0x7000 0 0 0 0>;
ralink,mtd-eeprom = <&boardconfig 0x410>;
ralink,mtd-eeprom-swap;
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};
};
&boardconfig {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_boardconfig_16: macaddr@16 {
reg = <0x16 0x6>;
};
};

View File

@ -117,7 +117,8 @@
&gsw {
/* Switch reset 19 */
phy-mode = "mii";
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
};
&localbus {
@ -194,3 +195,13 @@
status = "okay";
gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
};
&boardconfig {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_boardconfig_16: macaddr@16 {
reg = <0x16 0x6>;
};
};

View File

@ -149,7 +149,8 @@
*/
&gsw {
phy-mode = "mii";
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
};
&localbus {
@ -212,7 +213,8 @@
compatible = "pci168c,0029";
reg = <0x7000 0 0 0 0>;
qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};
};
@ -229,3 +231,13 @@
&vmmc {
status = "okay";
};
&boardconfig {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_boardconfig_16: macaddr@16 {
reg = <0x16 0x6>;
};
};

View File

@ -144,7 +144,8 @@
&gsw {
phy-mode = "mii";
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
};
&localbus {
@ -213,3 +214,13 @@
&vmmc {
status = "okay";
};
&boardconfig {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_boardconfig_16: macaddr@16 {
reg = <0x16 0x6>;
};
};

View File

@ -86,7 +86,8 @@
&gsw {
phy-mode = "mii";
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
};
&localbus {
@ -145,3 +146,13 @@
status = "okay";
gpios = <&gpio 31 GPIO_ACTIVE_HIGH>;
};
&boardconfig {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_boardconfig_16: macaddr@16 {
reg = <0x16 0x6>;
};
};

View File

@ -156,7 +156,8 @@
&gsw {
phy-mode = "rmii";
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
};
&localbus {
@ -220,7 +221,8 @@
wifi0: wifi@1814,0601 {
compatible = "pci1814,0601";
reg = <0x7000 0 0 0 0>;
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
ralink,mtd-eeprom = <&boardconfig 0x410>;
ralink,mtd-eeprom-swap;
};
@ -239,3 +241,13 @@
status = "okay";
gpios = <&gpiomm 1 GPIO_ACTIVE_HIGH>;
};
&boardconfig {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_boardconfig_16: macaddr@16 {
reg = <0x16 0x6>;
};
};

View File

@ -171,7 +171,8 @@
&gsw {
phy-mode = "mii";
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
};
&localbus {
@ -242,7 +243,8 @@
reg = <0x7000 0 0 0 0>;
ralink,mtd-eeprom = <&boardconfig 0x410>;
ralink,mtd-eeprom-swap;
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
};
usb@0f,0 {
@ -283,3 +285,13 @@
status = "okay";
gpios = <&gpiomm 1 GPIO_ACTIVE_HIGH>;
};
&boardconfig {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_boardconfig_16: macaddr@16 {
reg = <0x16 0x6>;
};
};

View File

@ -107,7 +107,8 @@
&gsw {
phy-mode = "mii";
mtd-mac-address = <&art 0x16>;
nvmem-cells = <&macaddr_art_16>;
nvmem-cell-names = "mac-address";
};
&localbus {
@ -159,7 +160,8 @@
compatible = "pci168c,0029";
reg = <0x7000 0 0 0 0>;
qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
mtd-mac-address = <&art 0x16>;
nvmem-cells = <&macaddr_art_16>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};
};
@ -177,3 +179,13 @@
status = "okay";
gpios = <&gpio 31 GPIO_ACTIVE_HIGH>;
};
&art {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_art_16: macaddr@16 {
reg = <0x16 0x6>;
};
};

View File

@ -94,7 +94,8 @@
};
&eth0 {
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
};
&gphy0 {
@ -233,3 +234,13 @@
status = "okay";
vbus-supply = <&usb_vbus>;
};
&boardconfig {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_boardconfig_16: macaddr@16 {
reg = <0x16 0x6>;
};
};

View File

@ -107,7 +107,8 @@
};
&eth0 {
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
};
&gphy0 {
@ -219,7 +220,8 @@
reg = <0x7000 0 0 0 0>;
ralink,mtd-eeprom = <&boardconfig 0x410>;
ralink,mtd-eeprom-swap;
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};
};
@ -243,3 +245,13 @@
&gpio 31 GPIO_ACTIVE_HIGH //still unknown
&gpio 3 GPIO_ACTIVE_HIGH>; //reset_slic?
};
&boardconfig {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_boardconfig_16: macaddr@16 {
reg = <0x16 0x6>;
};
};

View File

@ -127,7 +127,8 @@
};
&eth0 {
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};
@ -238,7 +239,8 @@
reg = <0x7000 0 0 0 0>;
ralink,mtd-eeprom = <&boardconfig 0x410>;
ralink,mtd-eeprom-swap;
mtd-mac-address = <&boardconfig 0x16>;
nvmem-cells = <&macaddr_boardconfig_16>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};
};
@ -278,3 +280,13 @@
&gpio 31 GPIO_ACTIVE_HIGH //still unknown
&gpio 3 GPIO_ACTIVE_HIGH>; //reset_slic?
};
&boardconfig {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_boardconfig_16: macaddr@16 {
reg = <0x16 0x6>;
};
};

View File

@ -110,7 +110,8 @@
};
&eth0 {
mtd-mac-address = <&ath9k_cal 0xf100>;
nvmem-cells = <&macaddr_ath9k_cal_f100>;
nvmem-cell-names = "mac-address";
};
&gphy0 {
@ -203,7 +204,8 @@
gpio-controller;
qca,no-eeprom;
qca,disable-5ghz;
mtd-mac-address = <&ath9k_cal 0xf100>;
nvmem-cells = <&macaddr_ath9k_cal_f100>;
nvmem-cell-names = "mac-address";
mac-address-increment = <2>;
};
};
@ -266,3 +268,13 @@
status = "okay";
vbus-supply = <&usb_vbus>;
};
&ath9k_cal {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_ath9k_cal_f100: macaddr@f100 {
reg = <0xf100 0x6>;
};
};

View File

@ -100,7 +100,8 @@
};
&eth0 {
mtd-mac-address = <&romfile 0xf100>;
nvmem-cells = <&macaddr_romfile_f100>;
nvmem-cell-names = "mac-address";
};
&gphy0 {
@ -191,7 +192,8 @@
mediatek,mtd-eeprom = <&radio 0x0000>;
big-endian;
ieee80211-freq-limit = <5000000 6000000>;
mtd-mac-address = <&romfile 0xf100>;
nvmem-cells = <&macaddr_romfile_f100>;
nvmem-cell-names = "mac-address";
mac-address-increment = <2>;
};
};
@ -277,3 +279,13 @@
status = "okay";
vbus-supply = <&usb_vbus>;
};
&romfile {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_romfile_f100: macaddr@f100 {
reg = <0xf100 0x6>;
};
};