ath79: use NVMEM for wlan caldata on ELECOM devices
authorINAGAKI Hiroshi <musashino.open@gmail.com>
Wed, 19 Oct 2022 14:57:34 +0000 (23:57 +0900)
committerHauke Mehrtens <hauke@hauke-m.de>
Wed, 19 Oct 2022 20:58:12 +0000 (22:58 +0200)
Use NVMEM "calibration" implementation for ath9k/ath10k(-ct) on ELECOM
WRC-300GHBK2-I and WRC-1750GHBK2-I/C instead of mtd-cal-data property
or user-space script.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
target/linux/ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts
target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata

index 510b577d190df3b912e871d6a0f9594589b66f63..f7358891b04824be1be45c08e685bcf24bf0dda9 100644 (file)
                label = "art";
                reg = <0xff0000 0x010000>;
                read-only;
+
+               compatible = "nvmem-cells";
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               cal_art_1000: cal@1000 {
+                       reg = <0x1000 0x440>;
+               };
+
+               macaddr_art_1002: macaddr@1002 {
+                       reg = <0x1002 0x6>;
+               };
+
+               cal_art_5000: cal@5000 {
+                       reg = <0x5000 0x844>;
+               };
        };
 };
 
 &pcie {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>;
+               nvmem-cell-names = "calibration";
+       };
 };
 
 &eth0 {
 };
 
 &wmac {
-       mtd-cal-data = <&art 0x1000>;
-};
-
-&art {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_art_1002: macaddr@1002 {
-               reg = <0x1002 0x6>;
-       };
+       nvmem-cells = <&cal_art_1000>;
+       nvmem-cell-names = "calibration";
 };
index 28ffce643456e62c17886879f84e556ff285e17c..5ffff57b48231348bf7cf0918f463b369d09379f 100644 (file)
                label = "art";
                reg = <0x7f0000 0x010000>;
                read-only;
+
+               compatible = "nvmem-cells";
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               cal_art_1000: cal@1000 {
+                       reg = <0x1000 0x440>;
+               };
+
+               macaddr_art_1002: macaddr@1002 {
+                       reg = <0x1002 0x6>;
+               };
        };
 };
 
 };
 
 &wmac {
-       mtd-cal-data = <&art 0x1000>;
-};
-
-&art {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_art_1002: macaddr@1002 {
-               reg = <0x1002 0x6>;
-       };
+       nvmem-cells = <&cal_art_1000>;
+       nvmem-cell-names = "calibration";
 };
index 57e59a89d62d0e4a77fb2c24a2d39deaacbff88a..8783b137cac44581e6aedbaecb4d3a37313b8f60 100644 (file)
@@ -74,9 +74,6 @@ case "$FIRMWARE" in
                caldata_extract "art" 0x5000 0x844
                ath10k_patch_mac $(mtd_get_mac_ascii devdata "wlan5mac")
                ;;
-       elecom,wrc-1750ghbk2-i)
-               caldata_extract "art" 0x5000 0x844
-               ;;
        engenius,ecb1200|\
        engenius,ecb1750)
                caldata_extract "art" 0x5000 0x844