Skip to content

Commit 253a0af

Browse files
Taniya Dasbebarino
authored andcommitted
clk: qcom: gcc: Add support for modem clocks in GCC
Add the required modem clocks in global clock controller which are required to bring the modem out of reset. Signed-off-by: Taniya Das <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Tested-by: Sibi Sankar <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent 53624f9 commit 253a0af

File tree

1 file changed

+71
-1
lines changed

1 file changed

+71
-1
lines changed

drivers/clk/qcom/gcc-sc7180.c

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0-only
22
/*
3-
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
3+
* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
44
*/
55

66
#include <linux/clk-provider.h>
@@ -2165,6 +2165,71 @@ static struct clk_branch gcc_video_xo_clk = {
21652165
},
21662166
};
21672167

2168+
static struct clk_branch gcc_mss_cfg_ahb_clk = {
2169+
.halt_reg = 0x8a000,
2170+
.halt_check = BRANCH_HALT,
2171+
.clkr = {
2172+
.enable_reg = 0x8a000,
2173+
.enable_mask = BIT(0),
2174+
.hw.init = &(struct clk_init_data){
2175+
.name = "gcc_mss_cfg_ahb_clk",
2176+
.ops = &clk_branch2_ops,
2177+
},
2178+
},
2179+
};
2180+
2181+
static struct clk_branch gcc_mss_mfab_axis_clk = {
2182+
.halt_reg = 0x8a004,
2183+
.halt_check = BRANCH_HALT_VOTED,
2184+
.clkr = {
2185+
.enable_reg = 0x8a004,
2186+
.enable_mask = BIT(0),
2187+
.hw.init = &(struct clk_init_data){
2188+
.name = "gcc_mss_mfab_axis_clk",
2189+
.ops = &clk_branch2_ops,
2190+
},
2191+
},
2192+
};
2193+
2194+
static struct clk_branch gcc_mss_nav_axi_clk = {
2195+
.halt_reg = 0x8a00c,
2196+
.halt_check = BRANCH_HALT_VOTED,
2197+
.clkr = {
2198+
.enable_reg = 0x8a00c,
2199+
.enable_mask = BIT(0),
2200+
.hw.init = &(struct clk_init_data){
2201+
.name = "gcc_mss_nav_axi_clk",
2202+
.ops = &clk_branch2_ops,
2203+
},
2204+
},
2205+
};
2206+
2207+
static struct clk_branch gcc_mss_snoc_axi_clk = {
2208+
.halt_reg = 0x8a150,
2209+
.halt_check = BRANCH_HALT,
2210+
.clkr = {
2211+
.enable_reg = 0x8a150,
2212+
.enable_mask = BIT(0),
2213+
.hw.init = &(struct clk_init_data){
2214+
.name = "gcc_mss_snoc_axi_clk",
2215+
.ops = &clk_branch2_ops,
2216+
},
2217+
},
2218+
};
2219+
2220+
static struct clk_branch gcc_mss_q6_memnoc_axi_clk = {
2221+
.halt_reg = 0x8a154,
2222+
.halt_check = BRANCH_HALT,
2223+
.clkr = {
2224+
.enable_reg = 0x8a154,
2225+
.enable_mask = BIT(0),
2226+
.hw.init = &(struct clk_init_data){
2227+
.name = "gcc_mss_q6_memnoc_axi_clk",
2228+
.ops = &clk_branch2_ops,
2229+
},
2230+
},
2231+
};
2232+
21682233
static struct gdsc ufs_phy_gdsc = {
21692234
.gdscr = 0x77004,
21702235
.pd = {
@@ -2336,6 +2401,11 @@ static struct clk_regmap *gcc_sc7180_clocks[] = {
23362401
[GPLL7] = &gpll7.clkr,
23372402
[GPLL4] = &gpll4.clkr,
23382403
[GPLL1] = &gpll1.clkr,
2404+
[GCC_MSS_CFG_AHB_CLK] = &gcc_mss_cfg_ahb_clk.clkr,
2405+
[GCC_MSS_MFAB_AXIS_CLK] = &gcc_mss_mfab_axis_clk.clkr,
2406+
[GCC_MSS_NAV_AXI_CLK] = &gcc_mss_nav_axi_clk.clkr,
2407+
[GCC_MSS_Q6_MEMNOC_AXI_CLK] = &gcc_mss_q6_memnoc_axi_clk.clkr,
2408+
[GCC_MSS_SNOC_AXI_CLK] = &gcc_mss_snoc_axi_clk.clkr,
23392409
};
23402410

23412411
static const struct qcom_reset_map gcc_sc7180_resets[] = {

0 commit comments

Comments
 (0)