Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: qcom: Add WCSS gcc clock control for QCS404

Add support for the WCSS QDSP gcc clock control used on qcs404
based devices. This would allow wcss remoteproc driver to control
the required gcc clocks to bring the subsystem out of reset.

Signed-off-by: Govind Singh <govinds@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Govind Singh and committed by
Stephen Boyd
7d0c76bd 56bf8740

+33
+30
drivers/clk/qcom/gcc-qcs404.c
··· 2604 2604 }, 2605 2605 }; 2606 2606 2607 + static struct clk_branch gcc_wdsp_q6ss_ahbs_clk = { 2608 + .halt_reg = 0x1e004, 2609 + .halt_check = BRANCH_HALT, 2610 + .clkr = { 2611 + .enable_reg = 0x1e004, 2612 + .enable_mask = BIT(0), 2613 + .hw.init = &(struct clk_init_data){ 2614 + .name = "gcc_wdsp_q6ss_ahbs_clk", 2615 + .ops = &clk_branch2_ops, 2616 + }, 2617 + }, 2618 + }; 2619 + 2620 + static struct clk_branch gcc_wdsp_q6ss_axim_clk = { 2621 + .halt_reg = 0x1e008, 2622 + .halt_check = BRANCH_HALT, 2623 + .clkr = { 2624 + .enable_reg = 0x1e008, 2625 + .enable_mask = BIT(0), 2626 + .hw.init = &(struct clk_init_data){ 2627 + .name = "gcc_wdsp_q6ss_axim_clk", 2628 + .ops = &clk_branch2_ops, 2629 + }, 2630 + }, 2631 + }; 2632 + 2607 2633 static struct clk_hw *gcc_qcs404_hws[] = { 2608 2634 &cxo.hw, 2609 2635 }; ··· 2775 2749 [GCC_QDSS_DAP_CLK] = &gcc_qdss_dap_clk.clkr, 2776 2750 [GCC_DCC_CLK] = &gcc_dcc_clk.clkr, 2777 2751 [GCC_DCC_XO_CLK] = &gcc_dcc_xo_clk.clkr, 2752 + [GCC_WCSS_Q6_AHB_CLK] = &gcc_wdsp_q6ss_ahbs_clk.clkr, 2753 + [GCC_WCSS_Q6_AXIM_CLK] = &gcc_wdsp_q6ss_axim_clk.clkr, 2754 + 2778 2755 }; 2779 2756 2780 2757 static const struct qcom_reset_map gcc_qcs404_resets[] = { ··· 2803 2774 [GCC_PCIE_0_SLEEP_ARES] = { 0x3e040, 1 }, 2804 2775 [GCC_PCIE_0_PIPE_ARES] = { 0x3e040, 0 }, 2805 2776 [GCC_EMAC_BCR] = { 0x4e000 }, 2777 + [GCC_WDSP_RESTART] = {0x19000}, 2806 2778 }; 2807 2779 2808 2780 static const struct regmap_config gcc_qcs404_regmap_config = {
+3
include/dt-bindings/clock/qcom,gcc-qcs404.h
··· 146 146 #define GCC_MDP_TBU_CLK 138 147 147 #define GCC_QDSS_DAP_CLK 139 148 148 #define GCC_DCC_XO_CLK 140 149 + #define GCC_WCSS_Q6_AHB_CLK 141 150 + #define GCC_WCSS_Q6_AXIM_CLK 142 149 151 #define GCC_CDSP_CFG_AHB_CLK 143 150 152 #define GCC_BIMC_CDSP_CLK 144 151 153 #define GCC_CDSP_TBU_CLK 145 ··· 175 173 #define GCC_PCIE_0_CORE_STICKY_ARES 19 176 174 #define GCC_PCIE_0_SLEEP_ARES 20 177 175 #define GCC_PCIE_0_PIPE_ARES 21 176 + #define GCC_WDSP_RESTART 22 178 177 179 178 #endif