[openwrt/openwrt] lantiq: use nvmem for fritz73x0

LEDE Commits lede-commits at lists.infradead.org
Mon Dec 23 14:47:13 PST 2024


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d3f8b1cf17ad0a241316f217ea2710fcf5228005

commit d3f8b1cf17ad0a241316f217ea2710fcf5228005
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Mon Dec 16 15:07:50 2024 -0800

    lantiq: use nvmem for fritz73x0
    
    These units use AR9287, which has a calibration size of 3d8.
    
    Also fixed compatible string to the proper one to indicate AR9287.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/17278
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts | 9 +++++++--
 .../lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts | 9 +++++++--
 .../xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom       | 3 ---
 3 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts
index 9ea6c3929c..ba6c487048 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts
@@ -136,6 +136,10 @@
 					#address-cells = <1>;
 					#size-cells = <1>;
 
+					cal_ath9k_cal_985: calibration at 985 {
+						reg = <0x985 0x3d8>;
+					};
+
 					macaddr_ath9k_cal_a91: macaddr at a91 {
 						compatible = "mac-base";
 						reg = <0xa91 0x6>;
@@ -180,8 +184,9 @@
 	reset-gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
 
 	wifi at 0,0 {
-		compatible = "pci0,0";
+		compatible = "pci168c,002d";
 		reg = <0x7000 0 0 0 0>;
-		qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
+		nvmem-cells = <&cal_ath9k_cal_985>;
+		nvmem-cell-names = "calibration";
 	};
 };
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts
index 953a8ccbf7..c09d3879b4 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts
@@ -163,6 +163,10 @@
 					#address-cells = <1>;
 					#size-cells = <1>;
 
+					cal_ath9k_cal_985: calibration at 985 {
+						reg = <0x985 0x3d8>;
+					};
+
 					macaddr_ath9k_cal_a91: macaddr at a91 {
 						compatible = "mac-base";
 						reg = <0xa91 0x6>;
@@ -206,9 +210,10 @@
 	reset-gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
 
 	wifi at 0,0 {
-		compatible = "pci0,0";
+		compatible = "pci168c,002d";
 		reg = <0x7000 0 0 0 0>;
-		qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
+		nvmem-cells = <&cal_ath9k_cal_985>;
+		nvmem-cell-names = "calibration";
 	};
 };
 
diff --git a/target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
index 98bb9af694..91eb3f1680 100644
--- a/target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
+++ b/target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
@@ -45,9 +45,6 @@ case "$FIRMWARE" in
 				caldata_extract "calibration" 0xf000 0x1000
 				ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 2) 0x20c
 				;;
-			avm,fritz7312|avm,fritz7320)
-				caldata_extract "urlader" 0x985 0x1000
-				;;
 			*)
 				caldata_die "board $board is not supported yet"
 				;;




More information about the lede-commits mailing list