Skip to content

Commit ceb4c8b

Browse files
cometzeroSylwester Nawrocki
authored andcommitted
clk: samsung: exynosautov9: add cmu_peris clock support
CMU_PERIS is responsible to control clocks of BLK_PERIS which has OPT/MCT/WDT and TMU. This patch only supports WDT gate clocks and all other clocks except WDT will be supported later. Signed-off-by: Chanho Park <chanho61.park@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Link: https://lore.kernel.org/r/20220504075154.58819-6-chanho61.park@samsung.com
1 parent 17f7dc4 commit ceb4c8b

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

drivers/clk/samsung/clk-exynosautov9.c

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,53 @@ static const struct samsung_cmu_info core_cmu_info __initconst = {
10151015
.clk_name = "dout_clkcmu_core_bus",
10161016
};
10171017

1018+
/* ---- CMU_PERIS ---------------------------------------------------------- */
1019+
1020+
/* Register Offset definitions for CMU_PERIS (0x10020000) */
1021+
#define PLL_CON0_MUX_CLKCMU_PERIS_BUS_USER 0x0600
1022+
#define CLK_CON_GAT_GOUT_BLK_PERIS_UID_SYSREG_PERIS_IPCLKPORT_PCLK 0x2058
1023+
#define CLK_CON_GAT_GOUT_BLK_PERIS_UID_WDT_CLUSTER0_IPCLKPORT_PCLK 0x205c
1024+
#define CLK_CON_GAT_GOUT_BLK_PERIS_UID_WDT_CLUSTER1_IPCLKPORT_PCLK 0x2060
1025+
1026+
static const unsigned long peris_clk_regs[] __initconst = {
1027+
PLL_CON0_MUX_CLKCMU_PERIS_BUS_USER,
1028+
CLK_CON_GAT_GOUT_BLK_PERIS_UID_SYSREG_PERIS_IPCLKPORT_PCLK,
1029+
CLK_CON_GAT_GOUT_BLK_PERIS_UID_WDT_CLUSTER0_IPCLKPORT_PCLK,
1030+
CLK_CON_GAT_GOUT_BLK_PERIS_UID_WDT_CLUSTER1_IPCLKPORT_PCLK,
1031+
};
1032+
1033+
/* List of parent clocks for Muxes in CMU_PERIS */
1034+
PNAME(mout_peris_bus_user_p) = { "oscclk", "dout_clkcmu_peris_bus" };
1035+
1036+
static const struct samsung_mux_clock peris_mux_clks[] __initconst = {
1037+
MUX(CLK_MOUT_PERIS_BUS_USER, "mout_peris_bus_user",
1038+
mout_peris_bus_user_p, PLL_CON0_MUX_CLKCMU_PERIS_BUS_USER, 4, 1),
1039+
};
1040+
1041+
static const struct samsung_gate_clock peris_gate_clks[] __initconst = {
1042+
GATE(CLK_GOUT_SYSREG_PERIS_PCLK, "gout_sysreg_peris_pclk",
1043+
"mout_peris_bus_user",
1044+
CLK_CON_GAT_GOUT_BLK_PERIS_UID_SYSREG_PERIS_IPCLKPORT_PCLK,
1045+
21, CLK_IGNORE_UNUSED, 0),
1046+
GATE(CLK_GOUT_WDT_CLUSTER0, "gout_wdt_cluster0", "mout_peris_bus_user",
1047+
CLK_CON_GAT_GOUT_BLK_PERIS_UID_WDT_CLUSTER0_IPCLKPORT_PCLK,
1048+
21, 0, 0),
1049+
GATE(CLK_GOUT_WDT_CLUSTER1, "gout_wdt_cluster1", "mout_peris_bus_user",
1050+
CLK_CON_GAT_GOUT_BLK_PERIS_UID_WDT_CLUSTER1_IPCLKPORT_PCLK,
1051+
21, 0, 0),
1052+
};
1053+
1054+
static const struct samsung_cmu_info peris_cmu_info __initconst = {
1055+
.mux_clks = peris_mux_clks,
1056+
.nr_mux_clks = ARRAY_SIZE(peris_mux_clks),
1057+
.gate_clks = peris_gate_clks,
1058+
.nr_gate_clks = ARRAY_SIZE(peris_gate_clks),
1059+
.nr_clk_ids = PERIS_NR_CLK,
1060+
.clk_regs = peris_clk_regs,
1061+
.nr_clk_regs = ARRAY_SIZE(peris_clk_regs),
1062+
.clk_name = "dout_clkcmu_peris_bus",
1063+
};
1064+
10181065
static int __init exynosautov9_cmu_probe(struct platform_device *pdev)
10191066
{
10201067
const struct samsung_cmu_info *info;
@@ -1031,6 +1078,10 @@ static const struct of_device_id exynosautov9_cmu_of_match[] = {
10311078
.compatible = "samsung,exynosautov9-cmu-core",
10321079
.data = &core_cmu_info,
10331080
}, {
1081+
}, {
1082+
.compatible = "samsung,exynosautov9-cmu-peris",
1083+
.data = &peris_cmu_info,
1084+
}, {
10341085
},
10351086
};
10361087

0 commit comments

Comments
 (0)