From cfc13c44595db591092859fc6adc71f1d8159c50 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Mon, 27 Dec 2021 23:41:20 +0100 Subject: [PATCH] ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data 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 --- .../etc/hotplug.d/firmware/11-ath10k-caldata | 100 +----------------- .../arm/boot/dts/qcom-ipq4018-ap120c-ac.dts | 15 +++ .../arm/boot/dts/qcom-ipq4018-ea6350v3.dts | 16 ++- .../arm/boot/dts/qcom-ipq4018-eap1300.dts | 15 +++ .../arm/boot/dts/qcom-ipq4018-ecw5211.dts | 16 ++- .../arm/boot/dts/qcom-ipq4018-gl-ap1300.dts | 15 +++ .../arm/boot/dts/qcom-ipq4018-jalapeno.dtsi | 17 ++- .../arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi | 30 ++++++ .../arch/arm/boot/dts/qcom-ipq4018-wac510.dts | 25 ++++- .../arm/boot/dts/qcom-ipq4018-wrtq-329acn.dts | 17 ++- .../arm/boot/dts/qcom-ipq4019-cm520-79f.dts | 37 ++++--- .../arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts | 11 ++ .../arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts | 11 ++ .../arm/boot/dts/qcom-ipq4019-e2600ac.dtsi | 4 + .../arm/boot/dts/qcom-ipq4019-eap2200.dts | 21 ++++ .../arm/boot/dts/qcom-ipq4019-gl-b2200.dts | 22 ++++ .../boot/dts/qcom-ipq4019-habanero-dvk.dts | 17 ++- .../arch/arm/boot/dts/qcom-ipq4019-oap100.dts | 15 +++ .../arm/boot/dts/qcom-ipq4019-r619ac.dtsi | 15 +++ .../arm/boot/dts/qcom-ipq4019-rtl30vw.dts | 15 +++ .../arm/boot/dts/qcom-ipq4019-u4019-32m.dts | 11 ++ .../arch/arm/boot/dts/qcom-ipq4019-u4019.dtsi | 4 + .../arch/arm/boot/dts/qcom-ipq4019-wpj419.dts | 15 +++ .../arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts | 50 ++++++--- .../arch/arm/boot/dts/qcom-ipq4028-wpj428.dts | 15 +++ .../arch/arm/boot/dts/qcom-ipq4029-ap-303.dts | 18 ++++ .../arm/boot/dts/qcom-ipq4029-ap-303h.dts | 25 +++++ .../arch/arm/boot/dts/qcom-ipq4029-ap-365.dts | 11 ++ .../dts/qcom-ipq4029-aruba-glenmorangie.dtsi | 5 + .../arm/boot/dts/qcom-ipq4029-gl-b1300.dts | 15 +++ .../arm/boot/dts/qcom-ipq4029-gl-s1300.dts | 15 +++ 31 files changed, 487 insertions(+), 131 deletions(-) diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 12061eadf5..c8b1e12ea3 100644 --- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -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 diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts index c35ce5ccc4..b2d8aa4999 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts @@ -211,6 +211,17 @@ 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 { @@ -342,9 +353,13 @@ &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>; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ea6350v3.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ea6350v3.dts index cfaba0f411..a99aa90b61 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ea6350v3.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ea6350v3.dts @@ -116,15 +116,18 @@ &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"; }; @@ -207,6 +210,17 @@ 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"; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts index f08ddd0abe..6a7f4e5b0f 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts @@ -188,6 +188,17 @@ 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"; @@ -226,10 +237,14 @@ &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"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts index 0ee8d1a52e..6f4d7b5f32 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts @@ -240,6 +240,17 @@ 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>; + }; }; }; }; @@ -306,11 +317,14 @@ &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"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-gl-ap1300.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-gl-ap1300.dts index f643882725..fa81bfbf52 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-gl-ap1300.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-gl-ap1300.dts @@ -189,6 +189,17 @@ 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>; + }; }; }; }; @@ -260,10 +271,14 @@ &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"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi index 3af6de1f60..da09e53cc3 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi @@ -195,6 +195,17 @@ 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>; + }; }; }; }; @@ -246,13 +257,15 @@ &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"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi index 3673a13430..ebb2d08e73 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi @@ -188,12 +188,30 @@ 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 { @@ -249,3 +267,15 @@ 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>; +}; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wac510.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wac510.dts index 20e12855f4..699e2e28b4 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wac510.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wac510.dts @@ -273,12 +273,30 @@ 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>; + }; }; }; }; @@ -348,13 +366,16 @@ &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"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wrtq-329acn.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wrtq-329acn.dts index 2465348a82..5b0c8cf106 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wrtq-329acn.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wrtq-329acn.dts @@ -178,6 +178,17 @@ 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>; + }; }; }; }; @@ -264,12 +275,14 @@ &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"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts index 6c97cede7b..ba6aabdc9c 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts @@ -284,6 +284,25 @@ 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 { @@ -347,24 +366,14 @@ &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>; - }; -}; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts index df1df2529a..a50ee4a84e 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts @@ -68,6 +68,17 @@ 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"; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts index 9348ef4eec..ce54ce9f9b 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts @@ -68,6 +68,17 @@ 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>; + }; }; }; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac.dtsi index 57d607849a..45681b19bb 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac.dtsi +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac.dtsi @@ -257,10 +257,14 @@ &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"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts index 95e616695c..c8112c04fe 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts @@ -159,6 +159,21 @@ 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>; + }; }; }; }; @@ -216,6 +231,8 @@ 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"; }; @@ -272,11 +289,15 @@ &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"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts index 339a1e0f72..243dcb84d6 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts @@ -207,6 +207,21 @@ 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>; + }; }; }; }; @@ -348,6 +363,9 @@ 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"; }; }; @@ -355,10 +373,14 @@ &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"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts index 49cf2cabfa..2a2cfb9ac2 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts @@ -284,6 +284,17 @@ 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"; @@ -334,13 +345,15 @@ &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"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-oap100.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-oap100.dts index 69423ce02b..bdcc31fef7 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-oap100.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-oap100.dts @@ -278,6 +278,17 @@ 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>; + }; }; }; }; @@ -318,11 +329,15 @@ &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"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi index 41294e1931..33be77ec36 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi @@ -186,6 +186,17 @@ 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>; + }; }; }; }; @@ -340,10 +351,14 @@ &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"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rtl30vw.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rtl30vw.dts index 0caa0255d0..dcbe95c526 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rtl30vw.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rtl30vw.dts @@ -267,6 +267,17 @@ 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 { @@ -376,10 +387,14 @@ &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"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts index 811c82b9c5..4efcdaf394 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts @@ -65,6 +65,17 @@ 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"; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019.dtsi index 4435d1fd28..ece80571bd 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019.dtsi +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019.dtsi @@ -217,8 +217,12 @@ &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>; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wpj419.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wpj419.dts index fe329c1d43..09cbfaca91 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wpj419.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wpj419.dts @@ -206,6 +206,17 @@ 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>; + }; }; }; }; @@ -378,8 +389,12 @@ &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>; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts index fb0cec59f7..1f8c830d90 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts @@ -254,7 +254,8 @@ 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"; }; }; @@ -340,10 +341,25 @@ 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 { @@ -356,6 +372,22 @@ 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 { @@ -386,12 +418,16 @@ &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"; }; @@ -419,13 +455,3 @@ &usb3_hs_phy { status = "okay"; }; - -&orgdata { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_orgdata_20: macaddr@20 { - reg = <0x20 0x6>; - }; -}; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts index 79f4c04edf..3892c9bd81 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts @@ -231,6 +231,17 @@ 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"; @@ -281,8 +292,12 @@ &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>; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts index 13f89d810c..6cbfa8f37d 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts @@ -118,6 +118,17 @@ 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 { @@ -130,6 +141,13 @@ 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 { diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-303h.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-303h.dts index 707ed18e3b..201ce97cd9 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-303h.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-303h.dts @@ -325,6 +325,17 @@ 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 { @@ -349,6 +360,13 @@ 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 { @@ -413,9 +431,16 @@ &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"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-365.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-365.dts index 988a4421b5..0bc46d7e7e 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-365.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-365.dts @@ -150,6 +150,17 @@ 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 { diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi index 9d0823f3ef..0b94aafc83 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi @@ -242,10 +242,15 @@ &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"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts index a735d8e3ac..6e087ba024 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts @@ -208,6 +208,17 @@ 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 { @@ -271,10 +282,14 @@ &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"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts index fa859b73a3..e9490c2690 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts @@ -207,6 +207,17 @@ 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 { @@ -347,10 +358,14 @@ &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"; }; -- 2.30.2