37
37
P_DSI2_PLL_DSICLK ,
38
38
P_DSI1_PLL_BYTECLK ,
39
39
P_DSI2_PLL_BYTECLK ,
40
+ P_LVDS_PLL ,
40
41
};
41
42
42
43
#define F_MN (f , s , _m , _n ) { .freq = f, .src = s, .m = _m, .n = _n }
@@ -143,6 +144,20 @@ static const struct clk_parent_data mmcc_pxo_dsi2_dsi1[] = {
143
144
{ .fw_name = "dsi1pll" , .name = "dsi1pll" },
144
145
};
145
146
147
+ static const struct parent_map mmcc_pxo_dsi2_dsi1_lvds_map [] = {
148
+ { P_PXO , 0 },
149
+ { P_DSI2_PLL_DSICLK , 1 },
150
+ { P_LVDS_PLL , 2 },
151
+ { P_DSI1_PLL_DSICLK , 3 },
152
+ };
153
+
154
+ static const struct clk_parent_data mmcc_pxo_dsi2_dsi1_lvds [] = {
155
+ { .fw_name = "pxo" , .name = "pxo_board" },
156
+ { .fw_name = "dsi2pll" , .name = "dsi2pll" },
157
+ { .fw_name = "lvdspll" , .name = "mpd4_lvds_pll" },
158
+ { .fw_name = "dsi1pll" , .name = "dsi1pll" },
159
+ };
160
+
146
161
static const struct parent_map mmcc_pxo_dsi1_dsi2_byte_map [] = {
147
162
{ P_PXO , 0 },
148
163
{ P_DSI1_PLL_BYTECLK , 1 },
@@ -2439,26 +2454,42 @@ static struct clk_rcg dsi2_pixel_src = {
2439
2454
},
2440
2455
.s = {
2441
2456
.src_sel_shift = 0 ,
2442
- .parent_map = mmcc_pxo_dsi2_dsi1_map ,
2457
+ .parent_map = mmcc_pxo_dsi2_dsi1_lvds_map ,
2443
2458
},
2444
2459
.clkr = {
2445
2460
.enable_reg = 0x0094 ,
2446
2461
.enable_mask = BIT (2 ),
2447
2462
.hw .init = & (struct clk_init_data ){
2448
2463
.name = "dsi2_pixel_src" ,
2449
- .parent_data = mmcc_pxo_dsi2_dsi1 ,
2450
- .num_parents = ARRAY_SIZE (mmcc_pxo_dsi2_dsi1 ),
2464
+ .parent_data = mmcc_pxo_dsi2_dsi1_lvds ,
2465
+ .num_parents = ARRAY_SIZE (mmcc_pxo_dsi2_dsi1_lvds ),
2451
2466
.ops = & clk_rcg_pixel_ops ,
2452
2467
},
2453
2468
},
2454
2469
};
2455
2470
2471
+ static struct clk_branch dsi2_pixel_lvds_src = {
2472
+ .clkr = {
2473
+ .enable_reg = 0x0094 ,
2474
+ .enable_mask = BIT (0 ),
2475
+ .hw .init = & (struct clk_init_data ){
2476
+ .name = "dsi2_pixel_lvds_src" ,
2477
+ .parent_hws = (const struct clk_hw * []){
2478
+ & dsi2_pixel_src .clkr .hw
2479
+ },
2480
+ .num_parents = 1 ,
2481
+ .ops = & clk_branch_simple_ops ,
2482
+ .flags = CLK_SET_RATE_PARENT ,
2483
+ },
2484
+ },
2485
+ };
2486
+
2456
2487
static struct clk_branch dsi2_pixel_clk = {
2457
2488
.halt_reg = 0x01d0 ,
2458
2489
.halt_bit = 19 ,
2459
2490
.clkr = {
2460
2491
.enable_reg = 0x0094 ,
2461
- .enable_mask = BIT ( 0 ) ,
2492
+ .enable_mask = 0 ,
2462
2493
.hw .init = & (struct clk_init_data ){
2463
2494
.name = "mdp_pclk2_clk" ,
2464
2495
.parent_hws = (const struct clk_hw * []){
@@ -2471,6 +2502,24 @@ static struct clk_branch dsi2_pixel_clk = {
2471
2502
},
2472
2503
};
2473
2504
2505
+ static struct clk_branch lvds_clk = {
2506
+ .halt_reg = 0x024c ,
2507
+ .halt_bit = 6 ,
2508
+ .clkr = {
2509
+ .enable_reg = 0x0264 ,
2510
+ .enable_mask = BIT (1 ),
2511
+ .hw .init = & (struct clk_init_data ){
2512
+ .name = "mdp_lvds_clk" ,
2513
+ .parent_hws = (const struct clk_hw * []){
2514
+ & dsi2_pixel_lvds_src .clkr .hw
2515
+ },
2516
+ .num_parents = 1 ,
2517
+ .ops = & clk_branch_ops ,
2518
+ .flags = CLK_SET_RATE_PARENT ,
2519
+ },
2520
+ },
2521
+ };
2522
+
2474
2523
static struct clk_branch gfx2d0_ahb_clk = {
2475
2524
.hwcg_reg = 0x0038 ,
2476
2525
.hwcg_bit = 28 ,
@@ -2799,6 +2848,8 @@ static struct clk_regmap *mmcc_msm8960_clks[] = {
2799
2848
[CSIPHY1_TIMER_CLK ] = & csiphy1_timer_clk .clkr ,
2800
2849
[CSIPHY0_TIMER_CLK ] = & csiphy0_timer_clk .clkr ,
2801
2850
[PLL2 ] = & pll2 .clkr ,
2851
+ [DSI2_PIXEL_LVDS_SRC ] = & dsi2_pixel_lvds_src .clkr ,
2852
+ [LVDS_CLK ] = & lvds_clk .clkr ,
2802
2853
};
2803
2854
2804
2855
static const struct qcom_reset_map mmcc_msm8960_resets [] = {
@@ -2983,6 +3034,8 @@ static struct clk_regmap *mmcc_apq8064_clks[] = {
2983
3034
[VCAP_CLK ] = & vcap_clk .clkr ,
2984
3035
[VCAP_NPL_CLK ] = & vcap_npl_clk .clkr ,
2985
3036
[PLL15 ] = & pll15 .clkr ,
3037
+ [DSI2_PIXEL_LVDS_SRC ] = & dsi2_pixel_lvds_src .clkr ,
3038
+ [LVDS_CLK ] = & lvds_clk .clkr ,
2986
3039
};
2987
3040
2988
3041
static const struct qcom_reset_map mmcc_apq8064_resets [] = {
0 commit comments