Commit 7d61e773 authored by AngeloGioacchino Del Regno's avatar AngeloGioacchino Del Regno Committed by Stephen Boyd

clk: qcom: smd: Add support for MSM8976 rpm clocks

Add rpm smd clocks, PMIC and bus clocks which are required on MSM8976,
MSM8956 (and APQ variants) for clients to vote on.
Signed-off-by: default avatarAngeloGioacchino Del Regno <kholk11@gmail.com>
Link: https://lkml.kernel.org/r/20191031112951.35850-2-kholk11@gmail.comSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent dad4e7fd
......@@ -525,6 +525,55 @@ static const struct rpm_smd_clk_desc rpm_clk_msm8974 = {
.num_clks = ARRAY_SIZE(msm8974_clks),
};
/* msm8976 */
DEFINE_CLK_SMD_RPM(msm8976, pcnoc_clk, pcnoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 0);
DEFINE_CLK_SMD_RPM(msm8976, snoc_clk, snoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 1);
DEFINE_CLK_SMD_RPM(msm8976, mmssnoc_ahb_clk, mmssnoc_ahb_a_clk,
QCOM_SMD_RPM_BUS_CLK, 2);
DEFINE_CLK_SMD_RPM(msm8976, bimc_clk, bimc_a_clk, QCOM_SMD_RPM_MEM_CLK, 0);
DEFINE_CLK_SMD_RPM(msm8976, ipa_clk, ipa_a_clk, QCOM_SMD_RPM_IPA_CLK, 0);
DEFINE_CLK_SMD_RPM_QDSS(msm8976, qdss_clk, qdss_a_clk,
QCOM_SMD_RPM_MISC_CLK, 1);
DEFINE_CLK_SMD_RPM_XO_BUFFER(msm8976, bb_clk1, bb_clk1_a, 1);
DEFINE_CLK_SMD_RPM_XO_BUFFER(msm8976, bb_clk2, bb_clk2_a, 2);
DEFINE_CLK_SMD_RPM_XO_BUFFER(msm8976, rf_clk2, rf_clk2_a, 5);
DEFINE_CLK_SMD_RPM_XO_BUFFER(msm8976, div_clk2, div_clk2_a, 12);
DEFINE_CLK_SMD_RPM_XO_BUFFER_PINCTRL(msm8976, bb_clk1_pin, bb_clk1_a_pin, 1);
DEFINE_CLK_SMD_RPM_XO_BUFFER_PINCTRL(msm8976, bb_clk2_pin, bb_clk2_a_pin, 2);
static struct clk_smd_rpm *msm8976_clks[] = {
[RPM_SMD_PCNOC_CLK] = &msm8976_pcnoc_clk,
[RPM_SMD_PCNOC_A_CLK] = &msm8976_pcnoc_a_clk,
[RPM_SMD_SNOC_CLK] = &msm8976_snoc_clk,
[RPM_SMD_SNOC_A_CLK] = &msm8976_snoc_a_clk,
[RPM_SMD_BIMC_CLK] = &msm8976_bimc_clk,
[RPM_SMD_BIMC_A_CLK] = &msm8976_bimc_a_clk,
[RPM_SMD_QDSS_CLK] = &msm8976_qdss_clk,
[RPM_SMD_QDSS_A_CLK] = &msm8976_qdss_a_clk,
[RPM_SMD_BB_CLK1] = &msm8976_bb_clk1,
[RPM_SMD_BB_CLK1_A] = &msm8976_bb_clk1_a,
[RPM_SMD_BB_CLK2] = &msm8976_bb_clk2,
[RPM_SMD_BB_CLK2_A] = &msm8976_bb_clk2_a,
[RPM_SMD_RF_CLK2] = &msm8976_rf_clk2,
[RPM_SMD_RF_CLK2_A] = &msm8976_rf_clk2_a,
[RPM_SMD_BB_CLK1_PIN] = &msm8976_bb_clk1_pin,
[RPM_SMD_BB_CLK1_A_PIN] = &msm8976_bb_clk1_a_pin,
[RPM_SMD_BB_CLK2_PIN] = &msm8976_bb_clk2_pin,
[RPM_SMD_BB_CLK2_A_PIN] = &msm8976_bb_clk2_a_pin,
[RPM_SMD_MMSSNOC_AHB_CLK] = &msm8976_mmssnoc_ahb_clk,
[RPM_SMD_MMSSNOC_AHB_A_CLK] = &msm8976_mmssnoc_ahb_a_clk,
[RPM_SMD_DIV_CLK2] = &msm8976_div_clk2,
[RPM_SMD_DIV_A_CLK2] = &msm8976_div_clk2_a,
[RPM_SMD_IPA_CLK] = &msm8976_ipa_clk,
[RPM_SMD_IPA_A_CLK] = &msm8976_ipa_a_clk,
};
static const struct rpm_smd_clk_desc rpm_clk_msm8976 = {
.clks = msm8976_clks,
.num_clks = ARRAY_SIZE(msm8976_clks),
};
/* msm8996 */
DEFINE_CLK_SMD_RPM(msm8996, pcnoc_clk, pcnoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 0);
DEFINE_CLK_SMD_RPM(msm8996, snoc_clk, snoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 1);
......@@ -720,6 +769,7 @@ static const struct rpm_smd_clk_desc rpm_clk_msm8998 = {
static const struct of_device_id rpm_smd_clk_match_table[] = {
{ .compatible = "qcom,rpmcc-msm8916", .data = &rpm_clk_msm8916 },
{ .compatible = "qcom,rpmcc-msm8974", .data = &rpm_clk_msm8974 },
{ .compatible = "qcom,rpmcc-msm8976", .data = &rpm_clk_msm8976 },
{ .compatible = "qcom,rpmcc-msm8996", .data = &rpm_clk_msm8996 },
{ .compatible = "qcom,rpmcc-msm8998", .data = &rpm_clk_msm8998 },
{ .compatible = "qcom,rpmcc-qcs404", .data = &rpm_clk_qcs404 },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment