aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq807x/patches-5.15/0037-v6.1-clk-qcom-apss-ipq-pll-add-support-for-IPQ8074.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ipq807x/patches-5.15/0037-v6.1-clk-qcom-apss-ipq-pll-add-support-for-IPQ8074.patch')
-rw-r--r--target/linux/ipq807x/patches-5.15/0037-v6.1-clk-qcom-apss-ipq-pll-add-support-for-IPQ8074.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/target/linux/ipq807x/patches-5.15/0037-v6.1-clk-qcom-apss-ipq-pll-add-support-for-IPQ8074.patch b/target/linux/ipq807x/patches-5.15/0037-v6.1-clk-qcom-apss-ipq-pll-add-support-for-IPQ8074.patch
new file mode 100644
index 0000000000..f5f18acb1b
--- /dev/null
+++ b/target/linux/ipq807x/patches-5.15/0037-v6.1-clk-qcom-apss-ipq-pll-add-support-for-IPQ8074.patch
@@ -0,0 +1,47 @@
+From e0a711bd88ba98f6ab5118d248ec84fcf495d313 Mon Sep 17 00:00:00 2001
+From: Robert Marko <robimarko@gmail.com>
+Date: Fri, 19 Aug 2022 00:06:26 +0200
+Subject: [PATCH] clk: qcom: apss-ipq-pll: add support for IPQ8074
+
+Add support for IPQ8074 since it uses the same PLL setup, however it uses
+slightly different Alpha PLL config.
+
+Alpha PLL config was obtained by dumping PLL registers from a running
+device.
+
+Signed-off-by: Robert Marko <robimarko@gmail.com>
+Signed-off-by: Bjorn Andersson <andersson@kernel.org>
+Link: https://lore.kernel.org/r/20220818220628.339366-7-robimarko@gmail.com
+---
+ drivers/clk/qcom/apss-ipq-pll.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+--- a/drivers/clk/qcom/apss-ipq-pll.c
++++ b/drivers/clk/qcom/apss-ipq-pll.c
+@@ -49,6 +49,18 @@ static const struct alpha_pll_config ipq
+ .test_ctl_hi_val = 0x4000,
+ };
+
++static const struct alpha_pll_config ipq8074_pll_config = {
++ .l = 0x48,
++ .config_ctl_val = 0x200d4828,
++ .config_ctl_hi_val = 0x6,
++ .early_output_mask = BIT(3),
++ .aux2_output_mask = BIT(2),
++ .aux_output_mask = BIT(1),
++ .main_output_mask = BIT(0),
++ .test_ctl_val = 0x1c000000,
++ .test_ctl_hi_val = 0x4000,
++};
++
+ static const struct regmap_config ipq_pll_regmap_config = {
+ .reg_bits = 32,
+ .reg_stride = 4,
+@@ -89,6 +101,7 @@ static int apss_ipq_pll_probe(struct pla
+
+ static const struct of_device_id apss_ipq_pll_match_table[] = {
+ { .compatible = "qcom,ipq6018-a53pll", .data = &ipq6018_pll_config },
++ { .compatible = "qcom,ipq8074-a53pll", .data = &ipq8074_pll_config },
+ { }
+ };
+ MODULE_DEVICE_TABLE(of, apss_ipq_pll_match_table);