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

clk: qcom: gdsc: Add GDSCs in msm8974 MMCC

Add the GDSC instances that exist as part of msm8974 MMCC block

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

+81
+1
drivers/clk/qcom/Kconfig
··· 98 98 config MSM_MMCC_8974 99 99 tristate "MSM8974 Multimedia Clock Controller" 100 100 select MSM_GCC_8974 101 + select QCOM_GDSC 101 102 depends on COMMON_CLK_QCOM 102 103 help 103 104 Support for the multimedia clock controller on msm8974 devices.
+72
drivers/clk/qcom/mmcc-msm8974.c
··· 31 31 #include "clk-rcg.h" 32 32 #include "clk-branch.h" 33 33 #include "reset.h" 34 + #include "gdsc.h" 34 35 35 36 enum { 36 37 P_XO, ··· 2343 2342 .aux_output_mask = BIT(1), 2344 2343 }; 2345 2344 2345 + static struct gdsc venus0_gdsc = { 2346 + .gdscr = 0x1024, 2347 + .cxcs = (unsigned int []){ 0x1028 }, 2348 + .cxc_count = 1, 2349 + .resets = (unsigned int []){ VENUS0_RESET }, 2350 + .reset_count = 1, 2351 + .pd = { 2352 + .name = "venus0", 2353 + }, 2354 + .pwrsts = PWRSTS_ON, 2355 + }; 2356 + 2357 + static struct gdsc mdss_gdsc = { 2358 + .gdscr = 0x2304, 2359 + .cxcs = (unsigned int []){ 0x231c, 0x2320 }, 2360 + .cxc_count = 2, 2361 + .pd = { 2362 + .name = "mdss", 2363 + }, 2364 + .pwrsts = PWRSTS_RET_ON, 2365 + }; 2366 + 2367 + static struct gdsc camss_jpeg_gdsc = { 2368 + .gdscr = 0x35a4, 2369 + .cxcs = (unsigned int []){ 0x35a8, 0x35ac, 0x35b0 }, 2370 + .cxc_count = 3, 2371 + .pd = { 2372 + .name = "camss_jpeg", 2373 + }, 2374 + .pwrsts = PWRSTS_OFF_ON, 2375 + }; 2376 + 2377 + static struct gdsc camss_vfe_gdsc = { 2378 + .gdscr = 0x36a4, 2379 + .cxcs = (unsigned int []){ 0x36a8, 0x36ac, 0x3704, 0x3714, 0x36b0 }, 2380 + .cxc_count = 5, 2381 + .pd = { 2382 + .name = "camss_vfe", 2383 + }, 2384 + .pwrsts = PWRSTS_OFF_ON, 2385 + }; 2386 + 2387 + static struct gdsc oxili_gdsc = { 2388 + .gdscr = 0x4024, 2389 + .cxcs = (unsigned int []){ 0x4028 }, 2390 + .cxc_count = 1, 2391 + .pd = { 2392 + .name = "oxili", 2393 + }, 2394 + .pwrsts = PWRSTS_OFF_ON, 2395 + }; 2396 + 2397 + static struct gdsc oxilicx_gdsc = { 2398 + .gdscr = 0x4034, 2399 + .pd = { 2400 + .name = "oxilicx", 2401 + }, 2402 + .pwrsts = PWRSTS_OFF_ON, 2403 + }; 2404 + 2346 2405 static struct clk_regmap *mmcc_msm8974_clocks[] = { 2347 2406 [MMSS_AHB_CLK_SRC] = &mmss_ahb_clk_src.clkr, 2348 2407 [MMSS_AXI_CLK_SRC] = &mmss_axi_clk_src.clkr, ··· 2579 2518 [OCMEMNOC_RESET] = { 0x50b0 }, 2580 2519 }; 2581 2520 2521 + static struct gdsc *mmcc_msm8974_gdscs[] = { 2522 + [VENUS0_GDSC] = &venus0_gdsc, 2523 + [MDSS_GDSC] = &mdss_gdsc, 2524 + [CAMSS_JPEG_GDSC] = &camss_jpeg_gdsc, 2525 + [CAMSS_VFE_GDSC] = &camss_vfe_gdsc, 2526 + [OXILI_GDSC] = &oxili_gdsc, 2527 + [OXILICX_GDSC] = &oxilicx_gdsc, 2528 + }; 2529 + 2582 2530 static const struct regmap_config mmcc_msm8974_regmap_config = { 2583 2531 .reg_bits = 32, 2584 2532 .reg_stride = 4, ··· 2602 2532 .num_clks = ARRAY_SIZE(mmcc_msm8974_clocks), 2603 2533 .resets = mmcc_msm8974_resets, 2604 2534 .num_resets = ARRAY_SIZE(mmcc_msm8974_resets), 2535 + .gdscs = mmcc_msm8974_gdscs, 2536 + .num_gdscs = ARRAY_SIZE(mmcc_msm8974_gdscs), 2605 2537 }; 2606 2538 2607 2539 static const struct of_device_id mmcc_msm8974_match_table[] = {
+8
include/dt-bindings/clock/qcom,mmcc-msm8974.h
··· 158 158 #define SPDM_RM_AXI 141 159 159 #define SPDM_RM_OCMEMNOC 142 160 160 161 + /* gdscs */ 162 + #define VENUS0_GDSC 0 163 + #define MDSS_GDSC 1 164 + #define CAMSS_JPEG_GDSC 2 165 + #define CAMSS_VFE_GDSC 3 166 + #define OXILI_GDSC 4 167 + #define OXILICX_GDSC 5 168 + 161 169 #endif