Skip to content

Commit 745d755

Browse files
Taniya Dasandersson
authored andcommitted
clk: qcom: clk-alpha-pll: Add support for controlling Taycan PLLs
Add clock ops for Taycan PLL, add the register offsets for supporting the PLL. Signed-off-by: Melody Olvera <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Taniya Das <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent c035a9e commit 745d755

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

drivers/clk/qcom/clk-alpha-pll.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,20 @@ const u8 clk_alpha_pll_regs[][PLL_OFF_MAX_REGS] = {
197197
[PLL_OFF_TEST_CTL_U1] = 0x34,
198198
[PLL_OFF_TEST_CTL_U2] = 0x38,
199199
},
200+
[CLK_ALPHA_PLL_TYPE_TAYCAN_ELU] = {
201+
[PLL_OFF_OPMODE] = 0x04,
202+
[PLL_OFF_STATE] = 0x08,
203+
[PLL_OFF_STATUS] = 0x0c,
204+
[PLL_OFF_L_VAL] = 0x10,
205+
[PLL_OFF_ALPHA_VAL] = 0x14,
206+
[PLL_OFF_USER_CTL] = 0x18,
207+
[PLL_OFF_USER_CTL_U] = 0x1c,
208+
[PLL_OFF_CONFIG_CTL] = 0x20,
209+
[PLL_OFF_CONFIG_CTL_U] = 0x24,
210+
[PLL_OFF_CONFIG_CTL_U1] = 0x28,
211+
[PLL_OFF_TEST_CTL] = 0x2c,
212+
[PLL_OFF_TEST_CTL_U] = 0x30,
213+
},
200214
[CLK_ALPHA_PLL_TYPE_RIVIAN_EVO] = {
201215
[PLL_OFF_OPMODE] = 0x04,
202216
[PLL_OFF_STATUS] = 0x0c,

drivers/clk/qcom/clk-alpha-pll.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ enum {
2727
CLK_ALPHA_PLL_TYPE_ZONDA_OLE,
2828
CLK_ALPHA_PLL_TYPE_LUCID_EVO,
2929
CLK_ALPHA_PLL_TYPE_LUCID_OLE,
30+
CLK_ALPHA_PLL_TYPE_TAYCAN_ELU,
3031
CLK_ALPHA_PLL_TYPE_RIVIAN_EVO,
3132
CLK_ALPHA_PLL_TYPE_DEFAULT_EVO,
3233
CLK_ALPHA_PLL_TYPE_BRAMMO_EVO,
@@ -185,12 +186,15 @@ extern const struct clk_ops clk_alpha_pll_zonda_ops;
185186
#define clk_alpha_pll_zonda_ole_ops clk_alpha_pll_zonda_ops
186187

187188
extern const struct clk_ops clk_alpha_pll_lucid_evo_ops;
189+
#define clk_alpha_pll_taycan_elu_ops clk_alpha_pll_lucid_evo_ops
188190
extern const struct clk_ops clk_alpha_pll_reset_lucid_evo_ops;
189191
#define clk_alpha_pll_reset_lucid_ole_ops clk_alpha_pll_reset_lucid_evo_ops
190192
extern const struct clk_ops clk_alpha_pll_fixed_lucid_evo_ops;
191193
#define clk_alpha_pll_fixed_lucid_ole_ops clk_alpha_pll_fixed_lucid_evo_ops
194+
#define clk_alpha_pll_fixed_taycan_elu_ops clk_alpha_pll_fixed_lucid_evo_ops
192195
extern const struct clk_ops clk_alpha_pll_postdiv_lucid_evo_ops;
193196
#define clk_alpha_pll_postdiv_lucid_ole_ops clk_alpha_pll_postdiv_lucid_evo_ops
197+
#define clk_alpha_pll_postdiv_taycan_elu_ops clk_alpha_pll_postdiv_lucid_evo_ops
194198

195199
extern const struct clk_ops clk_alpha_pll_rivian_evo_ops;
196200
#define clk_alpha_pll_postdiv_rivian_evo_ops clk_alpha_pll_postdiv_fabia_ops
@@ -218,6 +222,9 @@ void clk_lucid_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regma
218222
const struct alpha_pll_config *config);
219223
void clk_lucid_ole_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,
220224
const struct alpha_pll_config *config);
225+
#define clk_taycan_elu_pll_configure(pll, regmap, config) \
226+
clk_lucid_evo_pll_configure(pll, regmap, config)
227+
221228
void clk_rivian_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,
222229
const struct alpha_pll_config *config);
223230
void clk_stromer_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,

0 commit comments

Comments
 (0)