ath79: replace "mac-address-ascii" with "mac-base"

With upstream accepted "mac-base" binding there is no need for a
downstream "mac-address-ascii" workaround anymore.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This commit is contained in:
Rafał Miłecki 2023-07-21 07:34:25 +02:00
parent 350d9a3462
commit daaa0c1b25
6 changed files with 128 additions and 87 deletions

View File

@ -139,8 +139,8 @@
ath9k0: wifi@0,11 { ath9k0: wifi@0,11 {
compatible = "pci168c,0029"; compatible = "pci168c,0029";
reg = <0x8800 0 0 0 0>; reg = <0x8800 0 0 0 0>;
nvmem-cells = <&macaddr_lan>, <&cal_art_1000>; nvmem-cells = <&macaddr_lan 0>, <&cal_art_1000>;
nvmem-cell-names = "mac-address-ascii", "calibration"; nvmem-cell-names = "mac-address", "calibration";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-controller; gpio-controller;
}; };
@ -148,9 +148,8 @@
ath9k1: wifi@0,12 { ath9k1: wifi@0,12 {
compatible = "pci168c,0029"; compatible = "pci168c,0029";
reg = <0x9000 0 0 0 0>; reg = <0x9000 0 0 0 0>;
nvmem-cells = <&macaddr_wan>, <&cal_art_5000>; nvmem-cells = <&macaddr_wan 1>, <&cal_art_5000>;
nvmem-cell-names = "mac-address-ascii", "calibration"; nvmem-cell-names = "mac-address", "calibration";
mac-address-increment = <1>;
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-controller; gpio-controller;
}; };
@ -191,23 +190,31 @@
label = "caldata"; label = "caldata";
reg = <0x660000 0x010000>; reg = <0x660000 0x010000>;
read-only; read-only;
#address-cells = <1>;
#size-cells = <1>;
cal_art_1000: cal@1000 { nvmem-layout {
reg = <0x1000 0xeb8>; compatible = "fixed-layout";
}; #address-cells = <1>;
#size-cells = <1>;
cal_art_5000: cal@5000 { cal_art_1000: cal@1000 {
reg = <0x5000 0xeb8>; reg = <0x1000 0xeb8>;
}; };
macaddr_lan: macaddr@ffa0 { cal_art_5000: cal@5000 {
reg = <0xffa0 0x11>; reg = <0x5000 0xeb8>;
}; };
macaddr_wan: macaddr@ffb4 { macaddr_lan: macaddr@ffa0 {
reg = <0xffb4 0x11>; compatible = "mac-base";
reg = <0xffa0 0x11>;
#nvmem-cell-cells = <1>;
};
macaddr_wan: macaddr@ffb4 {
compatible = "mac-base";
reg = <0xffb4 0x11>;
#nvmem-cell-cells = <1>;
};
}; };
}; };
@ -224,8 +231,8 @@
pll-data = <0x11110000 0x00001099 0x00991099>; pll-data = <0x11110000 0x00001099 0x00991099>;
nvmem-cells = <&macaddr_lan>; nvmem-cells = <&macaddr_lan 0>;
nvmem-cell-names = "mac-address-ascii"; nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
@ -238,8 +245,8 @@
pll-data = <0x11110000 0x00001099 0x00991099>; pll-data = <0x11110000 0x00001099 0x00991099>;
nvmem-cells = <&macaddr_wan>; nvmem-cells = <&macaddr_wan 0>;
nvmem-cell-names = "mac-address-ascii"; nvmem-cell-names = "mac-address";
phy-handle = <&phy4>; phy-handle = <&phy4>;
}; };

View File

@ -77,9 +77,22 @@
}; };
bdinfo: partition@10000 { bdinfo: partition@10000 {
compatible = "nvmem-cells";
reg = <0x10000 0x10000>; reg = <0x10000 0x10000>;
label = "bdinfo"; label = "bdinfo";
read-only; read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
macaddr_bdinfo_18a: macaddr@18a {
compatible = "mac-base";
reg = <0x18a 0x11>;
#nvmem-cell-cells = <1>;
};
};
}; };
firmware: partition@20000 { firmware: partition@20000 {
@ -124,33 +137,21 @@
&eth0 { &eth0 {
status = "okay"; status = "okay";
nvmem-cells = <&macaddr_bdinfo_18a>; nvmem-cells = <&macaddr_bdinfo_18a 1>;
nvmem-cell-names = "mac-address-ascii"; nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
}; };
&eth1 { &eth1 {
status = "okay"; status = "okay";
nvmem-cells = <&macaddr_bdinfo_18a>; nvmem-cells = <&macaddr_bdinfo_18a 0>;
nvmem-cell-names = "mac-address-ascii"; nvmem-cell-names = "mac-address";
}; };
&wmac { &wmac {
status = "okay"; status = "okay";
mtd-cal-data = <&art 0x1000>; mtd-cal-data = <&art 0x1000>;
nvmem-cells = <&macaddr_bdinfo_18a>; nvmem-cells = <&macaddr_bdinfo_18a 2>;
nvmem-cell-names = "mac-address-ascii"; nvmem-cell-names = "mac-address";
mac-address-increment = <2>;
};
&bdinfo {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_bdinfo_18a: macaddr@18a {
reg = <0x18a 0x11>;
};
}; };

View File

@ -93,15 +93,23 @@
read-only; read-only;
compatible = "nvmem-cells"; compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_mib0_4b: macaddr@4b { nvmem-layout {
reg = <0x4b 0x11>; compatible = "fixed-layout";
}; #address-cells = <1>;
#size-cells = <1>;
macaddr_mib0_66: macaddr@66 { macaddr_mib0_4b: macaddr@4b {
reg = <0x66 0x11>; compatible = "mac-base";
reg = <0x4b 0x11>;
#nvmem-cell-cells = <1>;
};
macaddr_mib0_66: macaddr@66 {
compatible = "mac-base";
reg = <0x66 0x11>;
#nvmem-cell-cells = <1>;
};
}; };
}; };
@ -161,6 +169,6 @@
ieee80211-freq-limit = <2402000 2482000>; ieee80211-freq-limit = <2402000 2482000>;
nvmem-cells = <&macaddr_mib0_4b>, <&calibration_ath9k>; nvmem-cells = <&macaddr_mib0_4b 0>, <&calibration_ath9k>;
nvmem-cell-names = "mac-address-ascii", "calibration"; nvmem-cell-names = "mac-address", "calibration";
}; };

View File

@ -29,8 +29,8 @@
/* default for ar934x, except for 1000M */ /* default for ar934x, except for 1000M */
pll-data = <0x06000000 0x00000101 0x00001616>; pll-data = <0x06000000 0x00000101 0x00001616>;
nvmem-cells = <&macaddr_lan>; nvmem-cells = <&macaddr_lan 0>;
nvmem-cell-names = "mac-address-ascii"; nvmem-cell-names = "mac-address";
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-handle = <&phy0>; phy-handle = <&phy0>;
@ -58,13 +58,13 @@
ath9k: wifi@0,0 { ath9k: wifi@0,0 {
compatible = "pci168c,0030"; compatible = "pci168c,0030";
reg = <0x0000 0 0 0 0>; reg = <0x0000 0 0 0 0>;
/* "mac-address-ascii" currently does not work for /* "mac-address" currently does not work for
ath9k pci devices. these below are retained for future ath9k pci devices. these below are retained for future
improvements. */ improvements. */
/* nvmem-cells = <&macaddr_wan>, <&cal_art_5000>; /* nvmem-cells = <&macaddr_wan 1>, <&cal_art_5000>;
nvmem-cell-names = "mac-address-ascii", "calibration"; nvmem-cell-names = "mac-address", "calibration";
mac-address-increment = <1>; */ */
qca,no-eeprom; /* remove this when "mac-address-ascii" works */ qca,no-eeprom; /* remove this when "mac-address" works */
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
}; };
@ -117,15 +117,23 @@
read-only; read-only;
compatible = "nvmem-cells"; compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_lan: macaddr@4 { nvmem-layout {
reg = <0x4 0x11>; compatible = "fixed-layout";
}; #address-cells = <1>;
#size-cells = <1>;
macaddr_wan: macaddr@18 { macaddr_lan: macaddr@4 {
reg = <0x18 0x11>; compatible = "mac-base";
reg = <0x4 0x11>;
#nvmem-cell-cells = <1>;
};
macaddr_wan: macaddr@18 {
compatible = "mac-base";
reg = <0x18 0x11>;
#nvmem-cell-cells = <1>;
};
}; };
}; };
@ -160,6 +168,6 @@
&wmac { &wmac {
status = "okay"; status = "okay";
nvmem-cells = <&macaddr_lan>, <&cal_art_1000>; nvmem-cells = <&macaddr_lan 0>, <&cal_art_1000>;
nvmem-cell-names = "mac-address-ascii", "calibration"; nvmem-cell-names = "mac-address", "calibration";
}; };

View File

@ -65,8 +65,8 @@
phy-mode = "mii"; phy-mode = "mii";
nvmem-cells = <&macaddr_mfcdata_35>; nvmem-cells = <&macaddr_mfcdata_35 0>;
nvmem-cell-names = "mac-address-ascii"; nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <100>; speed = <100>;
@ -115,15 +115,23 @@
read-only; read-only;
compatible = "nvmem-cells"; compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_mfcdata_35: macaddr@35 { nvmem-layout {
reg = <0x35 0x11>; compatible = "fixed-layout";
}; #address-cells = <1>;
#size-cells = <1>;
macaddr_mfcdata_51: macaddr@51 { macaddr_mfcdata_35: macaddr@35 {
reg = <0x51 0x11>; compatible = "mac-base";
reg = <0x35 0x11>;
#nvmem-cell-cells = <1>;
};
macaddr_mfcdata_51: macaddr@51 {
compatible = "mac-base";
reg = <0x51 0x11>;
#nvmem-cell-cells = <1>;
};
}; };
}; };
@ -165,6 +173,6 @@
&wmac { &wmac {
status = "okay"; status = "okay";
nvmem-cells = <&cal_art_1000>, <&macaddr_mfcdata_51>; nvmem-cells = <&cal_art_1000>, <&macaddr_mfcdata_51 0>;
nvmem-cell-names = "calibration", "mac-address-ascii"; nvmem-cell-names = "calibration", "mac-address";
}; };

View File

@ -32,8 +32,8 @@
compatible = "qcom,ath10k"; compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>; reg = <0x0000 0 0 0 0>;
nvmem-cells = <&calibration_ath10k>, <&macaddr_devdata_94>; nvmem-cells = <&calibration_ath10k>, <&macaddr_devdata_94 0>;
nvmem-cell-names = "calibration", "mac-address-ascii"; nvmem-cell-names = "calibration", "mac-address";
}; };
}; };
@ -68,16 +68,25 @@
read-only; read-only;
compatible = "nvmem-cells"; compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_devdata_94: macaddr@94 { nvmem-layout {
reg = <0x94 0x11>; compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
macaddr_devdata_94: macaddr@94 {
compatible = "mac-base";
reg = <0x94 0x11>;
#nvmem-cell-cells = <1>;
};
macaddr_devdata_b0: macaddr@b0 {
compatible = "mac-base";
reg = <0xb0 0x11>;
#nvmem-cell-cells = <1>;
};
}; };
macaddr_devdata_b0: macaddr@b0 {
reg = <0xb0 0x11>;
};
}; };
partition@60000 { partition@60000 {
@ -147,6 +156,6 @@
&wmac { &wmac {
status = "okay"; status = "okay";
nvmem-cells = <&calibration_ath9k>, <&macaddr_devdata_b0>; nvmem-cells = <&calibration_ath9k>, <&macaddr_devdata_b0 0>;
nvmem-cell-names = "calibration", "mac-address-ascii"; nvmem-cell-names = "calibration", "mac-address";
}; };