Skip to content

Commit 7181c64

Browse files
lweiss-fairphoneandersson
authored andcommitted
clk: qcom: tcsrcc-sm8650: Add support for Milos SoC
The Milos SoC has a very similar tcsrcc block, only TCSR_UFS_CLKREF_EN uses different regs, and both TCSR_USB2_CLKREF_EN and TCSR_USB3_CLKREF_EN are not present. Modify these resources at probe if we're probing for Milos. Reviewed-by: Konrad Dybcio <[email protected]> Signed-off-by: Luca Weiss <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 5009024 commit 7181c64

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/clk/qcom/tcsrcc-sm8650.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,21 @@ static const struct qcom_cc_desc tcsr_cc_sm8650_desc = {
148148
};
149149

150150
static const struct of_device_id tcsr_cc_sm8650_match_table[] = {
151+
{ .compatible = "qcom,milos-tcsr" },
151152
{ .compatible = "qcom,sm8650-tcsr" },
152153
{ }
153154
};
154155
MODULE_DEVICE_TABLE(of, tcsr_cc_sm8650_match_table);
155156

156157
static int tcsr_cc_sm8650_probe(struct platform_device *pdev)
157158
{
159+
if (of_device_is_compatible(pdev->dev.of_node, "qcom,milos-tcsr")) {
160+
tcsr_ufs_clkref_en.halt_reg = 0x31118;
161+
tcsr_ufs_clkref_en.clkr.enable_reg = 0x31118;
162+
tcsr_cc_sm8650_clocks[TCSR_USB2_CLKREF_EN] = NULL;
163+
tcsr_cc_sm8650_clocks[TCSR_USB3_CLKREF_EN] = NULL;
164+
}
165+
158166
return qcom_cc_probe(pdev, &tcsr_cc_sm8650_desc);
159167
}
160168

0 commit comments

Comments
 (0)