diff options
Diffstat (limited to 'drivers/clk/qcom/gcc-msm8996.c')
-rw-r--r-- | drivers/clk/qcom/gcc-msm8996.c | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/drivers/clk/qcom/gcc-msm8996.c b/drivers/clk/qcom/gcc-msm8996.c index 16d7c323db49..bb8c61ff0176 100644 --- a/drivers/clk/qcom/gcc-msm8996.c +++ b/drivers/clk/qcom/gcc-msm8996.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include "clk-rcg.h" | 30 | #include "clk-rcg.h" |
31 | #include "clk-branch.h" | 31 | #include "clk-branch.h" |
32 | #include "reset.h" | 32 | #include "reset.h" |
33 | #include "gdsc.h" | ||
33 | 34 | ||
34 | #define F(f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) } | 35 | #define F(f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) } |
35 | 36 | ||
@@ -3059,6 +3060,83 @@ static struct clk_hw *gcc_msm8996_hws[] = { | |||
3059 | &ufs_ice_core_postdiv_clk_src.hw, | 3060 | &ufs_ice_core_postdiv_clk_src.hw, |
3060 | }; | 3061 | }; |
3061 | 3062 | ||
3063 | static struct gdsc aggre0_noc_gdsc = { | ||
3064 | .gdscr = 0x81004, | ||
3065 | .gds_hw_ctrl = 0x81028, | ||
3066 | .pd = { | ||
3067 | .name = "aggre0_noc", | ||
3068 | }, | ||
3069 | .pwrsts = PWRSTS_OFF_ON, | ||
3070 | .flags = VOTABLE, | ||
3071 | }; | ||
3072 | |||
3073 | static struct gdsc hlos1_vote_aggre0_noc_gdsc = { | ||
3074 | .gdscr = 0x7d024, | ||
3075 | .pd = { | ||
3076 | .name = "hlos1_vote_aggre0_noc", | ||
3077 | }, | ||
3078 | .pwrsts = PWRSTS_OFF_ON, | ||
3079 | .flags = VOTABLE, | ||
3080 | }; | ||
3081 | |||
3082 | static struct gdsc hlos1_vote_lpass_adsp_gdsc = { | ||
3083 | .gdscr = 0x7d034, | ||
3084 | .pd = { | ||
3085 | .name = "hlos1_vote_lpass_adsp", | ||
3086 | }, | ||
3087 | .pwrsts = PWRSTS_OFF_ON, | ||
3088 | .flags = VOTABLE, | ||
3089 | }; | ||
3090 | |||
3091 | static struct gdsc hlos1_vote_lpass_core_gdsc = { | ||
3092 | .gdscr = 0x7d038, | ||
3093 | .pd = { | ||
3094 | .name = "hlos1_vote_lpass_core", | ||
3095 | }, | ||
3096 | .pwrsts = PWRSTS_OFF_ON, | ||
3097 | .flags = VOTABLE, | ||
3098 | }; | ||
3099 | |||
3100 | static struct gdsc usb30_gdsc = { | ||
3101 | .gdscr = 0xf004, | ||
3102 | .pd = { | ||
3103 | .name = "usb30", | ||
3104 | }, | ||
3105 | .pwrsts = PWRSTS_OFF_ON, | ||
3106 | }; | ||
3107 | |||
3108 | static struct gdsc pcie0_gdsc = { | ||
3109 | .gdscr = 0x6b004, | ||
3110 | .pd = { | ||
3111 | .name = "pcie0", | ||
3112 | }, | ||
3113 | .pwrsts = PWRSTS_OFF_ON, | ||
3114 | }; | ||
3115 | |||
3116 | static struct gdsc pcie1_gdsc = { | ||
3117 | .gdscr = 0x6d004, | ||
3118 | .pd = { | ||
3119 | .name = "pcie1", | ||
3120 | }, | ||
3121 | .pwrsts = PWRSTS_OFF_ON, | ||
3122 | }; | ||
3123 | |||
3124 | static struct gdsc pcie2_gdsc = { | ||
3125 | .gdscr = 0x6e004, | ||
3126 | .pd = { | ||
3127 | .name = "pcie2", | ||
3128 | }, | ||
3129 | .pwrsts = PWRSTS_OFF_ON, | ||
3130 | }; | ||
3131 | |||
3132 | static struct gdsc ufs_gdsc = { | ||
3133 | .gdscr = 0x75004, | ||
3134 | .pd = { | ||
3135 | .name = "ufs", | ||
3136 | }, | ||
3137 | .pwrsts = PWRSTS_OFF_ON, | ||
3138 | }; | ||
3139 | |||
3062 | static struct clk_regmap *gcc_msm8996_clocks[] = { | 3140 | static struct clk_regmap *gcc_msm8996_clocks[] = { |
3063 | [GPLL0_EARLY] = &gpll0_early.clkr, | 3141 | [GPLL0_EARLY] = &gpll0_early.clkr, |
3064 | [GPLL0] = &gpll0.clkr, | 3142 | [GPLL0] = &gpll0.clkr, |
@@ -3245,6 +3323,18 @@ static struct clk_regmap *gcc_msm8996_clocks[] = { | |||
3245 | [GCC_RX1_USB2_CLKREF_CLK] = &gcc_rx1_usb2_clkref_clk.clkr, | 3323 | [GCC_RX1_USB2_CLKREF_CLK] = &gcc_rx1_usb2_clkref_clk.clkr, |
3246 | }; | 3324 | }; |
3247 | 3325 | ||
3326 | static struct gdsc *gcc_msm8996_gdscs[] = { | ||
3327 | [AGGRE0_NOC_GDSC] = &aggre0_noc_gdsc, | ||
3328 | [HLOS1_VOTE_AGGRE0_NOC_GDSC] = &hlos1_vote_aggre0_noc_gdsc, | ||
3329 | [HLOS1_VOTE_LPASS_ADSP_GDSC] = &hlos1_vote_lpass_adsp_gdsc, | ||
3330 | [HLOS1_VOTE_LPASS_CORE_GDSC] = &hlos1_vote_lpass_core_gdsc, | ||
3331 | [USB30_GDSC] = &usb30_gdsc, | ||
3332 | [PCIE0_GDSC] = &pcie0_gdsc, | ||
3333 | [PCIE1_GDSC] = &pcie1_gdsc, | ||
3334 | [PCIE2_GDSC] = &pcie2_gdsc, | ||
3335 | [UFS_GDSC] = &ufs_gdsc, | ||
3336 | }; | ||
3337 | |||
3248 | static const struct qcom_reset_map gcc_msm8996_resets[] = { | 3338 | static const struct qcom_reset_map gcc_msm8996_resets[] = { |
3249 | [GCC_SYSTEM_NOC_BCR] = { 0x4000 }, | 3339 | [GCC_SYSTEM_NOC_BCR] = { 0x4000 }, |
3250 | [GCC_CONFIG_NOC_BCR] = { 0x5000 }, | 3340 | [GCC_CONFIG_NOC_BCR] = { 0x5000 }, |
@@ -3363,6 +3453,8 @@ static const struct qcom_cc_desc gcc_msm8996_desc = { | |||
3363 | .num_clks = ARRAY_SIZE(gcc_msm8996_clocks), | 3453 | .num_clks = ARRAY_SIZE(gcc_msm8996_clocks), |
3364 | .resets = gcc_msm8996_resets, | 3454 | .resets = gcc_msm8996_resets, |
3365 | .num_resets = ARRAY_SIZE(gcc_msm8996_resets), | 3455 | .num_resets = ARRAY_SIZE(gcc_msm8996_resets), |
3456 | .gdscs = gcc_msm8996_gdscs, | ||
3457 | .num_gdscs = ARRAY_SIZE(gcc_msm8996_gdscs), | ||
3366 | }; | 3458 | }; |
3367 | 3459 | ||
3368 | static const struct of_device_id gcc_msm8996_match_table[] = { | 3460 | static const struct of_device_id gcc_msm8996_match_table[] = { |