Use nvmem cells for precal bin on smem based device.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
;;
"ath10k/pre-cal-pci-0000:01:00.0.bin")
case $board in
- asrock,g10)
- caldata_extract "0:art" 0x1000 0x2f20
- ;;
linksys,ea7500-v1 |\
linksys,ea8500)
- caldata_extract "art" 0x1000 0x2f20
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) 1)
;;
meraki,mr42)
caldata_extract_ubi "ART" 0x1000 0x2f20
;;
zyxel,nbg6817)
- caldata_extract "0:art" 0x1000 0x2f20
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:appsblenv ethaddr) 1)
;;
esac
;;
"ath10k/pre-cal-pci-0001:01:00.0.bin")
case $board in
- asrock,g10)
- caldata_extract "0:art" 0x5000 0x2f20
- ;;
- edgecore,ecw5410)
- caldata_extract "0:art" 0x1000 0x2f20
- ;;
linksys,ea7500-v1 |\
linksys,ea8500)
- caldata_extract "art" 0x5000 0x2f20
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) 2)
;;
meraki,mr42 |\
caldata_extract_ubi "ART" 0x5000 0x2f20
;;
zyxel,nbg6817)
- caldata_extract "0:art" 0x5000 0x2f20
ath10k_patch_mac $(mtd_get_mac_ascii 0:appsblenv ethaddr)
;;
esac
;;
"ath10k/pre-cal-pci-0002:01:00.0.bin")
case $board in
- edgecore,ecw5410)
- caldata_extract "0:art" 0x5000 0x2f20
- ;;
meraki,mr52)
CI_UBIPART=art
caldata_extract_ubi "ART" 0x9000 0x2f20
status = "okay";
max-link-speed = <1>;
+
+ bridge@0,0 {
+ reg = <0x00000000 0 0 0 0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
+
+ wifi@1,0 {
+ compatible = "qcom,ath10k";
+ status = "okay";
+ reg = <0x00010000 0 0 0 0>;
+
+ nvmem-cells = <&precal_art_1000>;
+ nvmem-cell-names = "pre-calibration";
+ };
+ };
};
&pcie1 {
status = "okay";
+
+ bridge@0,0 {
+ reg = <0x00000000 0 0 0 0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
+
+ wifi@1,0 {
+ compatible = "qcom,ath10k";
+ status = "okay";
+ reg = <0x00010000 0 0 0 0>;
+
+ nvmem-cells = <&precal_art_5000>;
+ nvmem-cell-names = "pre-calibration";
+ };
+ };
};
&pcie2 {
label = "art";
reg = <0x0c80000 0x0140000>;
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@dc0000 {
partitions {
compatible = "qcom,smem-part";
+
+ partition-art {
+ label = "0:art";
+ 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>;
+ };
+ };
};
};
};
reg = <0x00010000 0 0 0 0>;
compatible = "qcom,ath10k";
qcom,ath10k-calibration-variant = "ASRock-G10";
+ nvmem-cells = <&precal_art_1000>;
+ nvmem-cell-names = "pre-calibration";
};
};
};
reg = <0x00010000 0 0 0 0>;
compatible = "qcom,ath10k";
qcom,ath10k-calibration-variant = "ASRock-G10";
+ nvmem-cells = <&precal_art_5000>;
+ nvmem-cell-names = "pre-calibration";
};
};
};
partitions {
compatible = "qcom,smem-part";
+
+ partition-art {
+ label = "0:art";
+ 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>;
+ };
+ };
};
};
};
reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&pcie0_pins>;
pinctrl-names = "default";
+
+ bridge@0,0 {
+ reg = <0x00000000 0 0 0 0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
+
+ wifi@1,0 {
+ reg = <0x00010000 0 0 0 0>;
+ compatible = "qcom,ath10k";
+
+ nvmem-cells = <&precal_art_1000>;
+ nvmem-cell-names = "pre-calibration";
+ };
+ };
};
&pcie1 {
pinctrl-0 = <&pcie1_pins>;
pinctrl-names = "default";
max-link-speed = <1>;
+
+ bridge@0,0 {
+ reg = <0x00000000 0 0 0 0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
+
+ wifi@1,0 {
+ reg = <0x00010000 0 0 0 0>;
+ compatible = "qcom,ath10k";
+
+ nvmem-cells = <&precal_art_5000>;
+ nvmem-cell-names = "pre-calibration";
+ };
+ };
};
&mdio0 {
partitions {
compatible = "qcom,smem-part";
+
+ partition-art {
+ label = "0:art";
+ 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>;
+ };
+ };
};
};
};
status = "okay";
reg = <0x00010000 0 0 0 0>;
qcom,ath10k-calibration-variant = "Edgecore-ECW5410-L";
+ nvmem-cells = <&precal_art_1000>;
+ nvmem-cell-names = "pre-calibration";
};
};
};
status = "okay";
reg = <0x00010000 0 0 0 0>;
qcom,ath10k-calibration-variant = "Edgecore-ECW5410-L";
+ nvmem-cells = <&precal_art_5000>;
+ nvmem-cell-names = "pre-calibration";
};
};
};