diff options
author | Kalle Kankare <kalle.kankare@vincit.fi> | 2016-09-19 06:30:00 -0400 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2016-09-20 19:52:06 -0400 |
commit | 377d6479d298339888c5d6fb460d3275e1763f8f (patch) | |
tree | 66b2383c15be5221ea9ecdfe60ac4a23da27ccdb | |
parent | 7f4d3b52b6b69f274006cc65984672bfa7fd8b92 (diff) |
clk: imx53: Add clocks configuration
Add clocks configuration for CSI, FIRI and IEEE1588.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
-rw-r--r-- | drivers/clk/imx/clk-imx51-imx53.c | 20 | ||||
-rw-r--r-- | include/dt-bindings/clock/imx5-clock.h | 15 |
2 files changed, 34 insertions, 1 deletions
diff --git a/drivers/clk/imx/clk-imx51-imx53.c b/drivers/clk/imx/clk-imx51-imx53.c index 29d4c44ef356..1e3c9ea5f9dc 100644 --- a/drivers/clk/imx/clk-imx51-imx53.c +++ b/drivers/clk/imx/clk-imx51-imx53.c | |||
@@ -126,6 +126,7 @@ static const char *spdif0_com_sel[] = { "spdif0_podf", "ssi1_root_gate", }; | |||
126 | static const char *mx51_spdif1_com_sel[] = { "spdif1_podf", "ssi2_root_gate", }; | 126 | static const char *mx51_spdif1_com_sel[] = { "spdif1_podf", "ssi2_root_gate", }; |
127 | static const char *step_sels[] = { "lp_apm", }; | 127 | static const char *step_sels[] = { "lp_apm", }; |
128 | static const char *cpu_podf_sels[] = { "pll1_sw", "step_sel" }; | 128 | static const char *cpu_podf_sels[] = { "pll1_sw", "step_sel" }; |
129 | static const char *ieee1588_sels[] = { "pll3_sw", "pll4_sw", "dummy" /* usbphy2_clk */, "dummy" /* fec_phy_clk */ }; | ||
129 | 130 | ||
130 | static struct clk *clk[IMX5_CLK_END]; | 131 | static struct clk *clk[IMX5_CLK_END]; |
131 | static struct clk_onecell_data clk_data; | 132 | static struct clk_onecell_data clk_data; |
@@ -543,6 +544,25 @@ static void __init mx53_clocks_init(struct device_node *np) | |||
543 | clk[IMX5_CLK_I2C3_GATE] = imx_clk_gate2("i2c3_gate", "per_root", MXC_CCM_CCGR1, 22); | 544 | clk[IMX5_CLK_I2C3_GATE] = imx_clk_gate2("i2c3_gate", "per_root", MXC_CCM_CCGR1, 22); |
544 | clk[IMX5_CLK_SATA_GATE] = imx_clk_gate2("sata_gate", "ipg", MXC_CCM_CCGR4, 2); | 545 | clk[IMX5_CLK_SATA_GATE] = imx_clk_gate2("sata_gate", "ipg", MXC_CCM_CCGR4, 2); |
545 | 546 | ||
547 | clk[IMX5_CLK_FIRI_SEL] = imx_clk_mux("firi_sel", MXC_CCM_CSCMR2, 12, 2, | ||
548 | standard_pll_sel, ARRAY_SIZE(standard_pll_sel)); | ||
549 | clk[IMX5_CLK_FIRI_PRED] = imx_clk_divider("firi_pred", "firi_sel", MXC_CCM_CSCDR3, 6, 3); | ||
550 | clk[IMX5_CLK_FIRI_PODF] = imx_clk_divider("firi_podf", "firi_pred", MXC_CCM_CSCDR3, 0, 6); | ||
551 | clk[IMX5_CLK_FIRI_SERIAL_GATE] = imx_clk_gate2("firi_serial_gate", "firi_podf", MXC_CCM_CCGR1, 28); | ||
552 | clk[IMX5_CLK_FIRI_IPG_GATE] = imx_clk_gate2("firi_ipg_gate", "ipg", MXC_CCM_CCGR1, 26); | ||
553 | |||
554 | clk[IMX5_CLK_CSI0_MCLK1_SEL] = imx_clk_mux("csi0_mclk1_sel", MXC_CCM_CSCMR2, 22, 2, | ||
555 | standard_pll_sel, ARRAY_SIZE(standard_pll_sel)); | ||
556 | clk[IMX5_CLK_CSI0_MCLK1_PRED] = imx_clk_divider("csi0_mclk1_pred", "csi0_mclk1_sel", MXC_CCM_CSCDR4, 6, 3); | ||
557 | clk[IMX5_CLK_CSI0_MCLK1_PODF] = imx_clk_divider("csi0_mclk1_podf", "csi0_mclk1_pred", MXC_CCM_CSCDR4, 0, 6); | ||
558 | clk[IMX5_CLK_CSI0_MCLK1_GATE] = imx_clk_gate2("csi0_mclk1_serial_gate", "csi0_mclk1_podf", MXC_CCM_CCGR6, 4); | ||
559 | |||
560 | clk[IMX5_CLK_IEEE1588_SEL] = imx_clk_mux("ieee1588_sel", MXC_CCM_CSCMR2, 14, 2, | ||
561 | ieee1588_sels, ARRAY_SIZE(ieee1588_sels)); | ||
562 | clk[IMX5_CLK_IEEE1588_PRED] = imx_clk_divider("ieee1588_pred", "ieee1588_sel", MXC_CCM_CSCDR2, 6, 3); | ||
563 | clk[IMX5_CLK_IEEE1588_PODF] = imx_clk_divider("ieee1588_podf", "ieee1588_pred", MXC_CCM_CSCDR2, 0, 6); | ||
564 | clk[IMX5_CLK_IEEE1588_GATE] = imx_clk_gate2("ieee1588_serial_gate", "ieee1588_podf", MXC_CCM_CCGR7, 6); | ||
565 | |||
546 | clk[IMX5_CLK_CKO1_SEL] = imx_clk_mux("cko1_sel", MXC_CCM_CCOSR, 0, 4, | 566 | clk[IMX5_CLK_CKO1_SEL] = imx_clk_mux("cko1_sel", MXC_CCM_CCOSR, 0, 4, |
547 | mx53_cko1_sel, ARRAY_SIZE(mx53_cko1_sel)); | 567 | mx53_cko1_sel, ARRAY_SIZE(mx53_cko1_sel)); |
548 | clk[IMX5_CLK_CKO1_PODF] = imx_clk_divider("cko1_podf", "cko1_sel", MXC_CCM_CCOSR, 4, 3); | 568 | clk[IMX5_CLK_CKO1_PODF] = imx_clk_divider("cko1_podf", "cko1_sel", MXC_CCM_CCOSR, 4, 3); |
diff --git a/include/dt-bindings/clock/imx5-clock.h b/include/dt-bindings/clock/imx5-clock.h index f4b7478e23c8..d382fc71aa83 100644 --- a/include/dt-bindings/clock/imx5-clock.h +++ b/include/dt-bindings/clock/imx5-clock.h | |||
@@ -201,6 +201,19 @@ | |||
201 | #define IMX5_CLK_STEP_SEL 189 | 201 | #define IMX5_CLK_STEP_SEL 189 |
202 | #define IMX5_CLK_CPU_PODF_SEL 190 | 202 | #define IMX5_CLK_CPU_PODF_SEL 190 |
203 | #define IMX5_CLK_ARM 191 | 203 | #define IMX5_CLK_ARM 191 |
204 | #define IMX5_CLK_END 192 | 204 | #define IMX5_CLK_FIRI_PRED 192 |
205 | #define IMX5_CLK_FIRI_SEL 193 | ||
206 | #define IMX5_CLK_FIRI_PODF 194 | ||
207 | #define IMX5_CLK_FIRI_SERIAL_GATE 195 | ||
208 | #define IMX5_CLK_FIRI_IPG_GATE 196 | ||
209 | #define IMX5_CLK_CSI0_MCLK1_PRED 197 | ||
210 | #define IMX5_CLK_CSI0_MCLK1_SEL 198 | ||
211 | #define IMX5_CLK_CSI0_MCLK1_PODF 199 | ||
212 | #define IMX5_CLK_CSI0_MCLK1_GATE 200 | ||
213 | #define IMX5_CLK_IEEE1588_PRED 201 | ||
214 | #define IMX5_CLK_IEEE1588_SEL 202 | ||
215 | #define IMX5_CLK_IEEE1588_PODF 203 | ||
216 | #define IMX5_CLK_IEEE1588_GATE 204 | ||
217 | #define IMX5_CLK_END 205 | ||
205 | 218 | ||
206 | #endif /* __DT_BINDINGS_CLOCK_IMX5_H */ | 219 | #endif /* __DT_BINDINGS_CLOCK_IMX5_H */ |