diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2018-06-02 21:44:04 -0400 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2018-06-29 14:41:19 -0400 |
commit | debef195bd5c79210d60f1d6dec38bde3dae2b88 (patch) | |
tree | 1f7c7e76d6a9f4f56bd635bfa349cca0397ab6de | |
parent | 55c5e0c602c20cb6f350e5ae357cfd7e04ebb189 (diff) |
clk: imx6ul: add GPIO clock gates
i.MX6UL has GPIO clock gates in CCM CCGR,
add them into clock tree for clock management.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-rw-r--r-- | drivers/clk/imx/clk-imx6ul.c | 5 | ||||
-rw-r--r-- | include/dt-bindings/clock/imx6ul-clock.h | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/drivers/clk/imx/clk-imx6ul.c b/drivers/clk/imx/clk-imx6ul.c index ba563ba50b40..3ea2d97562fd 100644 --- a/drivers/clk/imx/clk-imx6ul.c +++ b/drivers/clk/imx/clk-imx6ul.c | |||
@@ -360,6 +360,7 @@ static void __init imx6ul_clocks_init(struct device_node *ccm_node) | |||
360 | clks[IMX6UL_CLK_UART2_SERIAL] = imx_clk_gate2("uart2_serial", "uart_podf", base + 0x68, 28); | 360 | clks[IMX6UL_CLK_UART2_SERIAL] = imx_clk_gate2("uart2_serial", "uart_podf", base + 0x68, 28); |
361 | if (clk_on_imx6ull()) | 361 | if (clk_on_imx6ull()) |
362 | clks[IMX6UL_CLK_AIPSTZ3] = imx_clk_gate2("aips_tz3", "ahb", base + 0x80, 18); | 362 | clks[IMX6UL_CLK_AIPSTZ3] = imx_clk_gate2("aips_tz3", "ahb", base + 0x80, 18); |
363 | clks[IMX6UL_CLK_GPIO2] = imx_clk_gate2("gpio2", "ipg", base + 0x68, 30); | ||
363 | 364 | ||
364 | /* CCGR1 */ | 365 | /* CCGR1 */ |
365 | clks[IMX6UL_CLK_ECSPI1] = imx_clk_gate2("ecspi1", "ecspi_podf", base + 0x6c, 0); | 366 | clks[IMX6UL_CLK_ECSPI1] = imx_clk_gate2("ecspi1", "ecspi_podf", base + 0x6c, 0); |
@@ -376,6 +377,8 @@ static void __init imx6ul_clocks_init(struct device_node *ccm_node) | |||
376 | clks[IMX6UL_CLK_GPT1_SERIAL] = imx_clk_gate2("gpt1_serial", "perclk", base + 0x6c, 22); | 377 | clks[IMX6UL_CLK_GPT1_SERIAL] = imx_clk_gate2("gpt1_serial", "perclk", base + 0x6c, 22); |
377 | clks[IMX6UL_CLK_UART4_IPG] = imx_clk_gate2("uart4_ipg", "ipg", base + 0x6c, 24); | 378 | clks[IMX6UL_CLK_UART4_IPG] = imx_clk_gate2("uart4_ipg", "ipg", base + 0x6c, 24); |
378 | clks[IMX6UL_CLK_UART4_SERIAL] = imx_clk_gate2("uart4_serial", "uart_podf", base + 0x6c, 24); | 379 | clks[IMX6UL_CLK_UART4_SERIAL] = imx_clk_gate2("uart4_serial", "uart_podf", base + 0x6c, 24); |
380 | clks[IMX6UL_CLK_GPIO1] = imx_clk_gate2("gpio1", "ipg", base + 0x6c, 26); | ||
381 | clks[IMX6UL_CLK_GPIO5] = imx_clk_gate2("gpio5", "ipg", base + 0x6c, 30); | ||
379 | 382 | ||
380 | /* CCGR2 */ | 383 | /* CCGR2 */ |
381 | if (clk_on_imx6ull()) { | 384 | if (clk_on_imx6ull()) { |
@@ -389,6 +392,7 @@ static void __init imx6ul_clocks_init(struct device_node *ccm_node) | |||
389 | clks[IMX6UL_CLK_I2C3] = imx_clk_gate2("i2c3", "perclk", base + 0x70, 10); | 392 | clks[IMX6UL_CLK_I2C3] = imx_clk_gate2("i2c3", "perclk", base + 0x70, 10); |
390 | clks[IMX6UL_CLK_OCOTP] = imx_clk_gate2("ocotp", "ipg", base + 0x70, 12); | 393 | clks[IMX6UL_CLK_OCOTP] = imx_clk_gate2("ocotp", "ipg", base + 0x70, 12); |
391 | clks[IMX6UL_CLK_IOMUXC] = imx_clk_gate2("iomuxc", "lcdif_podf", base + 0x70, 14); | 394 | clks[IMX6UL_CLK_IOMUXC] = imx_clk_gate2("iomuxc", "lcdif_podf", base + 0x70, 14); |
395 | clks[IMX6UL_CLK_GPIO3] = imx_clk_gate2("gpio3", "ipg", base + 0x70, 26); | ||
392 | clks[IMX6UL_CLK_LCDIF_APB] = imx_clk_gate2("lcdif_apb", "axi", base + 0x70, 28); | 396 | clks[IMX6UL_CLK_LCDIF_APB] = imx_clk_gate2("lcdif_apb", "axi", base + 0x70, 28); |
393 | clks[IMX6UL_CLK_PXP] = imx_clk_gate2("pxp", "axi", base + 0x70, 30); | 397 | clks[IMX6UL_CLK_PXP] = imx_clk_gate2("pxp", "axi", base + 0x70, 30); |
394 | 398 | ||
@@ -405,6 +409,7 @@ static void __init imx6ul_clocks_init(struct device_node *ccm_node) | |||
405 | clks[IMX6UL_CLK_UART6_IPG] = imx_clk_gate2("uart6_ipg", "ipg", base + 0x74, 6); | 409 | clks[IMX6UL_CLK_UART6_IPG] = imx_clk_gate2("uart6_ipg", "ipg", base + 0x74, 6); |
406 | clks[IMX6UL_CLK_UART6_SERIAL] = imx_clk_gate2("uart6_serial", "uart_podf", base + 0x74, 6); | 410 | clks[IMX6UL_CLK_UART6_SERIAL] = imx_clk_gate2("uart6_serial", "uart_podf", base + 0x74, 6); |
407 | clks[IMX6UL_CLK_LCDIF_PIX] = imx_clk_gate2("lcdif_pix", "lcdif_podf", base + 0x74, 10); | 411 | clks[IMX6UL_CLK_LCDIF_PIX] = imx_clk_gate2("lcdif_pix", "lcdif_podf", base + 0x74, 10); |
412 | clks[IMX6UL_CLK_GPIO4] = imx_clk_gate2("gpio4", "ipg", base + 0x74, 12); | ||
408 | clks[IMX6UL_CLK_QSPI] = imx_clk_gate2("qspi1", "qspi1_podf", base + 0x74, 14); | 413 | clks[IMX6UL_CLK_QSPI] = imx_clk_gate2("qspi1", "qspi1_podf", base + 0x74, 14); |
409 | clks[IMX6UL_CLK_WDOG1] = imx_clk_gate2("wdog1", "ipg", base + 0x74, 16); | 414 | clks[IMX6UL_CLK_WDOG1] = imx_clk_gate2("wdog1", "ipg", base + 0x74, 16); |
410 | clks[IMX6UL_CLK_MMDC_P0_FAST] = imx_clk_gate("mmdc_p0_fast", "mmdc_podf", base + 0x74, 20); | 415 | clks[IMX6UL_CLK_MMDC_P0_FAST] = imx_clk_gate("mmdc_p0_fast", "mmdc_podf", base + 0x74, 20); |
diff --git a/include/dt-bindings/clock/imx6ul-clock.h b/include/dt-bindings/clock/imx6ul-clock.h index 0aa1d9c3e0b9..f8e0476a3a0e 100644 --- a/include/dt-bindings/clock/imx6ul-clock.h +++ b/include/dt-bindings/clock/imx6ul-clock.h | |||
@@ -254,6 +254,12 @@ | |||
254 | #define IMX6UL_CLK_CKO2_PODF 241 | 254 | #define IMX6UL_CLK_CKO2_PODF 241 |
255 | #define IMX6UL_CLK_CKO2 242 | 255 | #define IMX6UL_CLK_CKO2 242 |
256 | #define IMX6UL_CLK_CKO 243 | 256 | #define IMX6UL_CLK_CKO 243 |
257 | #define IMX6UL_CLK_END 244 | 257 | #define IMX6UL_CLK_GPIO1 244 |
258 | #define IMX6UL_CLK_GPIO2 245 | ||
259 | #define IMX6UL_CLK_GPIO3 246 | ||
260 | #define IMX6UL_CLK_GPIO4 247 | ||
261 | #define IMX6UL_CLK_GPIO5 248 | ||
262 | |||
263 | #define IMX6UL_CLK_END 249 | ||
258 | 264 | ||
259 | #endif /* __DT_BINDINGS_CLOCK_IMX6UL_H */ | 265 | #endif /* __DT_BINDINGS_CLOCK_IMX6UL_H */ |