diff options
-rw-r--r-- | arch/arm/mach-imx/clk-imx6sx.c | 25 | ||||
-rw-r--r-- | include/dt-bindings/clock/imx6sx-clock.h | 6 |
2 files changed, 29 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/clk-imx6sx.c b/arch/arm/mach-imx/clk-imx6sx.c index 757dbdbd4ec1..cb8b1a7e2cab 100644 --- a/arch/arm/mach-imx/clk-imx6sx.c +++ b/arch/arm/mach-imx/clk-imx6sx.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright 2014 Freescale Semiconductor, Inc. | 2 | * Copyright (C) 2014 Freescale Semiconductor, Inc. |
3 | * | 3 | * |
4 | * The code contained herein is licensed under the GNU General Public | 4 | * The code contained herein is licensed under the GNU General Public |
5 | * License. You may obtain a copy of the GNU General Public License | 5 | * License. You may obtain a copy of the GNU General Public License |
@@ -159,6 +159,13 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) | |||
159 | clks[IMX6SX_CLK_ENET_REF] = clk_register_divider_table(NULL, "enet_ref", "pll6_enet", 0, | 159 | clks[IMX6SX_CLK_ENET_REF] = clk_register_divider_table(NULL, "enet_ref", "pll6_enet", 0, |
160 | base + 0xe0, 0, 2, 0, clk_enet_ref_table, | 160 | base + 0xe0, 0, 2, 0, clk_enet_ref_table, |
161 | &imx_ccm_lock); | 161 | &imx_ccm_lock); |
162 | clks[IMX6SX_CLK_ENET2_REF] = clk_register_divider_table(NULL, "enet2_ref", "pll6_enet", 0, | ||
163 | base + 0xe0, 2, 2, 0, clk_enet_ref_table, | ||
164 | &imx_ccm_lock); | ||
165 | clks[IMX6SX_CLK_ENET2_REF_125M] = imx_clk_gate("enet2_ref_125m", "enet2_ref", base + 0xe0, 20); | ||
166 | |||
167 | clks[IMX6SX_CLK_ENET_PTP_REF] = imx_clk_fixed_factor("enet_ptp_ref", "pll6_enet", 1, 20); | ||
168 | clks[IMX6SX_CLK_ENET_PTP] = imx_clk_gate("enet_ptp_25m", "enet_ptp_ref", base + 0xe0, 21); | ||
162 | 169 | ||
163 | /* name parent_name reg idx */ | 170 | /* name parent_name reg idx */ |
164 | clks[IMX6SX_CLK_PLL2_PFD0] = imx_clk_pfd("pll2_pfd0_352m", "pll2_bus", base + 0x100, 0); | 171 | clks[IMX6SX_CLK_PLL2_PFD0] = imx_clk_pfd("pll2_pfd0_352m", "pll2_bus", base + 0x100, 0); |
@@ -423,6 +430,22 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) | |||
423 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) | 430 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) |
424 | clk_prepare_enable(clks[clks_init_on[i]]); | 431 | clk_prepare_enable(clks[clks_init_on[i]]); |
425 | 432 | ||
433 | /* | ||
434 | * Init enet system AHB clock, set to 200Mhz | ||
435 | * pll2_pfd2_396m-> ENET_PODF-> ENET_AHB | ||
436 | */ | ||
437 | clk_set_parent(clks[IMX6SX_CLK_ENET_PRE_SEL], clks[IMX6SX_CLK_PLL2_PFD2]); | ||
438 | clk_set_parent(clks[IMX6SX_CLK_ENET_SEL], clks[IMX6SX_CLK_ENET_PODF]); | ||
439 | clk_set_rate(clks[IMX6SX_CLK_ENET_PODF], 200000000); | ||
440 | clk_set_rate(clks[IMX6SX_CLK_ENET_REF], 125000000); | ||
441 | clk_set_rate(clks[IMX6SX_CLK_ENET2_REF], 125000000); | ||
442 | |||
443 | /* | ||
444 | * Need to keep the ENET clocks enabled, else the system | ||
445 | * hangs when ENET clocks are disabled in the driver. | ||
446 | */ | ||
447 | clk_prepare_enable(clks[IMX6SX_CLK_ENET]); | ||
448 | |||
426 | /* Set initial power mode */ | 449 | /* Set initial power mode */ |
427 | imx6_set_lpm(WAIT_CLOCKED); | 450 | imx6_set_lpm(WAIT_CLOCKED); |
428 | 451 | ||
diff --git a/include/dt-bindings/clock/imx6sx-clock.h b/include/dt-bindings/clock/imx6sx-clock.h index 10c81341d1ab..49db3fb9f188 100644 --- a/include/dt-bindings/clock/imx6sx-clock.h +++ b/include/dt-bindings/clock/imx6sx-clock.h | |||
@@ -238,6 +238,10 @@ | |||
238 | #define IMX6SX_CLK_ENET_AHB 225 | 238 | #define IMX6SX_CLK_ENET_AHB 225 |
239 | #define IMX6SX_CLK_OCRAM_PODF 226 | 239 | #define IMX6SX_CLK_OCRAM_PODF 226 |
240 | #define IMX6SX_CLK_GPT_3M 227 | 240 | #define IMX6SX_CLK_GPT_3M 227 |
241 | #define IMX6SX_CLK_CLK_END 228 | 241 | #define IMX6SX_CLK_ENET_PTP 228 |
242 | #define IMX6SX_CLK_ENET_PTP_REF 229 | ||
243 | #define IMX6SX_CLK_ENET2_REF 230 | ||
244 | #define IMX6SX_CLK_ENET2_REF_125M 231 | ||
245 | #define IMX6SX_CLK_CLK_END 232 | ||
242 | 246 | ||
243 | #endif /* __DT_BINDINGS_CLOCK_IMX6SX_H */ | 247 | #endif /* __DT_BINDINGS_CLOCK_IMX6SX_H */ |