ath79: convert UBNT Aircube AC WiFis to nvmem-cells
authorStefan Kalscheuer <stefan@stklcode.de>
Sun, 18 Dec 2022 11:32:42 +0000 (12:32 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Fri, 6 Jan 2023 17:20:31 +0000 (18:20 +0100)
Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Merge art into partition node.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
target/linux/ath79/dts/ar9342_ubnt_aircube-ac.dts
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata

index e93c1b8dabc54ea8b9b73bc65b5b556fb9c2b30d..49cf39062a22a83e5c8d902ce09599daf8c2878d 100644 (file)
                                read-only;
                        };
 
-                       art: partition@ff0000 {
+                       partition@ff0000 {
                                label = "art";
                                reg = <0xff0000 0x010000>;
                                read-only;
+
+                               compatible = "nvmem-cells";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               macaddr_art_0: macaddr@0 {
+                                       reg = <0x0 0x6>;
+                               };
+
+                               calibration_art_1000: calibration@1000 {
+                                       reg = <0x1000 0x440>;
+                               };
+
+                               calibration_art_5000: calibration@5000 {
+                                       reg = <0x5000 0x844>;
+                               };
                        };
                };
        };
 
 &pcie {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0 0 0 0 0>;
+               nvmem-cells = <&calibration_art_5000>;
+               nvmem-cell-names = "calibration";
+       };
 };
 
 &mdio0 {
 &wmac {
        status = "okay";
 
-       mtd-cal-data = <&art 0x1000>;
-};
-
-&art {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_art_0: macaddr@0 {
-               reg = <0x0 0x6>;
-       };
+       nvmem-cells = <&calibration_art_1000>;
+       nvmem-cell-names = "calibration";
 };
index d03e88041aea58ca9f16de2b20ea06b7c9e01dac..74e6738162f3c8e4379f956d7c35f82583704415 100644 (file)
@@ -35,7 +35,6 @@ case "$FIRMWARE" in
        sophos,ap55c|\
        sophos,ap100|\
        sophos,ap100c|\
-       ubnt,aircube-ac|\
        ubnt,bullet-ac|\
        ubnt,unifiac-lite|\
        ubnt,unifiac-lr|\