Lines Matching +full:pll +full:- +full:1

1 // SPDX-License-Identifier: GPL-2.0-only
20 struct dss_pll pll; member
32 REG_MOD(vpll->clkctrl_base, 1, 14, 14); /* CIO_CLK_ICG */ in dss_dpll_enable_scp_clk()
37 REG_MOD(vpll->clkctrl_base, 0, 14, 14); /* CIO_CLK_ICG */ in dss_dpll_disable_scp_clk()
42 REG_MOD(vpll->clkctrl_base, 2, 31, 30); /* PLL_POWER_ON_ALL */ in dss_dpll_power_enable()
45 * DRA7x PLL CTRL's PLL_PWR_STATUS seems to always return 0, in dss_dpll_power_enable()
48 msleep(1); in dss_dpll_power_enable()
53 REG_MOD(vpll->clkctrl_base, 0, 31, 30); /* PLL_POWER_OFF */ in dss_dpll_power_disable()
56 static int dss_video_pll_enable(struct dss_pll *pll) in dss_video_pll_enable() argument
58 struct dss_video_pll *vpll = container_of(pll, struct dss_video_pll, pll); in dss_video_pll_enable()
65 dss_ctrl_pll_enable(pll->id, true); in dss_video_pll_enable()
69 r = dss_pll_wait_reset_done(pll); in dss_video_pll_enable()
79 dss_ctrl_pll_enable(pll->id, false); in dss_video_pll_enable()
85 static void dss_video_pll_disable(struct dss_pll *pll) in dss_video_pll_disable() argument
87 struct dss_video_pll *vpll = container_of(pll, struct dss_video_pll, pll); in dss_video_pll_disable()
93 dss_ctrl_pll_enable(pll->id, false); in dss_video_pll_disable()
105 .n_max = (1 << 8) - 1,
106 .m_max = (1 << 12) - 1,
107 .mX_max = (1 << 5) - 1,
113 .n_lsb = 1,
119 .mX_msb[1] = 30,
120 .mX_lsb[1] = 26,
135 struct dss_pll *pll; in dss_video_pll_init() local
138 /* PLL CONTROL */ in dss_video_pll_init()
142 dev_err(&pdev->dev, "failed to ioremap pll%d reg_name\n", id); in dss_video_pll_init()
150 dev_err(&pdev->dev, "failed to ioremap pll%d clkctrl\n", id); in dss_video_pll_init()
156 clk = devm_clk_get(&pdev->dev, clkin_name[id]); in dss_video_pll_init()
158 DSSERR("can't get video pll clkin\n"); in dss_video_pll_init()
162 vpll = devm_kzalloc(&pdev->dev, sizeof(*vpll), GFP_KERNEL); in dss_video_pll_init()
164 return ERR_PTR(-ENOMEM); in dss_video_pll_init()
166 vpll->dev = &pdev->dev; in dss_video_pll_init()
167 vpll->clkctrl_base = clkctrl_base; in dss_video_pll_init()
169 pll = &vpll->pll; in dss_video_pll_init()
171 pll->name = id == 0 ? "video0" : "video1"; in dss_video_pll_init()
172 pll->id = id == 0 ? DSS_PLL_VIDEO1 : DSS_PLL_VIDEO2; in dss_video_pll_init()
173 pll->clkin = clk; in dss_video_pll_init()
174 pll->regulator = regulator; in dss_video_pll_init()
175 pll->base = pll_base; in dss_video_pll_init()
176 pll->hw = &dss_dra7_video_pll_hw; in dss_video_pll_init()
177 pll->ops = &dss_pll_ops; in dss_video_pll_init()
179 r = dss_pll_register(pll); in dss_video_pll_init()
183 return pll; in dss_video_pll_init()
186 void dss_video_pll_uninit(struct dss_pll *pll) in dss_video_pll_uninit() argument
188 dss_pll_unregister(pll); in dss_video_pll_uninit()