Skip to content

Commit 126c6da

Browse files
committed
Merge tag 'qcom-drivers-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers
Qualcomm driver updates for v6.4 The Qualcomm SCM driver will now always clear the download bit, avoiding entering download mode on a clean reboot because the bootloader left it set. The vmid bitmap passed to qcom_scm_assign_mem() is transitioned to a well defined size. SM6375 support is added, and SC8180X, QDU1000/QRU1000, IPQ5332 and IPQ9574 compatibles are documented. GENI gains support for newer hardware with deeper FIFOs. The BWMON driver is updated to better handle the two register blocks, which are not consistent between MSM8998 and newer platforms. The LLCC driver no longer assumes a fixes stride across the various banks, and instead acquire the bank placement from DeviceTree. EDAC support for polling is introduced. EDAC support on SDM845 is disabled, as its been observed that accessing relevant registers is not permitted on most devices. PMIC GLINK is reworked to support defining which auxiliary children to spawn per platform, support for spawning a UCSI child is added and SM8450 and SM8550 is introduced. The RPM power-domain driver is cleaned up by moving and generalizing structures that are common between platforms, rather than duplicating everything. Macros are replaced with just direct definition of the relevant structures. Support for defining parent relationships between the power-domains is introduced, like it has been in rpmhpd for a long time. Number of processors has gone up, so max processor count in SMEM is bumped again. Error handling in SMSM is cleaned up using dev_err_probe(). Socinfo is taught about IPQ9574, QCM2290, QRB2210, QRB4210, SM7150, SA8775P and a number of PMICs. * tag 'qcom-drivers-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (51 commits) dt-bindings: firmware: document Qualcomm SC8180X SCM dt-bindings: sram: qcom,imem: document SM6375 IMEM soc: qcom: icc-bwmon: Handle global registers correctly soc: qcom: icc-bwmon: Remove unused struct member soc: qcom: smsm: Use dev_err_probe() firmware: qcom_scm: Add SM6375 compatible soc: qcom: llcc: Add configuration data for SM7150 dt-bindings: arm: msm: Add LLCC for SM7150 dt-bindings: soc: qcom: smd-rpm: re-add missing qcom,rpm-msm8994 soc: qcom: pmic_glink: register ucsi aux device dt-bindings: soc: qcom: qcom,pmic-glink: document SM8550 compatible dt-bindings: soc: qcom: qcom,pmic-glink: document SM8450 compatible firmware: qcom_scm: Clear download bit during reboot dt-bindings: soc: qcom: aoss: Document QDU1000/QRU1000 compatible dt-bindings: firmware: qcom,scm: Update QDU1000/QRU1000 compatible dt-bindings: soc: qcom: smd-rpm: Add IPQ9574 compatible firmware: qcom_scm: Use fixed width src vm bitmap dt-bindings: firmware: qcom,scm: document IPQ5332 SCM dt-bindings: scm: Add compatible for IPQ9574 soc: qcom: rpmpd: Remove useless comments ... Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 508471c + c78ad85 commit 126c6da

File tree

28 files changed

+1161
-417
lines changed

28 files changed

+1161
-417
lines changed

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

Lines changed: 116 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
77
title: Last Level Cache Controller
88

99
maintainers:
10-
- Rishabh Bhatnagar <[email protected]>
11-
- Sai Prakash Ranjan <[email protected]>
10+
- Bjorn Andersson <[email protected]>
1211

1312
description: |
1413
LLCC (Last Level Cache Controller) provides last level of cache memory in SoC,
@@ -27,21 +26,20 @@ properties:
2726
- qcom,sc8280xp-llcc
2827
- qcom,sdm845-llcc
2928
- qcom,sm6350-llcc
29+
- qcom,sm7150-llcc
3030
- qcom,sm8150-llcc
3131
- qcom,sm8250-llcc
3232
- qcom,sm8350-llcc
3333
- qcom,sm8450-llcc
3434
- qcom,sm8550-llcc
3535

3636
reg:
37-
items:
38-
- description: LLCC base register region
39-
- description: LLCC broadcast base register region
37+
minItems: 2
38+
maxItems: 9
4039

4140
reg-names:
42-
items:
43-
- const: llcc_base
44-
- const: llcc_broadcast_base
41+
minItems: 2
42+
maxItems: 9
4543

4644
interrupts:
4745
maxItems: 1
@@ -51,15 +49,120 @@ required:
5149
- reg
5250
- reg-names
5351

52+
allOf:
53+
- if:
54+
properties:
55+
compatible:
56+
contains:
57+
enum:
58+
- qcom,sc7180-llcc
59+
- qcom,sm6350-llcc
60+
then:
61+
properties:
62+
reg:
63+
items:
64+
- description: LLCC0 base register region
65+
- description: LLCC broadcast base register region
66+
reg-names:
67+
items:
68+
- const: llcc0_base
69+
- const: llcc_broadcast_base
70+
71+
- if:
72+
properties:
73+
compatible:
74+
contains:
75+
enum:
76+
- qcom,sc7280-llcc
77+
then:
78+
properties:
79+
reg:
80+
items:
81+
- description: LLCC0 base register region
82+
- description: LLCC1 base register region
83+
- description: LLCC broadcast base register region
84+
reg-names:
85+
items:
86+
- const: llcc0_base
87+
- const: llcc1_base
88+
- const: llcc_broadcast_base
89+
90+
- if:
91+
properties:
92+
compatible:
93+
contains:
94+
enum:
95+
- qcom,sc8180x-llcc
96+
- qcom,sc8280xp-llcc
97+
then:
98+
properties:
99+
reg:
100+
items:
101+
- description: LLCC0 base register region
102+
- description: LLCC1 base register region
103+
- description: LLCC2 base register region
104+
- description: LLCC3 base register region
105+
- description: LLCC4 base register region
106+
- description: LLCC5 base register region
107+
- description: LLCC6 base register region
108+
- description: LLCC7 base register region
109+
- description: LLCC broadcast base register region
110+
reg-names:
111+
items:
112+
- const: llcc0_base
113+
- const: llcc1_base
114+
- const: llcc2_base
115+
- const: llcc3_base
116+
- const: llcc4_base
117+
- const: llcc5_base
118+
- const: llcc6_base
119+
- const: llcc7_base
120+
- const: llcc_broadcast_base
121+
122+
- if:
123+
properties:
124+
compatible:
125+
contains:
126+
enum:
127+
- qcom,sdm845-llcc
128+
- qcom,sm8150-llcc
129+
- qcom,sm8250-llcc
130+
- qcom,sm8350-llcc
131+
- qcom,sm8450-llcc
132+
then:
133+
properties:
134+
reg:
135+
items:
136+
- description: LLCC0 base register region
137+
- description: LLCC1 base register region
138+
- description: LLCC2 base register region
139+
- description: LLCC3 base register region
140+
- description: LLCC broadcast base register region
141+
reg-names:
142+
items:
143+
- const: llcc0_base
144+
- const: llcc1_base
145+
- const: llcc2_base
146+
- const: llcc3_base
147+
- const: llcc_broadcast_base
148+
54149
additionalProperties: false
55150

56151
examples:
57152
- |
58153
#include <dt-bindings/interrupt-controller/arm-gic.h>
59154
60-
system-cache-controller@1100000 {
61-
compatible = "qcom,sdm845-llcc";
62-
reg = <0x1100000 0x200000>, <0x1300000 0x50000> ;
63-
reg-names = "llcc_base", "llcc_broadcast_base";
64-
interrupts = <GIC_SPI 582 IRQ_TYPE_LEVEL_HIGH>;
155+
soc {
156+
#address-cells = <2>;
157+
#size-cells = <2>;
158+
159+
system-cache-controller@1100000 {
160+
compatible = "qcom,sdm845-llcc";
161+
reg = <0 0x01100000 0 0x50000>, <0 0x01180000 0 0x50000>,
162+
<0 0x01200000 0 0x50000>, <0 0x01280000 0 0x50000>,
163+
<0 0x01300000 0 0x50000>;
164+
reg-names = "llcc0_base", "llcc1_base", "llcc2_base",
165+
"llcc3_base", "llcc_broadcast_base";
166+
interrupts = <GIC_SPI 582 IRQ_TYPE_LEVEL_HIGH>;
167+
};
65168
};

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ properties:
2424
- qcom,scm-apq8064
2525
- qcom,scm-apq8084
2626
- qcom,scm-ipq4019
27+
- qcom,scm-ipq5332
2728
- qcom,scm-ipq6018
2829
- qcom,scm-ipq806x
2930
- qcom,scm-ipq8074
31+
- qcom,scm-ipq9574
3032
- qcom,scm-mdm9607
3133
- qcom,scm-msm8226
3234
- qcom,scm-msm8660
@@ -42,6 +44,7 @@ properties:
4244
- qcom,scm-sa8775p
4345
- qcom,scm-sc7180
4446
- qcom,scm-sc7280
47+
- qcom,scm-sc8180x
4548
- qcom,scm-sc8280xp
4649
- qcom,scm-sdm670
4750
- qcom,scm-sdm845
@@ -166,6 +169,7 @@ allOf:
166169
compatible:
167170
contains:
168171
enum:
172+
- qcom,scm-qdu1000
169173
- qcom,scm-sm8450
170174
- qcom,scm-sm8550
171175
then:

Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ properties:
2525
compatible:
2626
items:
2727
- enum:
28+
- qcom,qdu1000-aoss-qmp
2829
- qcom,sc7180-aoss-qmp
2930
- qcom,sc7280-aoss-qmp
3031
- qcom,sc8180x-aoss-qmp

Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,14 @@ properties:
6262
maxItems: 1
6363

6464
qcom,intents:
65-
$ref: /schemas/types.yaml#/definitions/uint32-array
65+
$ref: /schemas/types.yaml#/definitions/uint32-matrix
66+
minItems: 1
67+
maxItems: 32
68+
items:
69+
items:
70+
- description: size of each intent to preallocate
71+
- description: amount of intents to preallocate
72+
minimum: 1
6673
description:
6774
List of (size, amount) pairs describing what intents should be
6875
preallocated for this virtual channel. This can be used to tweak the

Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ properties:
2525
- qcom,sc8180x-pmic-glink
2626
- qcom,sc8280xp-pmic-glink
2727
- qcom,sm8350-pmic-glink
28+
- qcom,sm8450-pmic-glink
29+
- qcom,sm8550-pmic-glink
2830
- const: qcom,pmic-glink
2931

3032
'#address-cells':

Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@ properties:
3333
enum:
3434
- qcom,rpm-apq8084
3535
- qcom,rpm-ipq6018
36+
- qcom,rpm-ipq9574
3637
- qcom,rpm-msm8226
3738
- qcom,rpm-msm8909
3839
- qcom,rpm-msm8916
3940
- qcom,rpm-msm8936
4041
- qcom,rpm-msm8953
4142
- qcom,rpm-msm8974
4243
- qcom,rpm-msm8976
44+
- qcom,rpm-msm8994
4345
- qcom,rpm-msm8996
4446
- qcom,rpm-msm8998
4547
- qcom,rpm-sdm660
@@ -84,6 +86,7 @@ if:
8486
- qcom,rpm-msm8974
8587
- qcom,rpm-msm8976
8688
- qcom,rpm-msm8953
89+
- qcom,rpm-msm8994
8790
then:
8891
properties:
8992
qcom,glink-channels: false

Documentation/devicetree/bindings/sram/qcom,imem.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ properties:
2626
- qcom,sdm845-imem
2727
- qcom,sdx55-imem
2828
- qcom,sdx65-imem
29+
- qcom,sm6375-imem
2930
- qcom,sm8450-imem
3031
- const: syscon
3132
- const: simple-mfd

drivers/edac/qcom_edac.c

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@
7676
#define DRP0_INTERRUPT_ENABLE BIT(6)
7777
#define SB_DB_DRP_INTERRUPT_ENABLE 0x3
7878

79+
#define ECC_POLL_MSEC 5000
80+
7981
enum {
8082
LLCC_DRAM_CE = 0,
8183
LLCC_DRAM_UE,
@@ -213,7 +215,7 @@ dump_syn_reg_values(struct llcc_drv_data *drv, u32 bank, int err_type)
213215

214216
for (i = 0; i < reg_data.reg_cnt; i++) {
215217
synd_reg = reg_data.synd_reg + (i * 4);
216-
ret = regmap_read(drv->regmap, drv->offsets[bank] + synd_reg,
218+
ret = regmap_read(drv->regmaps[bank], synd_reg,
217219
&synd_val);
218220
if (ret)
219221
goto clear;
@@ -222,8 +224,7 @@ dump_syn_reg_values(struct llcc_drv_data *drv, u32 bank, int err_type)
222224
reg_data.name, i, synd_val);
223225
}
224226

225-
ret = regmap_read(drv->regmap,
226-
drv->offsets[bank] + reg_data.count_status_reg,
227+
ret = regmap_read(drv->regmaps[bank], reg_data.count_status_reg,
227228
&err_cnt);
228229
if (ret)
229230
goto clear;
@@ -233,8 +234,7 @@ dump_syn_reg_values(struct llcc_drv_data *drv, u32 bank, int err_type)
233234
edac_printk(KERN_CRIT, EDAC_LLCC, "%s: Error count: 0x%4x\n",
234235
reg_data.name, err_cnt);
235236

236-
ret = regmap_read(drv->regmap,
237-
drv->offsets[bank] + reg_data.ways_status_reg,
237+
ret = regmap_read(drv->regmaps[bank], reg_data.ways_status_reg,
238238
&err_ways);
239239
if (ret)
240240
goto clear;
@@ -285,8 +285,7 @@ dump_syn_reg(struct edac_device_ctl_info *edev_ctl, int err_type, u32 bank)
285285
return ret;
286286
}
287287

288-
static irqreturn_t
289-
llcc_ecc_irq_handler(int irq, void *edev_ctl)
288+
static irqreturn_t llcc_ecc_irq_handler(int irq, void *edev_ctl)
290289
{
291290
struct edac_device_ctl_info *edac_dev_ctl = edev_ctl;
292291
struct llcc_drv_data *drv = edac_dev_ctl->dev->platform_data;
@@ -296,8 +295,7 @@ llcc_ecc_irq_handler(int irq, void *edev_ctl)
296295

297296
/* Iterate over the banks and look for Tag RAM or Data RAM errors */
298297
for (i = 0; i < drv->num_banks; i++) {
299-
ret = regmap_read(drv->regmap,
300-
drv->offsets[i] + DRP_INTERRUPT_STATUS,
298+
ret = regmap_read(drv->regmaps[i], DRP_INTERRUPT_STATUS,
301299
&drp_error);
302300

303301
if (!ret && (drp_error & SB_ECC_ERROR)) {
@@ -312,8 +310,7 @@ llcc_ecc_irq_handler(int irq, void *edev_ctl)
312310
if (!ret)
313311
irq_rc = IRQ_HANDLED;
314312

315-
ret = regmap_read(drv->regmap,
316-
drv->offsets[i] + TRP_INTERRUPT_0_STATUS,
313+
ret = regmap_read(drv->regmaps[i], TRP_INTERRUPT_0_STATUS,
317314
&trp_error);
318315

319316
if (!ret && (trp_error & SB_ECC_ERROR)) {
@@ -332,6 +329,11 @@ llcc_ecc_irq_handler(int irq, void *edev_ctl)
332329
return irq_rc;
333330
}
334331

332+
static void llcc_ecc_check(struct edac_device_ctl_info *edev_ctl)
333+
{
334+
llcc_ecc_irq_handler(0, edev_ctl);
335+
}
336+
335337
static int qcom_llcc_edac_probe(struct platform_device *pdev)
336338
{
337339
struct llcc_drv_data *llcc_driv_data = pdev->dev.platform_data;
@@ -359,29 +361,31 @@ static int qcom_llcc_edac_probe(struct platform_device *pdev)
359361
edev_ctl->ctl_name = "llcc";
360362
edev_ctl->panic_on_ue = LLCC_ERP_PANIC_ON_UE;
361363

362-
rc = edac_device_add_device(edev_ctl);
363-
if (rc)
364-
goto out_mem;
365-
366-
platform_set_drvdata(pdev, edev_ctl);
367-
368-
/* Request for ecc irq */
364+
/* Check if LLCC driver has passed ECC IRQ */
369365
ecc_irq = llcc_driv_data->ecc_irq;
370-
if (ecc_irq < 0) {
371-
rc = -ENODEV;
372-
goto out_dev;
373-
}
374-
rc = devm_request_irq(dev, ecc_irq, llcc_ecc_irq_handler,
366+
if (ecc_irq > 0) {
367+
/* Use interrupt mode if IRQ is available */
368+
rc = devm_request_irq(dev, ecc_irq, llcc_ecc_irq_handler,
375369
IRQF_TRIGGER_HIGH, "llcc_ecc", edev_ctl);
376-
if (rc)
377-
goto out_dev;
370+
if (!rc) {
371+
edac_op_state = EDAC_OPSTATE_INT;
372+
goto irq_done;
373+
}
374+
}
378375

379-
return rc;
376+
/* Fall back to polling mode otherwise */
377+
edev_ctl->poll_msec = ECC_POLL_MSEC;
378+
edev_ctl->edac_check = llcc_ecc_check;
379+
edac_op_state = EDAC_OPSTATE_POLL;
380380

381-
out_dev:
382-
edac_device_del_device(edev_ctl->dev);
383-
out_mem:
384-
edac_device_free_ctl_info(edev_ctl);
381+
irq_done:
382+
rc = edac_device_add_device(edev_ctl);
383+
if (rc) {
384+
edac_device_free_ctl_info(edev_ctl);
385+
return rc;
386+
}
387+
388+
platform_set_drvdata(pdev, edev_ctl);
385389

386390
return rc;
387391
}

0 commit comments

Comments
 (0)