2 * Copyright (c) 2015, The Linux Foundation. All rights reserved.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
16 /* DSI v2 has not been supported by now */
17 static const struct msm_dsi_config dsi_v2_cfg
= {
21 static const struct msm_dsi_config msm8974_apq8084_dsi_cfg
= {
22 .io_offset
= DSI_6G_REG_SHIFT
,
26 {"gdsc", -1, -1, -1, -1},
27 {"vdd", 3000000, 3000000, 150000, 100},
28 {"vdda", 1200000, 1200000, 100000, 100},
29 {"vddio", 1800000, 1800000, 100000, 100},
34 static const struct msm_dsi_config msm8916_dsi_cfg
= {
35 .io_offset
= DSI_6G_REG_SHIFT
,
39 {"gdsc", -1, -1, -1, -1},
40 {"vdd", 2850000, 2850000, 100000, 100},
41 {"vdda", 1200000, 1200000, 100000, 100},
42 {"vddio", 1800000, 1800000, 100000, 100},
47 static const struct msm_dsi_config msm8994_dsi_cfg
= {
48 .io_offset
= DSI_6G_REG_SHIFT
,
52 {"gdsc", -1, -1, -1, -1},
53 {"vdda", 1250000, 1250000, 100000, 100},
54 {"vddio", 1800000, 1800000, 100000, 100},
55 {"vcca", 1000000, 1000000, 10000, 100},
56 {"vdd", 1800000, 1800000, 100000, 100},
57 {"lab_reg", -1, -1, -1, -1},
58 {"ibb_reg", -1, -1, -1, -1},
63 static const struct msm_dsi_cfg_handler dsi_cfg_handlers
[] = {
64 {MSM_DSI_VER_MAJOR_V2
, U32_MAX
, &dsi_v2_cfg
},
65 {MSM_DSI_VER_MAJOR_6G
, MSM_DSI_6G_VER_MINOR_V1_0
,
66 &msm8974_apq8084_dsi_cfg
},
67 {MSM_DSI_VER_MAJOR_6G
, MSM_DSI_6G_VER_MINOR_V1_1
,
68 &msm8974_apq8084_dsi_cfg
},
69 {MSM_DSI_VER_MAJOR_6G
, MSM_DSI_6G_VER_MINOR_V1_1_1
,
70 &msm8974_apq8084_dsi_cfg
},
71 {MSM_DSI_VER_MAJOR_6G
, MSM_DSI_6G_VER_MINOR_V1_2
,
72 &msm8974_apq8084_dsi_cfg
},
73 {MSM_DSI_VER_MAJOR_6G
, MSM_DSI_6G_VER_MINOR_V1_3
, &msm8994_dsi_cfg
},
74 {MSM_DSI_VER_MAJOR_6G
, MSM_DSI_6G_VER_MINOR_V1_3_1
, &msm8916_dsi_cfg
},
77 const struct msm_dsi_cfg_handler
*msm_dsi_cfg_get(u32 major
, u32 minor
)
79 const struct msm_dsi_cfg_handler
*cfg_hnd
= NULL
;
82 for (i
= ARRAY_SIZE(dsi_cfg_handlers
) - 1; i
>= 0; i
--) {
83 if ((dsi_cfg_handlers
[i
].major
== major
) &&
84 (dsi_cfg_handlers
[i
].minor
== minor
)) {
85 cfg_hnd
= &dsi_cfg_handlers
[i
];