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>
&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 {
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>;
+ };
+};
&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)>;
};
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>;
+ };
+};
&gsw {
phy-mode = "rgmii";
- mtd-mac-address = <&boardconfig 0x10024>;
+ nvmem-cells = <&macaddr_boardconfig_10024>;
+ nvmem-cell-names = "mac-address";
};
&pci0 {
status = "okay";
vbus-supply = <&usb_vbus>;
};
+
+&boardconfig {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_boardconfig_10024: macaddr@10024 {
+ reg = <0x10024 0x6>;
+ };
+};
&gsw {
phy-mode = "mii";
- mtd-mac-address = <&boardconfig 0x16>;
+ nvmem-cells = <&macaddr_boardconfig_16>;
+ nvmem-cell-names = "mac-address";
};
&localbus {
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>;
+ };
+};
&gsw {
phy-mode = "mii";
- mtd-mac-address = <&boardconfig 0x16>;
+ nvmem-cells = <&macaddr_boardconfig_16>;
+ nvmem-cell-names = "mac-address";
};
&localbus {
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>;
+ };
+};
&gsw {
/* gpiomm 10 - switch */
phy-mode = "rmii";
- mtd-mac-address = <&boardconfig 0x16>;
+ nvmem-cells = <&macaddr_boardconfig_16>;
+ nvmem-cell-names = "mac-address";
};
&localbus {
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>;
+ };
+};
/* #define ARV4525PW_PHYRESET 13 */
&gsw {
phy-mode = "mii";
- mtd-mac-address = <&boardconfig 0x16>;
+ nvmem-cells = <&macaddr_boardconfig_16>;
+ nvmem-cell-names = "mac-address";
};
&localbus {
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>;
+ };
+};
*/
&gsw {
phy-mode = "rmii";
- mtd-mac-address = <&boardconfig 0x16>;
+ nvmem-cells = <&macaddr_boardconfig_16>;
+ nvmem-cell-names = "mac-address";
};
&localbus {
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>;
+ };
+};
/* GPIO 19: switch reset */
&gsw {
phy-mode = "rmii";
- mtd-mac-address = <&boardconfig 0x16>;
+ nvmem-cells = <&macaddr_boardconfig_16>;
+ nvmem-cell-names = "mac-address";
};
&localbus {
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>;
+ };
+};
&gsw {
/* Switch reset 19 */
phy-mode = "mii";
- mtd-mac-address = <&boardconfig 0x16>;
+ nvmem-cells = <&macaddr_boardconfig_16>;
+ nvmem-cell-names = "mac-address";
};
&localbus {
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>;
+ };
+};
*/
&gsw {
phy-mode = "mii";
- mtd-mac-address = <&boardconfig 0x16>;
+ nvmem-cells = <&macaddr_boardconfig_16>;
+ nvmem-cell-names = "mac-address";
};
&localbus {
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>;
};
};
&vmmc {
status = "okay";
};
+
+&boardconfig {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_boardconfig_16: macaddr@16 {
+ reg = <0x16 0x6>;
+ };
+};
&gsw {
phy-mode = "mii";
- mtd-mac-address = <&boardconfig 0x16>;
+ nvmem-cells = <&macaddr_boardconfig_16>;
+ nvmem-cell-names = "mac-address";
};
&localbus {
&vmmc {
status = "okay";
};
+
+&boardconfig {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_boardconfig_16: macaddr@16 {
+ reg = <0x16 0x6>;
+ };
+};
&gsw {
phy-mode = "mii";
- mtd-mac-address = <&boardconfig 0x16>;
+ nvmem-cells = <&macaddr_boardconfig_16>;
+ nvmem-cell-names = "mac-address";
};
&localbus {
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>;
+ };
+};
&gsw {
phy-mode = "rmii";
- mtd-mac-address = <&boardconfig 0x16>;
+ nvmem-cells = <&macaddr_boardconfig_16>;
+ nvmem-cell-names = "mac-address";
};
&localbus {
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;
};
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>;
+ };
+};
&gsw {
phy-mode = "mii";
- mtd-mac-address = <&boardconfig 0x16>;
+ nvmem-cells = <&macaddr_boardconfig_16>;
+ nvmem-cell-names = "mac-address";
};
&localbus {
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 {
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>;
+ };
+};
&gsw {
phy-mode = "mii";
- mtd-mac-address = <&art 0x16>;
+ nvmem-cells = <&macaddr_art_16>;
+ nvmem-cell-names = "mac-address";
};
&localbus {
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>;
};
};
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>;
+ };
+};
};
ð0 {
- mtd-mac-address = <&boardconfig 0x16>;
+ nvmem-cells = <&macaddr_boardconfig_16>;
+ nvmem-cell-names = "mac-address";
};
&gphy0 {
status = "okay";
vbus-supply = <&usb_vbus>;
};
+
+&boardconfig {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_boardconfig_16: macaddr@16 {
+ reg = <0x16 0x6>;
+ };
+};
};
ð0 {
- mtd-mac-address = <&boardconfig 0x16>;
+ nvmem-cells = <&macaddr_boardconfig_16>;
+ nvmem-cell-names = "mac-address";
};
&gphy0 {
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>;
};
};
&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>;
+ };
+};
};
ð0 {
- mtd-mac-address = <&boardconfig 0x16>;
+ nvmem-cells = <&macaddr_boardconfig_16>;
+ nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};
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>;
};
};
&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>;
+ };
+};
};
ð0 {
- mtd-mac-address = <&ath9k_cal 0xf100>;
+ nvmem-cells = <&macaddr_ath9k_cal_f100>;
+ nvmem-cell-names = "mac-address";
};
&gphy0 {
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>;
};
};
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>;
+ };
+};
};
ð0 {
- mtd-mac-address = <&romfile 0xf100>;
+ nvmem-cells = <&macaddr_romfile_f100>;
+ nvmem-cell-names = "mac-address";
};
&gphy0 {
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>;
};
};
status = "okay";
vbus-supply = <&usb_vbus>;
};
+
+&romfile {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_romfile_f100: macaddr@f100 {
+ reg = <0xf100 0x6>;
+ };
+};