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

View File

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

View File

@ -93,15 +93,23 @@
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_mib0_4b: macaddr@4b {
reg = <0x4b 0x11>;
};
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
macaddr_mib0_66: macaddr@66 {
reg = <0x66 0x11>;
macaddr_mib0_4b: macaddr@4b {
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>;
nvmem-cells = <&macaddr_mib0_4b>, <&calibration_ath9k>;
nvmem-cell-names = "mac-address-ascii", "calibration";
nvmem-cells = <&macaddr_mib0_4b 0>, <&calibration_ath9k>;
nvmem-cell-names = "mac-address", "calibration";
};

View File

@ -29,8 +29,8 @@
/* default for ar934x, except for 1000M */
pll-data = <0x06000000 0x00000101 0x00001616>;
nvmem-cells = <&macaddr_lan>;
nvmem-cell-names = "mac-address-ascii";
nvmem-cells = <&macaddr_lan 0>;
nvmem-cell-names = "mac-address";
phy-mode = "rgmii";
phy-handle = <&phy0>;
@ -58,13 +58,13 @@
ath9k: wifi@0,0 {
compatible = "pci168c,0030";
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
improvements. */
/* nvmem-cells = <&macaddr_wan>, <&cal_art_5000>;
nvmem-cell-names = "mac-address-ascii", "calibration";
mac-address-increment = <1>; */
qca,no-eeprom; /* remove this when "mac-address-ascii" works */
/* nvmem-cells = <&macaddr_wan 1>, <&cal_art_5000>;
nvmem-cell-names = "mac-address", "calibration";
*/
qca,no-eeprom; /* remove this when "mac-address" works */
gpio-controller;
#gpio-cells = <2>;
};
@ -117,15 +117,23 @@
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_lan: macaddr@4 {
reg = <0x4 0x11>;
};
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
macaddr_wan: macaddr@18 {
reg = <0x18 0x11>;
macaddr_lan: macaddr@4 {
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 {
status = "okay";
nvmem-cells = <&macaddr_lan>, <&cal_art_1000>;
nvmem-cell-names = "mac-address-ascii", "calibration";
nvmem-cells = <&macaddr_lan 0>, <&cal_art_1000>;
nvmem-cell-names = "mac-address", "calibration";
};

View File

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

View File

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