Skip to content

Commit ee22fbd

Browse files
committed
Merge tag 'qcom-drivers-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers
Qualcomm driver updates for v6.11 Support for Shared Memory (shm) Bridge is added, which provides a stricter interface for handling of buffers passed to TrustZone. The X1Elite platform is added to uefisecapp allow list, to instantiate the efivars implementation. A new in-kernel implementation of the pd-mapper (or servreg) service is introduced, to replace the userspace dependency for USB Type-C and battery management. Support for sharing interrupts across multiple bwmon instances is added, and a refcount imbalance issue is corrected. The LLCC support for recent platforms is corrected, and SA8775P support is added. A new interface is added to SMEM, to expose "feature codes". One example of the usecase for this is to indicate to the GPU driver which frequencies are available on the given device. The interrupt consumer and provider side of SMP2P is updated to provide more useful names in interrupt stats. Support for using the mailbox binding and driver for outgoing IPC interrupt in the SMSM driver is introduced. socinfo driver learns about SDM670 and IPQ5321, as well as get some updates to the X1E PMICs. pmic_glink is bumped to now support managing 3 USB Type-C ports. * tag 'qcom-drivers-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (48 commits) soc: qcom: smp2p: Use devname for interrupt descriptions soc: qcom: smsm: Add missing mailbox dependency to Kconfig soc: qcom: add missing pd-mapper dependencies soc: qcom: icc-bwmon: Allow for interrupts to be shared across instances dt-bindings: interconnect: qcom,msm8998-bwmon: Add X1E80100 BWMON instances dt-bindings: interconnect: qcom,msm8998-bwmon: Remove opp-table from the required list firmware: qcom: tzmem: export devm_qcom_tzmem_pool_new() soc: qcom: add pd-mapper implementation soc: qcom: pdr: extract PDR message marshalling data soc: qcom: pdr: fix parsing of domains lists soc: qcom: pdr: protect locator_addr with the main mutex firmware: qcom: scm: clarify the comment in qcom_scm_pas_init_image() firmware: qcom: scm: add support for SHM bridge memory carveout firmware: qcom: tzmem: enable SHM Bridge support firmware: qcom: scm: add support for SHM bridge operations firmware: qcom: qseecom: convert to using the TZ allocator firmware: qcom: scm: make qcom_scm_qseecom_app_get_id() use the TZ allocator firmware: qcom: scm: make qcom_scm_lmh_dcvsh() use the TZ allocator firmware: qcom: scm: make qcom_scm_ice_set_key() use the TZ allocator firmware: qcom: scm: make qcom_scm_assign_mem() use the TZ allocator ... Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents e9a316a + e49380c commit ee22fbd

40 files changed

+2266
-571
lines changed

Documentation/devicetree/bindings/cache/qcom,llcc.yaml

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ properties:
2121
compatible:
2222
enum:
2323
- qcom,qdu1000-llcc
24+
- qcom,sa8775p-llcc
2425
- qcom,sc7180-llcc
2526
- qcom,sc7280-llcc
2627
- qcom,sc8180x-llcc
@@ -80,6 +81,33 @@ allOf:
8081
- const: llcc0_base
8182
- const: llcc_broadcast_base
8283

84+
- if:
85+
properties:
86+
compatible:
87+
contains:
88+
enum:
89+
- qcom,sa8775p-llcc
90+
then:
91+
properties:
92+
reg:
93+
items:
94+
- description: LLCC0 base register region
95+
- description: LLCC1 base register region
96+
- description: LLCC2 base register region
97+
- description: LLCC3 base register region
98+
- description: LLCC4 base register region
99+
- description: LLCC5 base register region
100+
- description: LLCC broadcast base register region
101+
reg-names:
102+
items:
103+
- const: llcc0_base
104+
- const: llcc1_base
105+
- const: llcc2_base
106+
- const: llcc3_base
107+
- const: llcc4_base
108+
- const: llcc5_base
109+
- const: llcc_broadcast_base
110+
83111
- if:
84112
properties:
85113
compatible:
@@ -141,8 +169,31 @@ allOf:
141169
- qcom,sm8150-llcc
142170
- qcom,sm8250-llcc
143171
- qcom,sm8350-llcc
172+
then:
173+
properties:
174+
reg:
175+
items:
176+
- description: LLCC0 base register region
177+
- description: LLCC1 base register region
178+
- description: LLCC2 base register region
179+
- description: LLCC3 base register region
180+
- description: LLCC broadcast base register region
181+
reg-names:
182+
items:
183+
- const: llcc0_base
184+
- const: llcc1_base
185+
- const: llcc2_base
186+
- const: llcc3_base
187+
- const: llcc_broadcast_base
188+
189+
- if:
190+
properties:
191+
compatible:
192+
contains:
193+
enum:
144194
- qcom,sm8450-llcc
145195
- qcom,sm8550-llcc
196+
- qcom,sm8650-llcc
146197
then:
147198
properties:
148199
reg:
@@ -151,14 +202,16 @@ allOf:
151202
- description: LLCC1 base register region
152203
- description: LLCC2 base register region
153204
- description: LLCC3 base register region
154-
- description: LLCC broadcast base register region
205+
- description: LLCC broadcast OR register region
206+
- description: LLCC broadcast AND register region
155207
reg-names:
156208
items:
157209
- const: llcc0_base
158210
- const: llcc1_base
159211
- const: llcc2_base
160212
- const: llcc3_base
161213
- const: llcc_broadcast_base
214+
- const: llcc_broadcast_and_base
162215

163216
additionalProperties: false
164217

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ properties:
9393
protocol to handle sleeping SCM calls.
9494
maxItems: 1
9595

96+
memory-region:
97+
description:
98+
Phandle to the memory region reserved for the shared memory bridge to TZ.
99+
maxItems: 1
100+
96101
qcom,sdi-enabled:
97102
description:
98103
Indicates that the SDI (Secure Debug Image) has been enabled by TZ
@@ -193,6 +198,16 @@ allOf:
193198
then:
194199
properties:
195200
interrupts: false
201+
- if:
202+
not:
203+
properties:
204+
compatible:
205+
contains:
206+
enum:
207+
- qcom,scm-sa8775p
208+
then:
209+
properties:
210+
memory-region: false
196211

197212
required:
198213
- compatible

Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ properties:
3535
- qcom,sm8250-cpu-bwmon
3636
- qcom,sm8550-cpu-bwmon
3737
- qcom,sm8650-cpu-bwmon
38+
- qcom,x1e80100-cpu-bwmon
3839
- const: qcom,sdm845-bwmon # BWMON v4, unified register space
3940
- items:
4041
- enum:
@@ -44,6 +45,7 @@ properties:
4445
- qcom,sm8250-llcc-bwmon
4546
- qcom,sm8550-llcc-bwmon
4647
- qcom,sm8650-llcc-bwmon
48+
- qcom,x1e80100-llcc-bwmon
4749
- const: qcom,sc7280-llcc-bwmon
4850
- const: qcom,sc7280-llcc-bwmon # BWMON v5
4951
- const: qcom,sdm845-llcc-bwmon # BWMON v5
@@ -72,7 +74,6 @@ required:
7274
- interconnects
7375
- interrupts
7476
- operating-points-v2
75-
- opp-table
7677
- reg
7778

7879
additionalProperties: false

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ properties:
3131
- qcom,sc7280-aoss-qmp
3232
- qcom,sc8180x-aoss-qmp
3333
- qcom,sc8280xp-aoss-qmp
34+
- qcom,sdx75-aoss-qmp
3435
- qcom,sdm845-aoss-qmp
3536
- qcom,sm6350-aoss-qmp
3637
- qcom,sm8150-aoss-qmp

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ properties:
4141
description:
4242
Three entries specifying the outgoing ipc bit used for signaling the
4343
remote end of the smp2p edge.
44+
deprecated: true
4445

4546
qcom,local-pid:
4647
$ref: /schemas/types.yaml#/definitions/uint32
@@ -128,7 +129,7 @@ examples:
128129
compatible = "qcom,smp2p";
129130
qcom,smem = <431>, <451>;
130131
interrupts = <GIC_SPI 143 IRQ_TYPE_EDGE_RISING>;
131-
qcom,ipc = <&apcs 8 18>;
132+
mboxes = <&apcs 18>;
132133
qcom,local-pid = <0>;
133134
qcom,remote-pid = <4>;
134135

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

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ properties:
3333
specifier of the column in the subscription matrix representing the local
3434
processor.
3535

36+
mboxes:
37+
minItems: 1
38+
maxItems: 5
39+
description:
40+
Reference to the mailbox representing the outgoing doorbell in APCS for
41+
this client. Each entry represents the N:th remote processor by index
42+
(0-indexed).
43+
3644
'#size-cells':
3745
const: 0
3846

@@ -47,6 +55,7 @@ patternProperties:
4755
description:
4856
Three entries specifying the outgoing ipc bit used for signaling the N:th
4957
remote processor.
58+
deprecated: true
5059

5160
"@[0-9a-f]$":
5261
type: object
@@ -98,15 +107,18 @@ required:
98107
- '#address-cells'
99108
- '#size-cells'
100109

101-
anyOf:
102-
- required:
103-
- qcom,ipc-1
104-
- required:
105-
- qcom,ipc-2
106-
- required:
107-
- qcom,ipc-3
110+
oneOf:
108111
- required:
109-
- qcom,ipc-4
112+
- mboxes
113+
- anyOf:
114+
- required:
115+
- qcom,ipc-1
116+
- required:
117+
- qcom,ipc-2
118+
- required:
119+
- qcom,ipc-3
120+
- required:
121+
- qcom,ipc-4
110122

111123
additionalProperties: false
112124

@@ -122,7 +134,7 @@ examples:
122134
compatible = "qcom,smsm";
123135
#address-cells = <1>;
124136
#size-cells = <0>;
125-
qcom,ipc-3 = <&apcs 8 19>;
137+
mboxes = <0>, <0>, <0>, <&apcs 19>;
126138
127139
apps_smsm: apps@0 {
128140
reg = <0>;

MAINTAINERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18607,6 +18607,14 @@ F: Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst
1860718607
F: drivers/net/ethernet/qualcomm/rmnet/
1860818608
F: include/linux/if_rmnet.h
1860918609

18610+
QUALCOMM TRUST ZONE MEMORY ALLOCATOR
18611+
M: Bartosz Golaszewski <[email protected]>
18612+
18613+
S: Maintained
18614+
F: drivers/firmware/qcom/qcom_tzmem.c
18615+
F: drivers/firmware/qcom/qcom_tzmem.h
18616+
F: include/linux/firmware/qcom/qcom_tzmem.h
18617+
1861018618
QUALCOMM TSENS THERMAL DRIVER
1861118619
M: Amit Kucheria <[email protected]>
1861218620
M: Thara Gopinath <[email protected]>

drivers/cpufreq/qcom-cpufreq-nvmem.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ static int qcom_cpufreq_kryo_name_version(struct device *cpu_dev,
191191
case QCOM_ID_IPQ5312:
192192
case QCOM_ID_IPQ5302:
193193
case QCOM_ID_IPQ5300:
194+
case QCOM_ID_IPQ5321:
194195
case QCOM_ID_IPQ9514:
195196
case QCOM_ID_IPQ9550:
196197
case QCOM_ID_IPQ9554:

drivers/firmware/qcom/Kconfig

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,39 @@
77
menu "Qualcomm firmware drivers"
88

99
config QCOM_SCM
10+
select QCOM_TZMEM
1011
tristate
1112

13+
config QCOM_TZMEM
14+
tristate
15+
select GENERIC_ALLOCATOR
16+
17+
choice
18+
prompt "TrustZone interface memory allocator mode"
19+
default QCOM_TZMEM_MODE_GENERIC
20+
help
21+
Selects the mode of the memory allocator providing memory buffers of
22+
suitable format for sharing with the TrustZone. If in doubt, select
23+
'Generic'.
24+
25+
config QCOM_TZMEM_MODE_GENERIC
26+
bool "Generic"
27+
help
28+
Use the generic allocator mode. The memory is page-aligned, non-cachable
29+
and physically contiguous.
30+
31+
config QCOM_TZMEM_MODE_SHMBRIDGE
32+
bool "SHM Bridge"
33+
help
34+
Use Qualcomm Shared Memory Bridge. The memory has the same alignment as
35+
in the 'Generic' allocator but is also explicitly marked as an SHM Bridge
36+
buffer.
37+
38+
With this selected, all buffers passed to the TrustZone must be allocated
39+
using the TZMem allocator or else the TrustZone will refuse to use them.
40+
41+
endchoice
42+
1243
config QCOM_SCM_DOWNLOAD_MODE_DEFAULT
1344
bool "Qualcomm download mode enabled by default"
1445
depends on QCOM_SCM

drivers/firmware/qcom/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55

66
obj-$(CONFIG_QCOM_SCM) += qcom-scm.o
77
qcom-scm-objs += qcom_scm.o qcom_scm-smc.o qcom_scm-legacy.o
8+
obj-$(CONFIG_QCOM_TZMEM) += qcom_tzmem.o
89
obj-$(CONFIG_QCOM_QSEECOM) += qcom_qseecom.o
910
obj-$(CONFIG_QCOM_QSEECOM_UEFISECAPP) += qcom_qseecom_uefisecapp.o

0 commit comments

Comments
 (0)