clk: qcom: gcc-ipq6018: add qdss_at clock needed for wifi operation
authorMantas Pucka <mantas@8devices.com>
Tue, 23 Jan 2024 09:26:09 +0000 (11:26 +0200)
committerBjorn Andersson <andersson@kernel.org>
Tue, 23 Jan 2024 13:45:06 +0000 (07:45 -0600)
Without it system hangs upon wifi firmware load. It should be enabled by
remoteproc/wifi driver. Bindings already exist for it, so add it based
on vendor code.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://lore.kernel.org/r/1706001970-26032-1-git-send-email-mantas@8devices.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/clk/qcom/gcc-ipq6018.c

index b366912cd6480e181f4903bb2170202b9546ab85..cef7876744796f62184e340169cdae6d351c34e5 100644 (file)
@@ -3522,6 +3522,22 @@ static struct clk_branch gcc_prng_ahb_clk = {
        },
 };
 
+static struct clk_branch gcc_qdss_at_clk = {
+       .halt_reg = 0x29024,
+       .clkr = {
+               .enable_reg = 0x29024,
+               .enable_mask = BIT(0),
+               .hw.init = &(struct clk_init_data){
+                       .name = "gcc_qdss_at_clk",
+                       .parent_hws = (const struct clk_hw *[]){
+                               &qdss_at_clk_src.clkr.hw },
+                       .num_parents = 1,
+                       .flags = CLK_SET_RATE_PARENT,
+                       .ops = &clk_branch2_ops,
+               },
+       },
+};
+
 static struct clk_branch gcc_qdss_dap_clk = {
        .halt_reg = 0x29084,
        .clkr = {
@@ -4361,6 +4377,7 @@ static struct clk_regmap *gcc_ipq6018_clks[] = {
        [GCC_SYS_NOC_PCIE0_AXI_CLK] = &gcc_sys_noc_pcie0_axi_clk.clkr,
        [GCC_PCIE0_PIPE_CLK] = &gcc_pcie0_pipe_clk.clkr,
        [GCC_PRNG_AHB_CLK] = &gcc_prng_ahb_clk.clkr,
+       [GCC_QDSS_AT_CLK] = &gcc_qdss_at_clk.clkr,
        [GCC_QDSS_DAP_CLK] = &gcc_qdss_dap_clk.clkr,
        [GCC_QPIC_AHB_CLK] = &gcc_qpic_ahb_clk.clkr,
        [GCC_QPIC_CLK] = &gcc_qpic_clk.clkr,