]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
clk: qcom: rpmh: Add support for Glymur rpmh clocks
authorTaniya Das <taniya.das@oss.qualcomm.com>
Mon, 25 Aug 2025 18:19:11 +0000 (23:49 +0530)
committerBjorn Andersson <andersson@kernel.org>
Wed, 3 Sep 2025 23:15:43 +0000 (18:15 -0500)
Add RPMH clock support for the Glymur SoC to allow enable/disable of the
clocks.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Taniya Das <taniya.das@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250825-glymur-clock-controller-v5-v5-4-01b8c8681bcd@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/clk/qcom/clk-rpmh.c

index 5103a464d86d3cb4c0ce3ff68956178dd58b1864..63c38cb47bc4592ad8d50b11dd73e09fc3011982 100644 (file)
@@ -390,6 +390,11 @@ DEFINE_CLK_RPMH_VRM(clk7, _a4, "clka7", 4);
 
 DEFINE_CLK_RPMH_VRM(div_clk1, _div2, "divclka1", 2);
 
+DEFINE_CLK_RPMH_VRM(clk3, _a, "C3A_E0", 1);
+DEFINE_CLK_RPMH_VRM(clk4, _a, "C4A_E0", 1);
+DEFINE_CLK_RPMH_VRM(clk5, _a, "C5A_E0", 1);
+DEFINE_CLK_RPMH_VRM(clk8, _a, "C8A_E0", 1);
+
 DEFINE_CLK_RPMH_BCM(ce, "CE0");
 DEFINE_CLK_RPMH_BCM(hwkm, "HK0");
 DEFINE_CLK_RPMH_BCM(ipa, "IP0");
@@ -879,6 +884,22 @@ static const struct clk_rpmh_desc clk_rpmh_sm8750 = {
        .clka_optional = true,
 };
 
+static struct clk_hw *glymur_rpmh_clocks[] = {
+       [RPMH_CXO_CLK]          = &clk_rpmh_bi_tcxo_div2.hw,
+       [RPMH_CXO_CLK_A]        = &clk_rpmh_bi_tcxo_div2_ao.hw,
+       [RPMH_RF_CLK3]          = &clk_rpmh_clk3_a.hw,
+       [RPMH_RF_CLK3_A]        = &clk_rpmh_clk3_a_ao.hw,
+       [RPMH_RF_CLK4]          = &clk_rpmh_clk4_a.hw,
+       [RPMH_RF_CLK4_A]        = &clk_rpmh_clk4_a_ao.hw,
+       [RPMH_RF_CLK5]          = &clk_rpmh_clk5_a.hw,
+       [RPMH_RF_CLK5_A]        = &clk_rpmh_clk5_a_ao.hw,
+};
+
+static const struct clk_rpmh_desc clk_rpmh_glymur = {
+       .clks = glymur_rpmh_clocks,
+       .num_clks = ARRAY_SIZE(glymur_rpmh_clocks),
+};
+
 static struct clk_hw *of_clk_rpmh_hw_get(struct of_phandle_args *clkspec,
                                         void *data)
 {
@@ -968,6 +989,7 @@ static int clk_rpmh_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id clk_rpmh_match_table[] = {
+       { .compatible = "qcom,glymur-rpmh-clk", .data = &clk_rpmh_glymur},
        { .compatible = "qcom,milos-rpmh-clk", .data = &clk_rpmh_milos},
        { .compatible = "qcom,qcs615-rpmh-clk", .data = &clk_rpmh_qcs615},
        { .compatible = "qcom,qdu1000-rpmh-clk", .data = &clk_rpmh_qdu1000},