Skip to content

Commit 5c78501

Browse files
committed
Merge tag 'qcom-drivers-for-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers
Qualcomm driver updates for v5.15 This fixes the "shared memory state machine" (SMSM) interrupt logic to avoid missing transitions happening while the interrupts are masked. SM6115 support is added to smd-rpm and rpmpd. The Qualcomm SCM firmware driver is once again made possible to compile and load as a kernel module. An out-of-bounds error related to the cooling devices of the AOSS driver is corrected. The binding is converted to YAML and a generic compatible is introduced to reduce the driver churn. The GENI wrapper gains a helper function used in I2C and SPI for switching the serial engine hardware to use the wrapper's DMA-engine. Lastly it contains a number of cleanups and smaller fixes for rpmhpd, socinfo, CPR, mdt_loader and the GENI DT binding. * tag 'qcom-drivers-for-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: soc: qcom: smsm: Fix missed interrupts if state changes while masked soc: qcom: smsm: Implement support for get_irqchip_state soc: qcom: mdt_loader: be more informative on errors dt-bindings: qcom: geni-se: document iommus soc: qcom: smd-rpm: Add SM6115 compatible soc: qcom: geni: Add support for gpi dma soc: qcom: geni: move GENI_IF_DISABLE_RO to common header PM: AVS: qcom-cpr: Use nvmem_cell_read_variable_le_u32() drivers: soc: qcom: rpmpd: Add SM6115 RPM Power Domains dt-bindings: power: rpmpd: Add SM6115 to rpmpd binding dt-bindings: soc: qcom: smd-rpm: Add SM6115 compatible soc: qcom: aoss: Fix the out of bound usage of cooling_devs firmware: qcom_scm: Allow qcom_scm driver to be loadable as a permenent module soc: qcom: socinfo: Don't print anything if nothing found soc: qcom: rpmhpd: Use corner in power_off soc: qcom: aoss: Add generic compatible dt-bindings: soc: qcom: aoss: Convert to YAML dt-bindings: soc: qcom: aoss: Add SC8180X and generic compatible firmware: qcom_scm: remove a duplicative condition firmware: qcom_scm: Mark string array const Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 63db5ac + e3d4571 commit 5c78501

File tree

21 files changed

+269
-148
lines changed

21 files changed

+269
-148
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ properties:
3030
- qcom,sc8180x-rpmhpd
3131
- qcom,sdm845-rpmhpd
3232
- qcom,sdx55-rpmhpd
33+
- qcom,sm6115-rpmpd
3334
- qcom,sm8150-rpmhpd
3435
- qcom,sm8250-rpmhpd
3536
- qcom,sm8350-rpmhpd

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

Lines changed: 0 additions & 87 deletions
This file was deleted.
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/soc/qcom/qcom,aoss-qmp.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm Always-On Subsystem side channel binding
8+
9+
maintainers:
10+
- Bjorn Andersson <[email protected]>
11+
12+
description:
13+
This binding describes the hardware component responsible for side channel
14+
requests to the always-on subsystem (AOSS), used for certain power management
15+
requests that is not handled by the standard RPMh interface. Each client in the
16+
SoC has it's own block of message RAM and IRQ for communication with the AOSS.
17+
The protocol used to communicate in the message RAM is known as Qualcomm
18+
Messaging Protocol (QMP)
19+
20+
The AOSS side channel exposes control over a set of resources, used to control
21+
a set of debug related clocks and to affect the low power state of resources
22+
related to the secondary subsystems. These resources are exposed as a set of
23+
power-domains.
24+
25+
properties:
26+
compatible:
27+
items:
28+
- enum:
29+
- qcom,sc7180-aoss-qmp
30+
- qcom,sc7280-aoss-qmp
31+
- qcom,sc8180x-aoss-qmp
32+
- qcom,sdm845-aoss-qmp
33+
- qcom,sm8150-aoss-qmp
34+
- qcom,sm8250-aoss-qmp
35+
- qcom,sm8350-aoss-qmp
36+
- const: qcom,aoss-qmp
37+
38+
reg:
39+
maxItems: 1
40+
description:
41+
The base address and size of the message RAM for this client's
42+
communication with the AOSS
43+
44+
interrupts:
45+
maxItems: 1
46+
description:
47+
Should specify the AOSS message IRQ for this client
48+
49+
mboxes:
50+
maxItems: 1
51+
description:
52+
Reference to the mailbox representing the outgoing doorbell in APCS for
53+
this client, as described in mailbox/mailbox.txt
54+
55+
"#clock-cells":
56+
const: 0
57+
description:
58+
The single clock represents the QDSS clock.
59+
60+
"#power-domain-cells":
61+
const: 1
62+
description: |
63+
The provided power-domains are:
64+
CDSP state (0), LPASS state (1), modem state (2), SLPI
65+
state (3), SPSS state (4) and Venus state (5).
66+
67+
required:
68+
- compatible
69+
- reg
70+
- interrupts
71+
- mboxes
72+
- "#clock-cells"
73+
74+
additionalProperties: false
75+
76+
patternProperties:
77+
"^(cx|mx|ebi)$":
78+
type: object
79+
description:
80+
The AOSS side channel also provides the controls for three cooling devices,
81+
these are expressed as subnodes of the QMP node. The name of the node is
82+
used to identify the resource and must therefor be "cx", "mx" or "ebi".
83+
84+
properties:
85+
"#cooling-cells":
86+
const: 2
87+
88+
required:
89+
- "#cooling-cells"
90+
91+
additionalProperties: false
92+
93+
examples:
94+
- |
95+
#include <dt-bindings/interrupt-controller/arm-gic.h>
96+
97+
aoss_qmp: qmp@c300000 {
98+
compatible = "qcom,sdm845-aoss-qmp", "qcom,aoss-qmp";
99+
reg = <0x0c300000 0x100000>;
100+
interrupts = <GIC_SPI 389 IRQ_TYPE_EDGE_RISING>;
101+
mboxes = <&apss_shared 0>;
102+
103+
#clock-cells = <0>;
104+
#power-domain-cells = <1>;
105+
106+
cx_cdev: cx {
107+
#cooling-cells = <2>;
108+
};
109+
110+
mx_cdev: mx {
111+
#cooling-cells = <2>;
112+
};
113+
};
114+
...

Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ properties:
5151
interconnect-names:
5252
const: qup-core
5353

54+
iommus:
55+
maxItems: 1
56+
5457
required:
5558
- compatible
5659
- reg

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ properties:
3939
- qcom,rpm-msm8996
4040
- qcom,rpm-msm8998
4141
- qcom,rpm-sdm660
42+
- qcom,rpm-sm6115
4243
- qcom,rpm-sm6125
4344
- qcom,rpm-qcs404
4445

drivers/firmware/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ config INTEL_STRATIX10_RSU
203203
Say Y here if you want Intel RSU support.
204204

205205
config QCOM_SCM
206-
bool
206+
tristate "Qcom SCM driver"
207207
depends on ARM || ARM64
208208
depends on HAVE_ARM_SMCCC
209209
select RESET_CONTROLLER

drivers/firmware/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ obj-$(CONFIG_ISCSI_IBFT) += iscsi_ibft.o
1717
obj-$(CONFIG_FIRMWARE_MEMMAP) += memmap.o
1818
obj-$(CONFIG_RASPBERRYPI_FIRMWARE) += raspberrypi.o
1919
obj-$(CONFIG_FW_CFG_SYSFS) += qemu_fw_cfg.o
20-
obj-$(CONFIG_QCOM_SCM) += qcom_scm.o qcom_scm-smc.o qcom_scm-legacy.o
20+
obj-$(CONFIG_QCOM_SCM) += qcom-scm.o
21+
qcom-scm-objs += qcom_scm.o qcom_scm-smc.o qcom_scm-legacy.o
2122
obj-$(CONFIG_TI_SCI_PROTOCOL) += ti_sci.o
2223
obj-$(CONFIG_TRUSTED_FOUNDATIONS) += trusted_foundations.o
2324
obj-$(CONFIG_TURRIS_MOX_RWTM) += turris-mox-rwtm.o

drivers/firmware/qcom_scm.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ static struct qcom_scm_wb_entry qcom_scm_wb[] = {
7171
{ .flag = QCOM_SCM_FLAG_WARMBOOT_CPU3 },
7272
};
7373

74-
static const char *qcom_scm_convention_names[] = {
74+
static const char * const qcom_scm_convention_names[] = {
7575
[SMC_CONVENTION_UNKNOWN] = "unknown",
7676
[SMC_CONVENTION_ARM_32] = "smc arm 32",
7777
[SMC_CONVENTION_ARM_64] = "smc arm 64",
@@ -331,7 +331,7 @@ int qcom_scm_set_cold_boot_addr(void *entry, const cpumask_t *cpus)
331331
.owner = ARM_SMCCC_OWNER_SIP,
332332
};
333333

334-
if (!cpus || (cpus && cpumask_empty(cpus)))
334+
if (!cpus || cpumask_empty(cpus))
335335
return -EINVAL;
336336

337337
for_each_cpu(cpu, cpus) {
@@ -1299,6 +1299,7 @@ static const struct of_device_id qcom_scm_dt_match[] = {
12991299
{ .compatible = "qcom,scm" },
13001300
{}
13011301
};
1302+
MODULE_DEVICE_TABLE(of, qcom_scm_dt_match);
13021303

13031304
static struct platform_driver qcom_scm_driver = {
13041305
.driver = {
@@ -1315,3 +1316,6 @@ static int __init qcom_scm_init(void)
13151316
return platform_driver_register(&qcom_scm_driver);
13161317
}
13171318
subsys_initcall(qcom_scm_init);
1319+
1320+
MODULE_DESCRIPTION("Qualcomm Technologies, Inc. SCM driver");
1321+
MODULE_LICENSE("GPL v2");

drivers/iommu/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ config SPAPR_TCE_IOMMU
253253
config ARM_SMMU
254254
tristate "ARM Ltd. System MMU (SMMU) Support"
255255
depends on ARM64 || ARM || (COMPILE_TEST && !GENERIC_ATOMIC64)
256+
depends on QCOM_SCM || !QCOM_SCM #if QCOM_SCM=m this can't be =y
256257
select IOMMU_API
257258
select IOMMU_IO_PGTABLE_LPAE
258259
select ARM_DMA_USE_IOMMU if ARM
@@ -382,6 +383,7 @@ config QCOM_IOMMU
382383
# Note: iommu drivers cannot (yet?) be built as modules
383384
bool "Qualcomm IOMMU Support"
384385
depends on ARCH_QCOM || (COMPILE_TEST && !GENERIC_ATOMIC64)
386+
depends on QCOM_SCM=y
385387
select IOMMU_API
386388
select IOMMU_IO_PGTABLE_LPAE
387389
select ARM_DMA_USE_IOMMU

drivers/net/wireless/ath/ath10k/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ config ATH10K_SNOC
4444
tristate "Qualcomm ath10k SNOC support"
4545
depends on ATH10K
4646
depends on ARCH_QCOM || COMPILE_TEST
47+
depends on QCOM_SCM || !QCOM_SCM #if QCOM_SCM=m this can't be =y
4748
select QCOM_QMI_HELPERS
4849
help
4950
This module adds support for integrated WCN3990 chip connected

0 commit comments

Comments
 (0)