mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] Add clock support for CMU_G3D
       [not found] <CGME20260202101952epcas5p37eb879d5f55e7bdc8a90b86abe34eb4a@epcas5p3.samsung.com>
@ 2026-02-02 10:35 ` Raghav Sharma
       [not found]   ` <CGME20260202101954epcas5p27735b03488efceba5d7f970931905ec5@epcas5p2.samsung.com>
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Raghav Sharma @ 2026-02-02 10:35 UTC (permalink / raw)
  To: krzk, s.nawrocki, cw00.choi, alim.akhtar, mturquette, sboyd,
	robh, conor+dt, sunyeal.hong, shin.son
  Cc: linux-samsung-soc, linux-clk, devicetree, linux-arm-kernel,
	linux-kernel, chandan.vn, dev.tailor, karthik.sun, Raghav Sharma

This series adds clock support for the CMU_G3D block.
G3D block is for Graphics

Patch[1/3]: dt-bindings: clock: exynosautov920: add g3d clock definitions
        - Adds DT binding for CMU_G3D and clock definitions

Patch[2/3]: clk: samsung: exynosautov920: add block g3d clock support
        - Adds CMU_G3D clock driver support

Patch[3/3]: arm64: dts: exynosautov920: add CMU_G3D clock DT nodes
        - Adds dt node for CMU_G3D

Signed-off-by: Raghav Sharma <raghav.s@samsung.com>
---

Raghav Sharma (3):
  dt-bindings: clock: exynosautov920: add g3d clock definitions
  clk: samsung: exynosautov920: add block g3d clock support
  arm64: dts: exynosautov920: add cmu_g3d clock DT nodes

 .../clock/samsung,exynosautov920-clock.yaml   | 21 ++++++++
 .../arm64/boot/dts/exynos/exynosautov920.dtsi | 13 +++++
 drivers/clk/samsung/clk-exynosautov920.c      | 52 +++++++++++++++++++
 .../clock/samsung,exynosautov920.h            |  6 +++
 4 files changed, 92 insertions(+)


base-commit: 4c87cdd0328495759f6e9f9f4e1e53ef8032a76f
-- 
2.34.1


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

* [PATCH 1/3] dt-bindings: clock: exynosautov920: add G3D clock definitions
       [not found]   ` <CGME20260202101954epcas5p27735b03488efceba5d7f970931905ec5@epcas5p2.samsung.com>
@ 2026-02-02 10:35     ` Raghav Sharma
  2026-02-28 14:43       ` (subset) " Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Raghav Sharma @ 2026-02-02 10:35 UTC (permalink / raw)
  To: krzk, s.nawrocki, cw00.choi, alim.akhtar, mturquette, sboyd,
	robh, conor+dt, sunyeal.hong, shin.son
  Cc: linux-samsung-soc, linux-clk, devicetree, linux-arm-kernel,
	linux-kernel, chandan.vn, dev.tailor, karthik.sun, Raghav Sharma

Add device tree clock binding definitions for CMU_G3D

Signed-off-by: Raghav Sharma <raghav.s@samsung.com>
---
 .../clock/samsung,exynosautov920-clock.yaml   | 21 +++++++++++++++++++
 .../clock/samsung,exynosautov920.h            |  6 ++++++
 2 files changed, 27 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml b/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml
index 1318720193b3..6b1fc61a2ff9 100644
--- a/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml
+++ b/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml
@@ -35,6 +35,7 @@ properties:
       - samsung,exynosautov920-cmu-cpucl0
       - samsung,exynosautov920-cmu-cpucl1
       - samsung,exynosautov920-cmu-cpucl2
+      - samsung,exynosautov920-cmu-g3d
       - samsung,exynosautov920-cmu-hsi0
       - samsung,exynosautov920-cmu-hsi1
       - samsung,exynosautov920-cmu-hsi2
@@ -287,6 +288,26 @@ allOf:
             - const: oscclk
             - const: noc
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynosautov920-cmu-g3d
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: External reference clock (38.4 MHz)
+            - description: CMU_G3D SWITCH clock (from CMU_TOP)
+            - description: CMU_G3D NOCP clock (from CMU_TOP)
+
+        clock-names:
+          items:
+            - const: oscclk
+            - const: switch
+            - const: nocp
+
 required:
   - compatible
   - "#clock-cells"
diff --git a/include/dt-bindings/clock/samsung,exynosautov920.h b/include/dt-bindings/clock/samsung,exynosautov920.h
index 06dec27a8c77..f2628c220b22 100644
--- a/include/dt-bindings/clock/samsung,exynosautov920.h
+++ b/include/dt-bindings/clock/samsung,exynosautov920.h
@@ -309,4 +309,10 @@
 #define CLK_MOUT_MFD_NOC_USER           1
 #define CLK_DOUT_MFD_NOCP               2
 
+/* CMU_G3D */
+#define FOUT_PLL_G3D                    1
+#define CLK_MOUT_G3D_NOC                2
+#define CLK_MOUT_G3D_SWITCH_USER        3
+#define CLK_MOUT_G3D_NOCP_USER          4
+
 #endif /* _DT_BINDINGS_CLOCK_EXYNOSAUTOV920_H */
-- 
2.34.1


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

* [PATCH 2/3] clk: samsung: exynosautov920: add block G3D clock support
       [not found]   ` <CGME20260202101957epcas5p224b18e84c561e542c39096b2bd7f29a7@epcas5p2.samsung.com>
@ 2026-02-02 10:35     ` Raghav Sharma
  2026-02-28 14:43       ` (subset) " Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Raghav Sharma @ 2026-02-02 10:35 UTC (permalink / raw)
  To: krzk, s.nawrocki, cw00.choi, alim.akhtar, mturquette, sboyd,
	robh, conor+dt, sunyeal.hong, shin.son
  Cc: linux-samsung-soc, linux-clk, devicetree, linux-arm-kernel,
	linux-kernel, chandan.vn, dev.tailor, karthik.sun, Raghav Sharma

Add support for CMU_G3D which provides clocks to G3D block, and
register the required compatible and cmu_info for the same.

Signed-off-by: Raghav Sharma <raghav.s@samsung.com>
---
 drivers/clk/samsung/clk-exynosautov920.c | 52 ++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/drivers/clk/samsung/clk-exynosautov920.c b/drivers/clk/samsung/clk-exynosautov920.c
index d0617c7fff3a..c38b103721f0 100644
--- a/drivers/clk/samsung/clk-exynosautov920.c
+++ b/drivers/clk/samsung/clk-exynosautov920.c
@@ -30,6 +30,7 @@
 #define CLKS_NR_M2M                     (CLK_DOUT_M2M_NOCP + 1)
 #define CLKS_NR_MFC                     (CLK_DOUT_MFC_NOCP + 1)
 #define CLKS_NR_MFD                     (CLK_DOUT_MFD_NOCP + 1)
+#define CLKS_NR_G3D			(CLK_MOUT_G3D_NOCP_USER + 1)
 
 /* ---- CMU_TOP ------------------------------------------------------------ */
 
@@ -1942,6 +1943,54 @@ static const struct samsung_cmu_info mfd_cmu_info __initconst = {
 	.clk_name               = "noc",
 };
 
+/* ---- CMU_G3D --------------------------------------------------------- */
+
+/* Register Offset definitions for CMU_G3D (0x1a000000) */
+#define PLL_LOCKTIME_PLL_G3D                    0x0
+#define PLL_CON3_PLL_G3D                        0x10c
+#define CLK_CON_MUX_MUX_CLK_G3D_NOC             0x1000
+#define PLL_CON0_MUX_CLKCMU_G3D_NOCP_USER       0x600
+#define PLL_CON0_MUX_CLKCMU_G3D_SWITCH_USER     0x610
+
+static const unsigned long g3d_clk_regs[] __initconst = {
+	PLL_LOCKTIME_PLL_G3D,
+	PLL_CON3_PLL_G3D,
+	CLK_CON_MUX_MUX_CLK_G3D_NOC,
+	PLL_CON0_MUX_CLKCMU_G3D_NOCP_USER,
+	PLL_CON0_MUX_CLKCMU_G3D_SWITCH_USER,
+};
+
+static const struct samsung_pll_clock g3d_pll_clks[] __initconst = {
+	/* CMU_G3D_PLL */
+	PLL(pll_531x, FOUT_PLL_G3D, "fout_pll_g3d", "oscclk",
+	PLL_LOCKTIME_PLL_G3D, PLL_CON3_PLL_G3D, NULL),
+};
+
+/* List of parent clocks for Muxes in CMU_G3D */
+PNAME(mout_clk_g3d_noc_p) = { "oscclk", "fout_pll_g3d", "mout_clkcmu_g3d_switch_user"};
+PNAME(mout_clkcmu_g3d_switch_user_p) = { "oscclk", "dout_clkcmu_g3d_switch" };
+PNAME(mout_clkcmu_g3d_nocp_user_p) = { "oscclk", "dout_clkcmu_g3d_nocp" };
+
+static const struct samsung_mux_clock g3d_mux_clks[] __initconst = {
+	MUX(CLK_MOUT_G3D_NOC, "mout_clk_g3d_noc",
+	    mout_clk_g3d_noc_p, CLK_CON_MUX_MUX_CLK_G3D_NOC, 0, 2),
+	MUX(CLK_MOUT_G3D_SWITCH_USER, "mout_clkcmu_g3d_switch_user",
+	    mout_clkcmu_g3d_switch_user_p, PLL_CON0_MUX_CLKCMU_G3D_SWITCH_USER, 4, 1),
+	MUX(CLK_MOUT_G3D_NOCP_USER, "mout_clkcmu_g3d_nocp_user",
+	    mout_clkcmu_g3d_nocp_user_p, PLL_CON0_MUX_CLKCMU_G3D_NOCP_USER, 4, 1),
+};
+
+static const struct samsung_cmu_info g3d_cmu_info __initconst = {
+	.pll_clks               = g3d_pll_clks,
+	.nr_pll_clks            = ARRAY_SIZE(g3d_pll_clks),
+	.mux_clks               = g3d_mux_clks,
+	.nr_mux_clks            = ARRAY_SIZE(g3d_mux_clks),
+	.nr_clk_ids             = CLKS_NR_G3D,
+	.clk_regs               = g3d_clk_regs,
+	.nr_clk_regs            = ARRAY_SIZE(g3d_clk_regs),
+	.clk_name               = "noc",
+};
+
 static int __init exynosautov920_cmu_probe(struct platform_device *pdev)
 {
 	const struct samsung_cmu_info *info;
@@ -1981,6 +2030,9 @@ static const struct of_device_id exynosautov920_cmu_of_match[] = {
 	}, {
 		.compatible = "samsung,exynosautov920-cmu-mfd",
 		.data = &mfd_cmu_info,
+	}, {
+		.compatible = "samsung,exynosautov920-cmu-g3d",
+		.data = &g3d_cmu_info,
 	},
 	{ }
 };
-- 
2.34.1


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

* [PATCH 3/3] arm64: dts: exynosautov920: add CMU_G3D clock DT nodes
       [not found]   ` <CGME20260202102001epcas5p4ebe15ce1cec50c6ca024464ffdbe9d79@epcas5p4.samsung.com>
@ 2026-02-02 10:35     ` Raghav Sharma
  2026-02-28 14:44       ` (subset) " Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Raghav Sharma @ 2026-02-02 10:35 UTC (permalink / raw)
  To: krzk, s.nawrocki, cw00.choi, alim.akhtar, mturquette, sboyd,
	robh, conor+dt, sunyeal.hong, shin.son
  Cc: linux-samsung-soc, linux-clk, devicetree, linux-arm-kernel,
	linux-kernel, chandan.vn, dev.tailor, karthik.sun, Raghav Sharma

Add required dt node for cmu_g3d block, which provides
clocks for G3D IP

Signed-off-by: Raghav Sharma <raghav.s@samsung.com>
---
 arch/arm64/boot/dts/exynos/exynosautov920.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/exynosautov920.dtsi b/arch/arm64/boot/dts/exynos/exynosautov920.dtsi
index 02bf2ca52fdc..0bf7c4cb9846 100644
--- a/arch/arm64/boot/dts/exynos/exynosautov920.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynosautov920.dtsi
@@ -1473,6 +1473,19 @@ cmu_mfd: clock-controller@19e00000 {
 				      "noc";
 		};
 
+		cmu_g3d: clock-controller@1a000000 {
+			compatible = "samsung,exynosautov920-cmu-g3d";
+			reg = <0x1a000000 0x8000>;
+			#clock-cells = <1>;
+
+			clocks = <&xtcxo>,
+				 <&cmu_top DOUT_CLKCMU_G3D_SWITCH>,
+				 <&cmu_top DOUT_CLKCMU_G3D_NOCP>;
+			clock-names = "oscclk",
+				      "switch",
+				      "nocp";
+		};
+
 		pinctrl_aud: pinctrl@1a460000 {
 			compatible = "samsung,exynosautov920-pinctrl";
 			reg = <0x1a460000 0x10000>;
-- 
2.34.1


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

* Re: (subset) [PATCH 1/3] dt-bindings: clock: exynosautov920: add G3D clock definitions
  2026-02-02 10:35     ` [PATCH 1/3] dt-bindings: clock: exynosautov920: add G3D clock definitions Raghav Sharma
@ 2026-02-28 14:43       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-28 14:43 UTC (permalink / raw)
  To: s.nawrocki, cw00.choi, alim.akhtar, mturquette, sboyd, robh,
	conor+dt, sunyeal.hong, shin.son, Raghav Sharma
  Cc: Krzysztof Kozlowski, linux-samsung-soc, linux-clk, devicetree,
	linux-arm-kernel, linux-kernel, chandan.vn, dev.tailor,
	karthik.sun


On Mon, 02 Feb 2026 16:05:53 +0530, Raghav Sharma wrote:
> Add device tree clock binding definitions for CMU_G3D
> 
> 

Applied, thanks!

[1/3] dt-bindings: clock: exynosautov920: add G3D clock definitions
      https://git.kernel.org/krzk/linux/c/6e5913328102f818303b01e854df37fa9f251a47

Best regards,
-- 
Krzysztof Kozlowski <krzk@kernel.org>

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

* Re: (subset) [PATCH 2/3] clk: samsung: exynosautov920: add block G3D clock support
  2026-02-02 10:35     ` [PATCH 2/3] clk: samsung: exynosautov920: add block G3D clock support Raghav Sharma
@ 2026-02-28 14:43       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-28 14:43 UTC (permalink / raw)
  To: s.nawrocki, cw00.choi, alim.akhtar, mturquette, sboyd, robh,
	conor+dt, sunyeal.hong, shin.son, Raghav Sharma
  Cc: Krzysztof Kozlowski, linux-samsung-soc, linux-clk, devicetree,
	linux-arm-kernel, linux-kernel, chandan.vn, dev.tailor,
	karthik.sun


On Mon, 02 Feb 2026 16:05:54 +0530, Raghav Sharma wrote:
> Add support for CMU_G3D which provides clocks to G3D block, and
> register the required compatible and cmu_info for the same.
> 
> 

You have checkpatch warnings:
CHECK: Alignment should match open parenthesis

You should fix them before my scripts or my CI sees them.

Applied, thanks!

[2/3] clk: samsung: exynosautov920: add block G3D clock support
      https://git.kernel.org/krzk/linux/c/5e5f3286d66712fb49264da20e3d89534754d707

Best regards,
-- 
Krzysztof Kozlowski <krzk@kernel.org>

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

* Re: (subset) [PATCH 3/3] arm64: dts: exynosautov920: add CMU_G3D clock DT nodes
  2026-02-02 10:35     ` [PATCH 3/3] arm64: dts: exynosautov920: add CMU_G3D clock DT nodes Raghav Sharma
@ 2026-02-28 14:44       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-28 14:44 UTC (permalink / raw)
  To: s.nawrocki, cw00.choi, alim.akhtar, mturquette, sboyd, robh,
	conor+dt, sunyeal.hong, shin.son, Raghav Sharma
  Cc: linux-samsung-soc, linux-clk, devicetree, linux-arm-kernel,
	linux-kernel, chandan.vn, dev.tailor, karthik.sun


On Mon, 02 Feb 2026 16:05:55 +0530, Raghav Sharma wrote:
> Add required dt node for cmu_g3d block, which provides
> clocks for G3D IP
> 
> 

Applied, thanks!

[3/3] arm64: dts: exynosautov920: add CMU_G3D clock DT nodes
      https://git.kernel.org/krzk/linux/c/a94b4c84ae9294e4f2e398c61d94bedd56162785

Best regards,
-- 
Krzysztof Kozlowski <krzk@kernel.org>


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

end of thread, other threads:[~2026-02-28 14:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20260202101952epcas5p37eb879d5f55e7bdc8a90b86abe34eb4a@epcas5p3.samsung.com>
2026-02-02 10:35 ` [PATCH 0/3] Add clock support for CMU_G3D Raghav Sharma
     [not found]   ` <CGME20260202101954epcas5p27735b03488efceba5d7f970931905ec5@epcas5p2.samsung.com>
2026-02-02 10:35     ` [PATCH 1/3] dt-bindings: clock: exynosautov920: add G3D clock definitions Raghav Sharma
2026-02-28 14:43       ` (subset) " Krzysztof Kozlowski
     [not found]   ` <CGME20260202101957epcas5p224b18e84c561e542c39096b2bd7f29a7@epcas5p2.samsung.com>
2026-02-02 10:35     ` [PATCH 2/3] clk: samsung: exynosautov920: add block G3D clock support Raghav Sharma
2026-02-28 14:43       ` (subset) " Krzysztof Kozlowski
     [not found]   ` <CGME20260202102001epcas5p4ebe15ce1cec50c6ca024464ffdbe9d79@epcas5p4.samsung.com>
2026-02-02 10:35     ` [PATCH 3/3] arm64: dts: exynosautov920: add CMU_G3D clock DT nodes Raghav Sharma
2026-02-28 14:44       ` (subset) " Krzysztof Kozlowski

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®