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 <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21038
Link: https://github.com/openwrt/openwrt/pull/21273
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
George Moussalem 2025-12-09 15:04:56 +04:00 committed by Robert Marko
parent 66662fae91
commit facaa3d904
2 changed files with 5 additions and 104 deletions

View file

@ -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;
};
};
};
};

View file

@ -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