[openwrt/openwrt] ipq806x: chromium: Pull OnHub caldata directly from VPD

LEDE Commits lede-commits at lists.infradead.org
Fri Oct 24 11:57:29 PDT 2025


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/24d2ac6d3ab4854595f6ed26a15561cabff8b879

commit 24d2ac6d3ab4854595f6ed26a15561cabff8b879
Author: Brian Norris <computersforpeace at gmail.com>
AuthorDate: Mon Oct 20 22:44:25 2025 -0700

    ipq806x: chromium: Pull OnHub caldata directly from VPD
    
    The OnHub bootloader tries to patch the calibration directly into the
    device tree, but it uses constant paths that look like this:
    
      static const char *dt_path = "soc/pci@%8.8x/pcie at 0/ath10k at 0,0";
    
      https://chromium.googlesource.com/chromiumos/platform/depthcharge/+/refs/heads/firmware-storm-6315.B/src/board/storm/wifi_calibration.c#69
    
    These paths have changed in recent kernels, so we need to adapte.
    
    The CONFIG_GOOGLE_VPD kernel module (provided by kmod-google-firmware)
    is present on OnHub, and provides alternative means to locate this
    information, in /sys/firmware/vpd/ro/wifi_base64_calibration{0,1,2}. Use
    that instead.
    
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/20477
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../base-files/etc/hotplug.d/firmware/11-ath10k-caldata        | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 4e9d536bbc..36f07307c3 100644
--- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -6,9 +6,9 @@
 
 board=$(board_name)
 
-dt_base64_extract() {
+base64_extract() {
 	local target_dir="/sys$DEVPATH"
-	local source="$target_dir/../../of_node/qcom,ath10k-calibration-data-base64"
+	local source="$1"
 
 	[ -e "$source" ] || caldata_die "cannot find base64 calibration data: $source"
 	[ -d "$target_dir" ] || \
@@ -30,7 +30,7 @@ case "$FIRMWARE" in
 	case "$board" in
 	asus,onhub |\
 	tplink,onhub)
-		dt_base64_extract
+		base64_extract /sys/firmware/vpd/ro/wifi_base64_calibration0
 		;;
 	meraki,mr52)
 		CI_UBIPART=art
@@ -61,7 +61,7 @@ case "$FIRMWARE" in
 	case "$board" in
 	asus,onhub |\
 	tplink,onhub)
-		dt_base64_extract
+		base64_extract /sys/firmware/vpd/ro/wifi_base64_calibration1
 		;;
 	esac
 	;;
@@ -92,7 +92,7 @@ case "$FIRMWARE" in
 	case "$board" in
 	asus,onhub |\
 	tplink,onhub)
-		dt_base64_extract
+		base64_extract /sys/firmware/vpd/ro/wifi_base64_calibration2
 		;;
 	meraki,mr42)
 		CI_UBIPART=art




More information about the lede-commits mailing list