Skip to content

Commit 95183d3

Browse files
Jeffrey Hugobebarino
authored andcommitted
clk: qcom: Enumerate clocks and reset needed to boot the 8998 modem
We need to control five additional clocks and a reset inorder to boot the modem on msm8998. If we can boot the modem, we have a place to run the wlan firmware and get wifi up and running. Signed-off-by: Jeffrey Hugo <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent eee2810 commit 95183d3

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed

drivers/clk/qcom/gcc-msm8998.c

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,6 +1266,72 @@ static struct clk_branch gcc_bimc_mss_q6_axi_clk = {
12661266
},
12671267
};
12681268

1269+
static struct clk_branch gcc_mss_cfg_ahb_clk = {
1270+
.halt_reg = 0x8a000,
1271+
.halt_check = BRANCH_HALT,
1272+
.clkr = {
1273+
.enable_reg = 0x8a000,
1274+
.enable_mask = BIT(0),
1275+
.hw.init = &(struct clk_init_data){
1276+
.name = "gcc_mss_cfg_ahb_clk",
1277+
.ops = &clk_branch2_ops,
1278+
},
1279+
},
1280+
};
1281+
1282+
static struct clk_branch gcc_mss_snoc_axi_clk = {
1283+
.halt_reg = 0x8a03c,
1284+
.halt_check = BRANCH_HALT,
1285+
.clkr = {
1286+
.enable_reg = 0x8a03c,
1287+
.enable_mask = BIT(0),
1288+
.hw.init = &(struct clk_init_data){
1289+
.name = "gcc_mss_snoc_axi_clk",
1290+
.ops = &clk_branch2_ops,
1291+
},
1292+
},
1293+
};
1294+
1295+
static struct clk_branch gcc_mss_mnoc_bimc_axi_clk = {
1296+
.halt_reg = 0x8a004,
1297+
.halt_check = BRANCH_HALT,
1298+
.clkr = {
1299+
.enable_reg = 0x8a004,
1300+
.enable_mask = BIT(0),
1301+
.hw.init = &(struct clk_init_data){
1302+
.name = "gcc_mss_mnoc_bimc_axi_clk",
1303+
.ops = &clk_branch2_ops,
1304+
},
1305+
},
1306+
};
1307+
1308+
static struct clk_branch gcc_boot_rom_ahb_clk = {
1309+
.halt_reg = 0x38004,
1310+
.halt_check = BRANCH_HALT_VOTED,
1311+
.hwcg_reg = 0x38004,
1312+
.hwcg_bit = 1,
1313+
.clkr = {
1314+
.enable_reg = 0x52004,
1315+
.enable_mask = BIT(10),
1316+
.hw.init = &(struct clk_init_data){
1317+
.name = "gcc_boot_rom_ahb_clk",
1318+
.ops = &clk_branch2_ops,
1319+
},
1320+
},
1321+
};
1322+
1323+
static struct clk_branch gcc_mss_gpll0_div_clk_src = {
1324+
.halt_check = BRANCH_HALT_DELAY,
1325+
.clkr = {
1326+
.enable_reg = 0x5200c,
1327+
.enable_mask = BIT(2),
1328+
.hw.init = &(struct clk_init_data){
1329+
.name = "gcc_mss_gpll0_div_clk_src",
1330+
.ops = &clk_branch2_ops,
1331+
},
1332+
},
1333+
};
1334+
12691335
static struct clk_branch gcc_blsp1_ahb_clk = {
12701336
.halt_reg = 0x17004,
12711337
.halt_check = BRANCH_HALT_VOTED,
@@ -2832,6 +2898,11 @@ static struct clk_regmap *gcc_msm8998_clocks[] = {
28322898
[GCC_USB3_CLKREF_CLK] = &gcc_usb3_clkref_clk.clkr,
28332899
[GCC_PCIE_CLKREF_CLK] = &gcc_pcie_clkref_clk.clkr,
28342900
[GCC_RX1_USB2_CLKREF_CLK] = &gcc_rx1_usb2_clkref_clk.clkr,
2901+
[GCC_MSS_CFG_AHB_CLK] = &gcc_mss_cfg_ahb_clk.clkr,
2902+
[GCC_BOOT_ROM_AHB_CLK] = &gcc_boot_rom_ahb_clk.clkr,
2903+
[GCC_MSS_GPLL0_DIV_CLK_SRC] = &gcc_mss_gpll0_div_clk_src.clkr,
2904+
[GCC_MSS_SNOC_AXI_CLK] = &gcc_mss_snoc_axi_clk.clkr,
2905+
[GCC_MSS_MNOC_BIMC_AXI_CLK] = &gcc_mss_mnoc_bimc_axi_clk.clkr,
28352906
};
28362907

28372908
static struct gdsc *gcc_msm8998_gdscs[] = {
@@ -2928,6 +2999,7 @@ static const struct qcom_reset_map gcc_msm8998_resets[] = {
29282999
[GCC_GPU_BCR] = { 0x71000 },
29293000
[GCC_SPSS_BCR] = { 0x72000 },
29303001
[GCC_OBT_ODT_BCR] = { 0x73000 },
3002+
[GCC_MSS_RESTART] = { 0x79000 },
29313003
[GCC_VS_BCR] = { 0x7a000 },
29323004
[GCC_MSS_VS_RESET] = { 0x7a100 },
29333005
[GCC_GPU_VS_RESET] = { 0x7a104 },

include/dt-bindings/clock/qcom,gcc-msm8998.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@
177177
#define GCC_UFS_CLKREF_CLK 168
178178
#define GCC_PCIE_CLKREF_CLK 169
179179
#define GCC_RX1_USB2_CLKREF_CLK 170
180+
#define GCC_MSS_CFG_AHB_CLK 171
181+
#define GCC_BOOT_ROM_AHB_CLK 172
182+
#define GCC_MSS_GPLL0_DIV_CLK_SRC 173
183+
#define GCC_MSS_SNOC_AXI_CLK 174
184+
#define GCC_MSS_MNOC_BIMC_AXI_CLK 175
180185

181186
#define PCIE_0_GDSC 0
182187
#define UFS_GDSC 1
@@ -290,5 +295,6 @@
290295
#define GCC_MSMPU_BCR 105
291296
#define GCC_QUSB2PHY_PRIM_BCR 106
292297
#define GCC_QUSB2PHY_SEC_BCR 107
298+
#define GCC_MSS_RESTART 108
293299

294300
#endif

0 commit comments

Comments
 (0)