1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
6 #include <linux/kernel.h>
7 #include <linux/bitops.h>
9 #include <linux/platform_device.h>
10 #include <linux/module.h>
12 #include <linux/of_device.h>
13 #include <linux/clk-provider.h>
14 #include <linux/regmap.h>
15 #include <linux/reset-controller.h>
17 #include <dt-bindings/clock/qcom,gcc-msm8960.h>
18 #include <dt-bindings/reset/qcom,gcc-msm8960.h>
21 #include "clk-regmap.h"
24 #include "clk-branch.h"
25 #include "clk-hfpll.h"
28 static struct clk_pll pll3 = {
36 .clkr.hw.init = &(struct clk_init_data){
38 .parent_names = (const char *[]){ "pxo" },
44 static struct clk_regmap pll4_vote = {
46 .enable_mask = BIT(4),
47 .hw.init = &(struct clk_init_data){
49 .parent_names = (const char *[]){ "pll4" },
51 .ops = &clk_pll_vote_ops,
55 static struct clk_pll pll8 = {
63 .clkr.hw.init = &(struct clk_init_data){
65 .parent_names = (const char *[]){ "pxo" },
71 static struct clk_regmap pll8_vote = {
73 .enable_mask = BIT(8),
74 .hw.init = &(struct clk_init_data){
76 .parent_names = (const char *[]){ "pll8" },
78 .ops = &clk_pll_vote_ops,
82 static struct hfpll_data hfpll0_data = {
89 .config_val = 0x7845c665,
91 .droop_val = 0x0108c000,
92 .min_rate = 600000000UL,
93 .max_rate = 1800000000UL,
96 static struct clk_hfpll hfpll0 = {
98 .clkr.hw.init = &(struct clk_init_data){
99 .parent_names = (const char *[]){ "pxo" },
102 .ops = &clk_ops_hfpll,
103 .flags = CLK_IGNORE_UNUSED,
105 .lock = __SPIN_LOCK_UNLOCKED(hfpll0.lock),
108 static struct hfpll_data hfpll1_8064_data = {
113 .config_reg = 0x3244,
114 .status_reg = 0x325c,
115 .config_val = 0x7845c665,
117 .droop_val = 0x0108c000,
118 .min_rate = 600000000UL,
119 .max_rate = 1800000000UL,
122 static struct hfpll_data hfpll1_data = {
127 .config_reg = 0x3304,
128 .status_reg = 0x331c,
129 .config_val = 0x7845c665,
131 .droop_val = 0x0108c000,
132 .min_rate = 600000000UL,
133 .max_rate = 1800000000UL,
136 static struct clk_hfpll hfpll1 = {
138 .clkr.hw.init = &(struct clk_init_data){
139 .parent_names = (const char *[]){ "pxo" },
142 .ops = &clk_ops_hfpll,
143 .flags = CLK_IGNORE_UNUSED,
145 .lock = __SPIN_LOCK_UNLOCKED(hfpll1.lock),
148 static struct hfpll_data hfpll2_data = {
153 .config_reg = 0x3284,
154 .status_reg = 0x329c,
155 .config_val = 0x7845c665,
157 .droop_val = 0x0108c000,
158 .min_rate = 600000000UL,
159 .max_rate = 1800000000UL,
162 static struct clk_hfpll hfpll2 = {
164 .clkr.hw.init = &(struct clk_init_data){
165 .parent_names = (const char *[]){ "pxo" },
168 .ops = &clk_ops_hfpll,
169 .flags = CLK_IGNORE_UNUSED,
171 .lock = __SPIN_LOCK_UNLOCKED(hfpll2.lock),
174 static struct hfpll_data hfpll3_data = {
179 .config_reg = 0x32c4,
180 .status_reg = 0x32dc,
181 .config_val = 0x7845c665,
183 .droop_val = 0x0108c000,
184 .min_rate = 600000000UL,
185 .max_rate = 1800000000UL,
188 static struct clk_hfpll hfpll3 = {
190 .clkr.hw.init = &(struct clk_init_data){
191 .parent_names = (const char *[]){ "pxo" },
194 .ops = &clk_ops_hfpll,
195 .flags = CLK_IGNORE_UNUSED,
197 .lock = __SPIN_LOCK_UNLOCKED(hfpll3.lock),
200 static struct hfpll_data hfpll_l2_8064_data = {
205 .config_reg = 0x3304,
206 .status_reg = 0x331c,
207 .config_val = 0x7845c665,
209 .droop_val = 0x0108c000,
210 .min_rate = 600000000UL,
211 .max_rate = 1800000000UL,
214 static struct hfpll_data hfpll_l2_data = {
219 .config_reg = 0x3404,
220 .status_reg = 0x341c,
221 .config_val = 0x7845c665,
223 .droop_val = 0x0108c000,
224 .min_rate = 600000000UL,
225 .max_rate = 1800000000UL,
228 static struct clk_hfpll hfpll_l2 = {
230 .clkr.hw.init = &(struct clk_init_data){
231 .parent_names = (const char *[]){ "pxo" },
234 .ops = &clk_ops_hfpll,
235 .flags = CLK_IGNORE_UNUSED,
237 .lock = __SPIN_LOCK_UNLOCKED(hfpll_l2.lock),
240 static struct clk_pll pll14 = {
244 .config_reg = 0x31d4,
246 .status_reg = 0x31d8,
248 .clkr.hw.init = &(struct clk_init_data){
250 .parent_names = (const char *[]){ "pxo" },
256 static struct clk_regmap pll14_vote = {
257 .enable_reg = 0x34c0,
258 .enable_mask = BIT(14),
259 .hw.init = &(struct clk_init_data){
260 .name = "pll14_vote",
261 .parent_names = (const char *[]){ "pll14" },
263 .ops = &clk_pll_vote_ops,
274 static const struct parent_map gcc_pxo_pll8_map[] = {
279 static const char * const gcc_pxo_pll8[] = {
284 static const struct parent_map gcc_pxo_pll8_cxo_map[] = {
290 static const char * const gcc_pxo_pll8_cxo[] = {
296 static const struct parent_map gcc_pxo_pll8_pll3_map[] = {
302 static const char * const gcc_pxo_pll8_pll3[] = {
308 static struct freq_tbl clk_tbl_gsbi_uart[] = {
309 { 1843200, P_PLL8, 2, 6, 625 },
310 { 3686400, P_PLL8, 2, 12, 625 },
311 { 7372800, P_PLL8, 2, 24, 625 },
312 { 14745600, P_PLL8, 2, 48, 625 },
313 { 16000000, P_PLL8, 4, 1, 6 },
314 { 24000000, P_PLL8, 4, 1, 4 },
315 { 32000000, P_PLL8, 4, 1, 3 },
316 { 40000000, P_PLL8, 1, 5, 48 },
317 { 46400000, P_PLL8, 1, 29, 240 },
318 { 48000000, P_PLL8, 4, 1, 2 },
319 { 51200000, P_PLL8, 1, 2, 15 },
320 { 56000000, P_PLL8, 1, 7, 48 },
321 { 58982400, P_PLL8, 1, 96, 625 },
322 { 64000000, P_PLL8, 2, 1, 3 },
326 static struct clk_rcg gsbi1_uart_src = {
331 .mnctr_reset_bit = 7,
332 .mnctr_mode_shift = 5,
343 .parent_map = gcc_pxo_pll8_map,
345 .freq_tbl = clk_tbl_gsbi_uart,
347 .enable_reg = 0x29d4,
348 .enable_mask = BIT(11),
349 .hw.init = &(struct clk_init_data){
350 .name = "gsbi1_uart_src",
351 .parent_names = gcc_pxo_pll8,
354 .flags = CLK_SET_PARENT_GATE,
359 static struct clk_branch gsbi1_uart_clk = {
363 .enable_reg = 0x29d4,
364 .enable_mask = BIT(9),
365 .hw.init = &(struct clk_init_data){
366 .name = "gsbi1_uart_clk",
367 .parent_names = (const char *[]){
371 .ops = &clk_branch_ops,
372 .flags = CLK_SET_RATE_PARENT,
377 static struct clk_rcg gsbi2_uart_src = {
382 .mnctr_reset_bit = 7,
383 .mnctr_mode_shift = 5,
394 .parent_map = gcc_pxo_pll8_map,
396 .freq_tbl = clk_tbl_gsbi_uart,
398 .enable_reg = 0x29f4,
399 .enable_mask = BIT(11),
400 .hw.init = &(struct clk_init_data){
401 .name = "gsbi2_uart_src",
402 .parent_names = gcc_pxo_pll8,
405 .flags = CLK_SET_PARENT_GATE,
410 static struct clk_branch gsbi2_uart_clk = {
414 .enable_reg = 0x29f4,
415 .enable_mask = BIT(9),
416 .hw.init = &(struct clk_init_data){
417 .name = "gsbi2_uart_clk",
418 .parent_names = (const char *[]){
422 .ops = &clk_branch_ops,
423 .flags = CLK_SET_RATE_PARENT,
428 static struct clk_rcg gsbi3_uart_src = {
433 .mnctr_reset_bit = 7,
434 .mnctr_mode_shift = 5,
445 .parent_map = gcc_pxo_pll8_map,
447 .freq_tbl = clk_tbl_gsbi_uart,
449 .enable_reg = 0x2a14,
450 .enable_mask = BIT(11),
451 .hw.init = &(struct clk_init_data){
452 .name = "gsbi3_uart_src",
453 .parent_names = gcc_pxo_pll8,
456 .flags = CLK_SET_PARENT_GATE,
461 static struct clk_branch gsbi3_uart_clk = {
465 .enable_reg = 0x2a14,
466 .enable_mask = BIT(9),
467 .hw.init = &(struct clk_init_data){
468 .name = "gsbi3_uart_clk",
469 .parent_names = (const char *[]){
473 .ops = &clk_branch_ops,
474 .flags = CLK_SET_RATE_PARENT,
479 static struct clk_rcg gsbi4_uart_src = {
484 .mnctr_reset_bit = 7,
485 .mnctr_mode_shift = 5,
496 .parent_map = gcc_pxo_pll8_map,
498 .freq_tbl = clk_tbl_gsbi_uart,
500 .enable_reg = 0x2a34,
501 .enable_mask = BIT(11),
502 .hw.init = &(struct clk_init_data){
503 .name = "gsbi4_uart_src",
504 .parent_names = gcc_pxo_pll8,
507 .flags = CLK_SET_PARENT_GATE,
512 static struct clk_branch gsbi4_uart_clk = {
516 .enable_reg = 0x2a34,
517 .enable_mask = BIT(9),
518 .hw.init = &(struct clk_init_data){
519 .name = "gsbi4_uart_clk",
520 .parent_names = (const char *[]){
524 .ops = &clk_branch_ops,
525 .flags = CLK_SET_RATE_PARENT,
530 static struct clk_rcg gsbi5_uart_src = {
535 .mnctr_reset_bit = 7,
536 .mnctr_mode_shift = 5,
547 .parent_map = gcc_pxo_pll8_map,
549 .freq_tbl = clk_tbl_gsbi_uart,
551 .enable_reg = 0x2a54,
552 .enable_mask = BIT(11),
553 .hw.init = &(struct clk_init_data){
554 .name = "gsbi5_uart_src",
555 .parent_names = gcc_pxo_pll8,
558 .flags = CLK_SET_PARENT_GATE,
563 static struct clk_branch gsbi5_uart_clk = {
567 .enable_reg = 0x2a54,
568 .enable_mask = BIT(9),
569 .hw.init = &(struct clk_init_data){
570 .name = "gsbi5_uart_clk",
571 .parent_names = (const char *[]){
575 .ops = &clk_branch_ops,
576 .flags = CLK_SET_RATE_PARENT,
581 static struct clk_rcg gsbi6_uart_src = {
586 .mnctr_reset_bit = 7,
587 .mnctr_mode_shift = 5,
598 .parent_map = gcc_pxo_pll8_map,
600 .freq_tbl = clk_tbl_gsbi_uart,
602 .enable_reg = 0x2a74,
603 .enable_mask = BIT(11),
604 .hw.init = &(struct clk_init_data){
605 .name = "gsbi6_uart_src",
606 .parent_names = gcc_pxo_pll8,
609 .flags = CLK_SET_PARENT_GATE,
614 static struct clk_branch gsbi6_uart_clk = {
618 .enable_reg = 0x2a74,
619 .enable_mask = BIT(9),
620 .hw.init = &(struct clk_init_data){
621 .name = "gsbi6_uart_clk",
622 .parent_names = (const char *[]){
626 .ops = &clk_branch_ops,
627 .flags = CLK_SET_RATE_PARENT,
632 static struct clk_rcg gsbi7_uart_src = {
637 .mnctr_reset_bit = 7,
638 .mnctr_mode_shift = 5,
649 .parent_map = gcc_pxo_pll8_map,
651 .freq_tbl = clk_tbl_gsbi_uart,
653 .enable_reg = 0x2a94,
654 .enable_mask = BIT(11),
655 .hw.init = &(struct clk_init_data){
656 .name = "gsbi7_uart_src",
657 .parent_names = gcc_pxo_pll8,
660 .flags = CLK_SET_PARENT_GATE,
665 static struct clk_branch gsbi7_uart_clk = {
669 .enable_reg = 0x2a94,
670 .enable_mask = BIT(9),
671 .hw.init = &(struct clk_init_data){
672 .name = "gsbi7_uart_clk",
673 .parent_names = (const char *[]){
677 .ops = &clk_branch_ops,
678 .flags = CLK_SET_RATE_PARENT,
683 static struct clk_rcg gsbi8_uart_src = {
688 .mnctr_reset_bit = 7,
689 .mnctr_mode_shift = 5,
700 .parent_map = gcc_pxo_pll8_map,
702 .freq_tbl = clk_tbl_gsbi_uart,
704 .enable_reg = 0x2ab4,
705 .enable_mask = BIT(11),
706 .hw.init = &(struct clk_init_data){
707 .name = "gsbi8_uart_src",
708 .parent_names = gcc_pxo_pll8,
711 .flags = CLK_SET_PARENT_GATE,
716 static struct clk_branch gsbi8_uart_clk = {
720 .enable_reg = 0x2ab4,
721 .enable_mask = BIT(9),
722 .hw.init = &(struct clk_init_data){
723 .name = "gsbi8_uart_clk",
724 .parent_names = (const char *[]){ "gsbi8_uart_src" },
726 .ops = &clk_branch_ops,
727 .flags = CLK_SET_RATE_PARENT,
732 static struct clk_rcg gsbi9_uart_src = {
737 .mnctr_reset_bit = 7,
738 .mnctr_mode_shift = 5,
749 .parent_map = gcc_pxo_pll8_map,
751 .freq_tbl = clk_tbl_gsbi_uart,
753 .enable_reg = 0x2ad4,
754 .enable_mask = BIT(11),
755 .hw.init = &(struct clk_init_data){
756 .name = "gsbi9_uart_src",
757 .parent_names = gcc_pxo_pll8,
760 .flags = CLK_SET_PARENT_GATE,
765 static struct clk_branch gsbi9_uart_clk = {
769 .enable_reg = 0x2ad4,
770 .enable_mask = BIT(9),
771 .hw.init = &(struct clk_init_data){
772 .name = "gsbi9_uart_clk",
773 .parent_names = (const char *[]){ "gsbi9_uart_src" },
775 .ops = &clk_branch_ops,
776 .flags = CLK_SET_RATE_PARENT,
781 static struct clk_rcg gsbi10_uart_src = {
786 .mnctr_reset_bit = 7,
787 .mnctr_mode_shift = 5,
798 .parent_map = gcc_pxo_pll8_map,
800 .freq_tbl = clk_tbl_gsbi_uart,
802 .enable_reg = 0x2af4,
803 .enable_mask = BIT(11),
804 .hw.init = &(struct clk_init_data){
805 .name = "gsbi10_uart_src",
806 .parent_names = gcc_pxo_pll8,
809 .flags = CLK_SET_PARENT_GATE,
814 static struct clk_branch gsbi10_uart_clk = {
818 .enable_reg = 0x2af4,
819 .enable_mask = BIT(9),
820 .hw.init = &(struct clk_init_data){
821 .name = "gsbi10_uart_clk",
822 .parent_names = (const char *[]){ "gsbi10_uart_src" },
824 .ops = &clk_branch_ops,
825 .flags = CLK_SET_RATE_PARENT,
830 static struct clk_rcg gsbi11_uart_src = {
835 .mnctr_reset_bit = 7,
836 .mnctr_mode_shift = 5,
847 .parent_map = gcc_pxo_pll8_map,
849 .freq_tbl = clk_tbl_gsbi_uart,
851 .enable_reg = 0x2b14,
852 .enable_mask = BIT(11),
853 .hw.init = &(struct clk_init_data){
854 .name = "gsbi11_uart_src",
855 .parent_names = gcc_pxo_pll8,
858 .flags = CLK_SET_PARENT_GATE,
863 static struct clk_branch gsbi11_uart_clk = {
867 .enable_reg = 0x2b14,
868 .enable_mask = BIT(9),
869 .hw.init = &(struct clk_init_data){
870 .name = "gsbi11_uart_clk",
871 .parent_names = (const char *[]){ "gsbi11_uart_src" },
873 .ops = &clk_branch_ops,
874 .flags = CLK_SET_RATE_PARENT,
879 static struct clk_rcg gsbi12_uart_src = {
884 .mnctr_reset_bit = 7,
885 .mnctr_mode_shift = 5,
896 .parent_map = gcc_pxo_pll8_map,
898 .freq_tbl = clk_tbl_gsbi_uart,
900 .enable_reg = 0x2b34,
901 .enable_mask = BIT(11),
902 .hw.init = &(struct clk_init_data){
903 .name = "gsbi12_uart_src",
904 .parent_names = gcc_pxo_pll8,
907 .flags = CLK_SET_PARENT_GATE,
912 static struct clk_branch gsbi12_uart_clk = {
916 .enable_reg = 0x2b34,
917 .enable_mask = BIT(9),
918 .hw.init = &(struct clk_init_data){
919 .name = "gsbi12_uart_clk",
920 .parent_names = (const char *[]){ "gsbi12_uart_src" },
922 .ops = &clk_branch_ops,
923 .flags = CLK_SET_RATE_PARENT,
928 static struct freq_tbl clk_tbl_gsbi_qup[] = {
929 { 1100000, P_PXO, 1, 2, 49 },
930 { 5400000, P_PXO, 1, 1, 5 },
931 { 10800000, P_PXO, 1, 2, 5 },
932 { 15060000, P_PLL8, 1, 2, 51 },
933 { 24000000, P_PLL8, 4, 1, 4 },
934 { 25600000, P_PLL8, 1, 1, 15 },
935 { 27000000, P_PXO, 1, 0, 0 },
936 { 48000000, P_PLL8, 4, 1, 2 },
937 { 51200000, P_PLL8, 1, 2, 15 },
941 static struct clk_rcg gsbi1_qup_src = {
946 .mnctr_reset_bit = 7,
947 .mnctr_mode_shift = 5,
958 .parent_map = gcc_pxo_pll8_map,
960 .freq_tbl = clk_tbl_gsbi_qup,
962 .enable_reg = 0x29cc,
963 .enable_mask = BIT(11),
964 .hw.init = &(struct clk_init_data){
965 .name = "gsbi1_qup_src",
966 .parent_names = gcc_pxo_pll8,
969 .flags = CLK_SET_PARENT_GATE,
974 static struct clk_branch gsbi1_qup_clk = {
978 .enable_reg = 0x29cc,
979 .enable_mask = BIT(9),
980 .hw.init = &(struct clk_init_data){
981 .name = "gsbi1_qup_clk",
982 .parent_names = (const char *[]){ "gsbi1_qup_src" },
984 .ops = &clk_branch_ops,
985 .flags = CLK_SET_RATE_PARENT,
990 static struct clk_rcg gsbi2_qup_src = {
995 .mnctr_reset_bit = 7,
996 .mnctr_mode_shift = 5,
1007 .parent_map = gcc_pxo_pll8_map,
1009 .freq_tbl = clk_tbl_gsbi_qup,
1011 .enable_reg = 0x29ec,
1012 .enable_mask = BIT(11),
1013 .hw.init = &(struct clk_init_data){
1014 .name = "gsbi2_qup_src",
1015 .parent_names = gcc_pxo_pll8,
1017 .ops = &clk_rcg_ops,
1018 .flags = CLK_SET_PARENT_GATE,
1023 static struct clk_branch gsbi2_qup_clk = {
1027 .enable_reg = 0x29ec,
1028 .enable_mask = BIT(9),
1029 .hw.init = &(struct clk_init_data){
1030 .name = "gsbi2_qup_clk",
1031 .parent_names = (const char *[]){ "gsbi2_qup_src" },
1033 .ops = &clk_branch_ops,
1034 .flags = CLK_SET_RATE_PARENT,
1039 static struct clk_rcg gsbi3_qup_src = {
1044 .mnctr_reset_bit = 7,
1045 .mnctr_mode_shift = 5,
1056 .parent_map = gcc_pxo_pll8_map,
1058 .freq_tbl = clk_tbl_gsbi_qup,
1060 .enable_reg = 0x2a0c,
1061 .enable_mask = BIT(11),
1062 .hw.init = &(struct clk_init_data){
1063 .name = "gsbi3_qup_src",
1064 .parent_names = gcc_pxo_pll8,
1066 .ops = &clk_rcg_ops,
1067 .flags = CLK_SET_PARENT_GATE,
1072 static struct clk_branch gsbi3_qup_clk = {
1076 .enable_reg = 0x2a0c,
1077 .enable_mask = BIT(9),
1078 .hw.init = &(struct clk_init_data){
1079 .name = "gsbi3_qup_clk",
1080 .parent_names = (const char *[]){ "gsbi3_qup_src" },
1082 .ops = &clk_branch_ops,
1083 .flags = CLK_SET_RATE_PARENT,
1088 static struct clk_rcg gsbi4_qup_src = {
1093 .mnctr_reset_bit = 7,
1094 .mnctr_mode_shift = 5,
1105 .parent_map = gcc_pxo_pll8_map,
1107 .freq_tbl = clk_tbl_gsbi_qup,
1109 .enable_reg = 0x2a2c,
1110 .enable_mask = BIT(11),
1111 .hw.init = &(struct clk_init_data){
1112 .name = "gsbi4_qup_src",
1113 .parent_names = gcc_pxo_pll8,
1115 .ops = &clk_rcg_ops,
1116 .flags = CLK_SET_PARENT_GATE,
1121 static struct clk_branch gsbi4_qup_clk = {
1125 .enable_reg = 0x2a2c,
1126 .enable_mask = BIT(9),
1127 .hw.init = &(struct clk_init_data){
1128 .name = "gsbi4_qup_clk",
1129 .parent_names = (const char *[]){ "gsbi4_qup_src" },
1131 .ops = &clk_branch_ops,
1132 .flags = CLK_SET_RATE_PARENT,
1137 static struct clk_rcg gsbi5_qup_src = {
1142 .mnctr_reset_bit = 7,
1143 .mnctr_mode_shift = 5,
1154 .parent_map = gcc_pxo_pll8_map,
1156 .freq_tbl = clk_tbl_gsbi_qup,
1158 .enable_reg = 0x2a4c,
1159 .enable_mask = BIT(11),
1160 .hw.init = &(struct clk_init_data){
1161 .name = "gsbi5_qup_src",
1162 .parent_names = gcc_pxo_pll8,
1164 .ops = &clk_rcg_ops,
1165 .flags = CLK_SET_PARENT_GATE,
1170 static struct clk_branch gsbi5_qup_clk = {
1174 .enable_reg = 0x2a4c,
1175 .enable_mask = BIT(9),
1176 .hw.init = &(struct clk_init_data){
1177 .name = "gsbi5_qup_clk",
1178 .parent_names = (const char *[]){ "gsbi5_qup_src" },
1180 .ops = &clk_branch_ops,
1181 .flags = CLK_SET_RATE_PARENT,
1186 static struct clk_rcg gsbi6_qup_src = {
1191 .mnctr_reset_bit = 7,
1192 .mnctr_mode_shift = 5,
1203 .parent_map = gcc_pxo_pll8_map,
1205 .freq_tbl = clk_tbl_gsbi_qup,
1207 .enable_reg = 0x2a6c,
1208 .enable_mask = BIT(11),
1209 .hw.init = &(struct clk_init_data){
1210 .name = "gsbi6_qup_src",
1211 .parent_names = gcc_pxo_pll8,
1213 .ops = &clk_rcg_ops,
1214 .flags = CLK_SET_PARENT_GATE,
1219 static struct clk_branch gsbi6_qup_clk = {
1223 .enable_reg = 0x2a6c,
1224 .enable_mask = BIT(9),
1225 .hw.init = &(struct clk_init_data){
1226 .name = "gsbi6_qup_clk",
1227 .parent_names = (const char *[]){ "gsbi6_qup_src" },
1229 .ops = &clk_branch_ops,
1230 .flags = CLK_SET_RATE_PARENT,
1235 static struct clk_rcg gsbi7_qup_src = {
1240 .mnctr_reset_bit = 7,
1241 .mnctr_mode_shift = 5,
1252 .parent_map = gcc_pxo_pll8_map,
1254 .freq_tbl = clk_tbl_gsbi_qup,
1256 .enable_reg = 0x2a8c,
1257 .enable_mask = BIT(11),
1258 .hw.init = &(struct clk_init_data){
1259 .name = "gsbi7_qup_src",
1260 .parent_names = gcc_pxo_pll8,
1262 .ops = &clk_rcg_ops,
1263 .flags = CLK_SET_PARENT_GATE,
1268 static struct clk_branch gsbi7_qup_clk = {
1272 .enable_reg = 0x2a8c,
1273 .enable_mask = BIT(9),
1274 .hw.init = &(struct clk_init_data){
1275 .name = "gsbi7_qup_clk",
1276 .parent_names = (const char *[]){ "gsbi7_qup_src" },
1278 .ops = &clk_branch_ops,
1279 .flags = CLK_SET_RATE_PARENT,
1284 static struct clk_rcg gsbi8_qup_src = {
1289 .mnctr_reset_bit = 7,
1290 .mnctr_mode_shift = 5,
1301 .parent_map = gcc_pxo_pll8_map,
1303 .freq_tbl = clk_tbl_gsbi_qup,
1305 .enable_reg = 0x2aac,
1306 .enable_mask = BIT(11),
1307 .hw.init = &(struct clk_init_data){
1308 .name = "gsbi8_qup_src",
1309 .parent_names = gcc_pxo_pll8,
1311 .ops = &clk_rcg_ops,
1312 .flags = CLK_SET_PARENT_GATE,
1317 static struct clk_branch gsbi8_qup_clk = {
1321 .enable_reg = 0x2aac,
1322 .enable_mask = BIT(9),
1323 .hw.init = &(struct clk_init_data){
1324 .name = "gsbi8_qup_clk",
1325 .parent_names = (const char *[]){ "gsbi8_qup_src" },
1327 .ops = &clk_branch_ops,
1328 .flags = CLK_SET_RATE_PARENT,
1333 static struct clk_rcg gsbi9_qup_src = {
1338 .mnctr_reset_bit = 7,
1339 .mnctr_mode_shift = 5,
1350 .parent_map = gcc_pxo_pll8_map,
1352 .freq_tbl = clk_tbl_gsbi_qup,
1354 .enable_reg = 0x2acc,
1355 .enable_mask = BIT(11),
1356 .hw.init = &(struct clk_init_data){
1357 .name = "gsbi9_qup_src",
1358 .parent_names = gcc_pxo_pll8,
1360 .ops = &clk_rcg_ops,
1361 .flags = CLK_SET_PARENT_GATE,
1366 static struct clk_branch gsbi9_qup_clk = {
1370 .enable_reg = 0x2acc,
1371 .enable_mask = BIT(9),
1372 .hw.init = &(struct clk_init_data){
1373 .name = "gsbi9_qup_clk",
1374 .parent_names = (const char *[]){ "gsbi9_qup_src" },
1376 .ops = &clk_branch_ops,
1377 .flags = CLK_SET_RATE_PARENT,
1382 static struct clk_rcg gsbi10_qup_src = {
1387 .mnctr_reset_bit = 7,
1388 .mnctr_mode_shift = 5,
1399 .parent_map = gcc_pxo_pll8_map,
1401 .freq_tbl = clk_tbl_gsbi_qup,
1403 .enable_reg = 0x2aec,
1404 .enable_mask = BIT(11),
1405 .hw.init = &(struct clk_init_data){
1406 .name = "gsbi10_qup_src",
1407 .parent_names = gcc_pxo_pll8,
1409 .ops = &clk_rcg_ops,
1410 .flags = CLK_SET_PARENT_GATE,
1415 static struct clk_branch gsbi10_qup_clk = {
1419 .enable_reg = 0x2aec,
1420 .enable_mask = BIT(9),
1421 .hw.init = &(struct clk_init_data){
1422 .name = "gsbi10_qup_clk",
1423 .parent_names = (const char *[]){ "gsbi10_qup_src" },
1425 .ops = &clk_branch_ops,
1426 .flags = CLK_SET_RATE_PARENT,
1431 static struct clk_rcg gsbi11_qup_src = {
1436 .mnctr_reset_bit = 7,
1437 .mnctr_mode_shift = 5,
1448 .parent_map = gcc_pxo_pll8_map,
1450 .freq_tbl = clk_tbl_gsbi_qup,
1452 .enable_reg = 0x2b0c,
1453 .enable_mask = BIT(11),
1454 .hw.init = &(struct clk_init_data){
1455 .name = "gsbi11_qup_src",
1456 .parent_names = gcc_pxo_pll8,
1458 .ops = &clk_rcg_ops,
1459 .flags = CLK_SET_PARENT_GATE,
1464 static struct clk_branch gsbi11_qup_clk = {
1468 .enable_reg = 0x2b0c,
1469 .enable_mask = BIT(9),
1470 .hw.init = &(struct clk_init_data){
1471 .name = "gsbi11_qup_clk",
1472 .parent_names = (const char *[]){ "gsbi11_qup_src" },
1474 .ops = &clk_branch_ops,
1475 .flags = CLK_SET_RATE_PARENT,
1480 static struct clk_rcg gsbi12_qup_src = {
1485 .mnctr_reset_bit = 7,
1486 .mnctr_mode_shift = 5,
1497 .parent_map = gcc_pxo_pll8_map,
1499 .freq_tbl = clk_tbl_gsbi_qup,
1501 .enable_reg = 0x2b2c,
1502 .enable_mask = BIT(11),
1503 .hw.init = &(struct clk_init_data){
1504 .name = "gsbi12_qup_src",
1505 .parent_names = gcc_pxo_pll8,
1507 .ops = &clk_rcg_ops,
1508 .flags = CLK_SET_PARENT_GATE,
1513 static struct clk_branch gsbi12_qup_clk = {
1517 .enable_reg = 0x2b2c,
1518 .enable_mask = BIT(9),
1519 .hw.init = &(struct clk_init_data){
1520 .name = "gsbi12_qup_clk",
1521 .parent_names = (const char *[]){ "gsbi12_qup_src" },
1523 .ops = &clk_branch_ops,
1524 .flags = CLK_SET_RATE_PARENT,
1529 static const struct freq_tbl clk_tbl_gp[] = {
1530 { 9600000, P_CXO, 2, 0, 0 },
1531 { 13500000, P_PXO, 2, 0, 0 },
1532 { 19200000, P_CXO, 1, 0, 0 },
1533 { 27000000, P_PXO, 1, 0, 0 },
1534 { 64000000, P_PLL8, 2, 1, 3 },
1535 { 76800000, P_PLL8, 1, 1, 5 },
1536 { 96000000, P_PLL8, 4, 0, 0 },
1537 { 128000000, P_PLL8, 3, 0, 0 },
1538 { 192000000, P_PLL8, 2, 0, 0 },
1542 static struct clk_rcg gp0_src = {
1547 .mnctr_reset_bit = 7,
1548 .mnctr_mode_shift = 5,
1559 .parent_map = gcc_pxo_pll8_cxo_map,
1561 .freq_tbl = clk_tbl_gp,
1563 .enable_reg = 0x2d24,
1564 .enable_mask = BIT(11),
1565 .hw.init = &(struct clk_init_data){
1567 .parent_names = gcc_pxo_pll8_cxo,
1569 .ops = &clk_rcg_ops,
1570 .flags = CLK_SET_PARENT_GATE,
1575 static struct clk_branch gp0_clk = {
1579 .enable_reg = 0x2d24,
1580 .enable_mask = BIT(9),
1581 .hw.init = &(struct clk_init_data){
1583 .parent_names = (const char *[]){ "gp0_src" },
1585 .ops = &clk_branch_ops,
1586 .flags = CLK_SET_RATE_PARENT,
1591 static struct clk_rcg gp1_src = {
1596 .mnctr_reset_bit = 7,
1597 .mnctr_mode_shift = 5,
1608 .parent_map = gcc_pxo_pll8_cxo_map,
1610 .freq_tbl = clk_tbl_gp,
1612 .enable_reg = 0x2d44,
1613 .enable_mask = BIT(11),
1614 .hw.init = &(struct clk_init_data){
1616 .parent_names = gcc_pxo_pll8_cxo,
1618 .ops = &clk_rcg_ops,
1619 .flags = CLK_SET_RATE_GATE,
1624 static struct clk_branch gp1_clk = {
1628 .enable_reg = 0x2d44,
1629 .enable_mask = BIT(9),
1630 .hw.init = &(struct clk_init_data){
1632 .parent_names = (const char *[]){ "gp1_src" },
1634 .ops = &clk_branch_ops,
1635 .flags = CLK_SET_RATE_PARENT,
1640 static struct clk_rcg gp2_src = {
1645 .mnctr_reset_bit = 7,
1646 .mnctr_mode_shift = 5,
1657 .parent_map = gcc_pxo_pll8_cxo_map,
1659 .freq_tbl = clk_tbl_gp,
1661 .enable_reg = 0x2d64,
1662 .enable_mask = BIT(11),
1663 .hw.init = &(struct clk_init_data){
1665 .parent_names = gcc_pxo_pll8_cxo,
1667 .ops = &clk_rcg_ops,
1668 .flags = CLK_SET_RATE_GATE,
1673 static struct clk_branch gp2_clk = {
1677 .enable_reg = 0x2d64,
1678 .enable_mask = BIT(9),
1679 .hw.init = &(struct clk_init_data){
1681 .parent_names = (const char *[]){ "gp2_src" },
1683 .ops = &clk_branch_ops,
1684 .flags = CLK_SET_RATE_PARENT,
1689 static struct clk_branch pmem_clk = {
1695 .enable_reg = 0x25a0,
1696 .enable_mask = BIT(4),
1697 .hw.init = &(struct clk_init_data){
1699 .ops = &clk_branch_ops,
1704 static struct clk_rcg prng_src = {
1712 .parent_map = gcc_pxo_pll8_map,
1715 .hw.init = &(struct clk_init_data){
1717 .parent_names = gcc_pxo_pll8,
1719 .ops = &clk_rcg_ops,
1724 static struct clk_branch prng_clk = {
1726 .halt_check = BRANCH_HALT_VOTED,
1729 .enable_reg = 0x3080,
1730 .enable_mask = BIT(10),
1731 .hw.init = &(struct clk_init_data){
1733 .parent_names = (const char *[]){ "prng_src" },
1735 .ops = &clk_branch_ops,
1740 static const struct freq_tbl clk_tbl_sdc[] = {
1741 { 144000, P_PXO, 3, 2, 125 },
1742 { 400000, P_PLL8, 4, 1, 240 },
1743 { 16000000, P_PLL8, 4, 1, 6 },
1744 { 17070000, P_PLL8, 1, 2, 45 },
1745 { 20210000, P_PLL8, 1, 1, 19 },
1746 { 24000000, P_PLL8, 4, 1, 4 },
1747 { 48000000, P_PLL8, 4, 1, 2 },
1748 { 64000000, P_PLL8, 3, 1, 2 },
1749 { 96000000, P_PLL8, 4, 0, 0 },
1750 { 192000000, P_PLL8, 2, 0, 0 },
1754 static struct clk_rcg sdc1_src = {
1759 .mnctr_reset_bit = 7,
1760 .mnctr_mode_shift = 5,
1771 .parent_map = gcc_pxo_pll8_map,
1773 .freq_tbl = clk_tbl_sdc,
1775 .enable_reg = 0x282c,
1776 .enable_mask = BIT(11),
1777 .hw.init = &(struct clk_init_data){
1779 .parent_names = gcc_pxo_pll8,
1781 .ops = &clk_rcg_ops,
1786 static struct clk_branch sdc1_clk = {
1790 .enable_reg = 0x282c,
1791 .enable_mask = BIT(9),
1792 .hw.init = &(struct clk_init_data){
1794 .parent_names = (const char *[]){ "sdc1_src" },
1796 .ops = &clk_branch_ops,
1797 .flags = CLK_SET_RATE_PARENT,
1802 static struct clk_rcg sdc2_src = {
1807 .mnctr_reset_bit = 7,
1808 .mnctr_mode_shift = 5,
1819 .parent_map = gcc_pxo_pll8_map,
1821 .freq_tbl = clk_tbl_sdc,
1823 .enable_reg = 0x284c,
1824 .enable_mask = BIT(11),
1825 .hw.init = &(struct clk_init_data){
1827 .parent_names = gcc_pxo_pll8,
1829 .ops = &clk_rcg_ops,
1834 static struct clk_branch sdc2_clk = {
1838 .enable_reg = 0x284c,
1839 .enable_mask = BIT(9),
1840 .hw.init = &(struct clk_init_data){
1842 .parent_names = (const char *[]){ "sdc2_src" },
1844 .ops = &clk_branch_ops,
1845 .flags = CLK_SET_RATE_PARENT,
1850 static struct clk_rcg sdc3_src = {
1855 .mnctr_reset_bit = 7,
1856 .mnctr_mode_shift = 5,
1867 .parent_map = gcc_pxo_pll8_map,
1869 .freq_tbl = clk_tbl_sdc,
1871 .enable_reg = 0x286c,
1872 .enable_mask = BIT(11),
1873 .hw.init = &(struct clk_init_data){
1875 .parent_names = gcc_pxo_pll8,
1877 .ops = &clk_rcg_ops,
1882 static struct clk_branch sdc3_clk = {
1886 .enable_reg = 0x286c,
1887 .enable_mask = BIT(9),
1888 .hw.init = &(struct clk_init_data){
1890 .parent_names = (const char *[]){ "sdc3_src" },
1892 .ops = &clk_branch_ops,
1893 .flags = CLK_SET_RATE_PARENT,
1898 static struct clk_rcg sdc4_src = {
1903 .mnctr_reset_bit = 7,
1904 .mnctr_mode_shift = 5,
1915 .parent_map = gcc_pxo_pll8_map,
1917 .freq_tbl = clk_tbl_sdc,
1919 .enable_reg = 0x288c,
1920 .enable_mask = BIT(11),
1921 .hw.init = &(struct clk_init_data){
1923 .parent_names = gcc_pxo_pll8,
1925 .ops = &clk_rcg_ops,
1930 static struct clk_branch sdc4_clk = {
1934 .enable_reg = 0x288c,
1935 .enable_mask = BIT(9),
1936 .hw.init = &(struct clk_init_data){
1938 .parent_names = (const char *[]){ "sdc4_src" },
1940 .ops = &clk_branch_ops,
1941 .flags = CLK_SET_RATE_PARENT,
1946 static struct clk_rcg sdc5_src = {
1951 .mnctr_reset_bit = 7,
1952 .mnctr_mode_shift = 5,
1963 .parent_map = gcc_pxo_pll8_map,
1965 .freq_tbl = clk_tbl_sdc,
1967 .enable_reg = 0x28ac,
1968 .enable_mask = BIT(11),
1969 .hw.init = &(struct clk_init_data){
1971 .parent_names = gcc_pxo_pll8,
1973 .ops = &clk_rcg_ops,
1978 static struct clk_branch sdc5_clk = {
1982 .enable_reg = 0x28ac,
1983 .enable_mask = BIT(9),
1984 .hw.init = &(struct clk_init_data){
1986 .parent_names = (const char *[]){ "sdc5_src" },
1988 .ops = &clk_branch_ops,
1989 .flags = CLK_SET_RATE_PARENT,
1994 static const struct freq_tbl clk_tbl_tsif_ref[] = {
1995 { 105000, P_PXO, 1, 1, 256 },
1999 static struct clk_rcg tsif_ref_src = {
2004 .mnctr_reset_bit = 7,
2005 .mnctr_mode_shift = 5,
2016 .parent_map = gcc_pxo_pll8_map,
2018 .freq_tbl = clk_tbl_tsif_ref,
2020 .enable_reg = 0x2710,
2021 .enable_mask = BIT(11),
2022 .hw.init = &(struct clk_init_data){
2023 .name = "tsif_ref_src",
2024 .parent_names = gcc_pxo_pll8,
2026 .ops = &clk_rcg_ops,
2027 .flags = CLK_SET_RATE_GATE,
2032 static struct clk_branch tsif_ref_clk = {
2036 .enable_reg = 0x2710,
2037 .enable_mask = BIT(9),
2038 .hw.init = &(struct clk_init_data){
2039 .name = "tsif_ref_clk",
2040 .parent_names = (const char *[]){ "tsif_ref_src" },
2042 .ops = &clk_branch_ops,
2043 .flags = CLK_SET_RATE_PARENT,
2048 static const struct freq_tbl clk_tbl_usb[] = {
2049 { 60000000, P_PLL8, 1, 5, 32 },
2053 static struct clk_rcg usb_hs1_xcvr_src = {
2058 .mnctr_reset_bit = 7,
2059 .mnctr_mode_shift = 5,
2070 .parent_map = gcc_pxo_pll8_map,
2072 .freq_tbl = clk_tbl_usb,
2074 .enable_reg = 0x290c,
2075 .enable_mask = BIT(11),
2076 .hw.init = &(struct clk_init_data){
2077 .name = "usb_hs1_xcvr_src",
2078 .parent_names = gcc_pxo_pll8,
2080 .ops = &clk_rcg_ops,
2081 .flags = CLK_SET_RATE_GATE,
2086 static struct clk_branch usb_hs1_xcvr_clk = {
2090 .enable_reg = 0x290c,
2091 .enable_mask = BIT(9),
2092 .hw.init = &(struct clk_init_data){
2093 .name = "usb_hs1_xcvr_clk",
2094 .parent_names = (const char *[]){ "usb_hs1_xcvr_src" },
2096 .ops = &clk_branch_ops,
2097 .flags = CLK_SET_RATE_PARENT,
2102 static struct clk_rcg usb_hs3_xcvr_src = {
2107 .mnctr_reset_bit = 7,
2108 .mnctr_mode_shift = 5,
2119 .parent_map = gcc_pxo_pll8_map,
2121 .freq_tbl = clk_tbl_usb,
2123 .enable_reg = 0x370c,
2124 .enable_mask = BIT(11),
2125 .hw.init = &(struct clk_init_data){
2126 .name = "usb_hs3_xcvr_src",
2127 .parent_names = gcc_pxo_pll8,
2129 .ops = &clk_rcg_ops,
2130 .flags = CLK_SET_RATE_GATE,
2135 static struct clk_branch usb_hs3_xcvr_clk = {
2139 .enable_reg = 0x370c,
2140 .enable_mask = BIT(9),
2141 .hw.init = &(struct clk_init_data){
2142 .name = "usb_hs3_xcvr_clk",
2143 .parent_names = (const char *[]){ "usb_hs3_xcvr_src" },
2145 .ops = &clk_branch_ops,
2146 .flags = CLK_SET_RATE_PARENT,
2151 static struct clk_rcg usb_hs4_xcvr_src = {
2156 .mnctr_reset_bit = 7,
2157 .mnctr_mode_shift = 5,
2168 .parent_map = gcc_pxo_pll8_map,
2170 .freq_tbl = clk_tbl_usb,
2172 .enable_reg = 0x372c,
2173 .enable_mask = BIT(11),
2174 .hw.init = &(struct clk_init_data){
2175 .name = "usb_hs4_xcvr_src",
2176 .parent_names = gcc_pxo_pll8,
2178 .ops = &clk_rcg_ops,
2179 .flags = CLK_SET_RATE_GATE,
2184 static struct clk_branch usb_hs4_xcvr_clk = {
2188 .enable_reg = 0x372c,
2189 .enable_mask = BIT(9),
2190 .hw.init = &(struct clk_init_data){
2191 .name = "usb_hs4_xcvr_clk",
2192 .parent_names = (const char *[]){ "usb_hs4_xcvr_src" },
2194 .ops = &clk_branch_ops,
2195 .flags = CLK_SET_RATE_PARENT,
2200 static struct clk_rcg usb_hsic_xcvr_fs_src = {
2205 .mnctr_reset_bit = 7,
2206 .mnctr_mode_shift = 5,
2217 .parent_map = gcc_pxo_pll8_map,
2219 .freq_tbl = clk_tbl_usb,
2221 .enable_reg = 0x2928,
2222 .enable_mask = BIT(11),
2223 .hw.init = &(struct clk_init_data){
2224 .name = "usb_hsic_xcvr_fs_src",
2225 .parent_names = gcc_pxo_pll8,
2227 .ops = &clk_rcg_ops,
2228 .flags = CLK_SET_RATE_GATE,
2233 static const char * const usb_hsic_xcvr_fs_src_p[] = { "usb_hsic_xcvr_fs_src" };
2235 static struct clk_branch usb_hsic_xcvr_fs_clk = {
2239 .enable_reg = 0x2928,
2240 .enable_mask = BIT(9),
2241 .hw.init = &(struct clk_init_data){
2242 .name = "usb_hsic_xcvr_fs_clk",
2243 .parent_names = usb_hsic_xcvr_fs_src_p,
2245 .ops = &clk_branch_ops,
2246 .flags = CLK_SET_RATE_PARENT,
2251 static struct clk_branch usb_hsic_system_clk = {
2255 .enable_reg = 0x292c,
2256 .enable_mask = BIT(4),
2257 .hw.init = &(struct clk_init_data){
2258 .parent_names = usb_hsic_xcvr_fs_src_p,
2260 .name = "usb_hsic_system_clk",
2261 .ops = &clk_branch_ops,
2262 .flags = CLK_SET_RATE_PARENT,
2267 static struct clk_branch usb_hsic_hsic_clk = {
2271 .enable_reg = 0x2b44,
2272 .enable_mask = BIT(0),
2273 .hw.init = &(struct clk_init_data){
2274 .parent_names = (const char *[]){ "pll14_vote" },
2276 .name = "usb_hsic_hsic_clk",
2277 .ops = &clk_branch_ops,
2282 static struct clk_branch usb_hsic_hsio_cal_clk = {
2286 .enable_reg = 0x2b48,
2287 .enable_mask = BIT(0),
2288 .hw.init = &(struct clk_init_data){
2289 .name = "usb_hsic_hsio_cal_clk",
2290 .ops = &clk_branch_ops,
2295 static struct clk_rcg usb_fs1_xcvr_fs_src = {
2300 .mnctr_reset_bit = 7,
2301 .mnctr_mode_shift = 5,
2312 .parent_map = gcc_pxo_pll8_map,
2314 .freq_tbl = clk_tbl_usb,
2316 .enable_reg = 0x2968,
2317 .enable_mask = BIT(11),
2318 .hw.init = &(struct clk_init_data){
2319 .name = "usb_fs1_xcvr_fs_src",
2320 .parent_names = gcc_pxo_pll8,
2322 .ops = &clk_rcg_ops,
2323 .flags = CLK_SET_RATE_GATE,
2328 static const char * const usb_fs1_xcvr_fs_src_p[] = { "usb_fs1_xcvr_fs_src" };
2330 static struct clk_branch usb_fs1_xcvr_fs_clk = {
2334 .enable_reg = 0x2968,
2335 .enable_mask = BIT(9),
2336 .hw.init = &(struct clk_init_data){
2337 .name = "usb_fs1_xcvr_fs_clk",
2338 .parent_names = usb_fs1_xcvr_fs_src_p,
2340 .ops = &clk_branch_ops,
2341 .flags = CLK_SET_RATE_PARENT,
2346 static struct clk_branch usb_fs1_system_clk = {
2350 .enable_reg = 0x296c,
2351 .enable_mask = BIT(4),
2352 .hw.init = &(struct clk_init_data){
2353 .parent_names = usb_fs1_xcvr_fs_src_p,
2355 .name = "usb_fs1_system_clk",
2356 .ops = &clk_branch_ops,
2357 .flags = CLK_SET_RATE_PARENT,
2362 static struct clk_rcg usb_fs2_xcvr_fs_src = {
2367 .mnctr_reset_bit = 7,
2368 .mnctr_mode_shift = 5,
2379 .parent_map = gcc_pxo_pll8_map,
2381 .freq_tbl = clk_tbl_usb,
2383 .enable_reg = 0x2988,
2384 .enable_mask = BIT(11),
2385 .hw.init = &(struct clk_init_data){
2386 .name = "usb_fs2_xcvr_fs_src",
2387 .parent_names = gcc_pxo_pll8,
2389 .ops = &clk_rcg_ops,
2390 .flags = CLK_SET_RATE_GATE,
2395 static const char * const usb_fs2_xcvr_fs_src_p[] = { "usb_fs2_xcvr_fs_src" };
2397 static struct clk_branch usb_fs2_xcvr_fs_clk = {
2401 .enable_reg = 0x2988,
2402 .enable_mask = BIT(9),
2403 .hw.init = &(struct clk_init_data){
2404 .name = "usb_fs2_xcvr_fs_clk",
2405 .parent_names = usb_fs2_xcvr_fs_src_p,
2407 .ops = &clk_branch_ops,
2408 .flags = CLK_SET_RATE_PARENT,
2413 static struct clk_branch usb_fs2_system_clk = {
2417 .enable_reg = 0x298c,
2418 .enable_mask = BIT(4),
2419 .hw.init = &(struct clk_init_data){
2420 .name = "usb_fs2_system_clk",
2421 .parent_names = usb_fs2_xcvr_fs_src_p,
2423 .ops = &clk_branch_ops,
2424 .flags = CLK_SET_RATE_PARENT,
2429 static struct clk_branch ce1_core_clk = {
2435 .enable_reg = 0x2724,
2436 .enable_mask = BIT(4),
2437 .hw.init = &(struct clk_init_data){
2438 .name = "ce1_core_clk",
2439 .ops = &clk_branch_ops,
2444 static struct clk_branch ce1_h_clk = {
2448 .enable_reg = 0x2720,
2449 .enable_mask = BIT(4),
2450 .hw.init = &(struct clk_init_data){
2451 .name = "ce1_h_clk",
2452 .ops = &clk_branch_ops,
2457 static struct clk_branch dma_bam_h_clk = {
2463 .enable_reg = 0x25c0,
2464 .enable_mask = BIT(4),
2465 .hw.init = &(struct clk_init_data){
2466 .name = "dma_bam_h_clk",
2467 .ops = &clk_branch_ops,
2472 static struct clk_branch gsbi1_h_clk = {
2478 .enable_reg = 0x29c0,
2479 .enable_mask = BIT(4),
2480 .hw.init = &(struct clk_init_data){
2481 .name = "gsbi1_h_clk",
2482 .ops = &clk_branch_ops,
2487 static struct clk_branch gsbi2_h_clk = {
2493 .enable_reg = 0x29e0,
2494 .enable_mask = BIT(4),
2495 .hw.init = &(struct clk_init_data){
2496 .name = "gsbi2_h_clk",
2497 .ops = &clk_branch_ops,
2502 static struct clk_branch gsbi3_h_clk = {
2508 .enable_reg = 0x2a00,
2509 .enable_mask = BIT(4),
2510 .hw.init = &(struct clk_init_data){
2511 .name = "gsbi3_h_clk",
2512 .ops = &clk_branch_ops,
2517 static struct clk_branch gsbi4_h_clk = {
2523 .enable_reg = 0x2a20,
2524 .enable_mask = BIT(4),
2525 .hw.init = &(struct clk_init_data){
2526 .name = "gsbi4_h_clk",
2527 .ops = &clk_branch_ops,
2532 static struct clk_branch gsbi5_h_clk = {
2538 .enable_reg = 0x2a40,
2539 .enable_mask = BIT(4),
2540 .hw.init = &(struct clk_init_data){
2541 .name = "gsbi5_h_clk",
2542 .ops = &clk_branch_ops,
2547 static struct clk_branch gsbi6_h_clk = {
2553 .enable_reg = 0x2a60,
2554 .enable_mask = BIT(4),
2555 .hw.init = &(struct clk_init_data){
2556 .name = "gsbi6_h_clk",
2557 .ops = &clk_branch_ops,
2562 static struct clk_branch gsbi7_h_clk = {
2568 .enable_reg = 0x2a80,
2569 .enable_mask = BIT(4),
2570 .hw.init = &(struct clk_init_data){
2571 .name = "gsbi7_h_clk",
2572 .ops = &clk_branch_ops,
2577 static struct clk_branch gsbi8_h_clk = {
2583 .enable_reg = 0x2aa0,
2584 .enable_mask = BIT(4),
2585 .hw.init = &(struct clk_init_data){
2586 .name = "gsbi8_h_clk",
2587 .ops = &clk_branch_ops,
2592 static struct clk_branch gsbi9_h_clk = {
2598 .enable_reg = 0x2ac0,
2599 .enable_mask = BIT(4),
2600 .hw.init = &(struct clk_init_data){
2601 .name = "gsbi9_h_clk",
2602 .ops = &clk_branch_ops,
2607 static struct clk_branch gsbi10_h_clk = {
2613 .enable_reg = 0x2ae0,
2614 .enable_mask = BIT(4),
2615 .hw.init = &(struct clk_init_data){
2616 .name = "gsbi10_h_clk",
2617 .ops = &clk_branch_ops,
2622 static struct clk_branch gsbi11_h_clk = {
2628 .enable_reg = 0x2b00,
2629 .enable_mask = BIT(4),
2630 .hw.init = &(struct clk_init_data){
2631 .name = "gsbi11_h_clk",
2632 .ops = &clk_branch_ops,
2637 static struct clk_branch gsbi12_h_clk = {
2643 .enable_reg = 0x2b20,
2644 .enable_mask = BIT(4),
2645 .hw.init = &(struct clk_init_data){
2646 .name = "gsbi12_h_clk",
2647 .ops = &clk_branch_ops,
2652 static struct clk_branch tsif_h_clk = {
2658 .enable_reg = 0x2700,
2659 .enable_mask = BIT(4),
2660 .hw.init = &(struct clk_init_data){
2661 .name = "tsif_h_clk",
2662 .ops = &clk_branch_ops,
2667 static struct clk_branch usb_fs1_h_clk = {
2671 .enable_reg = 0x2960,
2672 .enable_mask = BIT(4),
2673 .hw.init = &(struct clk_init_data){
2674 .name = "usb_fs1_h_clk",
2675 .ops = &clk_branch_ops,
2680 static struct clk_branch usb_fs2_h_clk = {
2684 .enable_reg = 0x2980,
2685 .enable_mask = BIT(4),
2686 .hw.init = &(struct clk_init_data){
2687 .name = "usb_fs2_h_clk",
2688 .ops = &clk_branch_ops,
2693 static struct clk_branch usb_hs1_h_clk = {
2699 .enable_reg = 0x2900,
2700 .enable_mask = BIT(4),
2701 .hw.init = &(struct clk_init_data){
2702 .name = "usb_hs1_h_clk",
2703 .ops = &clk_branch_ops,
2708 static struct clk_branch usb_hs3_h_clk = {
2712 .enable_reg = 0x3700,
2713 .enable_mask = BIT(4),
2714 .hw.init = &(struct clk_init_data){
2715 .name = "usb_hs3_h_clk",
2716 .ops = &clk_branch_ops,
2721 static struct clk_branch usb_hs4_h_clk = {
2725 .enable_reg = 0x3720,
2726 .enable_mask = BIT(4),
2727 .hw.init = &(struct clk_init_data){
2728 .name = "usb_hs4_h_clk",
2729 .ops = &clk_branch_ops,
2734 static struct clk_branch usb_hsic_h_clk = {
2738 .enable_reg = 0x2920,
2739 .enable_mask = BIT(4),
2740 .hw.init = &(struct clk_init_data){
2741 .name = "usb_hsic_h_clk",
2742 .ops = &clk_branch_ops,
2747 static struct clk_branch sdc1_h_clk = {
2753 .enable_reg = 0x2820,
2754 .enable_mask = BIT(4),
2755 .hw.init = &(struct clk_init_data){
2756 .name = "sdc1_h_clk",
2757 .ops = &clk_branch_ops,
2762 static struct clk_branch sdc2_h_clk = {
2768 .enable_reg = 0x2840,
2769 .enable_mask = BIT(4),
2770 .hw.init = &(struct clk_init_data){
2771 .name = "sdc2_h_clk",
2772 .ops = &clk_branch_ops,
2777 static struct clk_branch sdc3_h_clk = {
2783 .enable_reg = 0x2860,
2784 .enable_mask = BIT(4),
2785 .hw.init = &(struct clk_init_data){
2786 .name = "sdc3_h_clk",
2787 .ops = &clk_branch_ops,
2792 static struct clk_branch sdc4_h_clk = {
2798 .enable_reg = 0x2880,
2799 .enable_mask = BIT(4),
2800 .hw.init = &(struct clk_init_data){
2801 .name = "sdc4_h_clk",
2802 .ops = &clk_branch_ops,
2807 static struct clk_branch sdc5_h_clk = {
2813 .enable_reg = 0x28a0,
2814 .enable_mask = BIT(4),
2815 .hw.init = &(struct clk_init_data){
2816 .name = "sdc5_h_clk",
2817 .ops = &clk_branch_ops,
2822 static struct clk_branch adm0_clk = {
2824 .halt_check = BRANCH_HALT_VOTED,
2827 .enable_reg = 0x3080,
2828 .enable_mask = BIT(2),
2829 .hw.init = &(struct clk_init_data){
2831 .ops = &clk_branch_ops,
2836 static struct clk_branch adm0_pbus_clk = {
2840 .halt_check = BRANCH_HALT_VOTED,
2843 .enable_reg = 0x3080,
2844 .enable_mask = BIT(3),
2845 .hw.init = &(struct clk_init_data){
2846 .name = "adm0_pbus_clk",
2847 .ops = &clk_branch_ops,
2852 static struct freq_tbl clk_tbl_ce3[] = {
2853 { 48000000, P_PLL8, 8 },
2854 { 100000000, P_PLL3, 12 },
2855 { 120000000, P_PLL3, 10 },
2859 static struct clk_rcg ce3_src = {
2867 .parent_map = gcc_pxo_pll8_pll3_map,
2869 .freq_tbl = clk_tbl_ce3,
2871 .enable_reg = 0x36c0,
2872 .enable_mask = BIT(7),
2873 .hw.init = &(struct clk_init_data){
2875 .parent_names = gcc_pxo_pll8_pll3,
2877 .ops = &clk_rcg_ops,
2878 .flags = CLK_SET_RATE_GATE,
2883 static struct clk_branch ce3_core_clk = {
2887 .enable_reg = 0x36cc,
2888 .enable_mask = BIT(4),
2889 .hw.init = &(struct clk_init_data){
2890 .name = "ce3_core_clk",
2891 .parent_names = (const char *[]){ "ce3_src" },
2893 .ops = &clk_branch_ops,
2894 .flags = CLK_SET_RATE_PARENT,
2899 static struct clk_branch ce3_h_clk = {
2903 .enable_reg = 0x36c4,
2904 .enable_mask = BIT(4),
2905 .hw.init = &(struct clk_init_data){
2906 .name = "ce3_h_clk",
2907 .parent_names = (const char *[]){ "ce3_src" },
2909 .ops = &clk_branch_ops,
2910 .flags = CLK_SET_RATE_PARENT,
2915 static const struct freq_tbl clk_tbl_sata_ref[] = {
2916 { 48000000, P_PLL8, 8, 0, 0 },
2917 { 100000000, P_PLL3, 12, 0, 0 },
2921 static struct clk_rcg sata_clk_src = {
2929 .parent_map = gcc_pxo_pll8_pll3_map,
2931 .freq_tbl = clk_tbl_sata_ref,
2933 .enable_reg = 0x2c08,
2934 .enable_mask = BIT(7),
2935 .hw.init = &(struct clk_init_data){
2936 .name = "sata_clk_src",
2937 .parent_names = gcc_pxo_pll8_pll3,
2939 .ops = &clk_rcg_ops,
2940 .flags = CLK_SET_RATE_GATE,
2945 static struct clk_branch sata_rxoob_clk = {
2949 .enable_reg = 0x2c0c,
2950 .enable_mask = BIT(4),
2951 .hw.init = &(struct clk_init_data){
2952 .name = "sata_rxoob_clk",
2953 .parent_names = (const char *[]){ "sata_clk_src" },
2955 .ops = &clk_branch_ops,
2956 .flags = CLK_SET_RATE_PARENT,
2961 static struct clk_branch sata_pmalive_clk = {
2965 .enable_reg = 0x2c10,
2966 .enable_mask = BIT(4),
2967 .hw.init = &(struct clk_init_data){
2968 .name = "sata_pmalive_clk",
2969 .parent_names = (const char *[]){ "sata_clk_src" },
2971 .ops = &clk_branch_ops,
2972 .flags = CLK_SET_RATE_PARENT,
2977 static struct clk_branch sata_phy_ref_clk = {
2981 .enable_reg = 0x2c14,
2982 .enable_mask = BIT(4),
2983 .hw.init = &(struct clk_init_data){
2984 .name = "sata_phy_ref_clk",
2985 .parent_names = (const char *[]){ "pxo" },
2987 .ops = &clk_branch_ops,
2992 static struct clk_branch sata_a_clk = {
2996 .enable_reg = 0x2c20,
2997 .enable_mask = BIT(4),
2998 .hw.init = &(struct clk_init_data){
2999 .name = "sata_a_clk",
3000 .ops = &clk_branch_ops,
3005 static struct clk_branch sata_h_clk = {
3009 .enable_reg = 0x2c00,
3010 .enable_mask = BIT(4),
3011 .hw.init = &(struct clk_init_data){
3012 .name = "sata_h_clk",
3013 .ops = &clk_branch_ops,
3018 static struct clk_branch sfab_sata_s_h_clk = {
3022 .enable_reg = 0x2480,
3023 .enable_mask = BIT(4),
3024 .hw.init = &(struct clk_init_data){
3025 .name = "sfab_sata_s_h_clk",
3026 .ops = &clk_branch_ops,
3031 static struct clk_branch sata_phy_cfg_clk = {
3035 .enable_reg = 0x2c40,
3036 .enable_mask = BIT(4),
3037 .hw.init = &(struct clk_init_data){
3038 .name = "sata_phy_cfg_clk",
3039 .ops = &clk_branch_ops,
3044 static struct clk_branch pcie_phy_ref_clk = {
3048 .enable_reg = 0x22d0,
3049 .enable_mask = BIT(4),
3050 .hw.init = &(struct clk_init_data){
3051 .name = "pcie_phy_ref_clk",
3052 .ops = &clk_branch_ops,
3057 static struct clk_branch pcie_h_clk = {
3061 .enable_reg = 0x22cc,
3062 .enable_mask = BIT(4),
3063 .hw.init = &(struct clk_init_data){
3064 .name = "pcie_h_clk",
3065 .ops = &clk_branch_ops,
3070 static struct clk_branch pcie_a_clk = {
3074 .enable_reg = 0x22c0,
3075 .enable_mask = BIT(4),
3076 .hw.init = &(struct clk_init_data){
3077 .name = "pcie_a_clk",
3078 .ops = &clk_branch_ops,
3083 static struct clk_branch pmic_arb0_h_clk = {
3085 .halt_check = BRANCH_HALT_VOTED,
3088 .enable_reg = 0x3080,
3089 .enable_mask = BIT(8),
3090 .hw.init = &(struct clk_init_data){
3091 .name = "pmic_arb0_h_clk",
3092 .ops = &clk_branch_ops,
3097 static struct clk_branch pmic_arb1_h_clk = {
3099 .halt_check = BRANCH_HALT_VOTED,
3102 .enable_reg = 0x3080,
3103 .enable_mask = BIT(9),
3104 .hw.init = &(struct clk_init_data){
3105 .name = "pmic_arb1_h_clk",
3106 .ops = &clk_branch_ops,
3111 static struct clk_branch pmic_ssbi2_clk = {
3113 .halt_check = BRANCH_HALT_VOTED,
3116 .enable_reg = 0x3080,
3117 .enable_mask = BIT(7),
3118 .hw.init = &(struct clk_init_data){
3119 .name = "pmic_ssbi2_clk",
3120 .ops = &clk_branch_ops,
3125 static struct clk_branch rpm_msg_ram_h_clk = {
3129 .halt_check = BRANCH_HALT_VOTED,
3132 .enable_reg = 0x3080,
3133 .enable_mask = BIT(6),
3134 .hw.init = &(struct clk_init_data){
3135 .name = "rpm_msg_ram_h_clk",
3136 .ops = &clk_branch_ops,
3141 static struct clk_regmap *gcc_msm8960_clks[] = {
3142 [PLL3] = &pll3.clkr,
3143 [PLL4_VOTE] = &pll4_vote,
3144 [PLL8] = &pll8.clkr,
3145 [PLL8_VOTE] = &pll8_vote,
3146 [PLL14] = &pll14.clkr,
3147 [PLL14_VOTE] = &pll14_vote,
3148 [GSBI1_UART_SRC] = &gsbi1_uart_src.clkr,
3149 [GSBI1_UART_CLK] = &gsbi1_uart_clk.clkr,
3150 [GSBI2_UART_SRC] = &gsbi2_uart_src.clkr,
3151 [GSBI2_UART_CLK] = &gsbi2_uart_clk.clkr,
3152 [GSBI3_UART_SRC] = &gsbi3_uart_src.clkr,
3153 [GSBI3_UART_CLK] = &gsbi3_uart_clk.clkr,
3154 [GSBI4_UART_SRC] = &gsbi4_uart_src.clkr,
3155 [GSBI4_UART_CLK] = &gsbi4_uart_clk.clkr,
3156 [GSBI5_UART_SRC] = &gsbi5_uart_src.clkr,
3157 [GSBI5_UART_CLK] = &gsbi5_uart_clk.clkr,
3158 [GSBI6_UART_SRC] = &gsbi6_uart_src.clkr,
3159 [GSBI6_UART_CLK] = &gsbi6_uart_clk.clkr,
3160 [GSBI7_UART_SRC] = &gsbi7_uart_src.clkr,
3161 [GSBI7_UART_CLK] = &gsbi7_uart_clk.clkr,
3162 [GSBI8_UART_SRC] = &gsbi8_uart_src.clkr,
3163 [GSBI8_UART_CLK] = &gsbi8_uart_clk.clkr,
3164 [GSBI9_UART_SRC] = &gsbi9_uart_src.clkr,
3165 [GSBI9_UART_CLK] = &gsbi9_uart_clk.clkr,
3166 [GSBI10_UART_SRC] = &gsbi10_uart_src.clkr,
3167 [GSBI10_UART_CLK] = &gsbi10_uart_clk.clkr,
3168 [GSBI11_UART_SRC] = &gsbi11_uart_src.clkr,
3169 [GSBI11_UART_CLK] = &gsbi11_uart_clk.clkr,
3170 [GSBI12_UART_SRC] = &gsbi12_uart_src.clkr,
3171 [GSBI12_UART_CLK] = &gsbi12_uart_clk.clkr,
3172 [GSBI1_QUP_SRC] = &gsbi1_qup_src.clkr,
3173 [GSBI1_QUP_CLK] = &gsbi1_qup_clk.clkr,
3174 [GSBI2_QUP_SRC] = &gsbi2_qup_src.clkr,
3175 [GSBI2_QUP_CLK] = &gsbi2_qup_clk.clkr,
3176 [GSBI3_QUP_SRC] = &gsbi3_qup_src.clkr,
3177 [GSBI3_QUP_CLK] = &gsbi3_qup_clk.clkr,
3178 [GSBI4_QUP_SRC] = &gsbi4_qup_src.clkr,
3179 [GSBI4_QUP_CLK] = &gsbi4_qup_clk.clkr,
3180 [GSBI5_QUP_SRC] = &gsbi5_qup_src.clkr,
3181 [GSBI5_QUP_CLK] = &gsbi5_qup_clk.clkr,
3182 [GSBI6_QUP_SRC] = &gsbi6_qup_src.clkr,
3183 [GSBI6_QUP_CLK] = &gsbi6_qup_clk.clkr,
3184 [GSBI7_QUP_SRC] = &gsbi7_qup_src.clkr,
3185 [GSBI7_QUP_CLK] = &gsbi7_qup_clk.clkr,
3186 [GSBI8_QUP_SRC] = &gsbi8_qup_src.clkr,
3187 [GSBI8_QUP_CLK] = &gsbi8_qup_clk.clkr,
3188 [GSBI9_QUP_SRC] = &gsbi9_qup_src.clkr,
3189 [GSBI9_QUP_CLK] = &gsbi9_qup_clk.clkr,
3190 [GSBI10_QUP_SRC] = &gsbi10_qup_src.clkr,
3191 [GSBI10_QUP_CLK] = &gsbi10_qup_clk.clkr,
3192 [GSBI11_QUP_SRC] = &gsbi11_qup_src.clkr,
3193 [GSBI11_QUP_CLK] = &gsbi11_qup_clk.clkr,
3194 [GSBI12_QUP_SRC] = &gsbi12_qup_src.clkr,
3195 [GSBI12_QUP_CLK] = &gsbi12_qup_clk.clkr,
3196 [GP0_SRC] = &gp0_src.clkr,
3197 [GP0_CLK] = &gp0_clk.clkr,
3198 [GP1_SRC] = &gp1_src.clkr,
3199 [GP1_CLK] = &gp1_clk.clkr,
3200 [GP2_SRC] = &gp2_src.clkr,
3201 [GP2_CLK] = &gp2_clk.clkr,
3202 [PMEM_A_CLK] = &pmem_clk.clkr,
3203 [PRNG_SRC] = &prng_src.clkr,
3204 [PRNG_CLK] = &prng_clk.clkr,
3205 [SDC1_SRC] = &sdc1_src.clkr,
3206 [SDC1_CLK] = &sdc1_clk.clkr,
3207 [SDC2_SRC] = &sdc2_src.clkr,
3208 [SDC2_CLK] = &sdc2_clk.clkr,
3209 [SDC3_SRC] = &sdc3_src.clkr,
3210 [SDC3_CLK] = &sdc3_clk.clkr,
3211 [SDC4_SRC] = &sdc4_src.clkr,
3212 [SDC4_CLK] = &sdc4_clk.clkr,
3213 [SDC5_SRC] = &sdc5_src.clkr,
3214 [SDC5_CLK] = &sdc5_clk.clkr,
3215 [TSIF_REF_SRC] = &tsif_ref_src.clkr,
3216 [TSIF_REF_CLK] = &tsif_ref_clk.clkr,
3217 [USB_HS1_XCVR_SRC] = &usb_hs1_xcvr_src.clkr,
3218 [USB_HS1_XCVR_CLK] = &usb_hs1_xcvr_clk.clkr,
3219 [USB_HSIC_XCVR_FS_SRC] = &usb_hsic_xcvr_fs_src.clkr,
3220 [USB_HSIC_XCVR_FS_CLK] = &usb_hsic_xcvr_fs_clk.clkr,
3221 [USB_HSIC_SYSTEM_CLK] = &usb_hsic_system_clk.clkr,
3222 [USB_HSIC_HSIC_CLK] = &usb_hsic_hsic_clk.clkr,
3223 [USB_HSIC_HSIO_CAL_CLK] = &usb_hsic_hsio_cal_clk.clkr,
3224 [USB_FS1_XCVR_FS_SRC] = &usb_fs1_xcvr_fs_src.clkr,
3225 [USB_FS1_XCVR_FS_CLK] = &usb_fs1_xcvr_fs_clk.clkr,
3226 [USB_FS1_SYSTEM_CLK] = &usb_fs1_system_clk.clkr,
3227 [USB_FS2_XCVR_FS_SRC] = &usb_fs2_xcvr_fs_src.clkr,
3228 [USB_FS2_XCVR_FS_CLK] = &usb_fs2_xcvr_fs_clk.clkr,
3229 [USB_FS2_SYSTEM_CLK] = &usb_fs2_system_clk.clkr,
3230 [CE1_CORE_CLK] = &ce1_core_clk.clkr,
3231 [CE1_H_CLK] = &ce1_h_clk.clkr,
3232 [DMA_BAM_H_CLK] = &dma_bam_h_clk.clkr,
3233 [GSBI1_H_CLK] = &gsbi1_h_clk.clkr,
3234 [GSBI2_H_CLK] = &gsbi2_h_clk.clkr,
3235 [GSBI3_H_CLK] = &gsbi3_h_clk.clkr,
3236 [GSBI4_H_CLK] = &gsbi4_h_clk.clkr,
3237 [GSBI5_H_CLK] = &gsbi5_h_clk.clkr,
3238 [GSBI6_H_CLK] = &gsbi6_h_clk.clkr,
3239 [GSBI7_H_CLK] = &gsbi7_h_clk.clkr,
3240 [GSBI8_H_CLK] = &gsbi8_h_clk.clkr,
3241 [GSBI9_H_CLK] = &gsbi9_h_clk.clkr,
3242 [GSBI10_H_CLK] = &gsbi10_h_clk.clkr,
3243 [GSBI11_H_CLK] = &gsbi11_h_clk.clkr,
3244 [GSBI12_H_CLK] = &gsbi12_h_clk.clkr,
3245 [TSIF_H_CLK] = &tsif_h_clk.clkr,
3246 [USB_FS1_H_CLK] = &usb_fs1_h_clk.clkr,
3247 [USB_FS2_H_CLK] = &usb_fs2_h_clk.clkr,
3248 [USB_HS1_H_CLK] = &usb_hs1_h_clk.clkr,
3249 [USB_HSIC_H_CLK] = &usb_hsic_h_clk.clkr,
3250 [SDC1_H_CLK] = &sdc1_h_clk.clkr,
3251 [SDC2_H_CLK] = &sdc2_h_clk.clkr,
3252 [SDC3_H_CLK] = &sdc3_h_clk.clkr,
3253 [SDC4_H_CLK] = &sdc4_h_clk.clkr,
3254 [SDC5_H_CLK] = &sdc5_h_clk.clkr,
3255 [ADM0_CLK] = &adm0_clk.clkr,
3256 [ADM0_PBUS_CLK] = &adm0_pbus_clk.clkr,
3257 [PMIC_ARB0_H_CLK] = &pmic_arb0_h_clk.clkr,
3258 [PMIC_ARB1_H_CLK] = &pmic_arb1_h_clk.clkr,
3259 [PMIC_SSBI2_CLK] = &pmic_ssbi2_clk.clkr,
3260 [RPM_MSG_RAM_H_CLK] = &rpm_msg_ram_h_clk.clkr,
3261 [PLL9] = &hfpll0.clkr,
3262 [PLL10] = &hfpll1.clkr,
3263 [PLL12] = &hfpll_l2.clkr,
3266 static const struct qcom_reset_map gcc_msm8960_resets[] = {
3267 [SFAB_MSS_Q6_SW_RESET] = { 0x2040, 7 },
3268 [SFAB_MSS_Q6_FW_RESET] = { 0x2044, 7 },
3269 [QDSS_STM_RESET] = { 0x2060, 6 },
3270 [AFAB_SMPSS_S_RESET] = { 0x20b8, 2 },
3271 [AFAB_SMPSS_M1_RESET] = { 0x20b8, 1 },
3272 [AFAB_SMPSS_M0_RESET] = { 0x20b8 },
3273 [AFAB_EBI1_CH0_RESET] = { 0x20c0, 7 },
3274 [AFAB_EBI1_CH1_RESET] = { 0x20c4, 7},
3275 [SFAB_ADM0_M0_RESET] = { 0x21e0, 7 },
3276 [SFAB_ADM0_M1_RESET] = { 0x21e4, 7 },
3277 [SFAB_ADM0_M2_RESET] = { 0x21e8, 7 },
3278 [ADM0_C2_RESET] = { 0x220c, 4},
3279 [ADM0_C1_RESET] = { 0x220c, 3},
3280 [ADM0_C0_RESET] = { 0x220c, 2},
3281 [ADM0_PBUS_RESET] = { 0x220c, 1 },
3282 [ADM0_RESET] = { 0x220c },
3283 [QDSS_CLKS_SW_RESET] = { 0x2260, 5 },
3284 [QDSS_POR_RESET] = { 0x2260, 4 },
3285 [QDSS_TSCTR_RESET] = { 0x2260, 3 },
3286 [QDSS_HRESET_RESET] = { 0x2260, 2 },
3287 [QDSS_AXI_RESET] = { 0x2260, 1 },
3288 [QDSS_DBG_RESET] = { 0x2260 },
3289 [PCIE_A_RESET] = { 0x22c0, 7 },
3290 [PCIE_AUX_RESET] = { 0x22c8, 7 },
3291 [PCIE_H_RESET] = { 0x22d0, 7 },
3292 [SFAB_PCIE_M_RESET] = { 0x22d4, 1 },
3293 [SFAB_PCIE_S_RESET] = { 0x22d4 },
3294 [SFAB_MSS_M_RESET] = { 0x2340, 7 },
3295 [SFAB_USB3_M_RESET] = { 0x2360, 7 },
3296 [SFAB_RIVA_M_RESET] = { 0x2380, 7 },
3297 [SFAB_LPASS_RESET] = { 0x23a0, 7 },
3298 [SFAB_AFAB_M_RESET] = { 0x23e0, 7 },
3299 [AFAB_SFAB_M0_RESET] = { 0x2420, 7 },
3300 [AFAB_SFAB_M1_RESET] = { 0x2424, 7 },
3301 [SFAB_SATA_S_RESET] = { 0x2480, 7 },
3302 [SFAB_DFAB_M_RESET] = { 0x2500, 7 },
3303 [DFAB_SFAB_M_RESET] = { 0x2520, 7 },
3304 [DFAB_SWAY0_RESET] = { 0x2540, 7 },
3305 [DFAB_SWAY1_RESET] = { 0x2544, 7 },
3306 [DFAB_ARB0_RESET] = { 0x2560, 7 },
3307 [DFAB_ARB1_RESET] = { 0x2564, 7 },
3308 [PPSS_PROC_RESET] = { 0x2594, 1 },
3309 [PPSS_RESET] = { 0x2594},
3310 [DMA_BAM_RESET] = { 0x25c0, 7 },
3311 [SPS_TIC_H_RESET] = { 0x2600, 7 },
3312 [SLIMBUS_H_RESET] = { 0x2620, 7 },
3313 [SFAB_CFPB_M_RESET] = { 0x2680, 7 },
3314 [SFAB_CFPB_S_RESET] = { 0x26c0, 7 },
3315 [TSIF_H_RESET] = { 0x2700, 7 },
3316 [CE1_H_RESET] = { 0x2720, 7 },
3317 [CE1_CORE_RESET] = { 0x2724, 7 },
3318 [CE1_SLEEP_RESET] = { 0x2728, 7 },
3319 [CE2_H_RESET] = { 0x2740, 7 },
3320 [CE2_CORE_RESET] = { 0x2744, 7 },
3321 [SFAB_SFPB_M_RESET] = { 0x2780, 7 },
3322 [SFAB_SFPB_S_RESET] = { 0x27a0, 7 },
3323 [RPM_PROC_RESET] = { 0x27c0, 7 },
3324 [PMIC_SSBI2_RESET] = { 0x280c, 12 },
3325 [SDC1_RESET] = { 0x2830 },
3326 [SDC2_RESET] = { 0x2850 },
3327 [SDC3_RESET] = { 0x2870 },
3328 [SDC4_RESET] = { 0x2890 },
3329 [SDC5_RESET] = { 0x28b0 },
3330 [DFAB_A2_RESET] = { 0x28c0, 7 },
3331 [USB_HS1_RESET] = { 0x2910 },
3332 [USB_HSIC_RESET] = { 0x2934 },
3333 [USB_FS1_XCVR_RESET] = { 0x2974, 1 },
3334 [USB_FS1_RESET] = { 0x2974 },
3335 [USB_FS2_XCVR_RESET] = { 0x2994, 1 },
3336 [USB_FS2_RESET] = { 0x2994 },
3337 [GSBI1_RESET] = { 0x29dc },
3338 [GSBI2_RESET] = { 0x29fc },
3339 [GSBI3_RESET] = { 0x2a1c },
3340 [GSBI4_RESET] = { 0x2a3c },
3341 [GSBI5_RESET] = { 0x2a5c },
3342 [GSBI6_RESET] = { 0x2a7c },
3343 [GSBI7_RESET] = { 0x2a9c },
3344 [GSBI8_RESET] = { 0x2abc },
3345 [GSBI9_RESET] = { 0x2adc },
3346 [GSBI10_RESET] = { 0x2afc },
3347 [GSBI11_RESET] = { 0x2b1c },
3348 [GSBI12_RESET] = { 0x2b3c },
3349 [SPDM_RESET] = { 0x2b6c },
3350 [TLMM_H_RESET] = { 0x2ba0, 7 },
3351 [SFAB_MSS_S_RESET] = { 0x2c00, 7 },
3352 [MSS_SLP_RESET] = { 0x2c60, 7 },
3353 [MSS_Q6SW_JTAG_RESET] = { 0x2c68, 7 },
3354 [MSS_Q6FW_JTAG_RESET] = { 0x2c6c, 7 },
3355 [MSS_RESET] = { 0x2c64 },
3356 [SATA_H_RESET] = { 0x2c80, 7 },
3357 [SATA_RXOOB_RESE] = { 0x2c8c, 7 },
3358 [SATA_PMALIVE_RESET] = { 0x2c90, 7 },
3359 [SATA_SFAB_M_RESET] = { 0x2c98, 7 },
3360 [TSSC_RESET] = { 0x2ca0, 7 },
3361 [PDM_RESET] = { 0x2cc0, 12 },
3362 [MPM_H_RESET] = { 0x2da0, 7 },
3363 [MPM_RESET] = { 0x2da4 },
3364 [SFAB_SMPSS_S_RESET] = { 0x2e00, 7 },
3365 [PRNG_RESET] = { 0x2e80, 12 },
3366 [RIVA_RESET] = { 0x35e0 },
3369 static struct clk_regmap *gcc_apq8064_clks[] = {
3370 [PLL3] = &pll3.clkr,
3371 [PLL4_VOTE] = &pll4_vote,
3372 [PLL8] = &pll8.clkr,
3373 [PLL8_VOTE] = &pll8_vote,
3374 [PLL14] = &pll14.clkr,
3375 [PLL14_VOTE] = &pll14_vote,
3376 [GSBI1_UART_SRC] = &gsbi1_uart_src.clkr,
3377 [GSBI1_UART_CLK] = &gsbi1_uart_clk.clkr,
3378 [GSBI2_UART_SRC] = &gsbi2_uart_src.clkr,
3379 [GSBI2_UART_CLK] = &gsbi2_uart_clk.clkr,
3380 [GSBI3_UART_SRC] = &gsbi3_uart_src.clkr,
3381 [GSBI3_UART_CLK] = &gsbi3_uart_clk.clkr,
3382 [GSBI4_UART_SRC] = &gsbi4_uart_src.clkr,
3383 [GSBI4_UART_CLK] = &gsbi4_uart_clk.clkr,
3384 [GSBI5_UART_SRC] = &gsbi5_uart_src.clkr,
3385 [GSBI5_UART_CLK] = &gsbi5_uart_clk.clkr,
3386 [GSBI6_UART_SRC] = &gsbi6_uart_src.clkr,
3387 [GSBI6_UART_CLK] = &gsbi6_uart_clk.clkr,
3388 [GSBI7_UART_SRC] = &gsbi7_uart_src.clkr,
3389 [GSBI7_UART_CLK] = &gsbi7_uart_clk.clkr,
3390 [GSBI1_QUP_SRC] = &gsbi1_qup_src.clkr,
3391 [GSBI1_QUP_CLK] = &gsbi1_qup_clk.clkr,
3392 [GSBI2_QUP_SRC] = &gsbi2_qup_src.clkr,
3393 [GSBI2_QUP_CLK] = &gsbi2_qup_clk.clkr,
3394 [GSBI3_QUP_SRC] = &gsbi3_qup_src.clkr,
3395 [GSBI3_QUP_CLK] = &gsbi3_qup_clk.clkr,
3396 [GSBI4_QUP_SRC] = &gsbi4_qup_src.clkr,
3397 [GSBI4_QUP_CLK] = &gsbi4_qup_clk.clkr,
3398 [GSBI5_QUP_SRC] = &gsbi5_qup_src.clkr,
3399 [GSBI5_QUP_CLK] = &gsbi5_qup_clk.clkr,
3400 [GSBI6_QUP_SRC] = &gsbi6_qup_src.clkr,
3401 [GSBI6_QUP_CLK] = &gsbi6_qup_clk.clkr,
3402 [GSBI7_QUP_SRC] = &gsbi7_qup_src.clkr,
3403 [GSBI7_QUP_CLK] = &gsbi7_qup_clk.clkr,
3404 [GP0_SRC] = &gp0_src.clkr,
3405 [GP0_CLK] = &gp0_clk.clkr,
3406 [GP1_SRC] = &gp1_src.clkr,
3407 [GP1_CLK] = &gp1_clk.clkr,
3408 [GP2_SRC] = &gp2_src.clkr,
3409 [GP2_CLK] = &gp2_clk.clkr,
3410 [PMEM_A_CLK] = &pmem_clk.clkr,
3411 [PRNG_SRC] = &prng_src.clkr,
3412 [PRNG_CLK] = &prng_clk.clkr,
3413 [SDC1_SRC] = &sdc1_src.clkr,
3414 [SDC1_CLK] = &sdc1_clk.clkr,
3415 [SDC2_SRC] = &sdc2_src.clkr,
3416 [SDC2_CLK] = &sdc2_clk.clkr,
3417 [SDC3_SRC] = &sdc3_src.clkr,
3418 [SDC3_CLK] = &sdc3_clk.clkr,
3419 [SDC4_SRC] = &sdc4_src.clkr,
3420 [SDC4_CLK] = &sdc4_clk.clkr,
3421 [TSIF_REF_SRC] = &tsif_ref_src.clkr,
3422 [TSIF_REF_CLK] = &tsif_ref_clk.clkr,
3423 [USB_HS1_XCVR_SRC] = &usb_hs1_xcvr_src.clkr,
3424 [USB_HS1_XCVR_CLK] = &usb_hs1_xcvr_clk.clkr,
3425 [USB_HS3_XCVR_SRC] = &usb_hs3_xcvr_src.clkr,
3426 [USB_HS3_XCVR_CLK] = &usb_hs3_xcvr_clk.clkr,
3427 [USB_HS4_XCVR_SRC] = &usb_hs4_xcvr_src.clkr,
3428 [USB_HS4_XCVR_CLK] = &usb_hs4_xcvr_clk.clkr,
3429 [USB_HSIC_XCVR_FS_SRC] = &usb_hsic_xcvr_fs_src.clkr,
3430 [USB_HSIC_XCVR_FS_CLK] = &usb_hsic_xcvr_fs_clk.clkr,
3431 [USB_HSIC_SYSTEM_CLK] = &usb_hsic_system_clk.clkr,
3432 [USB_HSIC_HSIC_CLK] = &usb_hsic_hsic_clk.clkr,
3433 [USB_HSIC_HSIO_CAL_CLK] = &usb_hsic_hsio_cal_clk.clkr,
3434 [USB_FS1_XCVR_FS_SRC] = &usb_fs1_xcvr_fs_src.clkr,
3435 [USB_FS1_XCVR_FS_CLK] = &usb_fs1_xcvr_fs_clk.clkr,
3436 [USB_FS1_SYSTEM_CLK] = &usb_fs1_system_clk.clkr,
3437 [SATA_H_CLK] = &sata_h_clk.clkr,
3438 [SATA_CLK_SRC] = &sata_clk_src.clkr,
3439 [SATA_RXOOB_CLK] = &sata_rxoob_clk.clkr,
3440 [SATA_PMALIVE_CLK] = &sata_pmalive_clk.clkr,
3441 [SATA_PHY_REF_CLK] = &sata_phy_ref_clk.clkr,
3442 [SATA_PHY_CFG_CLK] = &sata_phy_cfg_clk.clkr,
3443 [SATA_A_CLK] = &sata_a_clk.clkr,
3444 [SFAB_SATA_S_H_CLK] = &sfab_sata_s_h_clk.clkr,
3445 [CE3_SRC] = &ce3_src.clkr,
3446 [CE3_CORE_CLK] = &ce3_core_clk.clkr,
3447 [CE3_H_CLK] = &ce3_h_clk.clkr,
3448 [DMA_BAM_H_CLK] = &dma_bam_h_clk.clkr,
3449 [GSBI1_H_CLK] = &gsbi1_h_clk.clkr,
3450 [GSBI2_H_CLK] = &gsbi2_h_clk.clkr,
3451 [GSBI3_H_CLK] = &gsbi3_h_clk.clkr,
3452 [GSBI4_H_CLK] = &gsbi4_h_clk.clkr,
3453 [GSBI5_H_CLK] = &gsbi5_h_clk.clkr,
3454 [GSBI6_H_CLK] = &gsbi6_h_clk.clkr,
3455 [GSBI7_H_CLK] = &gsbi7_h_clk.clkr,
3456 [TSIF_H_CLK] = &tsif_h_clk.clkr,
3457 [USB_FS1_H_CLK] = &usb_fs1_h_clk.clkr,
3458 [USB_HS1_H_CLK] = &usb_hs1_h_clk.clkr,
3459 [USB_HSIC_H_CLK] = &usb_hsic_h_clk.clkr,
3460 [USB_HS3_H_CLK] = &usb_hs3_h_clk.clkr,
3461 [USB_HS4_H_CLK] = &usb_hs4_h_clk.clkr,
3462 [SDC1_H_CLK] = &sdc1_h_clk.clkr,
3463 [SDC2_H_CLK] = &sdc2_h_clk.clkr,
3464 [SDC3_H_CLK] = &sdc3_h_clk.clkr,
3465 [SDC4_H_CLK] = &sdc4_h_clk.clkr,
3466 [ADM0_CLK] = &adm0_clk.clkr,
3467 [ADM0_PBUS_CLK] = &adm0_pbus_clk.clkr,
3468 [PCIE_A_CLK] = &pcie_a_clk.clkr,
3469 [PCIE_PHY_REF_CLK] = &pcie_phy_ref_clk.clkr,
3470 [PCIE_H_CLK] = &pcie_h_clk.clkr,
3471 [PMIC_ARB0_H_CLK] = &pmic_arb0_h_clk.clkr,
3472 [PMIC_ARB1_H_CLK] = &pmic_arb1_h_clk.clkr,
3473 [PMIC_SSBI2_CLK] = &pmic_ssbi2_clk.clkr,
3474 [RPM_MSG_RAM_H_CLK] = &rpm_msg_ram_h_clk.clkr,
3475 [PLL9] = &hfpll0.clkr,
3476 [PLL10] = &hfpll1.clkr,
3477 [PLL12] = &hfpll_l2.clkr,
3478 [PLL16] = &hfpll2.clkr,
3479 [PLL17] = &hfpll3.clkr,
3482 static const struct qcom_reset_map gcc_apq8064_resets[] = {
3483 [QDSS_STM_RESET] = { 0x2060, 6 },
3484 [AFAB_SMPSS_S_RESET] = { 0x20b8, 2 },
3485 [AFAB_SMPSS_M1_RESET] = { 0x20b8, 1 },
3486 [AFAB_SMPSS_M0_RESET] = { 0x20b8 },
3487 [AFAB_EBI1_CH0_RESET] = { 0x20c0, 7 },
3488 [AFAB_EBI1_CH1_RESET] = { 0x20c4, 7},
3489 [SFAB_ADM0_M0_RESET] = { 0x21e0, 7 },
3490 [SFAB_ADM0_M1_RESET] = { 0x21e4, 7 },
3491 [SFAB_ADM0_M2_RESET] = { 0x21e8, 7 },
3492 [ADM0_C2_RESET] = { 0x220c, 4},
3493 [ADM0_C1_RESET] = { 0x220c, 3},
3494 [ADM0_C0_RESET] = { 0x220c, 2},
3495 [ADM0_PBUS_RESET] = { 0x220c, 1 },
3496 [ADM0_RESET] = { 0x220c },
3497 [QDSS_CLKS_SW_RESET] = { 0x2260, 5 },
3498 [QDSS_POR_RESET] = { 0x2260, 4 },
3499 [QDSS_TSCTR_RESET] = { 0x2260, 3 },
3500 [QDSS_HRESET_RESET] = { 0x2260, 2 },
3501 [QDSS_AXI_RESET] = { 0x2260, 1 },
3502 [QDSS_DBG_RESET] = { 0x2260 },
3503 [SFAB_PCIE_M_RESET] = { 0x22d8, 1 },
3504 [SFAB_PCIE_S_RESET] = { 0x22d8 },
3505 [PCIE_EXT_PCI_RESET] = { 0x22dc, 6 },
3506 [PCIE_PHY_RESET] = { 0x22dc, 5 },
3507 [PCIE_PCI_RESET] = { 0x22dc, 4 },
3508 [PCIE_POR_RESET] = { 0x22dc, 3 },
3509 [PCIE_HCLK_RESET] = { 0x22dc, 2 },
3510 [PCIE_ACLK_RESET] = { 0x22dc },
3511 [SFAB_USB3_M_RESET] = { 0x2360, 7 },
3512 [SFAB_RIVA_M_RESET] = { 0x2380, 7 },
3513 [SFAB_LPASS_RESET] = { 0x23a0, 7 },
3514 [SFAB_AFAB_M_RESET] = { 0x23e0, 7 },
3515 [AFAB_SFAB_M0_RESET] = { 0x2420, 7 },
3516 [AFAB_SFAB_M1_RESET] = { 0x2424, 7 },
3517 [SFAB_SATA_S_RESET] = { 0x2480, 7 },
3518 [SFAB_DFAB_M_RESET] = { 0x2500, 7 },
3519 [DFAB_SFAB_M_RESET] = { 0x2520, 7 },
3520 [DFAB_SWAY0_RESET] = { 0x2540, 7 },
3521 [DFAB_SWAY1_RESET] = { 0x2544, 7 },
3522 [DFAB_ARB0_RESET] = { 0x2560, 7 },
3523 [DFAB_ARB1_RESET] = { 0x2564, 7 },
3524 [PPSS_PROC_RESET] = { 0x2594, 1 },
3525 [PPSS_RESET] = { 0x2594},
3526 [DMA_BAM_RESET] = { 0x25c0, 7 },
3527 [SPS_TIC_H_RESET] = { 0x2600, 7 },
3528 [SFAB_CFPB_M_RESET] = { 0x2680, 7 },
3529 [SFAB_CFPB_S_RESET] = { 0x26c0, 7 },
3530 [TSIF_H_RESET] = { 0x2700, 7 },
3531 [CE1_H_RESET] = { 0x2720, 7 },
3532 [CE1_CORE_RESET] = { 0x2724, 7 },
3533 [CE1_SLEEP_RESET] = { 0x2728, 7 },
3534 [CE2_H_RESET] = { 0x2740, 7 },
3535 [CE2_CORE_RESET] = { 0x2744, 7 },
3536 [SFAB_SFPB_M_RESET] = { 0x2780, 7 },
3537 [SFAB_SFPB_S_RESET] = { 0x27a0, 7 },
3538 [RPM_PROC_RESET] = { 0x27c0, 7 },
3539 [PMIC_SSBI2_RESET] = { 0x280c, 12 },
3540 [SDC1_RESET] = { 0x2830 },
3541 [SDC2_RESET] = { 0x2850 },
3542 [SDC3_RESET] = { 0x2870 },
3543 [SDC4_RESET] = { 0x2890 },
3544 [USB_HS1_RESET] = { 0x2910 },
3545 [USB_HSIC_RESET] = { 0x2934 },
3546 [USB_FS1_XCVR_RESET] = { 0x2974, 1 },
3547 [USB_FS1_RESET] = { 0x2974 },
3548 [GSBI1_RESET] = { 0x29dc },
3549 [GSBI2_RESET] = { 0x29fc },
3550 [GSBI3_RESET] = { 0x2a1c },
3551 [GSBI4_RESET] = { 0x2a3c },
3552 [GSBI5_RESET] = { 0x2a5c },
3553 [GSBI6_RESET] = { 0x2a7c },
3554 [GSBI7_RESET] = { 0x2a9c },
3555 [SPDM_RESET] = { 0x2b6c },
3556 [TLMM_H_RESET] = { 0x2ba0, 7 },
3557 [SATA_SFAB_M_RESET] = { 0x2c18 },
3558 [SATA_RESET] = { 0x2c1c },
3559 [GSS_SLP_RESET] = { 0x2c60, 7 },
3560 [GSS_RESET] = { 0x2c64 },
3561 [TSSC_RESET] = { 0x2ca0, 7 },
3562 [PDM_RESET] = { 0x2cc0, 12 },
3563 [MPM_H_RESET] = { 0x2da0, 7 },
3564 [MPM_RESET] = { 0x2da4 },
3565 [SFAB_SMPSS_S_RESET] = { 0x2e00, 7 },
3566 [PRNG_RESET] = { 0x2e80, 12 },
3567 [RIVA_RESET] = { 0x35e0 },
3568 [CE3_H_RESET] = { 0x36c4, 7 },
3569 [SFAB_CE3_M_RESET] = { 0x36c8, 1 },
3570 [SFAB_CE3_S_RESET] = { 0x36c8 },
3571 [CE3_RESET] = { 0x36cc, 7 },
3572 [CE3_SLEEP_RESET] = { 0x36d0, 7 },
3573 [USB_HS3_RESET] = { 0x3710 },
3574 [USB_HS4_RESET] = { 0x3730 },
3577 static const struct regmap_config gcc_msm8960_regmap_config = {
3581 .max_register = 0x3660,
3585 static const struct regmap_config gcc_apq8064_regmap_config = {
3589 .max_register = 0x3880,
3593 static const struct qcom_cc_desc gcc_msm8960_desc = {
3594 .config = &gcc_msm8960_regmap_config,
3595 .clks = gcc_msm8960_clks,
3596 .num_clks = ARRAY_SIZE(gcc_msm8960_clks),
3597 .resets = gcc_msm8960_resets,
3598 .num_resets = ARRAY_SIZE(gcc_msm8960_resets),
3601 static const struct qcom_cc_desc gcc_apq8064_desc = {
3602 .config = &gcc_apq8064_regmap_config,
3603 .clks = gcc_apq8064_clks,
3604 .num_clks = ARRAY_SIZE(gcc_apq8064_clks),
3605 .resets = gcc_apq8064_resets,
3606 .num_resets = ARRAY_SIZE(gcc_apq8064_resets),
3609 static const struct of_device_id gcc_msm8960_match_table[] = {
3610 { .compatible = "qcom,gcc-msm8960", .data = &gcc_msm8960_desc },
3611 { .compatible = "qcom,gcc-apq8064", .data = &gcc_apq8064_desc },
3614 MODULE_DEVICE_TABLE(of, gcc_msm8960_match_table);
3616 static int gcc_msm8960_probe(struct platform_device *pdev)
3618 struct device *dev = &pdev->dev;
3619 const struct of_device_id *match;
3620 struct platform_device *tsens;
3623 match = of_match_device(gcc_msm8960_match_table, &pdev->dev);
3627 ret = qcom_cc_register_board_clk(dev, "cxo_board", "cxo", 19200000);
3631 ret = qcom_cc_register_board_clk(dev, "pxo_board", "pxo", 27000000);
3635 ret = qcom_cc_probe(pdev, match->data);
3639 if (match->data == &gcc_apq8064_desc) {
3640 hfpll1.d = &hfpll1_8064_data;
3641 hfpll_l2.d = &hfpll_l2_8064_data;
3644 if (of_get_available_child_count(pdev->dev.of_node) != 0)
3645 return devm_of_platform_populate(&pdev->dev);
3647 tsens = platform_device_register_data(&pdev->dev, "qcom-tsens", -1,
3650 return PTR_ERR(tsens);
3652 platform_set_drvdata(pdev, tsens);
3657 static int gcc_msm8960_remove(struct platform_device *pdev)
3659 struct platform_device *tsens = platform_get_drvdata(pdev);
3662 platform_device_unregister(tsens);
3667 static struct platform_driver gcc_msm8960_driver = {
3668 .probe = gcc_msm8960_probe,
3669 .remove = gcc_msm8960_remove,
3671 .name = "gcc-msm8960",
3672 .of_match_table = gcc_msm8960_match_table,
3676 static int __init gcc_msm8960_init(void)
3678 return platform_driver_register(&gcc_msm8960_driver);
3680 core_initcall(gcc_msm8960_init);
3682 static void __exit gcc_msm8960_exit(void)
3684 platform_driver_unregister(&gcc_msm8960_driver);
3686 module_exit(gcc_msm8960_exit);
3688 MODULE_DESCRIPTION("QCOM GCC MSM8960 Driver");
3689 MODULE_LICENSE("GPL v2");
3690 MODULE_ALIAS("platform:gcc-msm8960");