diff options
author | Paul Walmsley <pwalmsley@nvidia.com> | 2013-06-07 08:19:01 -0400 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2013-06-18 14:28:48 -0400 |
commit | 9e60121fd18c22851c19ec04e8e58172cb5a7d2c (patch) | |
tree | f18ed1d621ad45f907afc950f3521ccb4685bc30 | |
parent | 25c9ded6ed31184379c9b153ff37621fc323b084 (diff) |
clk: tegra: T114: add DFLL source clocks
Add the input clocks needed by the DFLL IP blocks. Initialize them to
51MHz (as required by the DFLL GFD) and to use the PLL_P clock source.
This patch is a collaboration with Peter De Schrijver
<pdeschrijver@nvidia.com>.
Thanks to Laxman Dewangan <ldewangan@nvidia.com> for identifying the
requirement to keep the DFLL clocks enabled to resolve PWR_I2C timeout
issues.
Signed-off-by: Paul Walmsley <pwalmsley@nvidia.com>
Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
Reviewed-by: Andrew Chew <achew@nvidia.com>
Cc: Matthew Longnecker <mlongnecker@nvidia.com>
Cc: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
-rw-r--r-- | drivers/clk/tegra/clk-tegra114.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/clk/tegra/clk-tegra114.c b/drivers/clk/tegra/clk-tegra114.c index 23244e476615..ccfff33e00b7 100644 --- a/drivers/clk/tegra/clk-tegra114.c +++ b/drivers/clk/tegra/clk-tegra114.c | |||
@@ -269,6 +269,8 @@ | |||
269 | #define CLK_SOURCE_I2CSLOW 0x3fc | 269 | #define CLK_SOURCE_I2CSLOW 0x3fc |
270 | #define CLK_SOURCE_SE 0x42c | 270 | #define CLK_SOURCE_SE 0x42c |
271 | #define CLK_SOURCE_MSELECT 0x3b4 | 271 | #define CLK_SOURCE_MSELECT 0x3b4 |
272 | #define CLK_SOURCE_DFLL_REF 0x62c | ||
273 | #define CLK_SOURCE_DFLL_SOC 0x630 | ||
272 | #define CLK_SOURCE_SOC_THERM 0x644 | 274 | #define CLK_SOURCE_SOC_THERM 0x644 |
273 | #define CLK_SOURCE_XUSB_HOST_SRC 0x600 | 275 | #define CLK_SOURCE_XUSB_HOST_SRC 0x600 |
274 | #define CLK_SOURCE_XUSB_FALCON_SRC 0x604 | 276 | #define CLK_SOURCE_XUSB_FALCON_SRC 0x604 |
@@ -875,6 +877,7 @@ enum tegra114_clk { | |||
875 | audio1, audio2, audio3, audio4, spdif, clk_out_1, clk_out_2, clk_out_3, | 877 | audio1, audio2, audio3, audio4, spdif, clk_out_1, clk_out_2, clk_out_3, |
876 | blink, xusb_host_src = 252, xusb_falcon_src, xusb_fs_src, xusb_ss_src, | 878 | blink, xusb_host_src = 252, xusb_falcon_src, xusb_fs_src, xusb_ss_src, |
877 | xusb_dev_src, xusb_dev, xusb_hs_src, sclk, hclk, pclk, cclk_g, cclk_lp, | 879 | xusb_dev_src, xusb_dev, xusb_hs_src, sclk, hclk, pclk, cclk_g, cclk_lp, |
880 | dfll_ref = 264, dfll_soc, | ||
878 | 881 | ||
879 | /* Mux clocks */ | 882 | /* Mux clocks */ |
880 | 883 | ||
@@ -1879,6 +1882,8 @@ static struct tegra_periph_init_data tegra_periph_clk_list[] = { | |||
1879 | TEGRA_INIT_DATA_MUX("i2cslow", NULL, "i2cslow", mux_pllp_pllc_clk32_clkm, CLK_SOURCE_I2CSLOW, 81, &periph_u_regs, TEGRA_PERIPH_ON_APB, i2cslow), | 1882 | TEGRA_INIT_DATA_MUX("i2cslow", NULL, "i2cslow", mux_pllp_pllc_clk32_clkm, CLK_SOURCE_I2CSLOW, 81, &periph_u_regs, TEGRA_PERIPH_ON_APB, i2cslow), |
1880 | TEGRA_INIT_DATA_INT8("se", NULL, "se", mux_pllp_pllc2_c_c3_pllm_clkm, CLK_SOURCE_SE, 127, &periph_v_regs, TEGRA_PERIPH_ON_APB, se), | 1883 | TEGRA_INIT_DATA_INT8("se", NULL, "se", mux_pllp_pllc2_c_c3_pllm_clkm, CLK_SOURCE_SE, 127, &periph_v_regs, TEGRA_PERIPH_ON_APB, se), |
1881 | TEGRA_INIT_DATA_INT_FLAGS("mselect", NULL, "mselect", mux_pllp_clkm, CLK_SOURCE_MSELECT, 99, &periph_v_regs, 0, mselect, CLK_IGNORE_UNUSED), | 1884 | TEGRA_INIT_DATA_INT_FLAGS("mselect", NULL, "mselect", mux_pllp_clkm, CLK_SOURCE_MSELECT, 99, &periph_v_regs, 0, mselect, CLK_IGNORE_UNUSED), |
1885 | TEGRA_INIT_DATA_MUX("dfll_ref", "ref", "t114_dfll", mux_pllp_clkm, CLK_SOURCE_DFLL_REF, 155, &periph_w_regs, TEGRA_PERIPH_ON_APB, dfll_ref), | ||
1886 | TEGRA_INIT_DATA_MUX("dfll_soc", "soc", "t114_dfll", mux_pllp_clkm, CLK_SOURCE_DFLL_SOC, 155, &periph_w_regs, TEGRA_PERIPH_ON_APB, dfll_soc), | ||
1882 | TEGRA_INIT_DATA_MUX8("soc_therm", NULL, "soc_therm", mux_pllm_pllc_pllp_plla, CLK_SOURCE_SOC_THERM, 78, &periph_u_regs, TEGRA_PERIPH_ON_APB, soc_therm), | 1887 | TEGRA_INIT_DATA_MUX8("soc_therm", NULL, "soc_therm", mux_pllm_pllc_pllp_plla, CLK_SOURCE_SOC_THERM, 78, &periph_u_regs, TEGRA_PERIPH_ON_APB, soc_therm), |
1883 | TEGRA_INIT_DATA_XUSB("xusb_host_src", "host_src", "tegra_xhci", mux_clkm_pllp_pllc_pllre, CLK_SOURCE_XUSB_HOST_SRC, 143, &periph_w_regs, TEGRA_PERIPH_ON_APB | TEGRA_PERIPH_NO_RESET, xusb_host_src), | 1888 | TEGRA_INIT_DATA_XUSB("xusb_host_src", "host_src", "tegra_xhci", mux_clkm_pllp_pllc_pllre, CLK_SOURCE_XUSB_HOST_SRC, 143, &periph_w_regs, TEGRA_PERIPH_ON_APB | TEGRA_PERIPH_NO_RESET, xusb_host_src), |
1884 | TEGRA_INIT_DATA_XUSB("xusb_falcon_src", "falcon_src", "tegra_xhci", mux_clkm_pllp_pllc_pllre, CLK_SOURCE_XUSB_FALCON_SRC, 143, &periph_w_regs, TEGRA_PERIPH_NO_RESET, xusb_falcon_src), | 1889 | TEGRA_INIT_DATA_XUSB("xusb_falcon_src", "falcon_src", "tegra_xhci", mux_clkm_pllp_pllc_pllre, CLK_SOURCE_XUSB_FALCON_SRC, 143, &periph_w_regs, TEGRA_PERIPH_NO_RESET, xusb_falcon_src), |
@@ -2122,6 +2127,10 @@ static const struct of_device_id pmc_match[] __initconst = { | |||
2122 | {}, | 2127 | {}, |
2123 | }; | 2128 | }; |
2124 | 2129 | ||
2130 | /* | ||
2131 | * dfll_soc/dfll_ref apparently must be kept enabled, otherwise I2C5 | ||
2132 | * breaks | ||
2133 | */ | ||
2125 | static __initdata struct tegra_clk_init_table init_table[] = { | 2134 | static __initdata struct tegra_clk_init_table init_table[] = { |
2126 | {uarta, pll_p, 408000000, 0}, | 2135 | {uarta, pll_p, 408000000, 0}, |
2127 | {uartb, pll_p, 408000000, 0}, | 2136 | {uartb, pll_p, 408000000, 0}, |
@@ -2137,6 +2146,8 @@ static __initdata struct tegra_clk_init_table init_table[] = { | |||
2137 | {i2s2, pll_a_out0, 11289600, 0}, | 2146 | {i2s2, pll_a_out0, 11289600, 0}, |
2138 | {i2s3, pll_a_out0, 11289600, 0}, | 2147 | {i2s3, pll_a_out0, 11289600, 0}, |
2139 | {i2s4, pll_a_out0, 11289600, 0}, | 2148 | {i2s4, pll_a_out0, 11289600, 0}, |
2149 | {dfll_soc, pll_p, 51000000, 1}, | ||
2150 | {dfll_ref, pll_p, 51000000, 1}, | ||
2140 | {clk_max, clk_max, 0, 0}, /* This MUST be the last entry. */ | 2151 | {clk_max, clk_max, 0, 0}, /* This MUST be the last entry. */ |
2141 | }; | 2152 | }; |
2142 | 2153 | ||