clk: qcom: tcsrcc-sm8550: add SAR2130P support
[ Upstream commit d2e0a043530b9d6f37a8de8f05e0725667aba0a6 ] The SAR2130P platform has the same TCSR Clock Controller as the SM8550, except for the lack of the UFS clocks. Extend the SM8550 TCSRCC driver to support SAR2130P. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241027-sar2130p-clocks-v5-9-ecad2a1432ba@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ecc8f3c06e
commit
082b6e35ff
@@ -129,6 +129,13 @@ static struct clk_branch tcsr_usb3_clkref_en = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_regmap *tcsr_cc_sar2130p_clocks[] = {
|
||||
[TCSR_PCIE_0_CLKREF_EN] = &tcsr_pcie_0_clkref_en.clkr,
|
||||
[TCSR_PCIE_1_CLKREF_EN] = &tcsr_pcie_1_clkref_en.clkr,
|
||||
[TCSR_USB2_CLKREF_EN] = &tcsr_usb2_clkref_en.clkr,
|
||||
[TCSR_USB3_CLKREF_EN] = &tcsr_usb3_clkref_en.clkr,
|
||||
};
|
||||
|
||||
static struct clk_regmap *tcsr_cc_sm8550_clocks[] = {
|
||||
[TCSR_PCIE_0_CLKREF_EN] = &tcsr_pcie_0_clkref_en.clkr,
|
||||
[TCSR_PCIE_1_CLKREF_EN] = &tcsr_pcie_1_clkref_en.clkr,
|
||||
@@ -146,6 +153,12 @@ static const struct regmap_config tcsr_cc_sm8550_regmap_config = {
|
||||
.fast_io = true,
|
||||
};
|
||||
|
||||
static const struct qcom_cc_desc tcsr_cc_sar2130p_desc = {
|
||||
.config = &tcsr_cc_sm8550_regmap_config,
|
||||
.clks = tcsr_cc_sar2130p_clocks,
|
||||
.num_clks = ARRAY_SIZE(tcsr_cc_sar2130p_clocks),
|
||||
};
|
||||
|
||||
static const struct qcom_cc_desc tcsr_cc_sm8550_desc = {
|
||||
.config = &tcsr_cc_sm8550_regmap_config,
|
||||
.clks = tcsr_cc_sm8550_clocks,
|
||||
@@ -153,7 +166,8 @@ static const struct qcom_cc_desc tcsr_cc_sm8550_desc = {
|
||||
};
|
||||
|
||||
static const struct of_device_id tcsr_cc_sm8550_match_table[] = {
|
||||
{ .compatible = "qcom,sm8550-tcsr" },
|
||||
{ .compatible = "qcom,sar2130p-tcsr", .data = &tcsr_cc_sar2130p_desc },
|
||||
{ .compatible = "qcom,sm8550-tcsr", .data = &tcsr_cc_sm8550_desc },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, tcsr_cc_sm8550_match_table);
|
||||
@@ -162,7 +176,7 @@ static int tcsr_cc_sm8550_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct regmap *regmap;
|
||||
|
||||
regmap = qcom_cc_map(pdev, &tcsr_cc_sm8550_desc);
|
||||
regmap = qcom_cc_map(pdev, of_device_get_match_data(&pdev->dev));
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user