ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data
authorChristian Lamparter <chunkeey@gmail.com>
Mon, 27 Dec 2021 22:41:20 +0000 (23:41 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Sat, 15 Jan 2022 16:26:55 +0000 (17:26 +0100)
moves extraction entries out of 11-ath10k-caldata and into
the individual board's device-tree.

Some notes:
 - mmc could work as well (not tested)
 - devices that pass the partitions via mtdparts
   bootargs are kept as is
 - gl-b2200 has a weird pcie wifi device
   (vendor claims 9886 wave 2. But firmware-extraction
   was for a wave 1 device?!)

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
31 files changed:
target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ea6350v3.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-gl-ap1300.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wac510.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wrtq-329acn.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac.dtsi
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-oap100.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rtl30vw.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019.dtsi
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wpj419.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-303h.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-365.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts

index 12061eadf5cd1b585cfc5068f554d0f7a1344fdd..c8b1e12ea3623689a4d1e4e213b9758885da3de3 100644 (file)
@@ -9,9 +9,6 @@ board=$(board_name)
 case "$FIRMWARE" in
 "ath10k/cal-pci-0000:01:00.0.bin")
        case "$board" in
-       glinet,gl-b2200)
-               caldata_extract "ART" 0x9000 0x2f20
-               ;;
        meraki,mr33)
                caldata_extract_ubi "ART" 0x9000 0x844
                caldata_valid "4408" || caldata_extract "ART" 0x9000 0x844
@@ -37,11 +34,6 @@ case "$FIRMWARE" in
                /usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \
                /usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1")
                ;;
-       buffalo,wtr-m2133hp)
-               caldata_extract "ART" 0x9000 0x2f20
-               ath10k_patch_mac $(mtd_get_mac_binary ORGDATA 0x32)
-               ;;
-       engenius,eap2200 |\
        openmesh,a62 |\
        plasmacloud,pa2200)
                caldata_extract "0:ART" 0x9000 0x2f20
@@ -63,29 +55,11 @@ case "$FIRMWARE" in
        ;;
 "ath10k/pre-cal-ahb-a000000.wifi.bin")
        case "$board" in
-       8dev,habanero-dvk |\
-       8dev,jalapeno |\
-       alfa-network,ap120c-ac |\
-       cilab,meshpoint-one |\
-       glinet,gl-ap1300 |\
-       glinet,gl-b1300 |\
-       glinet,gl-b2200 |\
-       glinet,gl-s1300 |\
-       linksys,ea6350v3 |\
-       mobipromo,cm520-79f |\
-       p2w,r619ac-64m |\
-       p2w,r619ac-128m |\
        qcom,ap-dk01.1-c1)
                caldata_extract "ART" 0x1000 0x2f20
                ;;
-       aruba,ap-303 |\
-       aruba,ap-303h |\
-       aruba,ap-365)
-               caldata_extract "ART" 0x1000 0x2f20
-               ath10k_patch_mac $(mtd_get_mac_binary mfginfo 0x1D)
-               ;;
-       asus,map-ac2200 |\
-       asus,rt-ac42u |\
+       asus,map-ac2200|\
+       asus,rt-ac42u|\
        asus,rt-ac58u)
                caldata_extract_ubi "Factory" 0x1000 0x2f20
                ;;
@@ -102,25 +76,10 @@ case "$FIRMWARE" in
                /usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \
                /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1")
                ;;
-       buffalo,wtr-m2133hp)
-               caldata_extract "ART" 0x1000 0x2f20
-               ath10k_patch_mac $(mtd_get_mac_binary ORGDATA 0x26)
-               ;;
-       cellc,rtl30vw |\
-       compex,wpj419 |\
-       compex,wpj428 |\
-       edgecore,ecw5211 |\
-       edgecore,oap100 |\
-       engenius,eap1300 |\
-       engenius,eap2200 |\
-       luma,wrtq-329acn|\
        openmesh,a42 |\
        openmesh,a62 |\
        plasmacloud,pa1200 |\
-       plasmacloud,pa2200 |\
-       qxwlan,e2600ac-c1 |\
-       qxwlan,e2600ac-c2 |\
-       unielec,u4019-32m)
+       plasmacloud,pa2200)
                caldata_extract "0:ART" 0x1000 0x2f20
                ;;
        devolo,magic-2-wifi-next)
@@ -166,14 +125,6 @@ case "$FIRMWARE" in
                caldata_extract_mmc "0:ART" 0x1000 0x2f20
                ath10k_patch_mac $(mmc_get_mac_binary ARTMTD 0x0)
                ;;
-       netgear,wac510)
-               caldata_extract "0:ART" 0x1000 0x2f20
-               ath10k_patch_mac $(mtd_get_mac_binary "0:MANUDATA" 0x6)
-               ;;
-       teltonika,rutx10)
-               caldata_extract "0:ART" 0x1000 0x2f20
-               ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:CONFIG" 0x0) 2)
-               ;;
        zyxel,nbg6617 |\
        zyxel,wre6606)
                caldata_extract "ART" 0x1000 0x2f20
@@ -183,28 +134,10 @@ case "$FIRMWARE" in
        ;;
 "ath10k/pre-cal-ahb-a800000.wifi.bin")
        case "$board" in
-       8dev,habanero-dvk |\
-       8dev,jalapeno |\
-       alfa-network,ap120c-ac |\
-       cilab,meshpoint-one |\
-       glinet,gl-ap1300 |\
-       glinet,gl-b1300 |\
-       glinet,gl-b2200 |\
-       glinet,gl-s1300 |\
-       linksys,ea6350v3 |\
-       mobipromo,cm520-79f |\
-       p2w,r619ac-64m |\
-       p2w,r619ac-128m |\
        qcom,ap-dk01.1-c1)
                caldata_extract "ART" 0x5000 0x2f20
                ;;
-       aruba,ap-303 |\
-       aruba,ap-303h |\
-       aruba,ap-365)
-               caldata_extract "ART" 0x5000 0x2f20
-               ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary mfginfo 0x1D) 1)
-               ;;
-       asus,map-ac2200 |\
+       asus,map-ac2200|\
        asus,rt-ac58u)
                caldata_extract_ubi "Factory" 0x5000 0x2f20
                ;;
@@ -221,25 +154,10 @@ case "$FIRMWARE" in
                /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \
                /usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1")
                ;;
-       buffalo,wtr-m2133hp)
-               caldata_extract "ART" 0x5000 0x2f20
-               ath10k_patch_mac $(mtd_get_mac_binary ORGDATA 0x2c)
-               ;;
-       cellc,rtl30vw |\
-       compex,wpj419 |\
-       compex,wpj428 |\
-       edgecore,ecw5211 |\
-       edgecore,oap100 |\
-       engenius,eap1300 |\
-       engenius,eap2200 |\
-       luma,wrtq-329acn|\
        openmesh,a42 |\
        openmesh,a62 |\
        plasmacloud,pa1200 |\
-       plasmacloud,pa2200 |\
-       qxwlan,e2600ac-c1 |\
-       qxwlan,e2600ac-c2 |\
-       unielec,u4019-32m)
+       plasmacloud,pa2200)
                caldata_extract "0:ART" 0x5000 0x2f20
                ;;
        devolo,magic-2-wifi-next)
@@ -286,14 +204,6 @@ case "$FIRMWARE" in
                caldata_extract_mmc "0:ART" 0x5000 0x2f20
                ath10k_patch_mac $(mmc_get_mac_binary ARTMTD 0xc)
                ;;
-       netgear,wac510)
-               caldata_extract "0:ART" 0x5000 0x2f20
-               ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:MANUDATA" 0x6) 16)
-               ;;
-       teltonika,rutx10)
-               caldata_extract "0:ART" 0x5000 0x2f20
-               ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:CONFIG" 0x0) 3)
-               ;;
        zyxel,nbg6617 |\
        zyxel,wre6606)
                caldata_extract "ART" 0x5000 0x2f20
index c35ce5ccc48595928f6f3b0c7d28fb1b918d7d17..b2d8aa499935873e3a84d42f2fdd327184ce88b9 100644 (file)
                                label = "ART";
                                reg = <0x00170000 0x00010000>;
                                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@180000 {
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
 };
 
 &wifi1 {
        status = "okay";
        qcom,ath10k-calibration-variant = "ALFA-Network-AP120C-AC";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
 };
index cfaba0f4112f91c19d2041309b2dbb542c6d3831..a99aa90b61f7d3b6f2cd2f2ee31667ebe39ddb10 100644 (file)
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
        qcom,ath10k-calibration-variant = "linksys-ea6350v3";
 };
 
 &wifi1 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
        qcom,ath10k-calibration-variant = "linksys-ea6350v3";
 };
 
-
 &blsp_dma {
        status = "okay";
 };
                                label = "ART";
                                reg = <0x00160000 0x00010000>;
                                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>;
+                               };
                        };
                        u_env@170000 {
                                label = "u_env";
index f08ddd0abe51aee1803c06eea14bbdefc84a341e..6a7f4e5b0f41f5953151e02f0812f3daf200ace7 100644 (file)
                                label = "0:ART";
                                reg = <0x00180000 0x00010000>;
                                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>;
+                               };
                        };
                        partition8@190000 {
                                compatible = "denx,fit";
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
        qcom,ath10k-calibration-variant = "EnGenius-EAP1300";
 };
 
 &wifi1 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
        qcom,ath10k-calibration-variant = "EnGenius-EAP1300";
 };
index 0ee8d1a52ed03b428dd0fe7d4ac8ca5044df1a95..6f4d7b5f32e9cfa52fc1da4774de25de7875dd21 100644 (file)
                                label = "0:ART";
                                reg = <0x00170000 0x00010000>;
                                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>;
+                               };
                        };
                };
        };
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
 };
 
 &wifi1 {
        status = "okay";
-
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
        qcom,ath10k-calibration-variant = "ALFA-Network-AP120C-AC";
 };
 
index f643882725c93263dc59b3ae19b331b541114669..fa81bfbf522b196f663ea52f1a01ad2c824fa2b3 100644 (file)
                                label = "ART";
                                reg = <0x00170000 0x00010000>;
                                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>;
+                               };
                        };
                };
        };
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
        qcom,ath10k-calibration-variant = "GL-AP1300";
 };
 
 &wifi1 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
        qcom,ath10k-calibration-variant = "GL-AP1300";
 };
index 3af6de1f603b06d0cae83d891e10e89bf2a734b8..da09e53cc3a7471aed9d4d222b7f589fea5ef261 100644 (file)
                                label = "ART";
                                reg = <0x00170000 0x00010000>;
                                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>;
+                               };
                        };
                };
        };
 
 &wifi0 {
        status = "okay";
-
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
        qcom,ath10k-calibration-variant = "8devices-Jalapeno";
 };
 
 &wifi1 {
        status = "okay";
-
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
        qcom,ath10k-calibration-variant = "8devices-Jalapeno";
 };
 
index 3673a13430cb2e011ec58735b0e5b31775042980..ebb2d08e738df308085e86934c0181bd34498bab 100644 (file)
                                label = "0:ART";
                                reg = <0x2e0000 0x10000>;
                                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>;
+                               };
                        };
 
                        config: partition@2f0000 {
                                label = "0:CONFIG";
                                reg = <0x2f0000 0x10000>;
                                read-only;
+                               compatible = "nvmem-cells";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               macaddr_config_0: macaddr@0 {
+                                       reg = <0x0 0x6>;
+                               };
                        };
 
                        partition@300000 {
        pinctrl-names = "default";
        phy-reset-gpio = <&tlmm 62 0>;
 };
+
+&wifi0 {
+       nvmem-cell-names = "pre-calibration", "mac-address";
+       nvmem-cells = <&precal_art_1000>, <&macaddr_config_0>;
+       mac-address-increment = <2>;
+};
+
+&wifi1 {
+       nvmem-cell-names = "pre-calibration", "mac-address";
+       nvmem-cells = <&precal_art_5000>, <&macaddr_config_0>;
+       mac-address-increment = <3>;
+};
index 20e12855f4ac462c225052b66e302db653910b46..699e2e28b4db6e0e18aa189c41a5b63c9d125306 100644 (file)
                                label = "0:MANUDATA";
                                reg = <0x001e0000 0x00010000>;
                                read-only;
+                               compatible = "nvmem-cells";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               macaddr_manudata_6: macaddr@6 {
+                                       reg = <0x6 0x6>;
+                               };
                        };
 
                        partition@1f0000 {
                                label = "0:ART";
                                reg = <0x001f0000 0x00010000>;
                                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>;
+                               };
                        };
                };
        };
 
 &wifi0 {
        status = "okay";
-
+       nvmem-cell-names = "pre-calibration", "mac-address";
+       nvmem-cells = <&precal_art_1000>, <&macaddr_manudata_6>;
        qcom,ath10k-calibration-variant = "Netgear-WAC510";
 };
 
 &wifi1 {
        status = "okay";
-
+       nvmem-cell-names = "pre-calibration", "mac-address";
+       nvmem-cells = <&precal_art_5000>, <&macaddr_manudata_6>;
+       mac-address-increment = <16>;
        qcom,ath10k-calibration-variant = "Netgear-WAC510";
 };
 
index 2465348a821ece25ba56be86adcb92ab71fc1fbc..5b0c8cf106900b167d88eb4e4a6492bcf597dcd4 100644 (file)
                                label = "0:ART";
                                reg = <0x170000 0x010000>;
                                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>;
+                               };
                        };
                };
        };
 
 &wifi0 {
        status = "okay";
-
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
        qcom,ath10k-calibration-variant = "Luma-WRTQ-329ACN";
 };
 
 &wifi1 {
        status = "okay";
-
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
        qcom,ath10k-calibration-variant = "Luma-WRTQ-329ACN";
 };
index 6c97cede7bf46387f2feb48c4126fbe29bb1f8eb..ba6aabdc9c1dc2241764c39bce8f8ddcf7338cde 100644 (file)
                                label = "ART";
                                reg = <0xb00000 0x80000>;
                                read-only;
+                               compatible = "nvmem-cells";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               precal_art_1000: precal@1000 {
+                                       reg = <0x1000 0x2f20>;
+                               };
+
+                               macaddr_art_1006: macaddr@1006 {
+                                       reg = <0x1006 0x6>;
+                               };
+
+                               precal_art_5000: precal@5000 {
+                                       reg = <0x5000 0x2f20>;
+                               };
+
+                               macaddr_art_5006: macaddr@5006 {
+                                       reg = <0x5006 0x6>;
+                               };
                        };
 
                        partition@b80000 {
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
        qcom,ath10k-calibration-variant = "CM520-79F";
 };
 
 &wifi1 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
        qcom,ath10k-calibration-variant = "CM520-79F";
 };
-
-&art {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_art_1006: macaddr@1006 {
-               reg = <0x1006 0x6>;
-       };
-
-       macaddr_art_5006: macaddr@5006 {
-               reg = <0x5006 0x6>;
-       };
-};
index df1df2529a10874c30af43404f771ba0c19e54d9..a50ee4a84ef1c85522c5086a6dbeffed3ea81e00 100644 (file)
                                label = "0:ART";
                                reg = <0x170000 0x10000>;
                                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@180000 {
                                compatible = "denx,fit";
index 9348ef4eecb45effb41cce4759acb7dfe0d7c73d..ce54ce9f9bfefd0f9d02434f3ef513b2a8c03f0f 100644 (file)
                                label = "0:ART";
                                reg = <0x170000 0x10000>;
                                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>;
+                               };
                        };
                };
        };
index 57d607849a1ff0f5298b0abfc0b25eef68982581..45681b19bb0199a9d2707fc7730cd63bf116a82d 100644 (file)
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
        qcom,ath10k-calibration-variant = "Qxwlan-E2600AC";
 };
 
 &wifi1 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
        qcom,ath10k-calibration-variant = "Qxwlan-E2600AC";
 };
index 95e616695cdc127f856670c06fb2b82644a58519..c8112c04fea74fd4050e5b8a1334978ba502c6a0 100644 (file)
                                label = "0:ART";
                                reg = <0x00170000 0x00010000>;
                                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>;
+                               };
+
+                               precal_art_9000: precal@9000 {
+                                       reg = <0x9000 0x2f20>;
+                               };
                        };
                };
        };
                wifi2: wifi@1,0 {
                        compatible = "qcom,ath10k";
                        reg = <0x00010000 0 0 0 0>;
+                       nvmem-cell-names = "pre-calibration";
+                       nvmem-cells = <&precal_art_9000>;
                        ieee80211-freq-limit = <5470000 5875000>;
                        qcom,ath10k-calibration-variant = "EnGenius-EAP2200";
                };
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
        qcom,ath10k-calibration-variant = "EnGenius-EAP2200";
 };
 
 &wifi1 {
        status = "okay";
        ieee80211-freq-limit = <5170000 5350000>;
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
        qcom,ath10k-calibration-variant = "EnGenius-EAP2200";
 };
index 339a1e0f7247034d79878467ebbac14ed0854914..243dcb84d6bf4595614a938b5c020b25abf28f56 100644 (file)
                                label = "ART";
                                reg = <0x170000 0x10000>;
                                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>;
+                               };
+
+                               cal_art_9000: cal@9000 {
+                                       reg = <0x9000 0x2f20>;
+                               };
                        };
                };
        };
                        status = "okay";
                        compatible = "qcom,ath10k";
                        reg = <0x00010000 0 0 0 0>;
+                        /* vendor said 9886 wave-2? Is this correct? */
+                       nvmem-cell-names = "calibration";
+                       nvmem-cells = <&cal_art_9000>;
                        qcom,ath10k-calibration-variant = "GL-B2200";
                };
        };
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
        qcom,ath10k-calibration-variant = "GL-B2200";
 };
 
 &wifi1 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
        qcom,ath10k-calibration-variant = "GL-B2200";
 };
index 49cf2cabfa9834e4cd4f9cdc4fc656ce7211b40d..2a2cfb9ac2811c5e87bb62146c36bfda643d1445 100644 (file)
                                label = "ART";
                                reg = <0x00170000 0x00010000>;
                                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@180000 {
                                label = "cfg";
 
 &wifi0 {
        status = "okay";
-
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
        qcom,ath10k-calibration-variant = "8devices-Habanero";
 };
 
 &wifi1 {
        status = "okay";
-
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
        qcom,ath10k-calibration-variant = "8devices-Habanero";
 };
 
index 69423ce02beee9b816f99e54c008fa55d99ca8af..bdcc31fef7b62956fdcc0508276185ef8701147c 100644 (file)
                                label = "0:ART";
                                reg = <0x00170000 0x00010000>;
                                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>;
+                               };
                        };
                };
        };
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
        qcom,ath10k-calibration-variant = "Edgecore OAP100";
 };
 
 &wifi1 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
        qcom,ath10k-calibration-variant = "Edgecore OAP100";
 };
 
index 41294e1931f7d86e733b3f2f2a76eb97b569e5c5..33be77ec36eae093e070bfddd33980d7b1b66fed 100644 (file)
                                label = "ART";
                                reg = <0x170000 0x10000>;
                                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>;
+                               };
                        };
                };
        };
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
        qcom,ath10k-calibration-variant = "P&W R619AC";
 };
 
 &wifi1 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
        qcom,ath10k-calibration-variant = "P&W R619AC";
 };
index 0caa0255d039aedcbbe7ddbf97460cce99c22068..dcbe95c526ba662b6e448f20d6e9c3f00b032bc3 100644 (file)
                                label = "0:ART";
                                reg = <0x170000 0x10000>;
                                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@180000 {
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
        qcom,ath10k-calibration-variant = "cellc,rtl30vw";
 };
 
 &wifi1 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
        qcom,ath10k-calibration-variant = "cellc,rtl30vw";
 };
index 811c82b9c53db06eaa423131a880ff85d2572041..4efcdaf394182e3209bb5b6b4ef97278fc8343d3 100644 (file)
                                label = "0:ART";
                                reg = <0x170000 0x10000>;
                                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@180000 {
                                compatible = "denx,fit";
index 4435d1fd283430b049e2938bca35240a9c038ecf..ece80571bddf8abc2b9112c699d9d03fe975115d 100644 (file)
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
 };
 
 &wifi1 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
 };
index fe329c1d437cea2456fc91494400b200d75a3b46..09cbfaca912aa449fadbf4eadb3e8b101c77eed3 100644 (file)
                                                label = "0:ART";
                                                reg = <0x170000 0x010000>;
                                                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>;
+                                               };
                                        };
                                };
                        };
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
 };
 
 &wifi1 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
 };
index fb0cec59f7e1330d161d6878694db1fc25fb17c6..1f8c830d902e7d4b9dc971f2bfafb7abda3104d3 100644 (file)
                wifi@0,0 {
                        compatible = "qcom,ath10k";
                        reg = <0 0 0 0 0>;
-
+                       nvmem-cell-names = "pre-calibration", "mac-address";
+                       nvmem-cells = <&precal_art_9000>, <&macaddr_orgdata_32>;
                        qcom,ath10k-calibration-variant = "Buffalo-WTR-M2133HP";
                };
        };
                                read-only;
                        };
 
-                       art: partition@b00000 {
+                       partition@b00000 {
                                label = "ART";
                                reg = <0x0b00000 0x0080000>;
                                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>;
+                               };
+
+                               precal_art_9000: precal@9000 {
+                                       reg = <0x5000 0x2f20>;
+                               };
                        };
 
                        partition@b80000 {
                                label = "ORGDATA";
                                reg = <0x0c00000 0x0080000>;
                                read-only;
+                               compatible = "nvmem-cells";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               macaddr_orgdata_20: macaddr@20 {
+                                       reg = <0x20 0x6>;
+                               };
+                               macaddr_orgdata_26: macaddr@26 {
+                                       reg = <0x26 0x6>;
+                               };
+                               macaddr_orgdata_2c: macaddr@2c {
+                                       reg = <0x2c 0x6>;
+                               };
+                               macaddr_orgdata_32: macaddr@32 {
+                                       reg = <0x32 0x6>;
+                               };
                        };
 
                        partition@c80000 {
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration", "mac-address";
+       nvmem-cells = <&precal_art_1000>, <&macaddr_orgdata_26>;
        qcom,ath10k-calibration-variant = "Buffalo-WTR-M2133HP";
        ieee80211-freq-limit = <2400000 2483000>;
 };
 
 &wifi1 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration", "mac-address";
+       nvmem-cells = <&precal_art_5000>, <&macaddr_orgdata_2c>;
        qcom,ath10k-calibration-variant = "Buffalo-WTR-M2133HP";
 };
 
 &usb3_hs_phy {
        status = "okay";
 };
-
-&orgdata {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_orgdata_20: macaddr@20 {
-               reg = <0x20 0x6>;
-       };
-};
index 79f4c04edf048975c4a4b60d7ddf54b9b196d25a..3892c9bd8179eed8c572b8fa831f0ff3113e4fa3 100644 (file)
                                label = "0:ART";
                                reg = <0x00170000 0x00010000>;
                                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>;
+                               };
                        };
                        partition6@180000 {
                                compatible = "denx,fit";
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
 };
 
 &wifi1 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
 };
index 13f89d810c193212cb9881115bcb4e2c137945eb..6cbfa8f37df5f1aa8e0c8eca104ab86f77d301fa 100644 (file)
                                label = "ART";
                                reg = <0xe0000 0x10000>;
                                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@f0000 {
                                label = "mfginfo";
                                reg = <0x1e0000 0x10000>;
                                read-only;
+                               compatible = "nvmem-cells";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               macaddr_mfginfo_1d: macaddr@1d {
+                                       reg = <0x1d 0x6>;
+                               };
                        };
 
                        partition@1f0000 {
index 707ed18e3b972ae129244d2ca520f52282757fd1..201ce97cd94c71b1c739aadb4ef34e737bbba76d 100644 (file)
                                label = "ART";
                                reg = <0x1f0000 0x10000>;
                                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@1f0000 {
                                label = "mfginfo";
                                reg = <0x390000 0x10000>;
                                read-only;
+                               compatible = "nvmem-cells";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               macaddr_mfginfo_1d: macaddr@1d {
+                                       reg = <0x1d 0x6>;
+                               };
                        };
 
                        partition@3a0000 {
 &wifi0 {
        status = "okay";
        qcom,ath10k-calibration-variant = "Aruba-AP-303";
+       nvmem-cell-names = "pre-calibration", "mac-address";
+       nvmem-cells = <&precal_art_1000>, <&macaddr_mfginfo_1d>;
+       qcom,ath10k-calibration-variant = "Aruba-AP-303";
 };
 
 &wifi1 {
        status = "okay";
        qcom,ath10k-calibration-variant = "Aruba-AP-303";
+       nvmem-cell-names = "pre-calibration", "mac-address";
+       nvmem-cells = <&precal_art_5000>, <&macaddr_mfginfo_1d>;
+       mac-address-increment = <1>;
+       qcom,ath10k-calibration-variant = "Aruba-AP-303";
 };
index 988a4421b5baa8bfe9995a5d38118817e8951800..0bc46d7e7e1a99b3965fa781fd3c1c1f5813ac03 100644 (file)
                                label = "ART";
                                reg = <0x1f0000 0x10000>;
                                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@200000 {
index 9d0823f3efa5b6f4c2f16e3271eec37d8e36952b..0b94aafc83f9c41028733757949bc9e09dc5e432 100644 (file)
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration", "mac-address";
+       nvmem-cells = <&precal_art_1000>, <&macaddr_mfginfo_1d>;
        qcom,ath10k-calibration-variant = "Aruba-AP-303";
 };
 
 &wifi1 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration", "mac-address";
+       nvmem-cells = <&precal_art_5000>, <&macaddr_mfginfo_1d>;
+       mac-address-increment = <1>;
        qcom,ath10k-calibration-variant = "Aruba-AP-303";
 };
index a735d8e3aca5002c6b0450a74f8e2e3bc9d478a1..6e087ba024f9da77bba77dde3bd569d7fd957127 100644 (file)
                                label = "ART";
                                reg = <0x170000 0x10000>;
                                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>;
+                               };
                        };
 
                        firmware@180000 {
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
        qcom,ath10k-calibration-variant = "GL-B1300";
 };
 
 &wifi1 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
        qcom,ath10k-calibration-variant = "GL-B1300";
 };
index fa859b73a35ba37856e0a72665133699af40c88b..e9490c2690939a15d186cc4c46cdfaa4dc441e4b 100644 (file)
                                label = "ART";
                                reg = <0x170000 0x10000>;
                                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>;
+                               };
                        };
 
                        firmware@180000 {
 
 &wifi0 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
        qcom,ath10k-calibration-variant = "GL-S1300";
 };
 
 &wifi1 {
        status = "okay";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
        qcom,ath10k-calibration-variant = "GL-S1300";
 };