Skip to content

Commit 945cb3a

Browse files
anderssonbebarino
authored andcommitted
clk: qcom: gpucc-sm8150: Add SC8180x support
The GPU clock controller found in SC8180x is a variant of the same block found in SM8150, but with one additional clock frequency for the gmu_clk_src clock. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20210721225329.3035779-1-bjorn.andersson@linaro.org Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 48662d9 commit 945cb3a

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

Documentation/devicetree/bindings/clock/qcom,gpucc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ properties:
2626
- qcom,sdm845-gpucc
2727
- qcom,sc7180-gpucc
2828
- qcom,sc7280-gpucc
29+
- qcom,sc8180x-gpucc
2930
- qcom,sm8150-gpucc
3031
- qcom,sm8250-gpucc
3132

drivers/clk/qcom/gpucc-sm8150.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ static const struct freq_tbl ftbl_gpu_cc_gmu_clk_src[] = {
8282
{ }
8383
};
8484

85+
static const struct freq_tbl ftbl_gpu_cc_gmu_clk_src_sc8180x[] = {
86+
F(19200000, P_BI_TCXO, 1, 0, 0),
87+
F(200000000, P_GPLL0_OUT_MAIN_DIV, 1.5, 0, 0),
88+
F(400000000, P_GPLL0_OUT_MAIN, 1.5, 0, 0),
89+
F(500000000, P_GPU_CC_PLL1_OUT_MAIN, 1, 0, 0),
90+
{ }
91+
};
92+
8593
static struct clk_rcg2 gpu_cc_gmu_clk_src = {
8694
.cmd_rcgr = 0x1120,
8795
.mnd_width = 0,
@@ -277,6 +285,7 @@ static const struct qcom_cc_desc gpu_cc_sm8150_desc = {
277285
};
278286

279287
static const struct of_device_id gpu_cc_sm8150_match_table[] = {
288+
{ .compatible = "qcom,sc8180x-gpucc" },
280289
{ .compatible = "qcom,sm8150-gpucc" },
281290
{ }
282291
};
@@ -290,6 +299,9 @@ static int gpu_cc_sm8150_probe(struct platform_device *pdev)
290299
if (IS_ERR(regmap))
291300
return PTR_ERR(regmap);
292301

302+
if (of_device_is_compatible(pdev->dev.of_node, "qcom,sc8180x-gpucc"))
303+
gpu_cc_gmu_clk_src.freq_tbl = ftbl_gpu_cc_gmu_clk_src_sc8180x;
304+
293305
clk_trion_pll_configure(&gpu_cc_pll1, regmap, &gpu_cc_pll1_config);
294306

295307
return qcom_cc_really_probe(pdev, &gpu_cc_sm8150_desc, regmap);

0 commit comments

Comments
 (0)