Skip to content

Commit dc99bbf

Browse files
Konrad Dybcioandersson
authored andcommitted
clk: qcom: alpha: Add support for programming the PLL_FSM_LEGACY_MODE bit
This is used on at least SM6375 and its variations. Signed-off-by: Konrad Dybcio <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e3ae3e8 commit dc99bbf

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
# define PLL_VOTE_FSM_RESET BIT(21)
2828
# define PLL_UPDATE BIT(22)
2929
# define PLL_UPDATE_BYPASS BIT(23)
30+
# define PLL_FSM_LEGACY_MODE BIT(24)
3031
# define PLL_OFFLINE_ACK BIT(28)
3132
# define ALPHA_PLL_ACK_LATCH BIT(29)
3233
# define PLL_ACTIVE_FLAG BIT(30)
@@ -1123,6 +1124,10 @@ void clk_fabia_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,
11231124
regmap_update_bits(regmap, PLL_USER_CTL(pll), mask, val);
11241125
}
11251126

1127+
if (pll->flags & SUPPORTS_FSM_LEGACY_MODE)
1128+
regmap_update_bits(regmap, PLL_MODE(pll), PLL_FSM_LEGACY_MODE,
1129+
PLL_FSM_LEGACY_MODE);
1130+
11261131
regmap_update_bits(regmap, PLL_MODE(pll), PLL_UPDATE_BYPASS,
11271132
PLL_UPDATE_BYPASS);
11281133

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,10 @@ struct clk_alpha_pll {
7272

7373
const struct pll_vco *vco_table;
7474
size_t num_vco;
75-
#define SUPPORTS_OFFLINE_REQ BIT(0)
76-
#define SUPPORTS_FSM_MODE BIT(2)
75+
#define SUPPORTS_OFFLINE_REQ BIT(0)
76+
#define SUPPORTS_FSM_MODE BIT(2)
7777
#define SUPPORTS_DYNAMIC_UPDATE BIT(3)
78+
#define SUPPORTS_FSM_LEGACY_MODE BIT(4)
7879
u8 flags;
7980

8081
struct clk_regmap clkr;

0 commit comments

Comments
 (0)