Skip to content

Commit 597a2d7

Browse files
georgemoussalemrobimarko
authored andcommitted
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 <[email protected]> Link: openwrt/openwrt#21038 Signed-off-by: Robert Marko <[email protected]>
1 parent 423cda9 commit 597a2d7

File tree

2 files changed

+5
-104
lines changed

2 files changed

+5
-104
lines changed

target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq5018-mx-base.dtsi

Lines changed: 2 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -120,76 +120,10 @@
120120
nand-bus-width = <8>;
121121

122122
partitions {
123-
compatible = "fixed-partitions";
124-
#address-cells = <1>;
125-
#size-cells = <1>;
123+
compatible = "qcom,smem-part";
126124

127-
partition@0 {
128-
label = "0:SBL1";
129-
reg = <0x00000000 0x80000>;
130-
read-only;
131-
};
132-
133-
partition@80000 {
134-
label = "0:MIBIB";
135-
reg = <0x00080000 0x80000>;
136-
read-only;
137-
};
138-
139-
partition@100000 {
140-
label = "0:QSEE";
141-
reg = <0x00100000 0x100000>;
142-
read-only;
143-
};
144-
145-
partition@200000 {
146-
label = "0:DEVCFG";
147-
reg = <0x00200000 0x40000>;
148-
read-only;
149-
};
150-
151-
partition@240000 {
152-
label = "0:CDT";
153-
reg = <0x00240000 0x40000>;
154-
read-only;
155-
};
156-
157-
partition@280000 {
158-
label = "0:APPSBLENV";
159-
reg = <0x00280000 0x80000>;
160-
};
161-
162-
partition@300000 {
163-
label = "0:APPSBL";
164-
reg = <0x00300000 0x140000>;
165-
read-only;
166-
};
167-
168-
partition@440000 {
169-
label = "0:ART";
170-
reg = <0x00440000 0x100000>;
171-
read-only;
172-
};
173-
174-
partition@540000 {
175-
label = "0:TRAINING";
176-
reg = <0x00540000 0x80000>;
177-
read-only;
178-
};
179-
180-
partition@5c0000 {
181-
label = "u_env";
182-
reg = <0x005c0000 0x80000>;
183-
};
184-
185-
partition@640000 {
186-
label = "s_env";
187-
reg = <0x00640000 0x40000>;
188-
};
189-
190-
partition@680000 {
125+
partition-devinfo {
191126
label = "devinfo";
192-
reg = <0x00680000 0x40000>;
193127
read-only;
194128

195129
nvmem-layout {
@@ -199,43 +133,10 @@
199133

200134
hw_mac_addr: hw_mac_addr {
201135
compatible = "mac-base";
202-
203136
#nvmem-cell-cells = <1>;
204137
};
205138
};
206139
};
207-
208-
partition@6c0000 {
209-
label = "kernel";
210-
reg = <0x006c0000 0x5200000>;
211-
};
212-
213-
partition@ec0000 {
214-
label = "rootfs";
215-
reg = <0x0ec0000 0x4a00000>;
216-
};
217-
218-
partition@58c0000 {
219-
label = "alt_kernel";
220-
reg = <0x058c0000 0x5200000>;
221-
};
222-
223-
partition@60c0000 {
224-
label = "alt_rootfs";
225-
reg = <0x060c0000 0x4a00000>;
226-
};
227-
228-
partition@aac0000 {
229-
label = "sysdiag";
230-
reg = <0x0aac0000 0x200000>;
231-
read-only;
232-
};
233-
234-
partition@acc0000 {
235-
label = "syscfg";
236-
reg = <0x0acc0000 0x4400000>;
237-
read-only;
238-
};
239140
};
240141
};
241142
};

target/linux/qualcommax/ipq50xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ case "$FIRMWARE" in
2525
linksys,mx2000|\
2626
linksys,mx5500|\
2727
linksys,spnmx56)
28-
caldata_extract "0:ART" 0x1000 0x20000
28+
caldata_extract "0:art" 0x1000 0x20000
2929
label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
3030
ath11k_patch_mac $(macaddr_add $label_mac 1) 0
3131
ath11k_remove_regdomain
@@ -59,7 +59,7 @@ case "$FIRMWARE" in
5959
ath11k_set_macflag
6060
;;
6161
linksys,mx2000)
62-
caldata_extract "0:ART" 0x26800 0x20000
62+
caldata_extract "0:art" 0x26800 0x20000
6363
label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
6464
ath11k_patch_mac $(macaddr_add $label_mac 2) 0
6565
ath11k_remove_regdomain
@@ -79,7 +79,7 @@ case "$FIRMWARE" in
7979
linksys,mr5500|\
8080
linksys,mx5500|\
8181
linksys,spnmx56)
82-
caldata_extract "0:ART" 0x26800 0x20000
82+
caldata_extract "0:art" 0x26800 0x20000
8383
label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
8484
ath11k_patch_mac $(macaddr_add $label_mac 2) 0
8585
ath11k_remove_regdomain

0 commit comments

Comments
 (0)