|
25 | 25 | #include "reset.h"
|
26 | 26 | #include "gdsc.h"
|
27 | 27 |
|
| 28 | +#define GCC_MMSS_MISC 0x0902C |
| 29 | +#define GCC_GPU_MISC 0x71028 |
| 30 | + |
28 | 31 | static struct pll_vco fabia_vco[] = {
|
29 | 32 | { 250000000, 2000000000, 0 },
|
30 | 33 | { 125000000, 1000000000, 1 },
|
@@ -1367,6 +1370,22 @@ static struct clk_branch gcc_boot_rom_ahb_clk = {
|
1367 | 1370 | },
|
1368 | 1371 | };
|
1369 | 1372 |
|
| 1373 | +static struct clk_branch gcc_mmss_gpll0_div_clk = { |
| 1374 | + .halt_check = BRANCH_HALT_DELAY, |
| 1375 | + .clkr = { |
| 1376 | + .enable_reg = 0x5200c, |
| 1377 | + .enable_mask = BIT(0), |
| 1378 | + .hw.init = &(struct clk_init_data){ |
| 1379 | + .name = "gcc_mmss_gpll0_div_clk", |
| 1380 | + .parent_hws = (const struct clk_hw *[]) { |
| 1381 | + &gpll0_out_main.clkr.hw, |
| 1382 | + }, |
| 1383 | + .num_parents = 1, |
| 1384 | + .ops = &clk_branch2_ops, |
| 1385 | + }, |
| 1386 | + }, |
| 1387 | +}; |
| 1388 | + |
1370 | 1389 | static struct clk_branch gcc_mmss_gpll0_clk = {
|
1371 | 1390 | .halt_check = BRANCH_HALT_DELAY,
|
1372 | 1391 | .clkr = {
|
@@ -1395,6 +1414,38 @@ static struct clk_branch gcc_mss_gpll0_div_clk_src = {
|
1395 | 1414 | },
|
1396 | 1415 | };
|
1397 | 1416 |
|
| 1417 | +static struct clk_branch gcc_gpu_gpll0_div_clk = { |
| 1418 | + .halt_check = BRANCH_HALT_DELAY, |
| 1419 | + .clkr = { |
| 1420 | + .enable_reg = 0x5200c, |
| 1421 | + .enable_mask = BIT(3), |
| 1422 | + .hw.init = &(struct clk_init_data){ |
| 1423 | + .name = "gcc_gpu_gpll0_div_clk", |
| 1424 | + .parent_hws = (const struct clk_hw *[]) { |
| 1425 | + &gpll0_out_main.clkr.hw, |
| 1426 | + }, |
| 1427 | + .num_parents = 1, |
| 1428 | + .ops = &clk_branch2_ops, |
| 1429 | + }, |
| 1430 | + }, |
| 1431 | +}; |
| 1432 | + |
| 1433 | +static struct clk_branch gcc_gpu_gpll0_clk = { |
| 1434 | + .halt_check = BRANCH_HALT_DELAY, |
| 1435 | + .clkr = { |
| 1436 | + .enable_reg = 0x5200c, |
| 1437 | + .enable_mask = BIT(4), |
| 1438 | + .hw.init = &(struct clk_init_data){ |
| 1439 | + .name = "gcc_gpu_gpll0_clk", |
| 1440 | + .parent_hws = (const struct clk_hw *[]) { |
| 1441 | + &gpll0_out_main.clkr.hw, |
| 1442 | + }, |
| 1443 | + .num_parents = 1, |
| 1444 | + .ops = &clk_branch2_ops, |
| 1445 | + }, |
| 1446 | + }, |
| 1447 | +}; |
| 1448 | + |
1398 | 1449 | static struct clk_branch gcc_blsp1_ahb_clk = {
|
1399 | 1450 | .halt_reg = 0x17004,
|
1400 | 1451 | .halt_check = BRANCH_HALT_VOTED,
|
@@ -3080,6 +3131,9 @@ static struct clk_regmap *gcc_msm8998_clocks[] = {
|
3080 | 3131 | [AGGRE2_SNOC_NORTH_AXI] = &aggre2_snoc_north_axi_clk.clkr,
|
3081 | 3132 | [SSC_XO] = &ssc_xo_clk.clkr,
|
3082 | 3133 | [SSC_CNOC_AHBS_CLK] = &ssc_cnoc_ahbs_clk.clkr,
|
| 3134 | + [GCC_MMSS_GPLL0_DIV_CLK] = &gcc_mmss_gpll0_div_clk.clkr, |
| 3135 | + [GCC_GPU_GPLL0_DIV_CLK] = &gcc_gpu_gpll0_div_clk.clkr, |
| 3136 | + [GCC_GPU_GPLL0_CLK] = &gcc_gpu_gpll0_clk.clkr, |
3083 | 3137 | };
|
3084 | 3138 |
|
3085 | 3139 | static struct gdsc *gcc_msm8998_gdscs[] = {
|
@@ -3235,6 +3289,10 @@ static int gcc_msm8998_probe(struct platform_device *pdev)
|
3235 | 3289 | if (ret)
|
3236 | 3290 | return ret;
|
3237 | 3291 |
|
| 3292 | + /* Disable the GPLL0 active input to MMSS and GPU via MISC registers */ |
| 3293 | + regmap_write(regmap, GCC_MMSS_MISC, 0x10003); |
| 3294 | + regmap_write(regmap, GCC_GPU_MISC, 0x10003); |
| 3295 | + |
3238 | 3296 | return qcom_cc_really_probe(pdev, &gcc_msm8998_desc, regmap);
|
3239 | 3297 | }
|
3240 | 3298 |
|
|
0 commit comments