Skip to contentSkip to conversation

clk: qcom: smd-rpm: Add clocks for MSM8920

PATCH In review Catherine A. Frederick 3 participants 7 messages May 5 – May 8

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 clk: qcom: smd-rpm: Add clocks for MSM8920

MSM8920 is very similar to MSM8917, but adds IPA clocks.

---
 drivers/clk/qcom/clk-smd-rpm.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
drivers/clk/qcom/clk-smd-rpm.c +31 -0
index 103db984a40b..cdabe373aabc 100644
@@ -666,6 +666,36 @@ static const struct rpm_smd_clk_desc rpm_clk_msm8917 = {
 	.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_smmnoc_icc_clks),
 };
 
+static struct clk_smd_rpm *msm8920_clks[] = {
+	[RPM_SMD_XO_CLK_SRC]		= &clk_smd_rpm_branch_bi_tcxo,
+	[RPM_SMD_XO_A_CLK_SRC]		= &clk_smd_rpm_branch_bi_tcxo_a,
+	[RPM_SMD_BIMC_GPU_CLK]		= &clk_smd_rpm_bimc_gpu_clk,
+	[RPM_SMD_BIMC_GPU_A_CLK]	= &clk_smd_rpm_bimc_gpu_a_clk,
+	[RPM_SMD_IPA_CLK]		= &clk_smd_rpm_ipa_clk,
+	[RPM_SMD_IPA_A_CLK]		= &clk_smd_rpm_ipa_a_clk,
+	[RPM_SMD_QDSS_CLK]		= &clk_smd_rpm_qdss_clk,
+	[RPM_SMD_QDSS_A_CLK]		= &clk_smd_rpm_qdss_a_clk,
+	[RPM_SMD_BB_CLK1]		= &clk_smd_rpm_bb_clk1,
+	[RPM_SMD_BB_CLK1_A]		= &clk_smd_rpm_bb_clk1_a,
+	[RPM_SMD_BB_CLK2]		= &clk_smd_rpm_bb_clk2,
+	[RPM_SMD_BB_CLK2_A]		= &clk_smd_rpm_bb_clk2_a,
+	[RPM_SMD_RF_CLK2]		= &clk_smd_rpm_rf_clk2,
+	[RPM_SMD_RF_CLK2_A]		= &clk_smd_rpm_rf_clk2_a,
+	[RPM_SMD_DIV_CLK2]		= &clk_smd_rpm_div_clk2,
+	[RPM_SMD_DIV_A_CLK2]		= &clk_smd_rpm_div_clk2_a,
+	[RPM_SMD_BB_CLK1_PIN]		= &clk_smd_rpm_bb_clk1_pin,
+	[RPM_SMD_BB_CLK1_A_PIN]		= &clk_smd_rpm_bb_clk1_a_pin,
+	[RPM_SMD_BB_CLK2_PIN]		= &clk_smd_rpm_bb_clk2_pin,
+	[RPM_SMD_BB_CLK2_A_PIN]		= &clk_smd_rpm_bb_clk2_a_pin,
+};
+
+static const struct rpm_smd_clk_desc rpm_clk_msm8920 = {
+	.clks = msm8920_clks,
+	.num_clks = ARRAY_SIZE(msm8920_clks),
+	.icc_clks = bimc_pcnoc_snoc_smmnoc_icc_clks,
+	.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_smmnoc_icc_clks),
+};
+
 static struct clk_smd_rpm *msm8936_clks[] = {
 	[RPM_SMD_XO_CLK_SRC]		= &clk_smd_rpm_branch_bi_tcxo,
 	[RPM_SMD_XO_A_CLK_SRC]		= &clk_smd_rpm_branch_bi_tcxo_a,
@@ -1295,6 +1325,7 @@ static const struct of_device_id rpm_smd_clk_match_table[] = {
 	{ .compatible = "qcom,rpmcc-msm8909", .data = &rpm_clk_msm8909 },
 	{ .compatible = "qcom,rpmcc-msm8916", .data = &rpm_clk_msm8916 },
 	{ .compatible = "qcom,rpmcc-msm8917", .data = &rpm_clk_msm8917 },
+	{ .compatible = "qcom,rpmcc-msm8920", .data = &rpm_clk_msm8920 },
 	{ .compatible = "qcom,rpmcc-msm8936", .data = &rpm_clk_msm8936 },
 	{ .compatible = "qcom,rpmcc-msm8937", .data = &rpm_clk_msm8937 },
 	{ .compatible = "qcom,rpmcc-msm8940", .data = &rpm_clk_msm8940 },
Signature · 1 line
2.53.0
#1 lore raw

PATCH 2/3 dt-bindings: clock: qcom,rpmcc: Add MSM8920 compatible

Document new qcom,rpmcc-msm8920 compatible with rpmcc changes.

---
 Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml +2 -0
index ab97d4b7dba8..e35a003f270d 100644
@@ -32,6 +32,7 @@ properties:
           - qcom,rpmcc-msm8909
           - qcom,rpmcc-msm8916
           - qcom,rpmcc-msm8917
+          - qcom,rpmcc-msm8920
           - qcom,rpmcc-msm8936
           - qcom,rpmcc-msm8937
           - qcom,rpmcc-msm8940
@@ -112,6 +113,7 @@ allOf:
               - qcom,rpmcc-msm8226
               - qcom,rpmcc-msm8916
               - qcom,rpmcc-msm8917
+              - qcom,rpmcc-msm8920
               - qcom,rpmcc-msm8936
               - qcom,rpmcc-msm8937
               - qcom,rpmcc-msm8940
Signature · 1 line
2.53.0
Reviewed-by on v1 2/3
#2 lore raw

Re: [PATCH 2/3] dt-bindings: clock: qcom,rpmcc: Add MSM8920 compatible

Quoted 7 lines · Catherine A. Frederick

Document new qcom,rpmcc-msm8920 compatible with rpmcc changes.

---
 Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml | 2 ++
 1 file changed, 2 insertions(+)

Please organize the patch documenting the compatible (DT bindings)
before the patch using that compatible.
See also: https://elixir.bootlin.com/linux/v6.14-rc6/source/Documentation/devicetree/bindings/submitting-patches.rst#L46

With this fixed:

Best regards,
Krzysztof

#3 lore raw

PATCH 3/3 arm64: dts: qcom: Add initial support for MSM8920

In reply to Catherine A. Frederick

Add initial support for MSM8920, which is essentially MSM8917 with an MSM8953 modem glued onto it.

---
 arch/arm64/boot/dts/qcom/msm8920.dtsi | 55 +++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8920.dtsi
arch/arm64/boot/dts/qcom/msm8920.dtsi new file +55 -0
new file mode 100644
index 000000000000..943cae72227a
@@ -0,0 +1,55 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2026, Catherine A. Frederick <[email protected]>
+ */
+
+#include "msm8917.dtsi"
+
+&adsp_mem {
+	size = <0x0 0x1100000>;
+};
+
+&gps_mem {
+	size = <0x0 0x200000>;
+};
+
+&mba_mem {
+	size = <0x0 0x100000>;
+};
+
+&venus_mem {
+	size = <0x0 0x400000>;
+};
+
+&wcnss_mem {
+	size = <0x0 0x700000>;
+};
+
+&apps_iommu {
+	/* IPA */
+	iommu-ctx@18000 {
+		compatible = "qcom,msm-iommu-v1-ns";
+		reg = <0x18000 0x1000>;
+		interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
+	};
+};
+
+&rpmcc {
+	compatible = "qcom,rpmcc-msm8920", "qcom,rpmcc";
+};
+
+&soc {
+	ipa: ipa@7900000 {
+		compatible = "qcom,ipa-lite-v2.6";
+		reg = <0x7900000 0x47000>;
+		clocks = <&rpmcc RPM_SMD_IPA_CLK>;
+		interrupts = <GIC_SPI 228 IRQ_TYPE_EDGE_RISING>,
+			     <GIC_SPI 230 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "ipa", "dma";
+		iommus = <&apps_iommu 0x18>;
+		modem-remoteproc = <&modem>;
+
+		status = "disabled";
+	};
+
+};
Signature · 1 line
2.53.0
#4 lore raw

Re: [PATCH 3/3] arm64: dts: qcom: Add initial support for MSM8920

arch/arm64/boot/dts/qcom/msm8920.dtsi

Quoted 14 lines · Catherine A. Frederick

Add initial support for MSM8920, which is essentially MSM8917 with an MSM8953 modem glued onto it.

---
 arch/arm64/boot/dts/qcom/msm8920.dtsi | 55 +++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8920.dtsi
arch/arm64/boot/dts/qcom/msm8920.dtsi new file +0 -0
new file mode 100644
index 000000000000..943cae72227a

That's a dead code, unused. No need to add it.

Best regards,
Krzysztof

#5 lore raw

Re: [PATCH 3/3] arm64: dts: qcom: Add initial support for MSM8920

Quoted 10 lines · Krzysztof Kozlowski
Quoted 9 lines · Catherine A. Frederick

Add initial support for MSM8920, which is essentially MSM8917 with an MSM8953 modem glued onto it.

---
 arch/arm64/boot/dts/qcom/msm8920.dtsi | 55 +++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8920.dtsi
Quoted 7 lines

arch/arm64/boot/dts/qcom/msm8920.dtsi

Quoted 5 lines
arch/arm64/boot/dts/qcom/msm8920.dtsi new file +0 -0
new file mode 100644
index 000000000000..943cae72227a

That's a dead code, unused. No need to add it.

If you have a device that will include this, please post it together

Konrad