Skip to content

Commit 63847e8

Browse files
Imran Shaikandersson
authored andcommitted
clk: qcom: Add support for Video Clock Controller on QCS8300
The QCS8300 Video clock controller is a derivative of SA8775P, but has a minor difference. Hence add support for QCS8300 Video clock controller by extending the SA8775P VideoCC. Reviewed-by: Dmitry Baryshkov <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Imran Shaik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 165a5dc commit 63847e8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/clk/qcom/videocc-sa8775p.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,7 @@ static struct qcom_cc_desc video_cc_sa8775p_desc = {
523523
};
524524

525525
static const struct of_device_id video_cc_sa8775p_match_table[] = {
526+
{ .compatible = "qcom,qcs8300-videocc" },
526527
{ .compatible = "qcom,sa8775p-videocc" },
527528
{ }
528529
};
@@ -550,6 +551,13 @@ static int video_cc_sa8775p_probe(struct platform_device *pdev)
550551
clk_lucid_evo_pll_configure(&video_pll0, regmap, &video_pll0_config);
551552
clk_lucid_evo_pll_configure(&video_pll1, regmap, &video_pll1_config);
552553

554+
/*
555+
* Set mvs0c clock divider to div-3 to make the mvs0 and
556+
* mvs0c clocks to run at the same frequency on QCS8300
557+
*/
558+
if (of_device_is_compatible(pdev->dev.of_node, "qcom,qcs8300-videocc"))
559+
regmap_write(regmap, video_cc_mvs0c_div2_div_clk_src.reg, 2);
560+
553561
/* Keep some clocks always enabled */
554562
qcom_branch_set_clk_en(regmap, 0x80ec); /* VIDEO_CC_AHB_CLK */
555563
qcom_branch_set_clk_en(regmap, 0x8144); /* VIDEO_CC_SLEEP_CLK */

0 commit comments

Comments
 (0)