1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
6 #include <linux/clk-provider.h>
7 #include <linux/module.h>
8 #include <linux/platform_device.h>
9 #include <linux/regmap.h>
10 #include <linux/reset-controller.h>
12 #include <dt-bindings/clock/qcom,dispcc-sm8250.h>
14 #include "clk-alpha-pll.h"
15 #include "clk-branch.h"
17 #include "clk-regmap-divider.h"
24 P_DISP_CC_PLL0_OUT_MAIN,
25 P_DISP_CC_PLL1_OUT_EVEN,
26 P_DISP_CC_PLL1_OUT_MAIN,
27 P_DP_PHY_PLL_LINK_CLK,
28 P_DP_PHY_PLL_VCO_DIV_CLK,
29 P_EDP_PHY_PLL_LINK_CLK,
30 P_EDP_PHY_PLL_VCO_DIV_CLK,
31 P_DSI0_PHY_PLL_OUT_BYTECLK,
32 P_DSI0_PHY_PLL_OUT_DSICLK,
33 P_DSI1_PHY_PLL_OUT_BYTECLK,
34 P_DSI1_PHY_PLL_OUT_DSICLK,
37 static struct pll_vco vco_table[] = {
38 { 249600000, 2000000000, 0 },
41 static struct alpha_pll_config disp_cc_pll0_config = {
44 .config_ctl_val = 0x20485699,
45 .config_ctl_hi_val = 0x00002261,
46 .config_ctl_hi1_val = 0x329A699C,
47 .user_ctl_val = 0x00000000,
48 .user_ctl_hi_val = 0x00000805,
49 .user_ctl_hi1_val = 0x00000000,
52 static struct clk_init_data disp_cc_pll0_init = {
53 .name = "disp_cc_pll0",
54 .parent_data = &(const struct clk_parent_data){
58 .ops = &clk_alpha_pll_lucid_ops,
61 static struct clk_alpha_pll disp_cc_pll0 = {
63 .vco_table = vco_table,
64 .num_vco = ARRAY_SIZE(vco_table),
65 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
66 .clkr.hw.init = &disp_cc_pll0_init
69 static struct alpha_pll_config disp_cc_pll1_config = {
72 .config_ctl_val = 0x20485699,
73 .config_ctl_hi_val = 0x00002261,
74 .config_ctl_hi1_val = 0x329A699C,
75 .user_ctl_val = 0x00000000,
76 .user_ctl_hi_val = 0x00000805,
77 .user_ctl_hi1_val = 0x00000000,
80 static struct clk_init_data disp_cc_pll1_init = {
81 .name = "disp_cc_pll1",
82 .parent_data = &(const struct clk_parent_data){
86 .ops = &clk_alpha_pll_lucid_ops,
89 static struct clk_alpha_pll disp_cc_pll1 = {
91 .vco_table = vco_table,
92 .num_vco = ARRAY_SIZE(vco_table),
93 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
94 .clkr.hw.init = &disp_cc_pll1_init
97 static const struct parent_map disp_cc_parent_map_0[] = {
99 { P_DP_PHY_PLL_LINK_CLK, 1 },
100 { P_DP_PHY_PLL_VCO_DIV_CLK, 2 },
103 static const struct clk_parent_data disp_cc_parent_data_0[] = {
104 { .fw_name = "bi_tcxo" },
105 { .fw_name = "dp_phy_pll_link_clk" },
106 { .fw_name = "dp_phy_pll_vco_div_clk" },
109 static const struct parent_map disp_cc_parent_map_1[] = {
113 static const struct clk_parent_data disp_cc_parent_data_1[] = {
114 { .fw_name = "bi_tcxo" },
117 static const struct parent_map disp_cc_parent_map_2[] = {
119 { P_DSI0_PHY_PLL_OUT_BYTECLK, 1 },
120 { P_DSI1_PHY_PLL_OUT_BYTECLK, 2 },
123 static const struct clk_parent_data disp_cc_parent_data_2[] = {
124 { .fw_name = "bi_tcxo" },
125 { .fw_name = "dsi0_phy_pll_out_byteclk" },
126 { .fw_name = "dsi1_phy_pll_out_byteclk" },
129 static const struct parent_map disp_cc_parent_map_3[] = {
131 { P_DISP_CC_PLL1_OUT_MAIN, 4 },
134 static const struct clk_parent_data disp_cc_parent_data_3[] = {
135 { .fw_name = "bi_tcxo" },
136 { .hw = &disp_cc_pll1.clkr.hw },
139 static const struct parent_map disp_cc_parent_map_4[] = {
141 { P_EDP_PHY_PLL_LINK_CLK, 1 },
142 { P_EDP_PHY_PLL_VCO_DIV_CLK, 2},
145 static const struct clk_parent_data disp_cc_parent_data_4[] = {
146 { .fw_name = "bi_tcxo" },
147 { .fw_name = "edp_phy_pll_link_clk" },
148 { .fw_name = "edp_phy_pll_vco_div_clk" },
151 static const struct parent_map disp_cc_parent_map_5[] = {
153 { P_DISP_CC_PLL0_OUT_MAIN, 1 },
154 { P_DISP_CC_PLL1_OUT_MAIN, 4 },
157 static const struct clk_parent_data disp_cc_parent_data_5[] = {
158 { .fw_name = "bi_tcxo" },
159 { .hw = &disp_cc_pll0.clkr.hw },
160 { .hw = &disp_cc_pll1.clkr.hw },
163 static const struct parent_map disp_cc_parent_map_6[] = {
165 { P_DSI0_PHY_PLL_OUT_DSICLK, 1 },
166 { P_DSI1_PHY_PLL_OUT_DSICLK, 2 },
169 static const struct clk_parent_data disp_cc_parent_data_6[] = {
170 { .fw_name = "bi_tcxo" },
171 { .fw_name = "dsi0_phy_pll_out_dsiclk" },
172 { .fw_name = "dsi1_phy_pll_out_dsiclk" },
175 static const struct parent_map disp_cc_parent_map_7[] = {
177 { P_DISP_CC_PLL1_OUT_MAIN, 4 },
178 /* { P_DISP_CC_PLL1_OUT_EVEN, 5 }, */
181 static const struct clk_parent_data disp_cc_parent_data_7[] = {
182 { .fw_name = "bi_tcxo" },
183 { .hw = &disp_cc_pll1.clkr.hw },
184 /* { .hw = &disp_cc_pll1_out_even.clkr.hw }, */
187 static const struct freq_tbl ftbl_disp_cc_mdss_ahb_clk_src[] = {
188 F(19200000, P_BI_TCXO, 1, 0, 0),
189 F(37500000, P_DISP_CC_PLL1_OUT_MAIN, 16, 0, 0),
190 F(75000000, P_DISP_CC_PLL1_OUT_MAIN, 8, 0, 0),
194 static struct clk_rcg2 disp_cc_mdss_ahb_clk_src = {
198 .parent_map = disp_cc_parent_map_3,
199 .freq_tbl = ftbl_disp_cc_mdss_ahb_clk_src,
200 .clkr.hw.init = &(struct clk_init_data){
201 .name = "disp_cc_mdss_ahb_clk_src",
202 .parent_data = disp_cc_parent_data_3,
203 .num_parents = ARRAY_SIZE(disp_cc_parent_data_3),
204 .flags = CLK_SET_RATE_PARENT,
205 .ops = &clk_rcg2_shared_ops,
209 static const struct freq_tbl ftbl_disp_cc_mdss_byte0_clk_src[] = {
210 F(19200000, P_BI_TCXO, 1, 0, 0),
214 static struct clk_rcg2 disp_cc_mdss_byte0_clk_src = {
218 .parent_map = disp_cc_parent_map_2,
219 .clkr.hw.init = &(struct clk_init_data){
220 .name = "disp_cc_mdss_byte0_clk_src",
221 .parent_data = disp_cc_parent_data_2,
222 .num_parents = ARRAY_SIZE(disp_cc_parent_data_2),
223 .flags = CLK_SET_RATE_PARENT,
224 .ops = &clk_byte2_ops,
228 static struct clk_rcg2 disp_cc_mdss_byte1_clk_src = {
232 .parent_map = disp_cc_parent_map_2,
233 .clkr.hw.init = &(struct clk_init_data){
234 .name = "disp_cc_mdss_byte1_clk_src",
235 .parent_data = disp_cc_parent_data_2,
236 .num_parents = ARRAY_SIZE(disp_cc_parent_data_2),
237 .flags = CLK_SET_RATE_PARENT,
238 .ops = &clk_byte2_ops,
242 static struct clk_rcg2 disp_cc_mdss_dp_aux1_clk_src = {
246 .parent_map = disp_cc_parent_map_1,
247 .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
248 .clkr.hw.init = &(struct clk_init_data){
249 .name = "disp_cc_mdss_dp_aux1_clk_src",
250 .parent_data = disp_cc_parent_data_1,
251 .num_parents = ARRAY_SIZE(disp_cc_parent_data_1),
252 .flags = CLK_SET_RATE_PARENT,
253 .ops = &clk_rcg2_ops,
257 static struct clk_rcg2 disp_cc_mdss_dp_aux_clk_src = {
261 .parent_map = disp_cc_parent_map_1,
262 .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
263 .clkr.hw.init = &(struct clk_init_data){
264 .name = "disp_cc_mdss_dp_aux_clk_src",
265 .parent_data = disp_cc_parent_data_1,
266 .num_parents = ARRAY_SIZE(disp_cc_parent_data_1),
267 .flags = CLK_SET_RATE_PARENT,
268 .ops = &clk_rcg2_ops,
272 static const struct freq_tbl ftbl_disp_cc_mdss_dp_link1_clk_src[] = {
273 F(162000000, P_DP_PHY_PLL_LINK_CLK, 1, 0, 0),
274 F(270000000, P_DP_PHY_PLL_LINK_CLK, 1, 0, 0),
275 F(540000000, P_DP_PHY_PLL_LINK_CLK, 1, 0, 0),
276 F(810000000, P_DP_PHY_PLL_LINK_CLK, 1, 0, 0),
280 static struct clk_rcg2 disp_cc_mdss_dp_link1_clk_src = {
284 .parent_map = disp_cc_parent_map_0,
285 .freq_tbl = ftbl_disp_cc_mdss_dp_link1_clk_src,
286 .clkr.hw.init = &(struct clk_init_data){
287 .name = "disp_cc_mdss_dp_link1_clk_src",
288 .parent_data = disp_cc_parent_data_0,
289 .num_parents = ARRAY_SIZE(disp_cc_parent_data_0),
290 .ops = &clk_byte2_ops,
294 static struct clk_rcg2 disp_cc_mdss_dp_link_clk_src = {
298 .parent_map = disp_cc_parent_map_0,
299 .freq_tbl = ftbl_disp_cc_mdss_dp_link1_clk_src,
300 .clkr.hw.init = &(struct clk_init_data){
301 .name = "disp_cc_mdss_dp_link_clk_src",
302 .parent_data = disp_cc_parent_data_0,
303 .num_parents = ARRAY_SIZE(disp_cc_parent_data_0),
304 .ops = &clk_byte2_ops,
308 static struct clk_rcg2 disp_cc_mdss_dp_pixel1_clk_src = {
312 .parent_map = disp_cc_parent_map_0,
313 .clkr.hw.init = &(struct clk_init_data){
314 .name = "disp_cc_mdss_dp_pixel1_clk_src",
315 .parent_data = disp_cc_parent_data_0,
316 .num_parents = ARRAY_SIZE(disp_cc_parent_data_0),
321 static struct clk_rcg2 disp_cc_mdss_dp_pixel2_clk_src = {
325 .parent_map = disp_cc_parent_map_0,
326 .clkr.hw.init = &(struct clk_init_data){
327 .name = "disp_cc_mdss_dp_pixel2_clk_src",
328 .parent_data = disp_cc_parent_data_0,
329 .num_parents = ARRAY_SIZE(disp_cc_parent_data_0),
334 static struct clk_rcg2 disp_cc_mdss_dp_pixel_clk_src = {
338 .parent_map = disp_cc_parent_map_0,
339 .clkr.hw.init = &(struct clk_init_data){
340 .name = "disp_cc_mdss_dp_pixel_clk_src",
341 .parent_data = disp_cc_parent_data_0,
342 .num_parents = ARRAY_SIZE(disp_cc_parent_data_0),
347 static struct clk_rcg2 disp_cc_mdss_edp_aux_clk_src = {
351 .parent_map = disp_cc_parent_map_1,
352 .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
353 .clkr.hw.init = &(struct clk_init_data){
354 .name = "disp_cc_mdss_edp_aux_clk_src",
355 .parent_data = disp_cc_parent_data_1,
356 .num_parents = ARRAY_SIZE(disp_cc_parent_data_1),
357 .flags = CLK_SET_RATE_PARENT,
358 .ops = &clk_rcg2_ops,
362 static struct clk_rcg2 disp_cc_mdss_edp_gtc_clk_src = {
366 .parent_map = disp_cc_parent_map_7,
367 .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
368 .clkr.hw.init = &(struct clk_init_data){
369 .name = "disp_cc_mdss_edp_gtc_clk_src",
370 .parent_data = disp_cc_parent_data_7,
371 .num_parents = ARRAY_SIZE(disp_cc_parent_data_7),
372 .flags = CLK_SET_RATE_PARENT,
373 .ops = &clk_rcg2_ops,
377 static struct clk_rcg2 disp_cc_mdss_edp_link_clk_src = {
381 .parent_map = disp_cc_parent_map_4,
382 .clkr.hw.init = &(struct clk_init_data){
383 .name = "disp_cc_mdss_edp_link_clk_src",
384 .parent_data = disp_cc_parent_data_4,
385 .num_parents = ARRAY_SIZE(disp_cc_parent_data_4),
386 .flags = CLK_SET_RATE_PARENT,
387 .ops = &clk_byte2_ops,
391 static struct clk_rcg2 disp_cc_mdss_edp_pixel_clk_src = {
395 .parent_map = disp_cc_parent_map_4,
396 .clkr.hw.init = &(struct clk_init_data){
397 .name = "disp_cc_mdss_edp_pixel_clk_src",
398 .parent_data = disp_cc_parent_data_4,
399 .num_parents = ARRAY_SIZE(disp_cc_parent_data_4),
404 static struct clk_branch disp_cc_mdss_edp_aux_clk = {
406 .halt_check = BRANCH_HALT,
408 .enable_reg = 0x2078,
409 .enable_mask = BIT(0),
410 .hw.init = &(struct clk_init_data){
411 .name = "disp_cc_mdss_edp_aux_clk",
412 .parent_hws = (const struct clk_hw*[]){
413 &disp_cc_mdss_edp_aux_clk_src.clkr.hw,
416 .flags = CLK_SET_RATE_PARENT,
417 .ops = &clk_branch2_ops,
422 static struct clk_branch disp_cc_mdss_edp_gtc_clk = {
424 .halt_check = BRANCH_HALT,
426 .enable_reg = 0x207c,
427 .enable_mask = BIT(0),
428 .hw.init = &(struct clk_init_data){
429 .name = "disp_cc_mdss_edp_gtc_clk",
430 .parent_hws = (const struct clk_hw*[]){
431 &disp_cc_mdss_edp_gtc_clk_src.clkr.hw,
434 .flags = CLK_SET_RATE_PARENT,
435 .ops = &clk_branch2_ops,
440 static struct clk_branch disp_cc_mdss_edp_link_clk = {
442 .halt_check = BRANCH_HALT,
444 .enable_reg = 0x2070,
445 .enable_mask = BIT(0),
446 .hw.init = &(struct clk_init_data){
447 .name = "disp_cc_mdss_edp_link_clk",
448 .parent_hws = (const struct clk_hw*[]){
449 &disp_cc_mdss_edp_link_clk_src.clkr.hw,
452 .flags = CLK_SET_RATE_PARENT,
453 .ops = &clk_branch2_ops,
458 static struct clk_branch disp_cc_mdss_edp_link_intf_clk = {
460 .halt_check = BRANCH_HALT,
462 .enable_reg = 0x2074,
463 .enable_mask = BIT(0),
464 .hw.init = &(struct clk_init_data){
465 .name = "disp_cc_mdss_edp_link_intf_clk",
466 .parent_hws = (const struct clk_hw*[]){
467 &disp_cc_mdss_edp_link_clk_src.clkr.hw,
470 .flags = CLK_GET_RATE_NOCACHE,
471 .ops = &clk_branch2_ops,
476 static struct clk_branch disp_cc_mdss_edp_pixel_clk = {
478 .halt_check = BRANCH_HALT,
480 .enable_reg = 0x206c,
481 .enable_mask = BIT(0),
482 .hw.init = &(struct clk_init_data){
483 .name = "disp_cc_mdss_edp_pixel_clk",
484 .parent_hws = (const struct clk_hw*[]){
485 &disp_cc_mdss_edp_pixel_clk_src.clkr.hw,
488 .flags = CLK_SET_RATE_PARENT,
489 .ops = &clk_branch2_ops,
494 static struct clk_rcg2 disp_cc_mdss_esc0_clk_src = {
498 .parent_map = disp_cc_parent_map_2,
499 .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
500 .clkr.hw.init = &(struct clk_init_data){
501 .name = "disp_cc_mdss_esc0_clk_src",
502 .parent_data = disp_cc_parent_data_2,
503 .num_parents = ARRAY_SIZE(disp_cc_parent_data_2),
504 .flags = CLK_SET_RATE_PARENT,
505 .ops = &clk_rcg2_ops,
509 static struct clk_rcg2 disp_cc_mdss_esc1_clk_src = {
513 .parent_map = disp_cc_parent_map_2,
514 .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
515 .clkr.hw.init = &(struct clk_init_data){
516 .name = "disp_cc_mdss_esc1_clk_src",
517 .parent_data = disp_cc_parent_data_2,
518 .num_parents = ARRAY_SIZE(disp_cc_parent_data_2),
519 .flags = CLK_SET_RATE_PARENT,
520 .ops = &clk_rcg2_ops,
524 static const struct freq_tbl ftbl_disp_cc_mdss_mdp_clk_src[] = {
525 F(19200000, P_BI_TCXO, 1, 0, 0),
526 F(85714286, P_DISP_CC_PLL1_OUT_MAIN, 7, 0, 0),
527 F(100000000, P_DISP_CC_PLL1_OUT_MAIN, 6, 0, 0),
528 F(150000000, P_DISP_CC_PLL1_OUT_MAIN, 4, 0, 0),
529 F(200000000, P_DISP_CC_PLL1_OUT_MAIN, 3, 0, 0),
530 F(300000000, P_DISP_CC_PLL1_OUT_MAIN, 2, 0, 0),
531 F(345000000, P_DISP_CC_PLL0_OUT_MAIN, 4, 0, 0),
532 F(460000000, P_DISP_CC_PLL0_OUT_MAIN, 3, 0, 0),
536 static struct clk_rcg2 disp_cc_mdss_mdp_clk_src = {
540 .parent_map = disp_cc_parent_map_5,
541 .freq_tbl = ftbl_disp_cc_mdss_mdp_clk_src,
542 .clkr.hw.init = &(struct clk_init_data){
543 .name = "disp_cc_mdss_mdp_clk_src",
544 .parent_data = disp_cc_parent_data_5,
545 .num_parents = ARRAY_SIZE(disp_cc_parent_data_5),
546 .flags = CLK_SET_RATE_PARENT,
547 .ops = &clk_rcg2_shared_ops,
551 static struct clk_rcg2 disp_cc_mdss_pclk0_clk_src = {
555 .parent_map = disp_cc_parent_map_6,
556 .clkr.hw.init = &(struct clk_init_data){
557 .name = "disp_cc_mdss_pclk0_clk_src",
558 .parent_data = disp_cc_parent_data_6,
559 .num_parents = ARRAY_SIZE(disp_cc_parent_data_6),
560 .flags = CLK_SET_RATE_PARENT,
561 .ops = &clk_pixel_ops,
565 static struct clk_rcg2 disp_cc_mdss_pclk1_clk_src = {
569 .parent_map = disp_cc_parent_map_6,
570 .clkr.hw.init = &(struct clk_init_data){
571 .name = "disp_cc_mdss_pclk1_clk_src",
572 .parent_data = disp_cc_parent_data_6,
573 .num_parents = ARRAY_SIZE(disp_cc_parent_data_6),
574 .flags = CLK_SET_RATE_PARENT,
575 .ops = &clk_pixel_ops,
579 static const struct freq_tbl ftbl_disp_cc_mdss_rot_clk_src[] = {
580 F(19200000, P_BI_TCXO, 1, 0, 0),
581 F(200000000, P_DISP_CC_PLL1_OUT_MAIN, 3, 0, 0),
582 F(300000000, P_DISP_CC_PLL1_OUT_MAIN, 2, 0, 0),
583 F(345000000, P_DISP_CC_PLL0_OUT_MAIN, 4, 0, 0),
584 F(460000000, P_DISP_CC_PLL0_OUT_MAIN, 3, 0, 0),
588 static struct clk_rcg2 disp_cc_mdss_rot_clk_src = {
592 .parent_map = disp_cc_parent_map_5,
593 .freq_tbl = ftbl_disp_cc_mdss_rot_clk_src,
594 .clkr.hw.init = &(struct clk_init_data){
595 .name = "disp_cc_mdss_rot_clk_src",
596 .parent_data = disp_cc_parent_data_5,
597 .num_parents = ARRAY_SIZE(disp_cc_parent_data_5),
598 .flags = CLK_SET_RATE_PARENT,
599 .ops = &clk_rcg2_shared_ops,
603 static struct clk_rcg2 disp_cc_mdss_vsync_clk_src = {
607 .parent_map = disp_cc_parent_map_1,
608 .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
609 .clkr.hw.init = &(struct clk_init_data){
610 .name = "disp_cc_mdss_vsync_clk_src",
611 .parent_data = disp_cc_parent_data_1,
612 .num_parents = ARRAY_SIZE(disp_cc_parent_data_1),
613 .flags = CLK_SET_RATE_PARENT,
614 .ops = &clk_rcg2_ops,
618 static struct clk_regmap_div disp_cc_mdss_byte0_div_clk_src = {
622 .clkr.hw.init = &(struct clk_init_data) {
623 .name = "disp_cc_mdss_byte0_div_clk_src",
624 .parent_hws = (const struct clk_hw*[]){
625 &disp_cc_mdss_byte0_clk_src.clkr.hw,
628 .ops = &clk_regmap_div_ops,
633 static struct clk_regmap_div disp_cc_mdss_byte1_div_clk_src = {
637 .clkr.hw.init = &(struct clk_init_data) {
638 .name = "disp_cc_mdss_byte1_div_clk_src",
639 .parent_hws = (const struct clk_hw*[]){
640 &disp_cc_mdss_byte1_clk_src.clkr.hw,
643 .ops = &clk_regmap_div_ops,
648 static struct clk_regmap_div disp_cc_mdss_dp_link1_div_clk_src = {
652 .clkr.hw.init = &(struct clk_init_data) {
653 .name = "disp_cc_mdss_dp_link1_div_clk_src",
654 .parent_hws = (const struct clk_hw*[]){
655 &disp_cc_mdss_dp_link1_clk_src.clkr.hw,
658 .ops = &clk_regmap_div_ro_ops,
663 static struct clk_regmap_div disp_cc_mdss_dp_link_div_clk_src = {
667 .clkr.hw.init = &(struct clk_init_data) {
668 .name = "disp_cc_mdss_dp_link_div_clk_src",
669 .parent_hws = (const struct clk_hw*[]){
670 &disp_cc_mdss_dp_link_clk_src.clkr.hw,
673 .ops = &clk_regmap_div_ro_ops,
677 static struct clk_branch disp_cc_mdss_ahb_clk = {
679 .halt_check = BRANCH_HALT,
681 .enable_reg = 0x2080,
682 .enable_mask = BIT(0),
683 .hw.init = &(struct clk_init_data){
684 .name = "disp_cc_mdss_ahb_clk",
685 .parent_hws = (const struct clk_hw*[]){
686 &disp_cc_mdss_ahb_clk_src.clkr.hw,
689 .flags = CLK_SET_RATE_PARENT,
690 .ops = &clk_branch2_ops,
695 static struct clk_branch disp_cc_mdss_byte0_clk = {
697 .halt_check = BRANCH_HALT,
699 .enable_reg = 0x2028,
700 .enable_mask = BIT(0),
701 .hw.init = &(struct clk_init_data){
702 .name = "disp_cc_mdss_byte0_clk",
703 .parent_hws = (const struct clk_hw*[]){
704 &disp_cc_mdss_byte0_clk_src.clkr.hw,
707 .flags = CLK_SET_RATE_PARENT,
708 .ops = &clk_branch2_ops,
713 static struct clk_branch disp_cc_mdss_byte0_intf_clk = {
715 .halt_check = BRANCH_HALT,
717 .enable_reg = 0x202c,
718 .enable_mask = BIT(0),
719 .hw.init = &(struct clk_init_data){
720 .name = "disp_cc_mdss_byte0_intf_clk",
721 .parent_hws = (const struct clk_hw*[]){
722 &disp_cc_mdss_byte0_div_clk_src.clkr.hw,
725 .flags = CLK_SET_RATE_PARENT,
726 .ops = &clk_branch2_ops,
731 static struct clk_branch disp_cc_mdss_byte1_clk = {
733 .halt_check = BRANCH_HALT,
735 .enable_reg = 0x2030,
736 .enable_mask = BIT(0),
737 .hw.init = &(struct clk_init_data){
738 .name = "disp_cc_mdss_byte1_clk",
739 .parent_hws = (const struct clk_hw*[]){
740 &disp_cc_mdss_byte1_clk_src.clkr.hw,
743 .flags = CLK_SET_RATE_PARENT,
744 .ops = &clk_branch2_ops,
749 static struct clk_branch disp_cc_mdss_byte1_intf_clk = {
751 .halt_check = BRANCH_HALT,
753 .enable_reg = 0x2034,
754 .enable_mask = BIT(0),
755 .hw.init = &(struct clk_init_data){
756 .name = "disp_cc_mdss_byte1_intf_clk",
757 .parent_hws = (const struct clk_hw*[]){
758 &disp_cc_mdss_byte1_div_clk_src.clkr.hw,
761 .flags = CLK_SET_RATE_PARENT,
762 .ops = &clk_branch2_ops,
767 static struct clk_branch disp_cc_mdss_dp_aux1_clk = {
769 .halt_check = BRANCH_HALT,
771 .enable_reg = 0x2068,
772 .enable_mask = BIT(0),
773 .hw.init = &(struct clk_init_data){
774 .name = "disp_cc_mdss_dp_aux1_clk",
775 .parent_hws = (const struct clk_hw*[]){
776 &disp_cc_mdss_dp_aux1_clk_src.clkr.hw,
779 .flags = CLK_SET_RATE_PARENT,
780 .ops = &clk_branch2_ops,
785 static struct clk_branch disp_cc_mdss_dp_aux_clk = {
787 .halt_check = BRANCH_HALT,
789 .enable_reg = 0x2054,
790 .enable_mask = BIT(0),
791 .hw.init = &(struct clk_init_data){
792 .name = "disp_cc_mdss_dp_aux_clk",
793 .parent_hws = (const struct clk_hw*[]){
794 &disp_cc_mdss_dp_aux_clk_src.clkr.hw,
797 .flags = CLK_SET_RATE_PARENT,
798 .ops = &clk_branch2_ops,
803 static struct clk_branch disp_cc_mdss_dp_link1_clk = {
805 .halt_check = BRANCH_HALT,
807 .enable_reg = 0x205c,
808 .enable_mask = BIT(0),
809 .hw.init = &(struct clk_init_data){
810 .name = "disp_cc_mdss_dp_link1_clk",
811 .parent_hws = (const struct clk_hw*[]){
812 &disp_cc_mdss_dp_link1_clk_src.clkr.hw,
815 .flags = CLK_SET_RATE_PARENT,
816 .ops = &clk_branch2_ops,
821 static struct clk_branch disp_cc_mdss_dp_link1_intf_clk = {
823 .halt_check = BRANCH_HALT,
825 .enable_reg = 0x2060,
826 .enable_mask = BIT(0),
827 .hw.init = &(struct clk_init_data){
828 .name = "disp_cc_mdss_dp_link1_intf_clk",
829 .parent_hws = (const struct clk_hw*[]){
830 &disp_cc_mdss_dp_link1_div_clk_src.clkr.hw,
833 .ops = &clk_branch2_ops,
838 static struct clk_branch disp_cc_mdss_dp_link_clk = {
840 .halt_check = BRANCH_HALT,
842 .enable_reg = 0x2040,
843 .enable_mask = BIT(0),
844 .hw.init = &(struct clk_init_data){
845 .name = "disp_cc_mdss_dp_link_clk",
846 .parent_hws = (const struct clk_hw*[]){
847 &disp_cc_mdss_dp_link_clk_src.clkr.hw,
850 .flags = CLK_SET_RATE_PARENT,
851 .ops = &clk_branch2_ops,
856 static struct clk_branch disp_cc_mdss_dp_link_intf_clk = {
858 .halt_check = BRANCH_HALT,
860 .enable_reg = 0x2044,
861 .enable_mask = BIT(0),
862 .hw.init = &(struct clk_init_data){
863 .name = "disp_cc_mdss_dp_link_intf_clk",
864 .parent_hws = (const struct clk_hw*[]){
865 &disp_cc_mdss_dp_link_div_clk_src.clkr.hw,
868 .ops = &clk_branch2_ops,
873 static struct clk_branch disp_cc_mdss_dp_pixel1_clk = {
875 .halt_check = BRANCH_HALT,
877 .enable_reg = 0x2050,
878 .enable_mask = BIT(0),
879 .hw.init = &(struct clk_init_data){
880 .name = "disp_cc_mdss_dp_pixel1_clk",
881 .parent_hws = (const struct clk_hw*[]){
882 &disp_cc_mdss_dp_pixel1_clk_src.clkr.hw,
885 .flags = CLK_SET_RATE_PARENT,
886 .ops = &clk_branch2_ops,
891 static struct clk_branch disp_cc_mdss_dp_pixel2_clk = {
893 .halt_check = BRANCH_HALT,
895 .enable_reg = 0x2058,
896 .enable_mask = BIT(0),
897 .hw.init = &(struct clk_init_data){
898 .name = "disp_cc_mdss_dp_pixel2_clk",
899 .parent_hws = (const struct clk_hw*[]){
900 &disp_cc_mdss_dp_pixel2_clk_src.clkr.hw,
903 .flags = CLK_SET_RATE_PARENT,
904 .ops = &clk_branch2_ops,
909 static struct clk_branch disp_cc_mdss_dp_pixel_clk = {
911 .halt_check = BRANCH_HALT,
913 .enable_reg = 0x204c,
914 .enable_mask = BIT(0),
915 .hw.init = &(struct clk_init_data){
916 .name = "disp_cc_mdss_dp_pixel_clk",
917 .parent_hws = (const struct clk_hw*[]){
918 &disp_cc_mdss_dp_pixel_clk_src.clkr.hw,
921 .flags = CLK_SET_RATE_PARENT,
922 .ops = &clk_branch2_ops,
927 static struct clk_branch disp_cc_mdss_esc0_clk = {
929 .halt_check = BRANCH_HALT,
931 .enable_reg = 0x2038,
932 .enable_mask = BIT(0),
933 .hw.init = &(struct clk_init_data){
934 .name = "disp_cc_mdss_esc0_clk",
935 .parent_hws = (const struct clk_hw*[]){
936 &disp_cc_mdss_esc0_clk_src.clkr.hw,
939 .flags = CLK_SET_RATE_PARENT,
940 .ops = &clk_branch2_ops,
945 static struct clk_branch disp_cc_mdss_esc1_clk = {
947 .halt_check = BRANCH_HALT,
949 .enable_reg = 0x203c,
950 .enable_mask = BIT(0),
951 .hw.init = &(struct clk_init_data){
952 .name = "disp_cc_mdss_esc1_clk",
953 .parent_hws = (const struct clk_hw*[]){
954 &disp_cc_mdss_esc1_clk_src.clkr.hw,
957 .flags = CLK_SET_RATE_PARENT,
958 .ops = &clk_branch2_ops,
963 static struct clk_branch disp_cc_mdss_mdp_clk = {
965 .halt_check = BRANCH_HALT,
967 .enable_reg = 0x200c,
968 .enable_mask = BIT(0),
969 .hw.init = &(struct clk_init_data){
970 .name = "disp_cc_mdss_mdp_clk",
971 .parent_hws = (const struct clk_hw*[]){
972 &disp_cc_mdss_mdp_clk_src.clkr.hw,
975 .flags = CLK_SET_RATE_PARENT,
976 .ops = &clk_branch2_ops,
981 static struct clk_branch disp_cc_mdss_mdp_lut_clk = {
983 .halt_check = BRANCH_VOTED,
985 .enable_reg = 0x201c,
986 .enable_mask = BIT(0),
987 .hw.init = &(struct clk_init_data){
988 .name = "disp_cc_mdss_mdp_lut_clk",
989 .parent_hws = (const struct clk_hw*[]){
990 &disp_cc_mdss_mdp_clk_src.clkr.hw,
993 .ops = &clk_branch2_ops,
998 static struct clk_branch disp_cc_mdss_non_gdsc_ahb_clk = {
1000 .halt_check = BRANCH_VOTED,
1002 .enable_reg = 0x4004,
1003 .enable_mask = BIT(0),
1004 .hw.init = &(struct clk_init_data){
1005 .name = "disp_cc_mdss_non_gdsc_ahb_clk",
1006 .parent_hws = (const struct clk_hw*[]){
1007 &disp_cc_mdss_ahb_clk_src.clkr.hw,
1010 .flags = CLK_SET_RATE_PARENT,
1011 .ops = &clk_branch2_ops,
1016 static struct clk_branch disp_cc_mdss_pclk0_clk = {
1018 .halt_check = BRANCH_HALT,
1020 .enable_reg = 0x2004,
1021 .enable_mask = BIT(0),
1022 .hw.init = &(struct clk_init_data){
1023 .name = "disp_cc_mdss_pclk0_clk",
1024 .parent_hws = (const struct clk_hw*[]){
1025 &disp_cc_mdss_pclk0_clk_src.clkr.hw,
1028 .flags = CLK_SET_RATE_PARENT,
1029 .ops = &clk_branch2_ops,
1034 static struct clk_branch disp_cc_mdss_pclk1_clk = {
1036 .halt_check = BRANCH_HALT,
1038 .enable_reg = 0x2008,
1039 .enable_mask = BIT(0),
1040 .hw.init = &(struct clk_init_data){
1041 .name = "disp_cc_mdss_pclk1_clk",
1042 .parent_hws = (const struct clk_hw*[]){
1043 &disp_cc_mdss_pclk1_clk_src.clkr.hw,
1046 .flags = CLK_SET_RATE_PARENT,
1047 .ops = &clk_branch2_ops,
1052 static struct clk_branch disp_cc_mdss_rot_clk = {
1054 .halt_check = BRANCH_HALT,
1056 .enable_reg = 0x2014,
1057 .enable_mask = BIT(0),
1058 .hw.init = &(struct clk_init_data){
1059 .name = "disp_cc_mdss_rot_clk",
1060 .parent_hws = (const struct clk_hw*[]){
1061 &disp_cc_mdss_rot_clk_src.clkr.hw,
1064 .flags = CLK_SET_RATE_PARENT,
1065 .ops = &clk_branch2_ops,
1070 static struct clk_branch disp_cc_mdss_rscc_ahb_clk = {
1072 .halt_check = BRANCH_HALT,
1074 .enable_reg = 0x400c,
1075 .enable_mask = BIT(0),
1076 .hw.init = &(struct clk_init_data){
1077 .name = "disp_cc_mdss_rscc_ahb_clk",
1078 .parent_hws = (const struct clk_hw*[]){
1079 &disp_cc_mdss_ahb_clk_src.clkr.hw,
1082 .flags = CLK_SET_RATE_PARENT,
1083 .ops = &clk_branch2_ops,
1088 static struct clk_branch disp_cc_mdss_rscc_vsync_clk = {
1090 .halt_check = BRANCH_HALT,
1092 .enable_reg = 0x4008,
1093 .enable_mask = BIT(0),
1094 .hw.init = &(struct clk_init_data){
1095 .name = "disp_cc_mdss_rscc_vsync_clk",
1096 .parent_hws = (const struct clk_hw*[]){
1097 &disp_cc_mdss_vsync_clk_src.clkr.hw,
1100 .flags = CLK_SET_RATE_PARENT,
1101 .ops = &clk_branch2_ops,
1106 static struct clk_branch disp_cc_mdss_vsync_clk = {
1108 .halt_check = BRANCH_HALT,
1110 .enable_reg = 0x2024,
1111 .enable_mask = BIT(0),
1112 .hw.init = &(struct clk_init_data){
1113 .name = "disp_cc_mdss_vsync_clk",
1114 .parent_hws = (const struct clk_hw*[]){
1115 &disp_cc_mdss_vsync_clk_src.clkr.hw,
1118 .flags = CLK_SET_RATE_PARENT,
1119 .ops = &clk_branch2_ops,
1124 static struct gdsc mdss_gdsc = {
1127 .name = "mdss_gdsc",
1129 .pwrsts = PWRSTS_OFF_ON,
1134 static struct clk_regmap *disp_cc_sm8250_clocks[] = {
1135 [DISP_CC_MDSS_AHB_CLK] = &disp_cc_mdss_ahb_clk.clkr,
1136 [DISP_CC_MDSS_AHB_CLK_SRC] = &disp_cc_mdss_ahb_clk_src.clkr,
1137 [DISP_CC_MDSS_BYTE0_CLK] = &disp_cc_mdss_byte0_clk.clkr,
1138 [DISP_CC_MDSS_BYTE0_CLK_SRC] = &disp_cc_mdss_byte0_clk_src.clkr,
1139 [DISP_CC_MDSS_BYTE0_DIV_CLK_SRC] = &disp_cc_mdss_byte0_div_clk_src.clkr,
1140 [DISP_CC_MDSS_BYTE0_INTF_CLK] = &disp_cc_mdss_byte0_intf_clk.clkr,
1141 [DISP_CC_MDSS_BYTE1_CLK] = &disp_cc_mdss_byte1_clk.clkr,
1142 [DISP_CC_MDSS_BYTE1_CLK_SRC] = &disp_cc_mdss_byte1_clk_src.clkr,
1143 [DISP_CC_MDSS_BYTE1_DIV_CLK_SRC] = &disp_cc_mdss_byte1_div_clk_src.clkr,
1144 [DISP_CC_MDSS_BYTE1_INTF_CLK] = &disp_cc_mdss_byte1_intf_clk.clkr,
1145 [DISP_CC_MDSS_DP_AUX1_CLK] = &disp_cc_mdss_dp_aux1_clk.clkr,
1146 [DISP_CC_MDSS_DP_AUX1_CLK_SRC] = &disp_cc_mdss_dp_aux1_clk_src.clkr,
1147 [DISP_CC_MDSS_DP_AUX_CLK] = &disp_cc_mdss_dp_aux_clk.clkr,
1148 [DISP_CC_MDSS_DP_AUX_CLK_SRC] = &disp_cc_mdss_dp_aux_clk_src.clkr,
1149 [DISP_CC_MDSS_DP_LINK1_CLK] = &disp_cc_mdss_dp_link1_clk.clkr,
1150 [DISP_CC_MDSS_DP_LINK1_CLK_SRC] = &disp_cc_mdss_dp_link1_clk_src.clkr,
1151 [DISP_CC_MDSS_DP_LINK1_DIV_CLK_SRC] = &disp_cc_mdss_dp_link1_div_clk_src.clkr,
1152 [DISP_CC_MDSS_DP_LINK1_INTF_CLK] = &disp_cc_mdss_dp_link1_intf_clk.clkr,
1153 [DISP_CC_MDSS_DP_LINK_CLK] = &disp_cc_mdss_dp_link_clk.clkr,
1154 [DISP_CC_MDSS_DP_LINK_CLK_SRC] = &disp_cc_mdss_dp_link_clk_src.clkr,
1155 [DISP_CC_MDSS_DP_LINK_DIV_CLK_SRC] = &disp_cc_mdss_dp_link_div_clk_src.clkr,
1156 [DISP_CC_MDSS_DP_LINK_INTF_CLK] = &disp_cc_mdss_dp_link_intf_clk.clkr,
1157 [DISP_CC_MDSS_DP_PIXEL1_CLK] = &disp_cc_mdss_dp_pixel1_clk.clkr,
1158 [DISP_CC_MDSS_DP_PIXEL1_CLK_SRC] = &disp_cc_mdss_dp_pixel1_clk_src.clkr,
1159 [DISP_CC_MDSS_DP_PIXEL2_CLK] = &disp_cc_mdss_dp_pixel2_clk.clkr,
1160 [DISP_CC_MDSS_DP_PIXEL2_CLK_SRC] = &disp_cc_mdss_dp_pixel2_clk_src.clkr,
1161 [DISP_CC_MDSS_DP_PIXEL_CLK] = &disp_cc_mdss_dp_pixel_clk.clkr,
1162 [DISP_CC_MDSS_DP_PIXEL_CLK_SRC] = &disp_cc_mdss_dp_pixel_clk_src.clkr,
1163 [DISP_CC_MDSS_EDP_AUX_CLK] = &disp_cc_mdss_edp_aux_clk.clkr,
1164 [DISP_CC_MDSS_EDP_AUX_CLK_SRC] = &disp_cc_mdss_edp_aux_clk_src.clkr,
1165 [DISP_CC_MDSS_EDP_GTC_CLK] = &disp_cc_mdss_edp_gtc_clk.clkr,
1166 [DISP_CC_MDSS_EDP_GTC_CLK_SRC] = &disp_cc_mdss_edp_gtc_clk_src.clkr,
1167 [DISP_CC_MDSS_EDP_LINK_CLK] = &disp_cc_mdss_edp_link_clk.clkr,
1168 [DISP_CC_MDSS_EDP_LINK_CLK_SRC] = &disp_cc_mdss_edp_link_clk_src.clkr,
1169 [DISP_CC_MDSS_EDP_LINK_INTF_CLK] = &disp_cc_mdss_edp_link_intf_clk.clkr,
1170 [DISP_CC_MDSS_EDP_PIXEL_CLK] = &disp_cc_mdss_edp_pixel_clk.clkr,
1171 [DISP_CC_MDSS_EDP_PIXEL_CLK_SRC] = &disp_cc_mdss_edp_pixel_clk_src.clkr,
1172 [DISP_CC_MDSS_ESC0_CLK] = &disp_cc_mdss_esc0_clk.clkr,
1173 [DISP_CC_MDSS_ESC0_CLK_SRC] = &disp_cc_mdss_esc0_clk_src.clkr,
1174 [DISP_CC_MDSS_ESC1_CLK] = &disp_cc_mdss_esc1_clk.clkr,
1175 [DISP_CC_MDSS_ESC1_CLK_SRC] = &disp_cc_mdss_esc1_clk_src.clkr,
1176 [DISP_CC_MDSS_MDP_CLK] = &disp_cc_mdss_mdp_clk.clkr,
1177 [DISP_CC_MDSS_MDP_CLK_SRC] = &disp_cc_mdss_mdp_clk_src.clkr,
1178 [DISP_CC_MDSS_MDP_LUT_CLK] = &disp_cc_mdss_mdp_lut_clk.clkr,
1179 [DISP_CC_MDSS_NON_GDSC_AHB_CLK] = &disp_cc_mdss_non_gdsc_ahb_clk.clkr,
1180 [DISP_CC_MDSS_PCLK0_CLK] = &disp_cc_mdss_pclk0_clk.clkr,
1181 [DISP_CC_MDSS_PCLK0_CLK_SRC] = &disp_cc_mdss_pclk0_clk_src.clkr,
1182 [DISP_CC_MDSS_PCLK1_CLK] = &disp_cc_mdss_pclk1_clk.clkr,
1183 [DISP_CC_MDSS_PCLK1_CLK_SRC] = &disp_cc_mdss_pclk1_clk_src.clkr,
1184 [DISP_CC_MDSS_ROT_CLK] = &disp_cc_mdss_rot_clk.clkr,
1185 [DISP_CC_MDSS_ROT_CLK_SRC] = &disp_cc_mdss_rot_clk_src.clkr,
1186 [DISP_CC_MDSS_RSCC_AHB_CLK] = &disp_cc_mdss_rscc_ahb_clk.clkr,
1187 [DISP_CC_MDSS_RSCC_VSYNC_CLK] = &disp_cc_mdss_rscc_vsync_clk.clkr,
1188 [DISP_CC_MDSS_VSYNC_CLK] = &disp_cc_mdss_vsync_clk.clkr,
1189 [DISP_CC_MDSS_VSYNC_CLK_SRC] = &disp_cc_mdss_vsync_clk_src.clkr,
1190 [DISP_CC_PLL0] = &disp_cc_pll0.clkr,
1191 [DISP_CC_PLL1] = &disp_cc_pll1.clkr,
1194 static const struct qcom_reset_map disp_cc_sm8250_resets[] = {
1195 [DISP_CC_MDSS_CORE_BCR] = { 0x2000 },
1196 [DISP_CC_MDSS_RSCC_BCR] = { 0x4000 },
1199 static struct gdsc *disp_cc_sm8250_gdscs[] = {
1200 [MDSS_GDSC] = &mdss_gdsc,
1203 static const struct regmap_config disp_cc_sm8250_regmap_config = {
1207 .max_register = 0x10000,
1211 static const struct qcom_cc_desc disp_cc_sm8250_desc = {
1212 .config = &disp_cc_sm8250_regmap_config,
1213 .clks = disp_cc_sm8250_clocks,
1214 .num_clks = ARRAY_SIZE(disp_cc_sm8250_clocks),
1215 .resets = disp_cc_sm8250_resets,
1216 .num_resets = ARRAY_SIZE(disp_cc_sm8250_resets),
1217 .gdscs = disp_cc_sm8250_gdscs,
1218 .num_gdscs = ARRAY_SIZE(disp_cc_sm8250_gdscs),
1221 static const struct of_device_id disp_cc_sm8250_match_table[] = {
1222 { .compatible = "qcom,sc8180x-dispcc" },
1223 { .compatible = "qcom,sm8150-dispcc" },
1224 { .compatible = "qcom,sm8250-dispcc" },
1227 MODULE_DEVICE_TABLE(of, disp_cc_sm8250_match_table);
1229 static int disp_cc_sm8250_probe(struct platform_device *pdev)
1231 struct regmap *regmap;
1233 regmap = qcom_cc_map(pdev, &disp_cc_sm8250_desc);
1235 return PTR_ERR(regmap);
1237 /* note: trion == lucid, except for the prepare() op */
1238 BUILD_BUG_ON(CLK_ALPHA_PLL_TYPE_TRION != CLK_ALPHA_PLL_TYPE_LUCID);
1239 if (of_device_is_compatible(pdev->dev.of_node, "qcom,sc8180x-dispcc") ||
1240 of_device_is_compatible(pdev->dev.of_node, "qcom,sm8150-dispcc")) {
1241 disp_cc_pll0_config.config_ctl_hi_val = 0x00002267;
1242 disp_cc_pll0_config.config_ctl_hi1_val = 0x00000024;
1243 disp_cc_pll0_config.user_ctl_hi1_val = 0x000000D0;
1244 disp_cc_pll0_init.ops = &clk_alpha_pll_trion_ops;
1245 disp_cc_pll1_config.config_ctl_hi_val = 0x00002267;
1246 disp_cc_pll1_config.config_ctl_hi1_val = 0x00000024;
1247 disp_cc_pll1_config.user_ctl_hi1_val = 0x000000D0;
1248 disp_cc_pll1_init.ops = &clk_alpha_pll_trion_ops;
1251 clk_lucid_pll_configure(&disp_cc_pll0, regmap, &disp_cc_pll0_config);
1252 clk_lucid_pll_configure(&disp_cc_pll1, regmap, &disp_cc_pll1_config);
1254 /* Enable clock gating for MDP clocks */
1255 regmap_update_bits(regmap, 0x8000, 0x10, 0x10);
1257 /* DISP_CC_XO_CLK always-on */
1258 regmap_update_bits(regmap, 0x605c, BIT(0), BIT(0));
1260 return qcom_cc_really_probe(pdev, &disp_cc_sm8250_desc, regmap);
1263 static struct platform_driver disp_cc_sm8250_driver = {
1264 .probe = disp_cc_sm8250_probe,
1266 .name = "disp_cc-sm8250",
1267 .of_match_table = disp_cc_sm8250_match_table,
1271 static int __init disp_cc_sm8250_init(void)
1273 return platform_driver_register(&disp_cc_sm8250_driver);
1275 subsys_initcall(disp_cc_sm8250_init);
1277 static void __exit disp_cc_sm8250_exit(void)
1279 platform_driver_unregister(&disp_cc_sm8250_driver);
1281 module_exit(disp_cc_sm8250_exit);
1283 MODULE_DESCRIPTION("QTI DISPCC SM8250 Driver");
1284 MODULE_LICENSE("GPL v2");