mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] clk: qcom: Add the Molokai GPU clock controller
@ 2026-11-15 20:19 Venkat Yadlapati via B4 Relay
  2026-11-15 20:19 ` [PATCH 1/2] dt-bindings: clock: qcom: sm8450-gpucc: Add " Venkat Yadlapati via B4 Relay
  2026-11-15 20:19 ` [PATCH 2/2] clk: qcom: gpucc-kaanapali: Add support for Molokai Venkat Yadlapati via B4 Relay
  0 siblings, 2 replies; 5+ messages in thread
From: Venkat Yadlapati via B4 Relay @ 2026-11-15 20:19 UTC (permalink / raw)
  To: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
	Jerome Brunet, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Konrad Dybcio, Taniya Das
  Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, Venkat Yadlapati

The graphics clock controller of the Qualcomm Molokai (SM8845) SoC is the
Kaanapali one, except for the PLL0 CONFIG_CTL_HI value and three branch
clocks that sit one register further. This documents a compatible for it
and handles it in the Kaanapali driver.

The SoC devicetree that uses it is sent separately in "Add support for
the Qualcomm Molokai (SM8845) and the Motorola Signature".

Tested on the Motorola Signature: the GPU clocks come up and the Adreno
829 runs.

I used an LLM (Claude) to help write these patches and their commit
messages. I reviewed all of them and tested the result on the device.

---
Venkat Yadlapati (2):
      dt-bindings: clock: qcom: sm8450-gpucc: Add Molokai GPU clock controller
      clk: qcom: gpucc-kaanapali: Add support for Molokai

 .../bindings/clock/qcom,sm8450-gpucc.yaml          |  1 +
 drivers/clk/qcom/Kconfig                           |  3 ++-
 drivers/clk/qcom/gpucc-kaanapali.c                 | 25 ++++++++++++++++++++++
 3 files changed, 28 insertions(+), 1 deletion(-)
---
base-commit: 6a876df4686788cd39128b62d7fcbff62f39278f
change-id: 20261116-molokai-gpucc-daebd2758b5d

Best regards,
--  
Venkat Yadlapati <venkat.yadlapati@yahoo.com>



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

* [PATCH 1/2] dt-bindings: clock: qcom: sm8450-gpucc: Add Molokai GPU clock controller
  2026-11-15 20:19 [PATCH 0/2] clk: qcom: Add the Molokai GPU clock controller Venkat Yadlapati via B4 Relay
@ 2026-11-15 20:19 ` Venkat Yadlapati via B4 Relay
  2026-11-20 12:22   ` Krzysztof Kozlowski
  2026-11-15 20:19 ` [PATCH 2/2] clk: qcom: gpucc-kaanapali: Add support for Molokai Venkat Yadlapati via B4 Relay
  1 sibling, 1 reply; 5+ messages in thread
From: Venkat Yadlapati via B4 Relay @ 2026-11-15 20:19 UTC (permalink / raw)
  To: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
	Jerome Brunet, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Konrad Dybcio, Taniya Das
  Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, Venkat Yadlapati

From: Venkat Yadlapati <venkat.yadlapati@yahoo.com>

Document the graphics clock controller of the Qualcomm Molokai (SM8845)
SoC. It is the Kaanapali one with a different PLL configuration and three
branch clocks at different offsets, so it is not compatible with it.

An LLM was used to help write this commit message.

Signed-off-by: Venkat Yadlapati <venkat.yadlapati@yahoo.com>
---
 Documentation/devicetree/bindings/clock/qcom,sm8450-gpucc.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8450-gpucc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8450-gpucc.yaml
index 7eca456211e4..e62e6127b06f 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sm8450-gpucc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sm8450-gpucc.yaml
@@ -37,6 +37,7 @@ properties:
       - qcom,glymur-gpucc
       - qcom,kaanapali-gpucc
       - qcom,milos-gpucc
+      - qcom,molokai-gpucc
       - qcom,nord-gpu2cc
       - qcom,nord-gpucc
       - qcom,sar2130p-gpucc

-- 
2.56.0



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

* [PATCH 2/2] clk: qcom: gpucc-kaanapali: Add support for Molokai
  2026-11-15 20:19 [PATCH 0/2] clk: qcom: Add the Molokai GPU clock controller Venkat Yadlapati via B4 Relay
  2026-11-15 20:19 ` [PATCH 1/2] dt-bindings: clock: qcom: sm8450-gpucc: Add " Venkat Yadlapati via B4 Relay
@ 2026-11-15 20:19 ` Venkat Yadlapati via B4 Relay
  2026-11-20 10:24   ` Abel Vesa
  1 sibling, 1 reply; 5+ messages in thread
From: Venkat Yadlapati via B4 Relay @ 2026-11-15 20:19 UTC (permalink / raw)
  To: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
	Jerome Brunet, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Konrad Dybcio, Taniya Das
  Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, Venkat Yadlapati

From: Venkat Yadlapati <venkat.yadlapati@yahoo.com>

The graphics clock controller of Molokai (SM8845) is the Kaanapali one,
except for the PLL0 CONFIG_CTL_HI value and the CX accu shift, DPM and
MEMNOC GFX branch clocks, which sit one register further. Handle it in
the Kaanapali driver.

Assisted-by: LLM
Signed-off-by: Venkat Yadlapati <venkat.yadlapati@yahoo.com>
---
 drivers/clk/qcom/Kconfig           |  3 ++-
 drivers/clk/qcom/gpucc-kaanapali.c | 25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig
index e6c58e8b1849..5d4db3264c5a 100644
--- a/drivers/clk/qcom/Kconfig
+++ b/drivers/clk/qcom/Kconfig
@@ -200,7 +200,8 @@ config CLK_KAANAPALI_GPUCC
 	select CLK_KAANAPALI_GCC
 	default m if ARCH_QCOM
 	help
-	  Support for the graphics clock controller on Kaanapali devices.
+	  Support for the graphics clock controller on Kaanapali and Molokai
+	  devices.
 	  Say Y if you want to support graphics controller devices and
 	  functionality such as 3D graphics.
 
diff --git a/drivers/clk/qcom/gpucc-kaanapali.c b/drivers/clk/qcom/gpucc-kaanapali.c
index f75f2caa2205..ea30a9e07a83 100644
--- a/drivers/clk/qcom/gpucc-kaanapali.c
+++ b/drivers/clk/qcom/gpucc-kaanapali.c
@@ -5,6 +5,7 @@
 
 #include <linux/clk-provider.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 
@@ -52,6 +53,18 @@ static const struct alpha_pll_config gpu_cc_pll0_config = {
 	.user_ctl_hi_val = 0x00000002,
 };
 
+/* Molokai needs a different PLL0 configuration */
+static const struct alpha_pll_config molokai_gpu_cc_pll0_config = {
+	.l = 0x31,
+	.cal_l = 0x48,
+	.alpha = 0x7aaa,
+	.config_ctl_val = 0x25c400e7,
+	.config_ctl_hi_val = 0x0a8060e0,
+	.config_ctl_hi1_val = 0xf51dea20,
+	.user_ctl_val = 0x00000408,
+	.user_ctl_hi_val = 0x00000002,
+};
+
 static struct clk_alpha_pll gpu_cc_pll0 = {
 	.offset = 0x0,
 	.config = &gpu_cc_pll0_config,
@@ -457,12 +470,24 @@ static const struct qcom_cc_desc gpu_cc_kaanapali_desc = {
 
 static const struct of_device_id gpu_cc_kaanapali_match_table[] = {
 	{ .compatible = "qcom,kaanapali-gpucc" },
+	{ .compatible = "qcom,molokai-gpucc" },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, gpu_cc_kaanapali_match_table);
 
 static int gpu_cc_kaanapali_probe(struct platform_device *pdev)
 {
+	if (of_device_is_compatible(pdev->dev.of_node, "qcom,molokai-gpucc")) {
+		gpu_cc_pll0.config = &molokai_gpu_cc_pll0_config;
+
+		gpu_cc_cx_accu_shift_clk.halt_reg = 0x9108;
+		gpu_cc_cx_accu_shift_clk.clkr.enable_reg = 0x9108;
+		gpu_cc_dpm_clk.halt_reg = 0x910c;
+		gpu_cc_dpm_clk.clkr.enable_reg = 0x910c;
+		gpu_cc_memnoc_gfx_clk.halt_reg = 0x90f0;
+		gpu_cc_memnoc_gfx_clk.clkr.enable_reg = 0x90f0;
+	}
+
 	return qcom_cc_probe(pdev, &gpu_cc_kaanapali_desc);
 }
 

-- 
2.56.0



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

* Re: [PATCH 2/2] clk: qcom: gpucc-kaanapali: Add support for Molokai
  2026-11-15 20:19 ` [PATCH 2/2] clk: qcom: gpucc-kaanapali: Add support for Molokai Venkat Yadlapati via B4 Relay
@ 2026-11-20 10:24   ` Abel Vesa
  0 siblings, 0 replies; 5+ messages in thread
From: Abel Vesa @ 2026-11-20 10:24 UTC (permalink / raw)
  To: venkat.yadlapati
  Cc: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
	Jerome Brunet, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Konrad Dybcio, Taniya Das, linux-arm-msm, linux-clk, devicetree,
	linux-kernel

On 26-11-16 01:49:28, Venkat Yadlapati via B4 Relay wrote:
> From: Venkat Yadlapati <venkat.yadlapati@yahoo.com>
> 
> The graphics clock controller of Molokai (SM8845) is the Kaanapali one,
> except for the PLL0 CONFIG_CTL_HI value and the CX accu shift, DPM and
> MEMNOC GFX branch clocks, which sit one register further. Handle it in
> the Kaanapali driver.
> 
> Assisted-by: LLM
> Signed-off-by: Venkat Yadlapati <venkat.yadlapati@yahoo.com>

Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>

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

* Re: [PATCH 1/2] dt-bindings: clock: qcom: sm8450-gpucc: Add Molokai GPU clock controller
  2026-11-15 20:19 ` [PATCH 1/2] dt-bindings: clock: qcom: sm8450-gpucc: Add " Venkat Yadlapati via B4 Relay
@ 2026-11-20 12:22   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-20 12:22 UTC (permalink / raw)
  To: venkat.yadlapati, Bjorn Andersson, Abel Vesa, Stephen Boyd,
	Brian Masney, Jerome Brunet, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Konrad Dybcio, Taniya Das
  Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel

On 15/11/2026 21:19, Venkat Yadlapati via B4 Relay wrote:
> From: Venkat Yadlapati <venkat.yadlapati@yahoo.com>
> 
> Document the graphics clock controller of the Qualcomm Molokai (SM8845)
> SoC. It is the Kaanapali one with a different PLL configuration and three
> branch clocks at different offsets, so it is not compatible with it.
> 
> An LLM was used to help write this commit message.

This does not belong to the commit msg, but to the changelog. Drop.


> 
> Signed-off-by: Venkat Yadlapati <venkat.yadlapati@yahoo.com>


With commit msg corrected:

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Best regards,
Krzysztof

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

end of thread, other threads:[~2026-11-20 12:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-15 20:19 [PATCH 0/2] clk: qcom: Add the Molokai GPU clock controller Venkat Yadlapati via B4 Relay
2026-11-15 20:19 ` [PATCH 1/2] dt-bindings: clock: qcom: sm8450-gpucc: Add " Venkat Yadlapati via B4 Relay
2026-11-20 12:22   ` Krzysztof Kozlowski
2026-11-15 20:19 ` [PATCH 2/2] clk: qcom: gpucc-kaanapali: Add support for Molokai Venkat Yadlapati via B4 Relay
2026-11-20 10:24   ` Abel Vesa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®