aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/soc/qcom/spm.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2021-10-26 17:17:56 +0200
committerArnd Bergmann <arnd@arndb.de>2021-10-26 17:17:57 +0200
commite2a3495bf9b9cc3c187ec096cfee4e170e99c83a (patch)
tree38d6a95d7e639150f3dc5a08e9af5c39222754de /drivers/soc/qcom/spm.c
parentMerge tag 'samsung-drivers-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/drivers (diff)
parentfirmware: qcom: scm: Don't break compile test on non-ARM platforms (diff)
downloadlinux-dev-e2a3495bf9b9cc3c187ec096cfee4e170e99c83a.tar.xz
linux-dev-e2a3495bf9b9cc3c187ec096cfee4e170e99c83a.zip
Merge tag 'qcom-drivers-for-5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers
More Qualcomm driver updates for v5.16 This introduces the Qualcomm "sleep stats" driver, which aids the efforts of bringing various Qualcomm platforms into low power mode. The SMP2P driver gains support for negotiating the "SSR" feature, which is used to better synchronize some corner cases that might appear as the remoteproc is recovering from a crash. The socinfo driver learns about a few new PMICs. SMEM is updated so that it's possible to put the compatible property directly in the reserved-memory node, to avoid having to have a separate node just pointing to the memory-region. Lastly it fixes some bugs in smp2p, apr, rpmhpd drivers, notably avoiding the issue where powering on a power-domain using rpmhpd while keeping the performance_state at 0 is a nop * tag 'qcom-drivers-for-5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: firmware: qcom: scm: Don't break compile test on non-ARM platforms soc: qcom: smp2p: Add of_node_put() before goto soc: qcom: apr: Add of_node_put() before return soc: qcom: qcom_stats: Fix client votes offset soc: qcom: rpmhpd: fix sm8350_mxc's peer domain dt-bindings: arm: cpus: Document qcom,msm8916-smp enable-method ARM: qcom: Add qcom,msm8916-smp enable-method identical to MSM8226 firmware: qcom: scm: Add support for MC boot address API soc: qcom: spm: Add 8916 SPM register data dt-bindings: soc: qcom: spm: Document qcom,msm8916-saw2-v3.0-cpu soc: qcom: socinfo: Add PM8150C and SMB2351 models firmware: qcom_scm: Fix error retval in __qcom_scm_is_call_available() soc: qcom: smp2p: add feature negotiation and ssr ack feature support soc: qcom: Add Sleep stats driver dt-bindings: Introduce QCOM Sleep stats bindings soc: qcom: socinfo: add two missing PMIC IDs soc: qcom: rpmhpd: Make power_on actually enable the domain soc: qcom: smem: Support reserved-memory description dt-bindings: soc: smem: Make indirection optional dt-bindings: sram: Document qcom,rpm-msg-ram Link: https://lore.kernel.org/r/20211026140706.1205989-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/soc/qcom/spm.c')
-rw-r--r--drivers/soc/qcom/spm.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c
index 2961a89d929c..f831420b7fd4 100644
--- a/drivers/soc/qcom/spm.c
+++ b/drivers/soc/qcom/spm.c
@@ -67,6 +67,25 @@ static const struct spm_reg_data spm_reg_8998_silver_l2 = {
.avs_limit = 0x4200420,
};
+static const u16 spm_reg_offset_v3_0[SPM_REG_NR] = {
+ [SPM_REG_CFG] = 0x08,
+ [SPM_REG_SPM_CTL] = 0x30,
+ [SPM_REG_DLY] = 0x34,
+ [SPM_REG_SEQ_ENTRY] = 0x400,
+};
+
+/* SPM register data for 8916 */
+static const struct spm_reg_data spm_reg_8916_cpu = {
+ .reg_offset = spm_reg_offset_v3_0,
+ .spm_cfg = 0x1,
+ .spm_dly = 0x3C102800,
+ .seq = { 0x60, 0x03, 0x60, 0x0B, 0x0F, 0x20, 0x10, 0x80, 0x30, 0x90,
+ 0x5B, 0x60, 0x03, 0x60, 0x3B, 0x76, 0x76, 0x0B, 0x94, 0x5B,
+ 0x80, 0x10, 0x26, 0x30, 0x0F },
+ .start_index[PM_SLEEP_MODE_STBY] = 0,
+ .start_index[PM_SLEEP_MODE_SPC] = 5,
+};
+
static const u16 spm_reg_offset_v2_1[SPM_REG_NR] = {
[SPM_REG_CFG] = 0x08,
[SPM_REG_SPM_CTL] = 0x30,
@@ -176,6 +195,8 @@ static const struct of_device_id spm_match_table[] = {
.data = &spm_reg_660_silver_l2 },
{ .compatible = "qcom,msm8226-saw2-v2.1-cpu",
.data = &spm_reg_8226_cpu },
+ { .compatible = "qcom,msm8916-saw2-v3.0-cpu",
+ .data = &spm_reg_8916_cpu },
{ .compatible = "qcom,msm8974-saw2-v2.1-cpu",
.data = &spm_reg_8974_8084_cpu },
{ .compatible = "qcom,msm8998-gold-saw2-v4.1-l2",