Skip to content

Commit 1fa2d1a

Browse files
Kiciukandersson
authored andcommitted
clk: qcom: hfpll: Add MSM8976 PLL data
Add PLL configuration for MSM8976 SoC, this SoC offers 3 HFPLL. Small cluster offers two presets for 652-902Mhz range and 902Mhz-1.47Ghz. For simplicity only add second range as smaller frequencies can be obtained via apcs divider or safe parent this also saves us a hassle of reconfiguring VCO bit and config_val. A72 and CCI cluster only use single frequency range with their outputs/post_dividers/vco_bits being static. Signed-off-by: Adam Skladowski <a39.skl@gmail.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20230812112534.8610-6-a39.skl@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent de37ca2 commit 1fa2d1a

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

drivers/clk/qcom/hfpll.c

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,62 @@ static const struct hfpll_data hdata = {
3232
.max_rate = 2900000000UL,
3333
};
3434

35+
static const struct hfpll_data msm8976_a53 = {
36+
.mode_reg = 0x00,
37+
.l_reg = 0x04,
38+
.m_reg = 0x08,
39+
.n_reg = 0x0c,
40+
.user_reg = 0x10,
41+
.config_reg = 0x14,
42+
.config_val = 0x341600,
43+
.status_reg = 0x1c,
44+
.lock_bit = 16,
45+
46+
.l_val = 0x35,
47+
.user_val = 0x109,
48+
.min_rate = 902400000UL,
49+
.max_rate = 1478400000UL,
50+
};
51+
52+
static const struct hfpll_data msm8976_a72 = {
53+
.mode_reg = 0x00,
54+
.l_reg = 0x04,
55+
.m_reg = 0x08,
56+
.n_reg = 0x0c,
57+
.user_reg = 0x10,
58+
.config_reg = 0x14,
59+
.config_val = 0x4e0405d,
60+
.status_reg = 0x1c,
61+
.lock_bit = 16,
62+
63+
.l_val = 0x3e,
64+
.user_val = 0x100109,
65+
.min_rate = 940800000UL,
66+
.max_rate = 2016000000UL,
67+
};
68+
69+
static const struct hfpll_data msm8976_cci = {
70+
.mode_reg = 0x00,
71+
.l_reg = 0x04,
72+
.m_reg = 0x08,
73+
.n_reg = 0x0c,
74+
.user_reg = 0x10,
75+
.config_reg = 0x14,
76+
.config_val = 0x141400,
77+
.status_reg = 0x1c,
78+
.lock_bit = 16,
79+
80+
.l_val = 0x20,
81+
.user_val = 0x100109,
82+
.min_rate = 556800000UL,
83+
.max_rate = 902400000UL,
84+
};
85+
3586
static const struct of_device_id qcom_hfpll_match_table[] = {
3687
{ .compatible = "qcom,hfpll", .data = &hdata },
88+
{ .compatible = "qcom,msm8976-hfpll-a53", .data = &msm8976_a53 },
89+
{ .compatible = "qcom,msm8976-hfpll-a72", .data = &msm8976_a72 },
90+
{ .compatible = "qcom,msm8976-hfpll-cci", .data = &msm8976_cci },
3791
{ }
3892
};
3993
MODULE_DEVICE_TABLE(of, qcom_hfpll_match_table);

0 commit comments

Comments
 (0)