From 597a2d7d186c2672b9efa97b61e9ab9df948436e Mon Sep 17 00:00:00 2001 From: George Moussalem Date: Tue, 9 Dec 2025 15:04:56 +0400 Subject: [PATCH] qualcommax: ipq50xx: load Linksys partition tables from SMEM The partition table on Linksys devices with a Qualcomm AX IPQ SoC is stored in SMEM. As such, load partition table from SMEM rather than statically defining them in their respective device trees. This helps generalize the base template and requires less maintenance. Signed-off-by: George Moussalem Link: https://github.com/openwrt/openwrt/pull/21038 Signed-off-by: Robert Marko --- .../arm64/boot/dts/qcom/ipq5018-mx-base.dtsi | 103 +----------------- .../etc/hotplug.d/firmware/11-ath11k-caldata | 6 +- 2 files changed, 5 insertions(+), 104 deletions(-) diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq5018-mx-base.dtsi b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq5018-mx-base.dtsi index a69385e17f..76c0384617 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq5018-mx-base.dtsi +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq5018-mx-base.dtsi @@ -120,76 +120,10 @@ nand-bus-width = <8>; partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; + compatible = "qcom,smem-part"; - partition@0 { - label = "0:SBL1"; - reg = <0x00000000 0x80000>; - read-only; - }; - - partition@80000 { - label = "0:MIBIB"; - reg = <0x00080000 0x80000>; - read-only; - }; - - partition@100000 { - label = "0:QSEE"; - reg = <0x00100000 0x100000>; - read-only; - }; - - partition@200000 { - label = "0:DEVCFG"; - reg = <0x00200000 0x40000>; - read-only; - }; - - partition@240000 { - label = "0:CDT"; - reg = <0x00240000 0x40000>; - read-only; - }; - - partition@280000 { - label = "0:APPSBLENV"; - reg = <0x00280000 0x80000>; - }; - - partition@300000 { - label = "0:APPSBL"; - reg = <0x00300000 0x140000>; - read-only; - }; - - partition@440000 { - label = "0:ART"; - reg = <0x00440000 0x100000>; - read-only; - }; - - partition@540000 { - label = "0:TRAINING"; - reg = <0x00540000 0x80000>; - read-only; - }; - - partition@5c0000 { - label = "u_env"; - reg = <0x005c0000 0x80000>; - }; - - partition@640000 { - label = "s_env"; - reg = <0x00640000 0x40000>; - }; - - partition@680000 { + partition-devinfo { label = "devinfo"; - reg = <0x00680000 0x40000>; read-only; nvmem-layout { @@ -199,43 +133,10 @@ hw_mac_addr: hw_mac_addr { compatible = "mac-base"; - #nvmem-cell-cells = <1>; }; }; }; - - partition@6c0000 { - label = "kernel"; - reg = <0x006c0000 0x5200000>; - }; - - partition@ec0000 { - label = "rootfs"; - reg = <0x0ec0000 0x4a00000>; - }; - - partition@58c0000 { - label = "alt_kernel"; - reg = <0x058c0000 0x5200000>; - }; - - partition@60c0000 { - label = "alt_rootfs"; - reg = <0x060c0000 0x4a00000>; - }; - - partition@aac0000 { - label = "sysdiag"; - reg = <0x0aac0000 0x200000>; - read-only; - }; - - partition@acc0000 { - label = "syscfg"; - reg = <0x0acc0000 0x4400000>; - read-only; - }; }; }; }; diff --git a/target/linux/qualcommax/ipq50xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/qualcommax/ipq50xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata index c34aadf7d4..6cd00bf53c 100644 --- a/target/linux/qualcommax/ipq50xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata +++ b/target/linux/qualcommax/ipq50xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata @@ -25,7 +25,7 @@ case "$FIRMWARE" in linksys,mx2000|\ linksys,mx5500|\ linksys,spnmx56) - caldata_extract "0:ART" 0x1000 0x20000 + caldata_extract "0:art" 0x1000 0x20000 label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) ath11k_patch_mac $(macaddr_add $label_mac 1) 0 ath11k_remove_regdomain @@ -59,7 +59,7 @@ case "$FIRMWARE" in ath11k_set_macflag ;; linksys,mx2000) - caldata_extract "0:ART" 0x26800 0x20000 + caldata_extract "0:art" 0x26800 0x20000 label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) ath11k_patch_mac $(macaddr_add $label_mac 2) 0 ath11k_remove_regdomain @@ -79,7 +79,7 @@ case "$FIRMWARE" in linksys,mr5500|\ linksys,mx5500|\ linksys,spnmx56) - caldata_extract "0:ART" 0x26800 0x20000 + caldata_extract "0:art" 0x26800 0x20000 label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) ath11k_patch_mac $(macaddr_add $label_mac 2) 0 ath11k_remove_regdomain -- 2.30.2