Thread (3 messages) 3 messages, 1 author, 2021-05-26
DORMANTno replies
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 2/2] clk: keystone: syscon-clk: Add support for AM64 specific ehrpwm-tbclk

From: Lokesh Vutla <hidden>
Date: 2021-05-26 16:54:14
Also in: linux-clk, linux-devicetree
Subsystem: arm/texas instrument keystone clock framework, common clk framework, the rest · Maintainers: Santosh Shilimkar, Michael Turquette, Stephen Boyd, Linus Torvalds

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 <redacted>
---
 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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help