ipq806x: utilize nvmem-cells for pre-calibration data
authorChristian Lamparter <chunkeey@gmail.com>
Mon, 27 Dec 2021 23:30:13 +0000 (00:30 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Fri, 4 Feb 2022 23:41:36 +0000 (00:41 +0100)
converts extraction entries from 11-ath10k-caldata into
nvmem-cells in the individual board's device-tree file.

The patch also moves previously existing referenced
nvmem-cells data nodes which were placed at the end
back into the partitions node. As well as removing
some duplicated properties from qcom-ipq8065-xr500.dts's
art (the included nighthawk.dtsi defines those already).

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8062-wg2600hp3.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nighthawk.dtsi
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-xr500.dts

index 78315d451644485e6406fe0f3af01cb86ba222fe..4a474766d52ce2ddc39ca2c34791a4f30be51f66 100644 (file)
@@ -23,12 +23,6 @@ case "$FIRMWARE" in
        asrock,g10)
                caldata_extract "0:art" 0x1000 0x2f20
                ;;
-       buffalo,wxr-2533dhp |\
-       nec,wg2600hp |\
-       nec,wg2600hp3 |\
-       tplink,vr2600v)
-               caldata_extract "ART" 0x1000 0x2f20
-               ;;
        linksys,ea7500-v1 |\
        linksys,ea8500)
                caldata_extract "art" 0x1000 0x2f20
@@ -38,16 +32,6 @@ case "$FIRMWARE" in
                CI_UBIPART=art
                caldata_extract_ubi "ART" 0x1000 0x2f20
                ;;
-       netgear,d7800 |\
-       netgear,r7500v2 |\
-       netgear,r7800 |\
-       netgear,xr500)
-               caldata_extract "art" 0x1000 0x2f20
-               ;;
-       tplink,ad7200 |\
-       tplink,c2600)
-               caldata_extract "radio" 0x1000 0x2f20
-               ;;
        zyxel,nbg6817)
                caldata_extract "0:art" 0x1000 0x2f20
                ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:appsblenv ethaddr) 1)
@@ -62,12 +46,6 @@ case "$FIRMWARE" in
        asrock,g10)
                caldata_extract "0:art" 0x5000 0x2f20
                ;;
-       buffalo,wxr-2533dhp |\
-       nec,wg2600hp |\
-       nec,wg2600hp3 |\
-       tplink,vr2600v)
-               caldata_extract "ART" 0x5000 0x2f20
-               ;;
        edgecore,ecw5410)
                caldata_extract "0:art" 0x1000 0x2f20
                ;;
@@ -81,16 +59,6 @@ case "$FIRMWARE" in
                CI_UBIPART=art
                caldata_extract_ubi "ART" 0x5000 0x2f20
                ;;
-       netgear,d7800 |\
-       netgear,r7500v2 |\
-       netgear,r7800 |\
-       netgear,xr500)
-               caldata_extract "art" 0x5000 0x2f20
-               ;;
-       tplink,ad7200 |\
-       tplink,c2600)
-               caldata_extract "radio" 0x5000 0x2f20
-               ;;
        zyxel,nbg6817)
                caldata_extract "0:art" 0x5000 0x2f20
                ath10k_patch_mac $(mtd_get_mac_ascii 0:appsblenv ethaddr)
index 8f1bb74540f2a9450bd521735aa8b5792e747e06..c1c21856ca5fb04ec9889aa4b1adc41ef045cddb 100644 (file)
                                        label = "ART";
                                        reg = <0x02e0000 0x0040000>;
                                        read-only;
+                                       compatible = "nvmem-cells";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       precal_ART_1000: precal@1000 {
+                                               reg = <0x1000 0x2f20>;
+                                       };
+
+                                       precal_ART_5000: precal@5000 {
+                                               reg = <0x5000 0x2f20>;
+                                       };
                                };
 
                                partition@320000 {
 
                        qcom,ath10k-calibration-variant = "NEC-Platforms-WG2600HP3";
 
-                       nvmem-cells = <&macaddr_PRODUCTDATA_12>;
-                       nvmem-cell-names = "mac-address";
+                       nvmem-cells = <&macaddr_PRODUCTDATA_12>, <&precal_ART_1000>;
+                       nvmem-cell-names = "mac-address", "pre-calibration";
                };
        };
 };
                        ieee80211-freq-limit = <2400000 2483000>;
                        qcom,ath10k-calibration-variant = "NEC-Platforms-WG2600HP3";
 
-                       nvmem-cells = <&macaddr_PRODUCTDATA_c>;
-                       nvmem-cell-names = "mac-address";
+                       nvmem-cells = <&macaddr_PRODUCTDATA_c>, <&precal_ART_5000>;
+                       nvmem-cell-names = "mac-address", "pre-calibration";
                };
        };
 };
index 5842c34c16bc1c46b40a17f7bf8b12ffde188179..115c6d43d243776a61aa44a857983a9ecd7aabae 100644 (file)
                                        label = "radio";
                                        reg = <0x1b0000 0x40000>;
                                        read-only;
+                                       compatible = "nvmem-cells";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       precal_radio_1000: precal@1000 {
+                                               reg = <0x1000 0x2f20>;
+                                       };
+
+                                       precal_radio_5000: precal@5000 {
+                                               reg = <0x5000 0x2f20>;
+                                       };
                                };
 
                                partition@1f0000 {
                        compatible = "pci168c,0040";
                        reg = <0x00010000 0 0 0 0>;
 
-                       nvmem-cells = <&macaddr_defaultmac_8>;
-                       nvmem-cell-names = "mac-address";
+                       nvmem-cells = <&macaddr_defaultmac_8>, <&precal_radio_1000>;
+                       nvmem-cell-names = "mac-address", "pre-calibration";
                        mac-address-increment = <(-1)>;
                };
        };
                        compatible = "pci168c,0040";
                        reg = <0x00010000 0 0 0 0>;
 
-                       nvmem-cells = <&macaddr_defaultmac_8>;
-                       nvmem-cell-names = "mac-address";
+                       nvmem-cells = <&macaddr_defaultmac_8>, <&precal_radio_5000>;
+                       nvmem-cell-names = "mac-address", "pre-calibration";
                };
        };
 };
index 16a6ca007610400c6f3b57202bf96baec26815d5..b8314a6bd0c9a73c9785ac6ea942a9d2c0607481 100644 (file)
                        compatible = "pci168c,0040";
                        reg = <0x00010000 0 0 0 0>;
 
-                       nvmem-cells = <&macaddr_art_6>;
-                       nvmem-cell-names = "mac-address";
+                       nvmem-cells = <&macaddr_art_6>, <&precal_art_1000>;
+                       nvmem-cell-names = "mac-address", "pre-calibration";
                        mac-address-increment = <(1)>;
                };
        };
                        compatible = "pci168c,0040";
                        reg = <0x00010000 0 0 0 0>;
 
-                       nvmem-cells = <&macaddr_art_6>;
-                       nvmem-cell-names = "mac-address";
+                       nvmem-cells = <&macaddr_art_6>, <&precal_art_5000>;
+                       nvmem-cell-names = "mac-address", "pre-calibration";
                        mac-address-increment = <(2)>;
                };
        };
                                read-only;
                        };
 
-                       art: art@1200000 {
+                       art@1200000 {
                                label = "art";
                                reg = <0x1200000 0x0140000>;
                                read-only;
+                               compatible = "nvmem-cells";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               macaddr_art_0: macaddr@0 {
+                                       reg = <0x0 0x6>;
+                               };
+
+                               macaddr_art_6: macaddr@6 {
+                                       reg = <0x6 0x6>;
+                               };
+
+                               precal_art_1000: precal@1000 {
+                                       reg = <0x1000 0x2f20>;
+                               };
+
+                               precal_art_5000: precal@5000 {
+                                       reg = <0x5000 0x2f20>;
+                               };
                        };
 
                        artbak: art@1340000 {
 &adm_dma {
        status = "okay";
 };
-
-&art {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_art_0: macaddr@0 {
-               reg = <0x0 0x6>;
-       };
-
-       macaddr_art_6: macaddr@6 {
-               reg = <0x6 0x6>;
-       };
-};
index f2bd1705b5252d9657e88a269482307fe1aeb63b..b3181d8857d9e3517ce0c6448a57818ea56a2452 100644 (file)
                        compatible = "pci168c,0040";
                        reg = <0x00010000 0 0 0 0>;
 
-                       nvmem-cells = <&macaddr_art_6>;
-                       nvmem-cell-names = "mac-address";
+                       nvmem-cells = <&macaddr_art_6>, <&precal_art_1000>;
+                       nvmem-cell-names = "mac-address", "pre-calibration";
                        mac-address-increment = <(1)>;
                };
        };
                        compatible = "pci168c,0040";
                        reg = <0x00010000 0 0 0 0>;
 
-                       nvmem-cells = <&macaddr_art_6>;
-                       nvmem-cell-names = "mac-address";
+                       nvmem-cells = <&macaddr_art_6>, <&precal_art_5000>;
+                       nvmem-cell-names = "mac-address", "pre-calibration";
                        mac-address-increment = <(2)>;
                };
        };
                                read-only;
                        };
 
-                       art: art@1200000 {
+                       art@1200000 {
                                label = "art";
                                reg = <0x1200000 0x0140000>;
                                read-only;
+                               compatible = "nvmem-cells";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               macaddr_art_0: macaddr@0 {
+                                       reg = <0x0 0x6>;
+                               };
+
+                               macaddr_art_6: macaddr@6 {
+                                       reg = <0x6 0x6>;
+                               };
+
+                               precal_art_1000: precal@1000 {
+                                       reg = <0x1000 0x2f20>;
+                               };
+
+                               precal_art_5000: precal@5000 {
+                                       reg = <0x5000 0x2f20>;
+                               };
                        };
 
                        artbak: art@1340000 {
                full-duplex;
        };
 };
-
-&art {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_art_0: macaddr@0 {
-               reg = <0x0 0x6>;
-       };
-
-       macaddr_art_6: macaddr@6 {
-               reg = <0x6 0x6>;
-       };
-};
index a671202dc9bb23e3b53c43082891afd6ad825027..3aec8568236f3f9e88d8cd73450b9f241fc5a213 100644 (file)
                                label = "ART";
                                reg = <0xfc0000 0x40000>;
                                read-only;
+
+                               compatible = "nvmem-cells";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               precal_ART_1000: precal@1000 {
+                                       reg = <0x1000 0x2f20>;
+                               };
+
+                               precal_ART_5000: precal@5000 {
+                                       reg = <0x5000 0x2f20>;
+                               };
                        };
                };
        };
                        compatible = "pci168c,0040";
                        reg = <0x00010000 0 0 0 0>;
 
-                       nvmem-cells = <&macaddr_defaultmac_0>;
-                       nvmem-cell-names = "mac-address";
+                       nvmem-cells = <&macaddr_defaultmac_0>, <&precal_ART_1000>;
+                       nvmem-cell-names = "mac-address", "pre-calibration";
                        mac-address-increment = <(-1)>;
                };
        };
                        compatible = "pci168c,0040";
                        reg = <0x00010000 0 0 0 0>;
 
-                       nvmem-cells = <&macaddr_defaultmac_0>;
-                       nvmem-cell-names = "mac-address";
+                       nvmem-cells = <&macaddr_defaultmac_0>, <&precal_ART_5000>;
+                       nvmem-cell-names = "mac-address", "pre-calibration";
                };
        };
 };
index 45da4a2b1193584ebc1ecb3f4f014aa1fecf2cad..998dad55c5e591e25c10abc98369be3e10fa6439 100644 (file)
                                        label = "ART";
                                        reg = <0x2e0000 0x40000>;
                                        read-only;
+                                       compatible = "nvmem-cells";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       precal_ART_1000: precal@1000 {
+                                               reg = <0x1000 0x2f20>;
+                                       };
+
+                                       precal_ART_5000: precal@5000 {
+                                               reg = <0x5000 0x2f20>;
+                                       };
                                };
 
                                TP@320000 {
                        compatible = "pci168c,0040";
                        reg = <0x00010000 0 0 0 0>;
 
-                       nvmem-cells = <&macaddr_PRODUCTDATA_12>;
-                       nvmem-cell-names = "mac-address";
+                       nvmem-cells = <&macaddr_PRODUCTDATA_12>, <&precal_ART_1000>;
+                       nvmem-cell-names = "mac-address", "pre-calibration";
                };
        };
 };
                        compatible = "pci168c,0040";
                        reg = <0x00010000 0 0 0 0>;
 
-                       nvmem-cells = <&macaddr_PRODUCTDATA_c>;
-                       nvmem-cell-names = "mac-address";
+                       nvmem-cells = <&macaddr_PRODUCTDATA_c>, <&precal_ART_5000>;
+                       nvmem-cell-names = "mac-address", "pre-calibration";
                };
        };
 };
index 4b4e8736d42b60297ad1118543c79d75177cc96b..e7ae1a25b2cd5eecd5a57cb90f89e73769764e23 100644 (file)
                                        read-only;
                                };
 
-                               ART: ART@180000 {
+                               ART@180000 {
                                        label = "ART";
                                        reg = <0x180000 0x40000>;
                                        read-only;
+
+                                       compatible = "nvmem-cells";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_ART_0: macaddr@0 {
+                                               reg = <0x0 0x6>;
+                                       };
+
+                                       macaddr_ART_6: macaddr@6 {
+                                               reg = <0x6 0x6>;
+                                       };
+
+                                       macaddr_ART_18: macaddr@18 {
+                                               reg = <0x18 0x6>;
+                                       };
+
+                                       macaddr_ART_1e: macaddr@1e {
+                                               reg = <0x1e 0x6>;
+                                       };
+
+                                       precal_ART_1000: precal@1000 {
+                                               reg = <0x1000 0x2f20>;
+                                       };
+
+                                       precal_ART_5000: precal@5000 {
+                                               reg = <0x5000 0x2f20>;
+                                       };
                                };
 
                                BOOTCONFIG@1c0000 {
                        compatible = "pci168c,0040";
                        reg = <0x00010000 0 0 0 0>;
 
-                       nvmem-cells = <&macaddr_ART_1e>;
-                       nvmem-cell-names = "mac-address";
+                       nvmem-cells = <&macaddr_ART_1e>, <&precal_ART_1000>;
+                       nvmem-cell-names = "mac-address", "pre-calibration";
                };
        };
 };
                        compatible = "pci168c,0040";
                        reg = <0x00010000 0 0 0 0>;
 
-                       nvmem-cells = <&macaddr_ART_18>;
-                       nvmem-cell-names = "mac-address";
+                       nvmem-cells = <&macaddr_ART_18>, <&precal_ART_5000>;
+                       nvmem-cell-names = "mac-address", "pre-calibration";
                };
        };
 };
                };
        };
 };
-
-&ART {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_ART_0: macaddr@0 {
-               reg = <0x0 0x6>;
-       };
-
-       macaddr_ART_6: macaddr@6 {
-               reg = <0x6 0x6>;
-       };
-
-       macaddr_ART_18: macaddr@18 {
-               reg = <0x18 0x6>;
-       };
-
-       macaddr_ART_1e: macaddr@1e {
-               reg = <0x1e 0x6>;
-       };
-};
index a1fde4d6983f6f1cf2f8e4fb18c2148d2e427afc..fc869c9ec09551cdbd16745d7a0fd85aa2e53856 100644 (file)
                                label = "art";
                                reg = <0x1200000 0x0140000>;
                                read-only;
+                               compatible = "nvmem-cells";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               macaddr_art_0: macaddr@0 {
+                                       reg = <0x0 0x6>;
+                               };
+
+                               macaddr_art_6: macaddr@6 {
+                                       reg = <0x6 0x6>;
+                               };
+
+                               precal_art_1000: precal@1000 {
+                                       reg = <0x1000 0x2f20>;
+                               };
+
+                               precal_art_5000: precal@5000 {
+                                       reg = <0x5000 0x2f20>;
+                               };
                        };
 
                        partition@1340000 {
                };
        };
 };
-
-&art {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_art_0: macaddr@0 {
-               reg = <0x0 0x6>;
-       };
-
-       macaddr_art_6: macaddr@6 {
-               reg = <0x6 0x6>;
-       };
-};
index 48beaf313e760b5d2179c40eadeda51fb9606483..bf7c963944b72d0b37f44a76199d0fa5f3dd84c5 100644 (file)
 };
 
 &wifi0 {
-       nvmem-cells = <&macaddr_art_6>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_art_6>, <&precal_art_1000>;
+       nvmem-cell-names = "mac-address", "pre-calibration";
        mac-address-increment = <(1)>;
 };
 
 &wifi1 {
-       nvmem-cells = <&macaddr_art_6>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_art_6>, <&precal_art_5000>;
+       nvmem-cell-names = "mac-address", "pre-calibration";
        mac-address-increment = <(2)>;
 };
index b7f00a7a6f57d8915d26fccabfd1c3b5f3161d0c..f584735e155e9fe43824941cd59073de8aaee8f3 100644 (file)
 };
 
 &wifi0 {
-       nvmem-cells = <&macaddr_art_c>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_art_c>, <&precal_art_1000>;
+       nvmem-cell-names = "mac-address", "pre-calibration";
 };
 
 &wifi1 {
-       nvmem-cells = <&macaddr_art_0>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_art_0>, <&precal_art_5000>;
+       nvmem-cell-names = "mac-address", "pre-calibration";
 };
 
 &art {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
        macaddr_art_c: macaddr@c {
                reg = <0xc 0x6>;
        };