]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ath79: add nvmem handling for AR9285 devices 19863/head
authorRosen Penev <rosenp@gmail.com>
Fri, 29 Aug 2025 23:28:54 +0000 (16:28 -0700)
committerHauke Mehrtens <hauke@hauke-m.de>
Thu, 11 Sep 2025 23:20:49 +0000 (01:20 +0200)
They have the same 0x200 calibration size.

Added various compatible lines in various places to make it clear what
device we're talking about.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19863
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
17 files changed:
target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts
target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi
target/linux/ath79/dts/ar7240_tplink.dtsi
target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi
target/linux/ath79/dts/ar7240_tplink_tl-wa701nd-v1.dts
target/linux/ath79/dts/ar7240_tplink_tl-wa730re-v1.dts
target/linux/ath79/dts/ar7240_tplink_tl-wa801nd-v1.dts
target/linux/ath79/dts/ar7240_tplink_tl-wa830re-v1.dts
target/linux/ath79/dts/ar7240_tplink_tl-wa901nd-v1.dts
target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi
target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v1.dts
target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v3.dts
target/linux/ath79/dts/ar7240_tplink_tl-wr741-v1.dts
target/linux/ath79/dts/ar7240_tplink_tl-wr743nd-v1.dts
target/linux/ath79/dts/ar7240_tplink_tl-wr841-v5.dts
target/linux/ath79/dts/ar7240_tplink_tl-wr941-v4.dts
target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom

index b1f8bd3a891cef87e82b719eb7f9a85a32b7b5f0..4be7b9779f4a38f94cc740d8f7dc6bbe128f8738 100644 (file)
                                        macaddr_art_6: macaddr@6 {
                                                reg = <0x6 0x6>;
                                        };
+
+                                       calibration_art_1000: calibration@1000 {
+                                               reg = <0x1000 0x200>;
+                                       };
                                };
                        };
                };
        ath9k: wifi@0,0 {
                compatible = "pci168c,002b";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&macaddr_art_0 1>;
-               nvmem-cell-names = "mac-address";
-               qca,no-eeprom;
+               nvmem-cells = <&macaddr_art_0 1>, <&calibration_art_1000>;
+               nvmem-cell-names = "mac-address", "calibration";
                #gpio-cells = <2>;
                gpio-controller;
        };
index 3d9ab10322d0f7e0f5d0c639ed420f580973e8fd..07d6779220020e925f7e13a2ed73a73f9c91ec0b 100644 (file)
                                        macaddr_art_6: macaddr@6 {
                                                reg = <0x6 0x6>;
                                        };
+
+                                       calibration_art_1000: calibration@1000 {
+                                               reg = <0x1000 0x200>;
+                                       };
                                };
                        };
                };
        ath9k: wifi@0,0 {
                compatible = "pci168c,002b";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&macaddr_art_0 1>;
-               nvmem-cell-names = "mac-address";
-               qca,no-eeprom;
+               nvmem-cells = <&macaddr_art_0 1>, <&calibration_art_1000>;
+               nvmem-cell-names = "mac-address", "calibration";
                #gpio-cells = <2>;
                gpio-controller;
        };
index 28e9a96b66fff590b2fd3cf52e5112e1b64a3c41..10256838b11bd40c48dd265e298168ede2c5aee7 100644 (file)
                                reg = <0x3f0000 0x10000>;
                                label = "art";
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       calibration_art_1000: calibration@1000 {
+                                       };
+                               };
                        };
                };
        };
 
        ath9k: wifi@0,0 {
                reg = <0x0000 0 0 0 0>;
-               qca,no-eeprom;
-               nvmem-cells = <&macaddr_uboot_1fc00 0>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&macaddr_uboot_1fc00 0>, <&calibration_art_1000>;
+               nvmem-cell-names = "mac-address", "calibration";
                #gpio-cells = <2>;
                gpio-controller;
        };
index 94d2570c6c1e54c4d0bf027dd13be69c0c3bf773..e7463ca9bad8b5d5f16ba8744a36f63e2a9b290a 100644 (file)
@@ -20,7 +20,3 @@
        nvmem-cells = <&macaddr_uboot_1fc00 0>;
        nvmem-cell-names = "mac-address";
 };
-
-&ath9k {
-       compatible = "pci168c,002a";
-};
index eda5ae4eb6c9347dffb4f8583e70979249911fe8..aad25dbc83adc3f69224455f36e6ea196e642458 100644 (file)
@@ -6,3 +6,11 @@
        model = "TP-Link TL-WA701ND v1";
        compatible = "tplink,tl-wa701nd-v1", "qca,ar7240";
 };
+
+&ath9k {
+       compatible = "pci168c,002b";
+};
+
+&calibration_art_1000 {
+       reg = <0x1000 0x200>;
+};
index 93e59dcda63064dfac722396d0f0a38995b58bb3..2bf5ae598ec968b99124812a4e4a8cc95b9eb92c 100644 (file)
@@ -6,3 +6,11 @@
        model = "TP-Link TL-WA730RE v1";
        compatible = "tplink,tl-wa730re-v1", "qca,ar7240";
 };
+
+&ath9k {
+       compatible = "pci168c,002b";
+};
+
+&calibration_art_1000 {
+       reg = <0x1000 0x200>;
+};
index c86f8f0e5485485ca2c87512a798a0b57e4810f5..499f3b67613dcca493f3799fcc698b64c278bc7c 100644 (file)
@@ -6,3 +6,11 @@
        model = "TP-Link TL-WA801ND v1";
        compatible = "tplink,tl-wa801nd-v1", "qca,ar7240";
 };
+
+&ath9k {
+       compatible = "pci168c,002a";
+};
+
+&calibration_art_1000 {
+       reg = <0x1000 0xeb8>;
+};
index e84dc6b3c7b1173e420b121c9dbdf620ff5ae8a2..55bd7f8dd46ded0b2e039058f794ac670c6d5fec 100644 (file)
@@ -6,3 +6,11 @@
        model = "TP-Link TL-WA830RE v1";
        compatible = "tplink,tl-wa830re-v1", "qca,ar7240";
 };
+
+&ath9k {
+       compatible = "pci168c,002a";
+};
+
+&calibration_art_1000 {
+       reg = <0x1000 0xeb8>;
+};
index 008da2ecf0f277d5c2a7e0f2e80271670e3b219f..df006910197928c22ca17f46bee9775b320048ec 100644 (file)
@@ -6,3 +6,11 @@
        model = "TP-Link TL-WA901ND v1";
        compatible = "tplink,tl-wa901nd-v1", "qca,ar7240";
 };
+
+&ath9k {
+       compatible = "pci168c,002b";
+};
+
+&calibration_art_1000 {
+       reg = <0x1000 0x200>;
+};
index e0c625e23955af7b3d5aecb6a4d026379247dbb4..69a3105fd9c1514eb43896c3cfc1a4bd6d53ba5e 100644 (file)
@@ -41,7 +41,3 @@
        nvmem-cells = <&macaddr_uboot_1fc00 1>;
        nvmem-cell-names = "mac-address";
 };
-
-&ath9k {
-       compatible = "pci168c,002b";
-};
index 8b38c5addbe9cc377ac8767867ee3625e3ab5e74..f16aab988f24a3b7c27915f689c8b511d02ded1b 100644 (file)
@@ -6,3 +6,11 @@
        model = "TP-Link TL-WR740N v1/v2";
        compatible = "tplink,tl-wr740n-v1", "qca,ar7240";
 };
+
+&ath9k {
+       compatible = "pci168c,002b";
+};
+
+&calibration_art_1000 {
+       reg = <0x1000 0x200>;
+};
index 71f361cd216e04f40bd36291fea5858c49a9b44e..28a903f0999d44a5ef421282015cb11540fd75af 100644 (file)
@@ -6,3 +6,11 @@
        model = "TP-Link TL-WR740N v3";
        compatible = "tplink,tl-wr740n-v3", "qca,ar7240";
 };
+
+&ath9k {
+       compatible = "pci168c,002b";
+};
+
+&calibration_art_1000 {
+       reg = <0x1000 0x200>;
+};
index d6fde1b37726ad57cbe58b6364c0fc22b96c079d..56956ceaf2636808ce559f49f766333dedbeafcd 100644 (file)
@@ -6,3 +6,11 @@
        model = "TP-Link TL-WR741N/ND v1/v2";
        compatible = "tplink,tl-wr741-v1", "qca,ar7240";
 };
+
+&ath9k {
+       compatible = "pci168c,002b";
+};
+
+&calibration_art_1000 {
+       reg = <0x1000 0x200>;
+};
index 756f64c9ddd6382d7444872c115f9dab4e8c49b2..f41b76710db74f7b8e9da9538d13a6cd6765b577 100644 (file)
@@ -6,3 +6,11 @@
        model = "TP-Link TL-WR743ND v1";
        compatible = "tplink,tl-wr743nd-v1", "qca,ar7240";
 };
+
+&ath9k {
+       compatible = "pci168c,002b";
+};
+
+&calibration_art_1000 {
+       reg = <0x1000 0x200>;
+};
index a90d6f7f56557086bdde5d333a22c0100f58ab31..632b8523caef79c9079e1f853c24e855273bd3a1 100644 (file)
@@ -6,3 +6,11 @@
        model = "TP-Link TL-WR841N/ND v5/v6";
        compatible = "tplink,tl-wr841-v5", "qca,ar7240";
 };
+
+&ath9k {
+       compatible = "pci168c,002a";
+};
+
+&calibration_art_1000 {
+       reg = <0x1000 0xeb8>;
+};
index d0b2ca0384d77a2f4740f9a603ed9bb925366412..14cff1f3f43b4432232a854d4841d4b3c909622c 100644 (file)
@@ -6,3 +6,11 @@
        model = "TP-Link TL-WR941N/ND v4";
        compatible = "tplink,tl-wr941-v4", "qca,ar7240";
 };
+
+&ath9k {
+       compatible = "pci168c,002a";
+};
+
+&calibration_art_1000 {
+       reg = <0x1000 0xeb8>;
+};
index 796ebc33216d23ac34188106c084e3d4ed8eecdc..0f96f0490253cc4bdc4549e05ae79f8cad42f235 100644 (file)
@@ -12,30 +12,16 @@ case "$FIRMWARE" in
        buffalo,whr-g301n|\
        engenius,eap350-v1|\
        engenius,ecb350-v1|\
-       engenius,enh202-v1|\
-       tplink,tl-wa701nd-v1|\
-       tplink,tl-wa730re-v1|\
-       tplink,tl-wa801nd-v1|\
-       tplink,tl-wa830re-v1|\
-       tplink,tl-wa901nd-v1|\
-       tplink,tl-wr841-v5|\
-       tplink,tl-wr941-v4)
+       engenius,enh202-v1)
                caldata_extract "art" 0x1000 0xeb8
                ;;
        dlink,dir-615-e4)
                caldata_extract "art" 0x1000 0x1000
                ath9k_patch_mac_crc $(mtd_get_mac_ascii "nvram" "lan_mac") 0x10c
                ;;
-       netgear,wnr1000-v2|\
        netgear,wnr2000-v3|\
-       netgear,wnr612-v2|\
-       on,n150r|\
        tplink,tl-mr3220-v1|\
        tplink,tl-mr3420-v1|\
-       tplink,tl-wr740n-v1|\
-       tplink,tl-wr740n-v3|\
-       tplink,tl-wr741-v1|\
-       tplink,tl-wr743nd-v1|\
        tplink,tl-wr841-v7|\
        ubnt,airrouter|\
        ubnt,bullet-m-ar7240|\