Skip to content

Commit be5b605

Browse files
Konrad Dybciobebarino
authored andcommitted
clk: qcom: rpmh: Add support for RPMH clocks on SM6350
Add support for RPMH clocks on SM6350 SoCs. Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Konrad Dybcio <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 4966c52 commit be5b605

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

drivers/clk/qcom/clk-rpmh.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,26 @@ static const struct clk_rpmh_desc clk_rpmh_sc7280 = {
536536
.num_clks = ARRAY_SIZE(sc7280_rpmh_clocks),
537537
};
538538

539+
DEFINE_CLK_RPMH_VRM(sm6350, ln_bb_clk2, ln_bb_clk2_ao, "lnbclkg2", 4);
540+
DEFINE_CLK_RPMH_VRM(sm6350, ln_bb_clk3, ln_bb_clk3_ao, "lnbclkg3", 4);
541+
DEFINE_CLK_RPMH_ARC(sm6350, qlink, qlink_ao, "qphy.lvl", 0x1, 4);
542+
543+
static struct clk_hw *sm6350_rpmh_clocks[] = {
544+
[RPMH_CXO_CLK] = &sc7280_bi_tcxo.hw,
545+
[RPMH_CXO_CLK_A] = &sc7280_bi_tcxo_ao.hw,
546+
[RPMH_LN_BB_CLK2] = &sm6350_ln_bb_clk2.hw,
547+
[RPMH_LN_BB_CLK2_A] = &sm6350_ln_bb_clk2_ao.hw,
548+
[RPMH_LN_BB_CLK3] = &sm6350_ln_bb_clk3.hw,
549+
[RPMH_LN_BB_CLK3_A] = &sm6350_ln_bb_clk3_ao.hw,
550+
[RPMH_QLINK_CLK] = &sm6350_qlink.hw,
551+
[RPMH_QLINK_CLK_A] = &sm6350_qlink_ao.hw,
552+
};
553+
554+
static const struct clk_rpmh_desc clk_rpmh_sm6350 = {
555+
.clks = sm6350_rpmh_clocks,
556+
.num_clks = ARRAY_SIZE(sm6350_rpmh_clocks),
557+
};
558+
539559
static struct clk_hw *of_clk_rpmh_hw_get(struct of_phandle_args *clkspec,
540560
void *data)
541561
{
@@ -623,6 +643,7 @@ static const struct of_device_id clk_rpmh_match_table[] = {
623643
{ .compatible = "qcom,sc8180x-rpmh-clk", .data = &clk_rpmh_sc8180x},
624644
{ .compatible = "qcom,sdm845-rpmh-clk", .data = &clk_rpmh_sdm845},
625645
{ .compatible = "qcom,sdx55-rpmh-clk", .data = &clk_rpmh_sdx55},
646+
{ .compatible = "qcom,sm6350-rpmh-clk", .data = &clk_rpmh_sm6350},
626647
{ .compatible = "qcom,sm8150-rpmh-clk", .data = &clk_rpmh_sm8150},
627648
{ .compatible = "qcom,sm8250-rpmh-clk", .data = &clk_rpmh_sm8250},
628649
{ .compatible = "qcom,sm8350-rpmh-clk", .data = &clk_rpmh_sm8350},

include/dt-bindings/clock/qcom,rpmh.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,7 @@
3131
#define RPMH_RF_CLK5_A 22
3232
#define RPMH_PKA_CLK 23
3333
#define RPMH_HWKM_CLK 24
34+
#define RPMH_QLINK_CLK 25
35+
#define RPMH_QLINK_CLK_A 26
3436

3537
#endif

0 commit comments

Comments
 (0)