Skip to content

Commit 0e548d5

Browse files
cyndisp2mate-nv
authored andcommitted
clk: tegra: Use XUSB-compatible SATA PLL sequence
Use a sequence for enabling hardware control of the SATA PLL that works both when using the SATA lane with SATA and when using it with XUSB. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
1 parent 9f0030c commit 0e548d5

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎drivers/clk/tegra/clk-pll.c‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@
112112

113113
#define SATA_PLL_CFG0 0x490
114114
#define SATA_PLL_CFG0_PADPLL_RESET_SWCTL BIT(0)
115+
#define SATA_PLL_CFG0_PADPLL_USE_LOCKDET BIT(2)
116+
#define SATA_PLL_CFG0_SEQ_ENABLE BIT(24)
117+
#define SATA_PLL_CFG0_SEQ_START_STATE BIT(25)
115118

116119
#define PLLE_MISC_PLLE_PTS BIT(8)
117120
#define PLLE_MISC_IDDQ_SW_VALUE BIT(13)
@@ -1367,6 +1370,14 @@ static int clk_plle_tegra114_enable(struct clk_hw *hw)
13671370
/* Enable hw control of SATA pll */
13681371
val = pll_readl(SATA_PLL_CFG0, pll);
13691372
val &= ~SATA_PLL_CFG0_PADPLL_RESET_SWCTL;
1373+
val |= SATA_PLL_CFG0_PADPLL_USE_LOCKDET;
1374+
val |= SATA_PLL_CFG0_SEQ_START_STATE;
1375+
pll_writel(val, SATA_PLL_CFG0, pll);
1376+
1377+
udelay(1);
1378+
1379+
val = pll_readl(SATA_PLL_CFG0, pll);
1380+
val |= SATA_PLL_CFG0_SEQ_ENABLE;
13701381
pll_writel(val, SATA_PLL_CFG0, pll);
13711382

13721383
out:

0 commit comments

Comments
 (0)