Skip to contentSkip to conversation

clk: imx: vf610: add CAAM clock

PATCH Applied Andrey Smirnov 3 participants 3 messages Jun 1, 2020 – Jun 23, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: imx: vf610: add CAAM clock

According to Vybrid Security RM, CCM_CCGR11[CG176] can be used to gate CAAM ipg clock.

---
 drivers/clk/imx/clk-vf610.c             | 1 +
 include/dt-bindings/clock/vf610-clock.h | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/clk/imx/clk-vf610.c +1 -0
index cd04e7dc1878..5129ef8e1d6e 100644
@@ -438,6 +438,7 @@ static void __init vf610_clocks_init(struct device_node *ccm_node)
 	clk[VF610_CLK_SNVS] = imx_clk_gate2("snvs-rtc", "ipg_bus", CCM_CCGR6, CCM_CCGRx_CGn(7));
 	clk[VF610_CLK_DAP] = imx_clk_gate("dap", "platform_bus", CCM_CCSR, 24);
 	clk[VF610_CLK_OCOTP] = imx_clk_gate("ocotp", "ipg_bus", CCM_CCGR6, CCM_CCGRx_CGn(5));
+	clk[VF610_CLK_CAAM] = imx_clk_gate2("caam", "ipg_bus", CCM_CCGR11, CCM_CCGRx_CGn(0));
 
 	imx_check_clocks(clk, ARRAY_SIZE(clk));
 
include/dt-bindings/clock/vf610-clock.h +2 -1
index 95394f35a74a..0f2d60e884dc 100644
@@ -195,6 +195,7 @@
 #define VF610_CLK_WKPU			186
 #define VF610_CLK_TCON0			187
 #define VF610_CLK_TCON1			188
-#define VF610_CLK_END			189
+#define VF610_CLK_CAAM			189
+#define VF610_CLK_END			190
 
 #endif /* __DT_BINDINGS_CLOCK_VF610_H */

--
2.21.3

Tested-by on v1 1/1
#1 lore raw

On a Vybrid VF610 based platform I tested this with 5.8-rc1. With the necessary DTS patch, the CAAM worked correctly for me.

Quoted 44 lines · Andrey Smirnov

According to Vybrid Security RM, CCM_CCGR11[CG176] can be used to gate CAAM ipg clock.

---
 drivers/clk/imx/clk-vf610.c             | 1 +
 include/dt-bindings/clock/vf610-clock.h | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/clk/imx/clk-vf610.c +1 -0
index cd04e7dc1878..5129ef8e1d6e 100644
@@ -438,6 +438,7 @@ static void __init vf610_clocks_init(struct device_node *ccm_node)
        clk[VF610_CLK_SNVS] = imx_clk_gate2("snvs-rtc", "ipg_bus", CCM_CCGR6, CCM_CCGRx_CGn(7));
        clk[VF610_CLK_DAP] = imx_clk_gate("dap", "platform_bus", CCM_CCSR, 24);
        clk[VF610_CLK_OCOTP] = imx_clk_gate("ocotp", "ipg_bus", CCM_CCGR6, CCM_CCGRx_CGn(5));
+       clk[VF610_CLK_CAAM] = imx_clk_gate2("caam", "ipg_bus", CCM_CCGR11, CCM_CCGRx_CGn(0));
 
        imx_check_clocks(clk, ARRAY_SIZE(clk));
 
include/dt-bindings/clock/vf610-clock.h +2 -2
index 95394f35a74a..0f2d60e884dc 100644
@@ -195,6 +195,7 @@
 #define VF610_CLK_WKPU                 186
 #define VF610_CLK_TCON0                        187
 #define VF610_CLK_TCON1                        188
-#define VF610_CLK_END                  189
+#define VF610_CLK_CAAM                 189
+#define VF610_CLK_END                  190
 
 #endif /* __DT_BINDINGS_CLOCK_VF610_H */
--

2.21.3