lantiq: use nvmem for fritz73x0
authorRosen Penev <rosenp@gmail.com>
Mon, 16 Dec 2024 23:07:50 +0000 (15:07 -0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 23 Dec 2024 22:46:42 +0000 (23:46 +0100)
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@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17278
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts
target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom

index 9ea6c3929cb7c7b801623336b37265daccb89af5..ba6c48704893bd92aa24b9a8f03a66e607eafd34 100644 (file)
                                        #address-cells = <1>;
                                        #size-cells = <1>;
 
+                                       cal_ath9k_cal_985: calibration@985 {
+                                               reg = <0x985 0x3d8>;
+                                       };
+
                                        macaddr_ath9k_cal_a91: macaddr@a91 {
                                                compatible = "mac-base";
                                                reg = <0xa91 0x6>;
        reset-gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
 
        wifi@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";
        };
 };
index 953a8ccbf740acb51e4f04e3c1fa31a863321365..c09d3879b4209b8995a952e9776b4f21c25b3656 100644 (file)
                                        #address-cells = <1>;
                                        #size-cells = <1>;
 
+                                       cal_ath9k_cal_985: calibration@985 {
+                                               reg = <0x985 0x3d8>;
+                                       };
+
                                        macaddr_ath9k_cal_a91: macaddr@a91 {
                                                compatible = "mac-base";
                                                reg = <0xa91 0x6>;
        reset-gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
 
        wifi@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";
        };
 };
 
index 98bb9af6947a298775ff7fa26ac6501c57df8378..91eb3f16806ce3e7cdaf3972cdaebc77a359a2e9 100644 (file)
@@ -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"
                                ;;