Skip to content

Commit 13ee75c

Browse files
committed
Merge tag 'qcom-drivers-for-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers
Qualcomm driver updates for v5.17 This introduces RPM power-domain support for the SM8450, SM6125 and QCM2290 platforms. It them clean up the platform-based naming of the resources definitions throughout the RPMh PD driver. The last-level cache controller driver gains SM8350 support. The RPM sleep stats driver gains support for several older systems that had a slightly different memory layout for this information. The socinfo gains SM8450, SM6350 and SM7227 definitions. In addition to the DeviceTree binding updates related to these changes new compatibles was added to describe the SM8450 and the Kryo 780 CPU. Lastly a few typo and style fixes are introduced. * tag 'qcom-drivers-for-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (27 commits) soc: qcom: rpmh-rsc: Fix typo in a comment soc: qcom: socinfo: Add SM6350 and SM7225 dt-bindings: arm: msm: Don't mark LLCC interrupt as required dt-bindings: firmware: scm: Add SM6350 compatible dt-bindings: arm: msm: Add LLCC for SM6350 soc: qcom: rpmhpd: Sort power-domain definitions and lists soc: qcom: rpmhpd: Remove mx/cx relationship on sc7280 soc: qcom: rpmhpd: Rename rpmhpd struct names soc: qcom: rpmhpd: sm8450: Add the missing .peer for sm8450_cx_ao soc: qcom: socinfo: add SM8450 ID soc: qcom: rpmhpd: Add SM8450 power domains dt-bindings: power: rpmpd: Add SM8450 to rpmpd binding soc: qcom: smem: Update max processor count dt-bindings: arm: qcom: Document SM8450 SoC and boards dt-bindings: firmware: scm: Add SM8450 compatible dt-bindings: arm: cpus: Add kryo780 compatible soc: qcom: rpmpd: Add support for sm6125 dt-bindings: qcom-rpmpd: Add sm6125 power domains soc: qcom: aoss: constify static struct thermal_cooling_device_ops PM: AVS: qcom-cpr: Use div64_ul instead of do_div ... Link: https://lore.kernel.org/r/20211221040452.3620633-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents 9593bdf + e395f02 commit 13ee75c

18 files changed

Lines changed: 335 additions & 142 deletions

File tree

Documentation/devicetree/bindings/arm/cpus.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ properties:
174174
- qcom,kryo560
175175
- qcom,kryo570
176176
- qcom,kryo685
177+
- qcom,kryo780
177178
- qcom,scorpion
178179

179180
enable-method:

Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ properties:
2424
- qcom,sc7180-llcc
2525
- qcom,sc7280-llcc
2626
- qcom,sdm845-llcc
27+
- qcom,sm6350-llcc
2728
- qcom,sm8150-llcc
2829
- qcom,sm8250-llcc
2930

@@ -44,7 +45,6 @@ required:
4445
- compatible
4546
- reg
4647
- reg-names
47-
- interrupts
4848

4949
additionalProperties: false
5050

Documentation/devicetree/bindings/arm/qcom.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ description: |
5050
sm8150
5151
sm8250
5252
sm8350
53+
sm8450
5354
5455
The 'board' element must be one of the following strings:
5556
@@ -257,6 +258,11 @@ properties:
257258
- qcom,sm8350-mtp
258259
- const: qcom,sm8350
259260

261+
- items:
262+
- enum:
263+
- qcom,sm8450-qrd
264+
- const: qcom,sm8450
265+
260266
additionalProperties: true
261267

262268
...

Documentation/devicetree/bindings/firmware/qcom,scm.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ Required properties:
2626
* "qcom,scm-sc7280"
2727
* "qcom,scm-sdm845"
2828
* "qcom,scm-sdx55"
29+
* "qcom,scm-sm6350"
2930
* "qcom,scm-sm8150"
3031
* "qcom,scm-sm8250"
3132
* "qcom,scm-sm8350"
33+
* "qcom,scm-sm8450"
3234
and:
3335
* "qcom,scm"
3436
- clocks: Specifies clocks needed by the SCM interface, if any:

Documentation/devicetree/bindings/power/qcom,rpmpd.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ properties:
2424
- qcom,msm8994-rpmpd
2525
- qcom,msm8996-rpmpd
2626
- qcom,msm8998-rpmpd
27+
- qcom,qcm2290-rpmpd
2728
- qcom,qcs404-rpmpd
2829
- qcom,sdm660-rpmpd
2930
- qcom,sc7180-rpmhpd
@@ -32,10 +33,12 @@ properties:
3233
- qcom,sdm845-rpmhpd
3334
- qcom,sdx55-rpmhpd
3435
- qcom,sm6115-rpmpd
36+
- qcom,sm6125-rpmpd
3537
- qcom,sm6350-rpmhpd
3638
- qcom,sm8150-rpmhpd
3739
- qcom,sm8250-rpmhpd
3840
- qcom,sm8350-rpmhpd
41+
- qcom,sm8450-rpmhpd
3942

4043
'#power-domain-cells':
4144
const: 1

Documentation/devicetree/bindings/soc/qcom/qcom-stats.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ properties:
2121
enum:
2222
- qcom,rpmh-stats
2323
- qcom,rpm-stats
24+
# For older RPM firmware versions with fixed offset for the sleep stats
25+
- qcom,apq8084-rpm-stats
26+
- qcom,msm8226-rpm-stats
27+
- qcom,msm8916-rpm-stats
28+
- qcom,msm8974-rpm-stats
2429

2530
reg:
2631
maxItems: 1

drivers/soc/qcom/cpr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ static int cpr_interpolate(const struct corner *corner, int step_volt,
10101010
return corner->uV;
10111011

10121012
temp = f_diff * (uV_high - uV_low);
1013-
do_div(temp, f_high - f_low);
1013+
temp = div64_ul(temp, f_high - f_low);
10141014

10151015
/*
10161016
* max_volt_scale has units of uV/MHz while freq values

drivers/soc/qcom/llcc-qcom.c

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,28 @@ static const struct llcc_slice_config sm8250_data[] = {
195195
{ LLCC_WRCACHE, 31, 256, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 },
196196
};
197197

198+
static const struct llcc_slice_config sm8350_data[] = {
199+
{ LLCC_CPUSS, 1, 3072, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 1, 1 },
200+
{ LLCC_VIDSC0, 2, 512, 3, 1, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 },
201+
{ LLCC_AUDIO, 6, 1024, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 0, 0 },
202+
{ LLCC_MDMHPGRW, 7, 1024, 3, 0, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 },
203+
{ LLCC_MODHW, 9, 1024, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 },
204+
{ LLCC_CMPT, 10, 3072, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 },
205+
{ LLCC_GPUHTW, 11, 1024, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 },
206+
{ LLCC_GPU, 12, 1024, 1, 0, 0xfff, 0x0, 0, 0, 0, 1, 1, 0 },
207+
{ LLCC_MMUHWT, 13, 1024, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 0, 1 },
208+
{ LLCC_DISP, 16, 3072, 2, 1, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 },
209+
{ LLCC_MDMPNG, 21, 1024, 0, 1, 0xf, 0x0, 0, 0, 0, 0, 1, 0 },
210+
{ LLCC_AUDHW, 22, 1024, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 },
211+
{ LLCC_CVP, 28, 512, 3, 1, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 },
212+
{ LLCC_MODPE, 29, 256, 1, 1, 0xf, 0x0, 0, 0, 0, 0, 1, 0 },
213+
{ LLCC_APTCM, 30, 1024, 3, 1, 0x0, 0x1, 1, 0, 0, 0, 1, 0 },
214+
{ LLCC_WRCACHE, 31, 512, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 0, 1 },
215+
{ LLCC_CVPFW, 17, 512, 1, 0, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 },
216+
{ LLCC_CPUSS1, 3, 1024, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 },
217+
{ LLCC_CPUHWT, 5, 512, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 0, 1 },
218+
};
219+
198220
static const struct qcom_llcc_config sc7180_cfg = {
199221
.sct_data = sc7180_data,
200222
.size = ARRAY_SIZE(sc7180_data),
@@ -228,6 +250,11 @@ static const struct qcom_llcc_config sm8250_cfg = {
228250
.size = ARRAY_SIZE(sm8250_data),
229251
};
230252

253+
static const struct qcom_llcc_config sm8350_cfg = {
254+
.sct_data = sm8350_data,
255+
.size = ARRAY_SIZE(sm8350_data),
256+
};
257+
231258
static struct llcc_drv_data *drv_data = (void *) -EPROBE_DEFER;
232259

233260
/**
@@ -644,6 +671,7 @@ static const struct of_device_id qcom_llcc_of_match[] = {
644671
{ .compatible = "qcom,sm6350-llcc", .data = &sm6350_cfg },
645672
{ .compatible = "qcom,sm8150-llcc", .data = &sm8150_cfg },
646673
{ .compatible = "qcom,sm8250-llcc", .data = &sm8250_cfg },
674+
{ .compatible = "qcom,sm8350-llcc", .data = &sm8350_cfg },
647675
{ }
648676
};
649677

drivers/soc/qcom/qcom_aoss.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ static int qmp_cdev_set_cur_state(struct thermal_cooling_device *cdev,
352352
return ret;
353353
}
354354

355-
static struct thermal_cooling_device_ops qmp_cooling_device_ops = {
355+
static const struct thermal_cooling_device_ops qmp_cooling_device_ops = {
356356
.get_max_state = qmp_cdev_get_max_state,
357357
.get_cur_state = qmp_cdev_get_cur_state,
358358
.set_cur_state = qmp_cdev_set_cur_state,

drivers/soc/qcom/qcom_stats.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,15 @@ static const struct stats_config rpm_data = {
237237
.subsystem_stats_in_smem = false,
238238
};
239239

240+
/* Older RPM firmwares have the stats at a fixed offset instead */
241+
static const struct stats_config rpm_data_dba0 = {
242+
.stats_offset = 0xdba0,
243+
.num_records = 2,
244+
.appended_stats_avail = true,
245+
.dynamic_offset = false,
246+
.subsystem_stats_in_smem = false,
247+
};
248+
240249
static const struct stats_config rpmh_data = {
241250
.stats_offset = 0x48,
242251
.num_records = 3,
@@ -246,6 +255,10 @@ static const struct stats_config rpmh_data = {
246255
};
247256

248257
static const struct of_device_id qcom_stats_table[] = {
258+
{ .compatible = "qcom,apq8084-rpm-stats", .data = &rpm_data_dba0 },
259+
{ .compatible = "qcom,msm8226-rpm-stats", .data = &rpm_data_dba0 },
260+
{ .compatible = "qcom,msm8916-rpm-stats", .data = &rpm_data_dba0 },
261+
{ .compatible = "qcom,msm8974-rpm-stats", .data = &rpm_data_dba0 },
249262
{ .compatible = "qcom,rpm-stats", .data = &rpm_data },
250263
{ .compatible = "qcom,rpmh-stats", .data = &rpmh_data },
251264
{ }

0 commit comments

Comments
 (0)