Skip to contentSkip to conversation

soc: qcom: Add support for SM8450

PATCH Applied Vinod Koul 3 participants 10 messages Dec 1, 2021 – Dec 8, 2021

Subsystems (3)

v1 of 2 Applied 7/7 Latest is v2 →

lore
Share & tools
lore

Vinod Koul

author
#0 lore raw

cover soc: qcom: Add support for SM8450

This series adds CPU, SoC and board compatible followed by rpmpd support for SM8450 and socinfo ID and update the smem processor count

Dmitry Baryshkov (4):
soc: qcom: smem: Update max processor count
dt-bindings: power: rpmpd: Add SM8450 to rpmpd binding
soc: qcom: rpmhpd: Add SM8450 power domains
soc: qcom: socinfo: add SM8450 ID

Vinod Koul (3):
dt-bindings: arm: cpus: Add kryo780 compatible
dt-bindings: firmware: scm: Add SM8450 compatible
dt-bindings: arm: qcom: Document SM8450 SoC and boards

 .../devicetree/bindings/arm/cpus.yaml         |  1 +
 .../devicetree/bindings/arm/qcom.yaml         |  6 +++
 .../devicetree/bindings/firmware/qcom,scm.txt |  1 +
 .../devicetree/bindings/power/qcom,rpmpd.yaml |  1 +
 drivers/soc/qcom/rpmhpd.c                     | 52 +++++++++++++++++++
 drivers/soc/qcom/smem.c                       |  2 +-
 drivers/soc/qcom/socinfo.c                    |  1 +
 include/dt-bindings/power/qcom-rpmpd.h        | 15 ++++++
 8 files changed, 78 insertions(+), 1 deletion(-)
Signature · 1 line
2.31.1
author
#1 lore raw

PATCH 1/7 dt-bindings: arm: cpus: Add kryo780 compatible

Kryo780 is found in SM8450, so add it to the list of cpu compatibles

---
 Documentation/devicetree/bindings/arm/cpus.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/cpus.yaml +1 -0
index f2ab6423b4af..dfa28e3525cb 100644
@@ -174,6 +174,7 @@ properties:
       - qcom,kryo560
       - qcom,kryo570
       - qcom,kryo685
+      - qcom,kryo780
       - qcom,scorpion
 
   enable-method:
Signature · 1 line
2.31.1
author
#2 lore raw

PATCH 2/7 dt-bindings: firmware: scm: Add SM8450 compatible

In reply to Vinod Koul

Add compatible for SM8450 SoCs.

---
 Documentation/devicetree/bindings/firmware/qcom,scm.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/firmware/qcom,scm.txt +1 -0
index d7e3cda8924e..548733388497 100644
@@ -29,6 +29,7 @@ Required properties:
  * "qcom,scm-sm8150"
  * "qcom,scm-sm8250"
  * "qcom,scm-sm8350"
+ * "qcom,scm-sm8450"
  and:
  * "qcom,scm"
 - clocks: Specifies clocks needed by the SCM interface, if any:
Signature · 1 line
2.31.1
author
#3 lore raw

PATCH 3/7 dt-bindings: arm: qcom: Document SM8450 SoC and boards

In reply to Vinod Koul

Document the SM8450 SoC binding and also the boards using it.

---
 Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/arm/qcom.yaml +6 -0
index c8808e0f9e64..29a0bd3adac2 100644
@@ -50,6 +50,7 @@ description: |
         sm8150
         sm8250
         sm8350
+        sm8450
 
   The 'board' element must be one of the following strings:
 
@@ -257,6 +258,11 @@ properties:
               - qcom,sm8350-mtp
           - const: qcom,sm8350
 
+      - items:
+          - enum:
+              - qcom,sm8450-qrd
+          - const: qcom,sm8450
+
 additionalProperties: true
 
 ...
Signature · 1 line
2.31.1
author
#4 lore raw

PATCH 4/7 soc: qcom: smem: Update max processor count

In reply to Vinod Koul

From: Dmitry Baryshkov <[email protected]>

Update max processor count to reflect the number of co-processors on SM8450 SoCs.

---
 drivers/soc/qcom/smem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/qcom/smem.c +1 -1
index c7e519bfdc8a..e2057d8f1eff 100644
@@ -85,7 +85,7 @@
 #define SMEM_GLOBAL_HOST	0xfffe
 
 /* Max number of processors/hosts in a system */
-#define SMEM_HOST_COUNT		14
+#define SMEM_HOST_COUNT		15
 
 /**
   * struct smem_proc_comm - proc_comm communication struct (legacy)
Signature · 1 line
2.31.1
author
#5 lore raw

PATCH 5/7 dt-bindings: power: rpmpd: Add SM8450 to rpmpd binding

In reply to Vinod Koul

From: Dmitry Baryshkov <[email protected]>

Add compatible and constants for the power domains exposed by the RPMH in the Qualcomm SM8450 platform.

---
 .../devicetree/bindings/power/qcom,rpmpd.yaml     |  1 +
 include/dt-bindings/power/qcom-rpmpd.h            | 15 +++++++++++++++
 2 files changed, 16 insertions(+)
Documentation/devicetree/bindings/power/qcom,rpmpd.yaml +1 -0
index e810480e3eb7..a51f7d6c58b7 100644
@@ -36,6 +36,7 @@ properties:
       - qcom,sm8150-rpmhpd
       - qcom,sm8250-rpmhpd
       - qcom,sm8350-rpmhpd
+      - qcom,sm8450-rpmhpd
 
   '#power-domain-cells':
     const: 1
include/dt-bindings/power/qcom-rpmpd.h +15 -0
index 960f7976a807..535d7addd382 100644
@@ -68,6 +68,21 @@
 #define SM8350_MXC_AO	11
 #define SM8350_MSS	12
 
+/* SM8450 Power Domain Indexes */
+#define SM8450_CX	0
+#define SM8450_CX_AO	1
+#define SM8450_EBI	2
+#define SM8450_GFX	3
+#define SM8450_LCX	4
+#define SM8450_LMX	5
+#define SM8450_MMCX	6
+#define SM8450_MMCX_AO	7
+#define SM8450_MX	8
+#define SM8450_MX_AO	9
+#define SM8450_MXC	10
+#define SM8450_MXC_AO	11
+#define SM8450_MSS	12
+
 /* SC7180 Power Domain Indexes */
 #define SC7180_CX	0
 #define SC7180_CX_AO	1
Signature · 1 line
2.31.1
author
#6 lore raw

PATCH 6/7 soc: qcom: rpmhpd: Add SM8450 power domains

In reply to Vinod Koul

From: Dmitry Baryshkov <[email protected]>

Add the power domains exposed by RPMH in the Qualcomm SM8450 platform. Unlike previous generations CX domain is not a child of MX domain.

---
 drivers/soc/qcom/rpmhpd.c | 52 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
drivers/soc/qcom/rpmhpd.c +52 -0
index 1118345d8824..e7e150ce1b1a 100644
@@ -253,6 +253,57 @@ static const struct rpmhpd_desc sm8350_desc = {
 	.num_pds = ARRAY_SIZE(sm8350_rpmhpds),
 };
 
+/* SM8450 RPMH powerdomains */
+static struct rpmhpd sm8450_cx_ao;
+static struct rpmhpd sm8450_cx = {
+	.pd = { .name = "cx", },
+	.peer = &sm8450_cx_ao,
+	.res_name = "cx.lvl",
+};
+
+static struct rpmhpd sm8450_cx_ao = {
+	.pd = { .name = "cx_ao", },
+	.active_only = true,
+	.res_name = "cx.lvl",
+};
+
+static struct rpmhpd sm8450_mmcx_ao;
+static struct rpmhpd sm8450_mmcx = {
+	.pd = { .name = "mmcx", },
+	.peer = &sm8450_mmcx_ao,
+	.parent = &sm8450_cx.pd,
+	.res_name = "mmcx.lvl",
+};
+
+static struct rpmhpd sm8450_mmcx_ao = {
+	.pd = { .name = "mmcx_ao", },
+	.active_only = true,
+	.peer = &sm8450_mmcx,
+	.parent = &sm8450_cx_ao.pd,
+	.res_name = "mmcx.lvl",
+};
+
+static struct rpmhpd *sm8450_rpmhpds[] = {
+	[SM8450_CX] = &sm8450_cx,
+	[SM8450_CX_AO] = &sm8450_cx_ao,
+	[SM8450_EBI] = &sdm845_ebi,
+	[SM8450_GFX] = &sdm845_gfx,
+	[SM8450_LCX] = &sdm845_lcx,
+	[SM8450_LMX] = &sdm845_lmx,
+	[SM8450_MMCX] = &sm8450_mmcx,
+	[SM8450_MMCX_AO] = &sm8450_mmcx_ao,
+	[SM8450_MX] = &sdm845_mx,
+	[SM8450_MX_AO] = &sdm845_mx_ao,
+	[SM8450_MXC] = &sm8350_mxc,
+	[SM8450_MXC_AO] = &sm8350_mxc_ao,
+	[SM8450_MSS] = &sdm845_mss,
+};
+
+static const struct rpmhpd_desc sm8450_desc = {
+	.rpmhpds = sm8450_rpmhpds,
+	.num_pds = ARRAY_SIZE(sm8450_rpmhpds),
+};
+
 /* SC7180 RPMH powerdomains */
 static struct rpmhpd *sc7180_rpmhpds[] = {
 	[SC7180_CX] = &sdm845_cx,
@@ -318,6 +369,7 @@ static const struct of_device_id rpmhpd_match_table[] = {
 	{ .compatible = "qcom,sm8150-rpmhpd", .data = &sm8150_desc },
 	{ .compatible = "qcom,sm8250-rpmhpd", .data = &sm8250_desc },
 	{ .compatible = "qcom,sm8350-rpmhpd", .data = &sm8350_desc },
+	{ .compatible = "qcom,sm8450-rpmhpd", .data = &sm8450_desc },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, rpmhpd_match_table);
Signature · 1 line
2.31.1
author
#7 lore raw

PATCH 7/7 soc: qcom: socinfo: add SM8450 ID

In reply to Vinod Koul

From: Dmitry Baryshkov <[email protected]>

Add the ID for the Qualcomm SM8450 SoC.

---
 drivers/soc/qcom/socinfo.c | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/qcom/socinfo.c +1 -0
index 9a0eb59405e8..113dc57b74c3 100644
@@ -315,6 +315,7 @@ static const struct soc_id soc_id[] = {
 	{ 425, "SC7180" },
 	{ 453, "IPQ6005" },
 	{ 455, "QRB5165" },
+	{ 457, "SM8450" },
 };
 
 static const char *socinfo_machine(struct device *dev, unsigned int id)
Signature · 1 line
2.31.1
#8 lore raw
In reply to Vinod Koul
This series was applied to qcom/linux.git (for-next) by Bjorn Andersson <[email protected]>:

Hello:

This series was applied to qcom/linux.git (for-next) by Bjorn Andersson <[email protected]>:

Quoted 10 lines · On Wed, 1 Dec 2021 12:57:38 +0530 you wrote:

This series adds CPU, SoC and board compatible followed by rpmpd support for SM8450 and socinfo ID and update the smem processor count

Dmitry Baryshkov (4):
soc: qcom: smem: Update max processor count
dt-bindings: power: rpmpd: Add SM8450 to rpmpd binding
soc: qcom: rpmhpd: Add SM8450 power domains
soc: qcom: socinfo: add SM8450 ID

[...]

Here is the summary with links:
- [1/7] dt-bindings: arm: cpus: Add kryo780 compatible

    https://git.kernel.org/qcom/c/f5ef92aa8b78
  - [2/7] dt-bindings: firmware: scm: Add SM8450 compatible
    https://git.kernel.org/qcom/c/ff0ce949551f
  - [3/7] dt-bindings: arm: qcom: Document SM8450 SoC and boards
    https://git.kernel.org/qcom/c/c1b360d25457
  - [4/7] soc: qcom: smem: Update max processor count
    https://git.kernel.org/qcom/c/1f88aa777924
  - [5/7] dt-bindings: power: rpmpd: Add SM8450 to rpmpd binding
    https://git.kernel.org/qcom/c/3fe1b82d947f
  - [6/7] soc: qcom: rpmhpd: Add SM8450 power domains
    https://git.kernel.org/qcom/c/4f84580dbd71
  - [7/7] soc: qcom: socinfo: add SM8450 ID
    https://git.kernel.org/qcom/c/34f922976948

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
#9 lore raw
In reply to Vinod Koul
Quoted 10 lines · Vinod Koul

This series adds CPU, SoC and board compatible followed by rpmpd support for SM8450 and socinfo ID and update the smem processor count

Dmitry Baryshkov (4):
soc: qcom: smem: Update max processor count
dt-bindings: power: rpmpd: Add SM8450 to rpmpd binding
soc: qcom: rpmhpd: Add SM8450 power domains
soc: qcom: socinfo: add SM8450 ID

[...]

Applied, thanks!

[1/7] dt-bindings: arm: cpus: Add kryo780 compatible

      commit: f5ef92aa8b78dbe7e65c0eb27a176961f41d70ea
[2/7] dt-bindings: firmware: scm: Add SM8450 compatible
      commit: ff0ce949551fce08feb2ad9a6f59b785b59bad4e
[3/7] dt-bindings: arm: qcom: Document SM8450 SoC and boards
      commit: c1b360d254575a71ee683ad8f78e929a9450adda
[4/7] soc: qcom: smem: Update max processor count
      commit: 1f88aa7779247dd03c6396efd3d8d2c80964c1ac
[5/7] dt-bindings: power: rpmpd: Add SM8450 to rpmpd binding
      commit: 3fe1b82d947fa07fd40c76b099568c9b74300fab
[6/7] soc: qcom: rpmhpd: Add SM8450 power domains
      commit: 4f84580dbd71836131f1ef23c00835fcb1fd74dc
[7/7] soc: qcom: socinfo: add SM8450 ID
      commit: 34f92297694823b2a9f4f9a1d9f4f4ee265494f9

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>