aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/tegra/clk-pll.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/tegra/clk-pll.c')
-rw-r--r--drivers/clk/tegra/clk-pll.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/drivers/clk/tegra/clk-pll.c b/drivers/clk/tegra/clk-pll.c
index 6aad8abc69a2..637b62ccc91e 100644
--- a/drivers/clk/tegra/clk-pll.c
+++ b/drivers/clk/tegra/clk-pll.c
@@ -96,10 +96,20 @@
96 (PLLE_SS_MAX_VAL | PLLE_SS_INC_VAL | PLLE_SS_INCINTRV_VAL) 96 (PLLE_SS_MAX_VAL | PLLE_SS_INC_VAL | PLLE_SS_INCINTRV_VAL)
97 97
98#define PLLE_AUX_PLLP_SEL BIT(2) 98#define PLLE_AUX_PLLP_SEL BIT(2)
99#define PLLE_AUX_USE_LOCKDET BIT(3)
99#define PLLE_AUX_ENABLE_SWCTL BIT(4) 100#define PLLE_AUX_ENABLE_SWCTL BIT(4)
101#define PLLE_AUX_SS_SWCTL BIT(6)
100#define PLLE_AUX_SEQ_ENABLE BIT(24) 102#define PLLE_AUX_SEQ_ENABLE BIT(24)
103#define PLLE_AUX_SEQ_START_STATE BIT(25)
101#define PLLE_AUX_PLLRE_SEL BIT(28) 104#define PLLE_AUX_PLLRE_SEL BIT(28)
102 105
106#define XUSBIO_PLL_CFG0 0x51c
107#define XUSBIO_PLL_CFG0_PADPLL_RESET_SWCTL BIT(0)
108#define XUSBIO_PLL_CFG0_CLK_ENABLE_SWCTL BIT(2)
109#define XUSBIO_PLL_CFG0_PADPLL_USE_LOCKDET BIT(6)
110#define XUSBIO_PLL_CFG0_SEQ_ENABLE BIT(24)
111#define XUSBIO_PLL_CFG0_SEQ_START_STATE BIT(25)
112
103#define PLLE_MISC_PLLE_PTS BIT(8) 113#define PLLE_MISC_PLLE_PTS BIT(8)
104#define PLLE_MISC_IDDQ_SW_VALUE BIT(13) 114#define PLLE_MISC_IDDQ_SW_VALUE BIT(13)
105#define PLLE_MISC_IDDQ_SW_CTRL BIT(14) 115#define PLLE_MISC_IDDQ_SW_CTRL BIT(14)
@@ -1328,7 +1338,28 @@ static int clk_plle_tegra114_enable(struct clk_hw *hw)
1328 pll_writel(val, PLLE_SS_CTRL, pll); 1338 pll_writel(val, PLLE_SS_CTRL, pll);
1329 udelay(1); 1339 udelay(1);
1330 1340
1331 /* TODO: enable hw control of xusb brick pll */ 1341 /* Enable hw control of xusb brick pll */
1342 val = pll_readl_misc(pll);
1343 val &= ~PLLE_MISC_IDDQ_SW_CTRL;
1344 pll_writel_misc(val, pll);
1345
1346 val = pll_readl(pll->params->aux_reg, pll);
1347 val |= (PLLE_AUX_USE_LOCKDET | PLLE_AUX_SEQ_START_STATE);
1348 val &= ~(PLLE_AUX_ENABLE_SWCTL | PLLE_AUX_SS_SWCTL);
1349 pll_writel(val, pll->params->aux_reg, pll);
1350 udelay(1);
1351 val |= PLLE_AUX_SEQ_ENABLE;
1352 pll_writel(val, pll->params->aux_reg, pll);
1353
1354 val = pll_readl(XUSBIO_PLL_CFG0, pll);
1355 val |= (XUSBIO_PLL_CFG0_PADPLL_USE_LOCKDET |
1356 XUSBIO_PLL_CFG0_SEQ_START_STATE);
1357 val &= ~(XUSBIO_PLL_CFG0_CLK_ENABLE_SWCTL |
1358 XUSBIO_PLL_CFG0_PADPLL_RESET_SWCTL);
1359 pll_writel(val, XUSBIO_PLL_CFG0, pll);
1360 udelay(1);
1361 val |= XUSBIO_PLL_CFG0_SEQ_ENABLE;
1362 pll_writel(val, XUSBIO_PLL_CFG0, pll);
1332 1363
1333out: 1364out:
1334 if (pll->lock) 1365 if (pll->lock)