linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] clk: keystone: Add support for AM64 specific ehrpwm-tbclk
@ 2021-05-26 16:53 Lokesh Vutla
  2021-05-26 16:53 ` [PATCH 1/2] dt-bindings: clock: ehrpwm: Add support for AM64 specific compatible Lokesh Vutla
  2021-05-26 16:53 ` [PATCH 2/2] clk: keystone: syscon-clk: Add support for AM64 specific ehrpwm-tbclk Lokesh Vutla
  0 siblings, 2 replies; 3+ messages in thread
From: Lokesh Vutla @ 2021-05-26 16:53 UTC (permalink / raw)
  To: mturquette, sboyd, Rob Herring
  Cc: Device Tree Mailing List, ssantosh, Vignesh R, linux-clk,
	Linux ARM Mailing List, Nishanth Menon, Lokesh Vutla

This series adds support for AM64 specific ehrpwm Time-base submodule
clock.

Lokesh Vutla (2):
  dt-bindings: clock: ehrpwm: Add support for AM64 specific compatible
  clk: keystone: syscon-clk: Add support for AM64 specific ehrpwm-tbclk

 .../bindings/clock/ti,am654-ehrpwm-tbclk.yaml   |  4 +++-
 drivers/clk/keystone/syscon-clk.c               | 17 +++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

-- 
2.31.1


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

* [PATCH 1/2] dt-bindings: clock: ehrpwm: Add support for AM64 specific compatible
  2021-05-26 16:53 [PATCH 0/2] clk: keystone: Add support for AM64 specific ehrpwm-tbclk Lokesh Vutla
@ 2021-05-26 16:53 ` Lokesh Vutla
  2021-05-26 16:53 ` [PATCH 2/2] clk: keystone: syscon-clk: Add support for AM64 specific ehrpwm-tbclk Lokesh Vutla
  1 sibling, 0 replies; 3+ messages in thread
From: Lokesh Vutla @ 2021-05-26 16:53 UTC (permalink / raw)
  To: mturquette, sboyd, Rob Herring
  Cc: Device Tree Mailing List, ssantosh, Vignesh R, linux-clk,
	Linux ARM Mailing List, Nishanth Menon, Lokesh Vutla

Introduce AM64 specific compatible for ehrpwm time-base sub-module clock.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 .../devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml b/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml
index 6b419a9878f3..c4adf0a80ca4 100644
--- a/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml
+++ b/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml
@@ -12,7 +12,9 @@ maintainers:
 properties:
   compatible:
     items:
-      - const: ti,am654-ehrpwm-tbclk
+      - enum:
+          - ti,am654-ehrpwm-tbclk
+          - ti,am64-ehrpwm-tbclk
       - const: syscon
 
   "#clock-cells":
-- 
2.31.1


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

* [PATCH 2/2] clk: keystone: syscon-clk: Add support for AM64 specific ehrpwm-tbclk
  2021-05-26 16:53 [PATCH 0/2] clk: keystone: Add support for AM64 specific ehrpwm-tbclk Lokesh Vutla
  2021-05-26 16:53 ` [PATCH 1/2] dt-bindings: clock: ehrpwm: Add support for AM64 specific compatible Lokesh Vutla
@ 2021-05-26 16:53 ` Lokesh Vutla
  1 sibling, 0 replies; 3+ messages in thread
From: Lokesh Vutla @ 2021-05-26 16:53 UTC (permalink / raw)
  To: mturquette, sboyd, Rob Herring
  Cc: Device Tree Mailing List, ssantosh, Vignesh R, linux-clk,
	Linux ARM Mailing List, Nishanth Menon, Lokesh Vutla

AM64 has 9 instances of EPWM modules. And each instance has a clk to
Timer-Base sub-module that can be controlled by Control module. Update
the driver with all the 9 instance of clocks associated to
ti,am64-ehrpwm-tbclk.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 drivers/clk/keystone/syscon-clk.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/clk/keystone/syscon-clk.c b/drivers/clk/keystone/syscon-clk.c
index 5b3d36462174..c55a8ec249d1 100644
--- a/drivers/clk/keystone/syscon-clk.c
+++ b/drivers/clk/keystone/syscon-clk.c
@@ -149,11 +149,28 @@ static const struct ti_syscon_gate_clk_data am654_clk_data[] = {
 	{ /* Sentinel */ },
 };
 
+static const struct ti_syscon_gate_clk_data am64_clk_data[] = {
+	TI_SYSCON_CLK_GATE("ehrpwm_tbclk0", 0x0, 0),
+	TI_SYSCON_CLK_GATE("ehrpwm_tbclk1", 0x4, 0),
+	TI_SYSCON_CLK_GATE("ehrpwm_tbclk2", 0x8, 0),
+	TI_SYSCON_CLK_GATE("ehrpwm_tbclk3", 0xc, 0),
+	TI_SYSCON_CLK_GATE("ehrpwm_tbclk4", 0x10, 0),
+	TI_SYSCON_CLK_GATE("ehrpwm_tbclk5", 0x14, 0),
+	TI_SYSCON_CLK_GATE("ehrpwm_tbclk6", 0x18, 0),
+	TI_SYSCON_CLK_GATE("ehrpwm_tbclk7", 0x1c, 0),
+	TI_SYSCON_CLK_GATE("ehrpwm_tbclk8", 0x20, 0),
+	{ /* Sentinel */ },
+};
+
 static const struct of_device_id ti_syscon_gate_clk_ids[] = {
 	{
 		.compatible = "ti,am654-ehrpwm-tbclk",
 		.data = &am654_clk_data,
 	},
+	{
+		.compatible = "ti,am64-ehrpwm-tbclk",
+		.data = &am64_clk_data,
+	},
 	{ }
 };
 MODULE_DEVICE_TABLE(of, ti_syscon_gate_clk_ids);
-- 
2.31.1


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

end of thread, other threads:[~2021-05-26 16:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26 16:53 [PATCH 0/2] clk: keystone: Add support for AM64 specific ehrpwm-tbclk Lokesh Vutla
2021-05-26 16:53 ` [PATCH 1/2] dt-bindings: clock: ehrpwm: Add support for AM64 specific compatible Lokesh Vutla
2021-05-26 16:53 ` [PATCH 2/2] clk: keystone: syscon-clk: Add support for AM64 specific ehrpwm-tbclk Lokesh Vutla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).