]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ipq40xx: meraki: convert to nvmem for calibration 20474/head
authorHal Martin <hal.martin@gmail.com>
Wed, 22 Oct 2025 16:16:00 +0000 (18:16 +0200)
committerRobert Marko <robimarko@gmail.com>
Thu, 23 Oct 2025 11:14:15 +0000 (13:14 +0200)
This commit changes the Meraki MR33 and MR74 device trees to use nvmem
for ART calibration.

The WiFi BDF was moved from insect-common.dtsi to the respective
device files in preparation for additional insect-family devices being added.

Signed-off-by: Hal Martin <hal.martin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20474
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4029-mr33.dts
target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4029-mr74.dts

index 4a1a0ff31118a3485c1930865c011bac871dfa74..a91d0c6d35e90a5765d45c2c7e3851b4f0545fa2 100644 (file)
@@ -7,15 +7,6 @@
 board=$(board_name)
 
 case "$FIRMWARE" in
-"ath10k/cal-pci-0000:01:00.0.bin")
-       case "$board" in
-       meraki,mr33 |\
-       meraki,mr74)
-               caldata_extract_ubi "ART" 0x9000 0x844
-               caldata_valid "4408" || caldata_extract "ART" 0x9000 0x844
-               ;;
-       esac
-       ;;
 "ath10k/pre-cal-pci-0000:01:00.0.bin")
        case "$board" in
        asus,map-ac2200)
@@ -111,11 +102,6 @@ case "$FIRMWARE" in
                caldata_extract_mmc "0:ART" 0x1000 0x2f20
                ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
                ;;
-       meraki,mr33 |\
-       meraki,mr74)
-               caldata_extract_ubi "ART" 0x1000 0x2f20
-               caldata_valid "202f" || caldata_extract "ART" 0x1000 0x2f20
-               ;;
        mikrotik,cap-ac |\
        mikrotik,hap-ac2 |\
        mikrotik,hap-ac3 |\
@@ -210,11 +196,6 @@ case "$FIRMWARE" in
                caldata_extract_mmc "0:ART" 0x5000 0x2f20
                ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
                ;;
-       meraki,mr33 |\
-       meraki,mr74)
-               caldata_extract_ubi "ART" 0x5000 0x2f20
-               caldata_valid "202f" || caldata_extract "ART" 0x5000 0x2f20
-               ;;
        mikrotik,cap-ac |\
        mikrotik,hap-ac2 |\
        mikrotik,hap-ac3 |\
index 71df9d365a37108fa8679cc914fd4fc4c55f55bf..46cc68435f63775a2f44414c9bd3ec95fbdda06a 100644 (file)
                                 * confuse the u-boot and it might not
                                 * find the kernel partition anymore.
                                 */
+                               volumes {
+                                       ubi_art: ubi-volume-art {
+                                               volname = "ART";
+                                       };
+                               };
                        };
                };
        };
 };
 
+&ubi_art {
+       nvmem-layout {
+               compatible = "fixed-layout";
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               precal_factory_1000: precal@1000 {
+                       reg = <0x1000 0x2f20>;
+               };
+
+               precal_factory_5000: precal@5000 {
+                       reg = <0x5000 0x2f20>;
+               };
+
+               cal_factory_9000: cal@9000 {
+                       reg = <0x9000 0x844>;
+               };
+       };
+};
+
 &pcie0 {
        status = "okay";
        perst-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
        wifi@0,0 {
                compatible = "qcom,ath10k";
                reg = <0x00010000 0 0 0 0>;
-               nvmem-cells = <&mac_address 1>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&mac_address 1>, <&cal_factory_9000>;
+               nvmem-cell-names = "mac-address", "calibration";
        };
 };
 
 
 &wifi0 {
        status = "okay";
-       qcom,ath10k-calibration-variant = "Meraki-MR33";
-       nvmem-cells = <&mac_address 2>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&mac_address 2>, <&precal_factory_1000>;
+       nvmem-cell-names = "mac-address", "pre-calibration";
 };
 
 &wifi1 {
        status = "okay";
-       qcom,ath10k-calibration-variant = "Meraki-MR33";
-       nvmem-cells = <&mac_address 3>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&mac_address 3>, <&precal_factory_5000>;
+       nvmem-cell-names = "mac-address", "pre-calibration";
 };
 
 &mdio {
index 953caa8b60a28ebaf8e792aa69d86a0033f2d1c9..a1fad08559e8047cf4dc271d4252e3204f635742 100644 (file)
 &tricolor {
        enable-gpios = <&tlmm 48 GPIO_ACTIVE_HIGH>;
 };
+
+&wifi0 {
+       qcom,ath10k-calibration-variant = "Meraki-MR33";
+};
+
+&wifi1 {
+       qcom,ath10k-calibration-variant = "Meraki-MR33";
+};
index 9f89330b6617619da03aa329dc19df0827393192..2df9e912a252411c0bf3eabd57e1bbc7d0d08489 100644 (file)
 &tricolor {
        enable-gpios = <&tlmm 14 GPIO_ACTIVE_LOW>;
 };
+
+&wifi0 {
+       qcom,ath10k-calibration-variant = "Meraki-MR33";
+};
+
+&wifi1 {
+       qcom,ath10k-calibration-variant = "Meraki-MR33";
+};