Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a255ff4 authored by Taniya Das's avatar Taniya Das
Browse files

clk: qcom: rpmh: Add support for RPMH clocks for LITO



Add the PMIC XO clocks supported on LITO and register them with clock
framework for clients to be able to use it.

Change-Id: Ib9aa81e2a63c56003e69b4b432c187ae174226c2
Signed-off-by: default avatarTaniya Das <tdas@codeaurora.org>
parent 0b1cd965
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -281,6 +281,33 @@ static const struct clk_rpmh_desc clk_rpmh_kona = {
	.num_clks = ARRAY_SIZE(kona_rpmh_clocks),
};

DEFINE_CLK_RPMH_ARC(lito, bi_tcxo, bi_tcxo_ao, "xo.lvl", 0x3, 2);
DEFINE_CLK_RPMH_VRM(lito, ln_bb_clk3, ln_bb_clk3_ao, "lnbclka3", 2);
DEFINE_CLK_RPMH_VRM(lito, rf_clk1, rf_clk1_ao, "rfclkd1", 1);
DEFINE_CLK_RPMH_VRM(lito, rf_clk2, rf_clk2_ao, "rfclkd2", 1);
DEFINE_CLK_RPMH_VRM(lito, rf_clk3, rf_clk3_ao, "rfclkd3", 1);
DEFINE_CLK_RPMH_VRM(lito, rf_clk4, rf_clk4_ao, "rfclkd4", 1);

static struct clk_hw *lito_rpmh_clocks[] = {
	[RPMH_CXO_CLK]		= &lito_bi_tcxo.hw,
	[RPMH_CXO_CLK_A]	= &lito_bi_tcxo_ao.hw,
	[RPMH_LN_BB_CLK3]	= &lito_ln_bb_clk3.hw,
	[RPMH_LN_BB_CLK3_A]	= &lito_ln_bb_clk3_ao.hw,
	[RPMH_RF_CLK1]		= &lito_rf_clk1.hw,
	[RPMH_RF_CLK1_A]	= &lito_rf_clk1_ao.hw,
	[RPMH_RF_CLK2]		= &lito_rf_clk2.hw,
	[RPMH_RF_CLK2_A]	= &lito_rf_clk2_ao.hw,
	[RPMH_RF_CLK3]		= &lito_rf_clk3.hw,
	[RPMH_RF_CLK3_A]	= &lito_rf_clk3_ao.hw,
	[RPMH_RF_CLK4]		= &lito_rf_clk4.hw,
	[RPMH_RF_CLK4_A]	= &lito_rf_clk4_ao.hw,
};

static const struct clk_rpmh_desc clk_rpmh_lito = {
	.clks = lito_rpmh_clocks,
	.num_clks = ARRAY_SIZE(lito_rpmh_clocks),
};

static struct clk_hw *of_clk_rpmh_hw_get(struct of_phandle_args *clkspec,
					 void *data)
{
@@ -358,6 +385,7 @@ static int clk_rpmh_probe(struct platform_device *pdev)
static const struct of_device_id clk_rpmh_match_table[] = {
	{ .compatible = "qcom,sdm845-rpmh-clk", .data = &clk_rpmh_sdm845},
	{ .compatible = "qcom,kona-rpmh-clk", .data = &clk_rpmh_kona},
	{ .compatible = "qcom,lito-rpmh-clk", .data = &clk_rpmh_lito},
	{ }
};
MODULE_DEVICE_TABLE(of, clk_rpmh_match_table);