Linux-Clk Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/2] RPM clocks for MSM8976/56
@ 2019-10-31 11:29 kholk11
  2019-10-31 11:29 ` [PATCH 1/2] clk: qcom: smd: Add support for MSM8976 rpm clocks kholk11
  2019-10-31 11:29 ` [PATCH 2/2] dt-bindings: clock: rpmcc: Document msm8976 compatible kholk11
  0 siblings, 2 replies; 4+ messages in thread
From: kholk11 @ 2019-10-31 11:29 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: kholk11, marijns95, agross, mturquette, bjorn.andersson, sboyd,
	robh+dt, mark.rutland, linux-clk, devicetree

From: AngeloGioacchino Del Regno <kholk11@gmail.com>

This enables RPM clocks on MSM8976/56, mainly necessary for the
interconnect driver, but exclusively for.

These changes have been tested on MSM8956 Sony Xperia Loire smartphones.

AngeloGioacchino Del Regno (2):
  clk: qcom: smd: Add support for MSM8976 rpm clocks
  dt-bindings: clock: rpmcc: Document msm8976 compatible

 .../devicetree/bindings/clock/qcom,rpmcc.txt  |  1 +
 drivers/clk/qcom/clk-smd-rpm.c                | 50 +++++++++++++++++++
 2 files changed, 51 insertions(+)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] clk: qcom: smd: Add support for MSM8976 rpm clocks
  2019-10-31 11:29 [PATCH 0/2] RPM clocks for MSM8976/56 kholk11
@ 2019-10-31 11:29 ` kholk11
  2019-10-31 11:29 ` [PATCH 2/2] dt-bindings: clock: rpmcc: Document msm8976 compatible kholk11
  1 sibling, 0 replies; 4+ messages in thread
From: kholk11 @ 2019-10-31 11:29 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: kholk11, marijns95, agross, mturquette, bjorn.andersson, sboyd,
	robh+dt, mark.rutland, linux-clk, devicetree

From: AngeloGioacchino Del Regno <kholk11@gmail.com>

Add rpm smd clocks, PMIC and bus clocks which are required on MSM8976,
MSM8956 (and APQ variants) for clients to vote on.

Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com>
---
 drivers/clk/qcom/clk-smd-rpm.c | 50 ++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/drivers/clk/qcom/clk-smd-rpm.c b/drivers/clk/qcom/clk-smd-rpm.c
index fef5e8157061..d8ae38daff63 100644
--- a/drivers/clk/qcom/clk-smd-rpm.c
+++ b/drivers/clk/qcom/clk-smd-rpm.c
@@ -523,6 +523,55 @@ static const struct rpm_smd_clk_desc rpm_clk_msm8974 = {
 	.num_clks = ARRAY_SIZE(msm8974_clks),
 };
 
+
+/* msm8976 */
+DEFINE_CLK_SMD_RPM(msm8976, pcnoc_clk, pcnoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 0);
+DEFINE_CLK_SMD_RPM(msm8976, snoc_clk, snoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 1);
+DEFINE_CLK_SMD_RPM(msm8976, mmssnoc_ahb_clk, mmssnoc_ahb_a_clk,
+		   QCOM_SMD_RPM_BUS_CLK, 2);
+DEFINE_CLK_SMD_RPM(msm8976, bimc_clk, bimc_a_clk, QCOM_SMD_RPM_MEM_CLK, 0);
+DEFINE_CLK_SMD_RPM(msm8976, ipa_clk, ipa_a_clk, QCOM_SMD_RPM_IPA_CLK, 0);
+DEFINE_CLK_SMD_RPM_QDSS(msm8976, qdss_clk, qdss_a_clk,
+			QCOM_SMD_RPM_MISC_CLK, 1);
+DEFINE_CLK_SMD_RPM_XO_BUFFER(msm8976, bb_clk1, bb_clk1_a, 1);
+DEFINE_CLK_SMD_RPM_XO_BUFFER(msm8976, bb_clk2, bb_clk2_a, 2);
+DEFINE_CLK_SMD_RPM_XO_BUFFER(msm8976, rf_clk2, rf_clk2_a, 5);
+DEFINE_CLK_SMD_RPM_XO_BUFFER(msm8976, div_clk2, div_clk2_a, 12);
+DEFINE_CLK_SMD_RPM_XO_BUFFER_PINCTRL(msm8976, bb_clk1_pin, bb_clk1_a_pin, 1);
+DEFINE_CLK_SMD_RPM_XO_BUFFER_PINCTRL(msm8976, bb_clk2_pin, bb_clk2_a_pin, 2);
+
+static struct clk_smd_rpm *msm8976_clks[] = {
+	[RPM_SMD_PCNOC_CLK] = &msm8976_pcnoc_clk,
+	[RPM_SMD_PCNOC_A_CLK] = &msm8976_pcnoc_a_clk,
+	[RPM_SMD_SNOC_CLK] = &msm8976_snoc_clk,
+	[RPM_SMD_SNOC_A_CLK] = &msm8976_snoc_a_clk,
+	[RPM_SMD_BIMC_CLK] = &msm8976_bimc_clk,
+	[RPM_SMD_BIMC_A_CLK] = &msm8976_bimc_a_clk,
+	[RPM_SMD_QDSS_CLK] = &msm8976_qdss_clk,
+	[RPM_SMD_QDSS_A_CLK] = &msm8976_qdss_a_clk,
+	[RPM_SMD_BB_CLK1] = &msm8976_bb_clk1,
+	[RPM_SMD_BB_CLK1_A] = &msm8976_bb_clk1_a,
+	[RPM_SMD_BB_CLK2] = &msm8976_bb_clk2,
+	[RPM_SMD_BB_CLK2_A] = &msm8976_bb_clk2_a,
+	[RPM_SMD_RF_CLK2] = &msm8976_rf_clk2,
+	[RPM_SMD_RF_CLK2_A] = &msm8976_rf_clk2_a,
+	[RPM_SMD_BB_CLK1_PIN] = &msm8976_bb_clk1_pin,
+	[RPM_SMD_BB_CLK1_A_PIN] = &msm8976_bb_clk1_a_pin,
+	[RPM_SMD_BB_CLK2_PIN] = &msm8976_bb_clk2_pin,
+	[RPM_SMD_BB_CLK2_A_PIN] = &msm8976_bb_clk2_a_pin,
+	[RPM_SMD_MMSSNOC_AHB_CLK] = &msm8976_mmssnoc_ahb_clk,
+	[RPM_SMD_MMSSNOC_AHB_A_CLK] = &msm8976_mmssnoc_ahb_a_clk,
+	[RPM_SMD_DIV_CLK2] = &msm8976_div_clk2,
+	[RPM_SMD_DIV_A_CLK2] = &msm8976_div_clk2_a,
+	[RPM_SMD_IPA_CLK] = &msm8976_ipa_clk,
+	[RPM_SMD_IPA_A_CLK] = &msm8976_ipa_a_clk,
+};
+
+static const struct rpm_smd_clk_desc rpm_clk_msm8976 = {
+	.clks = msm8976_clks,
+	.num_clks = ARRAY_SIZE(msm8976_clks),
+};
+
 /* msm8996 */
 DEFINE_CLK_SMD_RPM(msm8996, pcnoc_clk, pcnoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 0);
 DEFINE_CLK_SMD_RPM(msm8996, snoc_clk, snoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 1);
@@ -712,6 +761,7 @@ static const struct rpm_smd_clk_desc rpm_clk_msm8998 = {
 static const struct of_device_id rpm_smd_clk_match_table[] = {
 	{ .compatible = "qcom,rpmcc-msm8916", .data = &rpm_clk_msm8916 },
 	{ .compatible = "qcom,rpmcc-msm8974", .data = &rpm_clk_msm8974 },
+	{ .compatible = "qcom,rpmcc-msm8976", .data = &rpm_clk_msm8976 },
 	{ .compatible = "qcom,rpmcc-msm8996", .data = &rpm_clk_msm8996 },
 	{ .compatible = "qcom,rpmcc-msm8998", .data = &rpm_clk_msm8998 },
 	{ .compatible = "qcom,rpmcc-qcs404",  .data = &rpm_clk_qcs404  },
-- 
2.21.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] dt-bindings: clock: rpmcc: Document msm8976 compatible
  2019-10-31 11:29 [PATCH 0/2] RPM clocks for MSM8976/56 kholk11
  2019-10-31 11:29 ` [PATCH 1/2] clk: qcom: smd: Add support for MSM8976 rpm clocks kholk11
@ 2019-10-31 11:29 ` kholk11
  2019-11-06  3:57   ` Rob Herring
  1 sibling, 1 reply; 4+ messages in thread
From: kholk11 @ 2019-10-31 11:29 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: kholk11, marijns95, agross, mturquette, bjorn.andersson, sboyd,
	robh+dt, mark.rutland, linux-clk, devicetree

From: AngeloGioacchino Del Regno <kholk11@gmail.com>

Support for MSM8976 was added to the clk-smd-rpm driver: let's
document here the newly added compatible string.

Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com>
---
 Documentation/devicetree/bindings/clock/qcom,rpmcc.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt b/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt
index 944719bd586f..356cabcd844d 100644
--- a/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt
+++ b/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt
@@ -14,6 +14,7 @@ Required properties :
 			"qcom,rpmcc-apq8060", "qcom,rpmcc"
 			"qcom,rpmcc-msm8916", "qcom,rpmcc"
 			"qcom,rpmcc-msm8974", "qcom,rpmcc"
+			"qcom,rpmcc-msm8976", "qcom,rpmcc"
 			"qcom,rpmcc-apq8064", "qcom,rpmcc"
 			"qcom,rpmcc-msm8996", "qcom,rpmcc"
 			"qcom,rpmcc-msm8998", "qcom,rpmcc"
-- 
2.21.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] dt-bindings: clock: rpmcc: Document msm8976 compatible
  2019-10-31 11:29 ` [PATCH 2/2] dt-bindings: clock: rpmcc: Document msm8976 compatible kholk11
@ 2019-11-06  3:57   ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2019-11-06  3:57 UTC (permalink / raw)
  To: kholk11
  Cc: linux-arm-msm, kholk11, marijns95, agross, mturquette,
	bjorn.andersson, sboyd, robh+dt, mark.rutland, linux-clk,
	devicetree

On Thu, 31 Oct 2019 12:29:51 +0100, kholk11@gmail.com wrote:
> From: AngeloGioacchino Del Regno <kholk11@gmail.com>
> 
> Support for MSM8976 was added to the clk-smd-rpm driver: let's
> document here the newly added compatible string.
> 
> Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com>
> ---
>  Documentation/devicetree/bindings/clock/qcom,rpmcc.txt | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-31 11:29 [PATCH 0/2] RPM clocks for MSM8976/56 kholk11
2019-10-31 11:29 ` [PATCH 1/2] clk: qcom: smd: Add support for MSM8976 rpm clocks kholk11
2019-10-31 11:29 ` [PATCH 2/2] dt-bindings: clock: rpmcc: Document msm8976 compatible kholk11
2019-11-06  3:57   ` Rob Herring

Linux-Clk Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-clk/0 linux-clk/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-clk linux-clk/ https://lore.kernel.org/linux-clk \
		linux-clk@vger.kernel.org
	public-inbox-index linux-clk

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-clk


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git