[openwrt/openwrt] ath79: convert boards based on senao_ap-dual.dtsi WiFis to nvmem-cells

LEDE Commits lede-commits at lists.infradead.org
Thu Dec 15 06:46:50 PST 2022


chunkeey pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/4845b60525e158f72da56a7468dda9243820c5ea

commit 4845b60525e158f72da56a7468dda9243820c5ea
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Thu Dec 15 09:44:55 2022 +0100

    ath79: convert boards based on senao_ap-dual.dtsi WiFis to nvmem-cells
    
    Pull the calibration data from the nvmem subsystem. This allows us to
    move userspace caldata extraction into the device-tree definition.
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 target/linux/ath79/dts/ar9344_engenius_eap600.dts       | 16 ++++++++++++----
 target/linux/ath79/dts/ar9344_engenius_ecb600.dts       | 16 ++++++++++++----
 target/linux/ath79/dts/ar9344_senao_ap-dual.dtsi        |  3 ---
 target/linux/ath79/dts/ar9344_watchguard_ap100.dts      | 17 +++++++++++++++--
 target/linux/ath79/dts/ar9344_watchguard_ap200.dts      | 16 ++++++++++++----
 .../base-files/etc/hotplug.d/firmware/10-ath9k-eeprom   |  4 ----
 6 files changed, 51 insertions(+), 21 deletions(-)

diff --git a/target/linux/ath79/dts/ar9344_engenius_eap600.dts b/target/linux/ath79/dts/ar9344_engenius_eap600.dts
index 50e0674be4..618660802c 100644
--- a/target/linux/ath79/dts/ar9344_engenius_eap600.dts
+++ b/target/linux/ath79/dts/ar9344_engenius_eap600.dts
@@ -36,14 +36,14 @@
 
 &pcie {
 	wifi at 0,0,0 {
-		nvmem-cells = <&macaddr_art_0>;
-		nvmem-cell-names = "mac-address";
+		nvmem-cells = <&macaddr_art_0>, <&calibration_art_5000>;
+		nvmem-cell-names = "mac-address", "calibration";
 	};
 };
 
 &wmac {
-	nvmem-cells = <&macaddr_art_0>;
-	nvmem-cell-names = "mac-address";
+	nvmem-cells = <&macaddr_art_0>, <&calibration_art_1000>;
+	nvmem-cell-names = "mac-address", "calibration";
 	mac-address-increment = <(-1)>;
 };
 
@@ -55,4 +55,12 @@
 	macaddr_art_0: macaddr at 0 {
 		reg = <0x0 0x6>;
 	};
+
+	calibration_art_1000: calibration at 1000 {
+		reg = <0x1000 0x440>;
+	};
+
+	calibration_art_5000: calibration at 5000 {
+		reg = <0x5000 0x440>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar9344_engenius_ecb600.dts b/target/linux/ath79/dts/ar9344_engenius_ecb600.dts
index ad32dc9e39..5f6ffb130d 100644
--- a/target/linux/ath79/dts/ar9344_engenius_ecb600.dts
+++ b/target/linux/ath79/dts/ar9344_engenius_ecb600.dts
@@ -30,15 +30,15 @@
 
 &pcie {
 	wifi at 0,0,0 {
-		nvmem-cells = <&macaddr_art_0>;
-		nvmem-cell-names = "mac-address";
+		nvmem-cells = <&macaddr_art_0>, <&calibration_art_5000>;
+		nvmem-cell-names = "mac-address", "calibration";
 		mac-address-increment = <(-2)>;
 	};
 };
 
 &wmac {
-	nvmem-cells = <&macaddr_art_0>;
-	nvmem-cell-names = "mac-address";
+	nvmem-cells = <&macaddr_art_0>, <&calibration_art_1000>;
+	nvmem-cell-names = "mac-address", "calibration";
 	mac-address-increment = <(-1)>;
 };
 
@@ -50,4 +50,12 @@
 	macaddr_art_0: macaddr at 0 {
 		reg = <0x0 0x6>;
 	};
+
+	calibration_art_1000: calibration at 1000 {
+		reg = <0x1000 0x440>;
+	};
+
+	calibration_art_5000: calibration at 5000 {
+		reg = <0x5000 0x440>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar9344_senao_ap-dual.dtsi b/target/linux/ath79/dts/ar9344_senao_ap-dual.dtsi
index c963138f6a..c0e95065d5 100644
--- a/target/linux/ath79/dts/ar9344_senao_ap-dual.dtsi
+++ b/target/linux/ath79/dts/ar9344_senao_ap-dual.dtsi
@@ -63,7 +63,6 @@
 		compatible = "pci168c,0030";
 		reg = <0x0 0 0 0 0>;
 		ieee80211-freq-limit = <2402000 2482000>;
-		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
 	};
@@ -73,6 +72,4 @@
 	status = "okay";
 
 	ieee80211-freq-limit = <4900000 5990000>;
-
-	mtd-cal-data = <&art 0x1000>;
 };
diff --git a/target/linux/ath79/dts/ar9344_watchguard_ap100.dts b/target/linux/ath79/dts/ar9344_watchguard_ap100.dts
index d2ebe14979..3cd3fb70e6 100644
--- a/target/linux/ath79/dts/ar9344_watchguard_ap100.dts
+++ b/target/linux/ath79/dts/ar9344_watchguard_ap100.dts
@@ -63,13 +63,18 @@
 
 &pcie {
 	status = "disabled";
+
+	wifi at 0,0,0 {
+		nvmem-cells = <&calibration_art_5000>;
+		nvmem-cell-names = "calibration";
+	};
 };
 
 &wmac {
 	/delete-property/ qca,disable-2ghz;
 
-	nvmem-cells = <&macaddr_art_0>;
-	nvmem-cell-names = "mac-address";
+	nvmem-cells = <&macaddr_art_0>, <&calibration_art_1000>;
+	nvmem-cell-names = "mac-address", "calibration";
 	mac-address-increment = <(-2)>;
 };
 
@@ -81,4 +86,12 @@
 	macaddr_art_0: macaddr at 0 {
 		reg = <0x0 0x6>;
 	};
+
+	calibration_art_1000: calibration at 1000 {
+		reg = <0x1000 0x440>;
+	};
+
+	calibration_art_5000: calibration at 5000 {
+		reg = <0x5000 0x440>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar9344_watchguard_ap200.dts b/target/linux/ath79/dts/ar9344_watchguard_ap200.dts
index 0cd966476c..88c7637fc9 100644
--- a/target/linux/ath79/dts/ar9344_watchguard_ap200.dts
+++ b/target/linux/ath79/dts/ar9344_watchguard_ap200.dts
@@ -63,15 +63,15 @@
 
 &pcie {
 	wifi at 0,0,0 {
-		nvmem-cells = <&macaddr_art_0>;
-		nvmem-cell-names = "mac-address";
+		nvmem-cells = <&macaddr_art_0>, <&calibration_art_5000>;
+		nvmem-cell-names = "mac-address", "calibration";
 		mac-address-increment = <(-1)>;
 	};
 };
 
 &wmac {
-	nvmem-cells = <&macaddr_art_0>;
-	nvmem-cell-names = "mac-address";
+	nvmem-cells = <&macaddr_art_0>, <&calibration_art_1000>;
+	nvmem-cell-names = "mac-address", "calibration";
 	mac-address-increment = <(-2)>;
 };
 
@@ -83,4 +83,12 @@
 	macaddr_art_0: macaddr at 0 {
 		reg = <0x0 0x6>;
 	};
+
+	calibration_art_1000: calibration at 1000 {
+		reg = <0x1000 0x440>;
+	};
+
+	calibration_art_5000: calibration at 5000 {
+		reg = <0x5000 0x440>;
+	};
 };
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 0001fa1590..9ded116e9d 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -83,13 +83,9 @@ case "$FIRMWARE" in
 	;;
 "ath9k-eeprom-pci-0000:00:00.0.bin")
 	case $board in
-	engenius,eap600|\
-	engenius,ecb600|\
 	mercury,mw4530r-v1|\
 	ocedo,raccoon|\
 	ubnt,unifi-ap-pro|\
-	watchguard,ap100|\
-	watchguard,ap200|\
 	winchannel,wb2000)
 		caldata_extract "art" 0x5000 0x440
 		;;




More information about the lede-commits mailing list