[openwrt/openwrt] ath79: convert Buffalo WZR-HP-G302H A1A0 WiFis to nvmem-cells

LEDE Commits lede-commits at lists.infradead.org
Sat Dec 17 11:49:43 PST 2022


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/b7ad3c5c5d16de37f393fbee2233e1aa1eb7f3b3

commit b7ad3c5c5d16de37f393fbee2233e1aa1eb7f3b3
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Thu Dec 15 15:17:26 2022 +0100

    ath79: convert Buffalo WZR-HP-G302H A1A0 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.
    
    Merge art into partition node.
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 .../ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts | 29 +++++++++++-----------
 .../etc/hotplug.d/firmware/10-ath9k-eeprom         |  1 -
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts
index c6fd220ed1..4a2f749cc4 100644
--- a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts
+++ b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts
@@ -133,10 +133,22 @@
 				label = "u-boot-env";
 			};
 
-			art: partition at 50000 {
+			partition at 50000 {
 				reg = <0x50000 0x10000>;
 				label = "art";
 				read-only;
+
+				compatible = "nvmem-cells";
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				macaddr_art_120c: macaddr at 120c {
+					reg = <0x120c 0x6>;
+				};
+
+				calibration_art_1000: calibration at 1000 {
+					reg = <0x1000 0xeb8>;
+				};
 			};
 
 			partition at 60000 {
@@ -197,9 +209,8 @@
 	ath9k: wifi at 0,0 {
 		compatible = "pci168c,002a";
 		reg = <0x0000 0 0 0 0>;
-		nvmem-cells = <&macaddr_art_120c>;
-		nvmem-cell-names = "mac-address";
-		qca,no-eeprom;
+		nvmem-cells = <&macaddr_art_120c>, <&calibration_art_1000>;
+		nvmem-cell-names = "mac-address", "calibration";
 		#gpio-cells = <2>;
 		gpio-controller;
 	};
@@ -212,13 +223,3 @@
 &usb {
 	status = "okay";
 };
-
-&art {
-	compatible = "nvmem-cells";
-	#address-cells = <1>;
-	#size-cells = <1>;
-
-	macaddr_art_120c: macaddr at 120c {
-		reg = <0x120c 0x6>;
-	};
-};
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 ebcac0b6b2..5fcfcaf64f 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
@@ -86,7 +86,6 @@ case "$FIRMWARE" in
 	avm,fritz300e)
 		caldata_extract_reverse "urloader" 0x1541 0x440
 		;;
-	buffalo,wzr-hp-g302h-a1a0|\
 	ubnt,unifi-ap-outdoor-plus)
 		caldata_extract "art" 0x1000 0xeb8
 		;;




More information about the lede-commits mailing list