lantiq: use nvmem for fritz 736x
authorRosen Penev <rosenp@gmail.com>
Mon, 16 Dec 2024 23:42:19 +0000 (15:42 -0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 23 Dec 2024 22:46:42 +0000 (23:46 +0100)
Two use AR9287 and one AR9381. Both have different calibration sizes.
Move differences out of wifi node to make it clearer what's what.

qca,no-eeprom needs to stay for 7362sl as there's no nvmem equivalent
for caldata_extract_reverse

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/vr9_avm_fritz7360-v2.dts
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi
target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom

index cc15324b56e08b15c402fe6b2845b1fa1f4e00c4..1b4140506291e9e3802c2a8e7c7a9506d59278d8 100644 (file)
@@ -49,7 +49,7 @@
                                        #size-cells = <1>;
 
                                        cal_urlader_985: cal@985 {
-                                               reg = <0x985 0x440>;
+                                               reg = <0x985 0x3d8>;
                                        };
 
                                        macaddr_urlader_a91: macaddr@a91 {
@@ -94,7 +94,7 @@
 };
 
 &wifi {
-       /delete-property/ qca,no-eeprom;
+       compatible = "pci168c,002e";
        nvmem-cells = <&cal_urlader_985>;
        nvmem-cell-names = "calibration";
 };
index cbe6c14c991fdc2143beb7c8eecdca7c5c9f185a..9301b049cae9b682f40329df568fa0f476604154 100644 (file)
                                        #address-cells = <1>;
                                        #size-cells = <1>;
 
+                                       cal_urlader_985: cal@985 {
+                                               reg = <0x985 0x3d8>;
+                                       };
+
                                        macaddr_urlader_a91: macaddr@a91 {
                                                compatible = "mac-base";
                                                reg = <0xa91 0x6>;
@@ -89,3 +93,9 @@
 &phy1 {
        reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
 };
+
+&wifi {
+       compatible = "pci168c,002e";
+       nvmem-cells = <&cal_urlader_985>;
+       nvmem-cell-names = "calibration";
+};
index 7929bde6cfe68bfccf687ccedcc940988cbbc993..e1334fa3064bc9c86067e4e8f8041a6e7cfbc9ee 100644 (file)
 &phy1 {
        reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
 };
+
+&wifi {
+       compatible = "pci168c,0030";
+       qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:01:00.0.bin */
+};
index e7fc9a4f55b7b4ea2cbfffce8fbe749117c8ff7a..cc0c97da89c01fce875b36e8cf3ddb9a36f6fbff 100644 (file)
                #address-cells = <2>;
                device_type = "pci";
 
-               wifi: wifi@168c,002e {
-                       compatible = "pci168c,002e";
+               wifi: wifi@0,0 {
                        reg = <0 0 0 0 0>;
-                       qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:01:00.0.bin */
                };
        };
 };
index 164e2d39caa5b648de81b09286c4698f0fb37112..936181c693521001a414ef18f15a3bf12037d219 100644 (file)
@@ -19,9 +19,6 @@ case "$FIRMWARE" in
                        avm,fritz3390)
                                caldata_extract_reverse "urlader" 0x2546 0x440
                                ;;
-                       avm,fritz7360sl)
-                               caldata_extract "urlader" 0x985 0x1000
-                               ;;
                        avm,fritz7412|\
                        avm,fritz7430)
                                /usr/bin/fritz_cal_extract -i 1 -s 0x1e000 -e 0x207 -l 5120 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader") || \