xref: /openbmc/linux/drivers/gpu/drm/msm/dsi/dsi_cfg.c (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
197fb5e8dSThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only
2d248b61fSHai Li /*
3d248b61fSHai Li  * Copyright (c) 2015, The Linux Foundation. All rights reserved.
4d248b61fSHai Li  */
5d248b61fSHai Li 
6d248b61fSHai Li #include "dsi_cfg.h"
7d248b61fSHai Li 
8cea65dbdSArchit Taneja static const char * const dsi_v2_bus_clk_names[] = {
9db9a3750SRob Clark 	"core_mmss", "iface", "bus",
10cea65dbdSArchit Taneja };
11cea65dbdSArchit Taneja 
12d8810a66SDouglas Anderson static const struct regulator_bulk_data apq8064_dsi_regulators[] = {
13d8810a66SDouglas Anderson 	{ .supply = "vdda", .init_load_uA = 100000 },	/* 1.2 V */
14d8810a66SDouglas Anderson 	{ .supply = "avdd", .init_load_uA = 10000 },	/* 3.0 V */
15d8810a66SDouglas Anderson 	{ .supply = "vddio", .init_load_uA = 100000 },	/* 1.8 V */
16d8810a66SDouglas Anderson };
17d8810a66SDouglas Anderson 
18cea65dbdSArchit Taneja static const struct msm_dsi_config apq8064_dsi_cfg = {
19d248b61fSHai Li 	.io_offset = 0,
20d8810a66SDouglas Anderson 	.regulator_data = apq8064_dsi_regulators,
21d8810a66SDouglas Anderson 	.num_regulators = ARRAY_SIZE(apq8064_dsi_regulators),
22cea65dbdSArchit Taneja 	.bus_clk_names = dsi_v2_bus_clk_names,
23cea65dbdSArchit Taneja 	.num_bus_clks = ARRAY_SIZE(dsi_v2_bus_clk_names),
24ff83e76bSKonrad Dybcio 	.io_start = {
25ff83e76bSKonrad Dybcio 		{ 0x4700000, 0x5800000 },
26ff83e76bSKonrad Dybcio 	},
27d248b61fSHai Li };
28d248b61fSHai Li 
296e0eb52eSArchit Taneja static const char * const dsi_6g_bus_clk_names[] = {
30db9a3750SRob Clark 	"mdp_core", "iface", "bus", "core_mmss",
316e0eb52eSArchit Taneja };
326e0eb52eSArchit Taneja 
33d8810a66SDouglas Anderson static const struct regulator_bulk_data msm8974_apq8084_regulators[] = {
34d8810a66SDouglas Anderson 	{ .supply = "vdd", .init_load_uA = 150000 },	/* 3.0 V */
35d8810a66SDouglas Anderson 	{ .supply = "vdda", .init_load_uA = 100000 },	/* 1.2 V */
36d8810a66SDouglas Anderson 	{ .supply = "vddio", .init_load_uA = 100000 },	/* 1.8 V */
37d8810a66SDouglas Anderson };
38d8810a66SDouglas Anderson 
39d248b61fSHai Li static const struct msm_dsi_config msm8974_apq8084_dsi_cfg = {
40d248b61fSHai Li 	.io_offset = DSI_6G_REG_SHIFT,
41d8810a66SDouglas Anderson 	.regulator_data = msm8974_apq8084_regulators,
42d8810a66SDouglas Anderson 	.num_regulators = ARRAY_SIZE(msm8974_apq8084_regulators),
436e0eb52eSArchit Taneja 	.bus_clk_names = dsi_6g_bus_clk_names,
446e0eb52eSArchit Taneja 	.num_bus_clks = ARRAY_SIZE(dsi_6g_bus_clk_names),
45ff83e76bSKonrad Dybcio 	.io_start = {
46ff83e76bSKonrad Dybcio 		{ 0xfd922800, 0xfd922b00 },
47ff83e76bSKonrad Dybcio 	},
486e0eb52eSArchit Taneja };
496e0eb52eSArchit Taneja 
505da326f4SKonrad Dybcio static const char * const dsi_v1_3_1_clk_names[] = {
51db9a3750SRob Clark 	"mdp_core", "iface", "bus",
52d248b61fSHai Li };
53d248b61fSHai Li 
545da326f4SKonrad Dybcio static const struct regulator_bulk_data dsi_v1_3_1_regulators[] = {
55d8810a66SDouglas Anderson 	{ .supply = "vdda", .init_load_uA = 100000 },	/* 1.2 V */
56d8810a66SDouglas Anderson 	{ .supply = "vddio", .init_load_uA = 100000 },	/* 1.8 V */
57d8810a66SDouglas Anderson };
58d8810a66SDouglas Anderson 
59d248b61fSHai Li static const struct msm_dsi_config msm8916_dsi_cfg = {
60d248b61fSHai Li 	.io_offset = DSI_6G_REG_SHIFT,
615da326f4SKonrad Dybcio 	.regulator_data = dsi_v1_3_1_regulators,
625da326f4SKonrad Dybcio 	.num_regulators = ARRAY_SIZE(dsi_v1_3_1_regulators),
635da326f4SKonrad Dybcio 	.bus_clk_names = dsi_v1_3_1_clk_names,
645da326f4SKonrad Dybcio 	.num_bus_clks = ARRAY_SIZE(dsi_v1_3_1_clk_names),
65ff83e76bSKonrad Dybcio 	.io_start = {
66ff83e76bSKonrad Dybcio 		{ 0x1a98000 },
67ff83e76bSKonrad Dybcio 	},
68d248b61fSHai Li };
69d248b61fSHai Li 
703f3c8affSAngeloGioacchino Del Regno static const struct msm_dsi_config msm8976_dsi_cfg = {
713f3c8affSAngeloGioacchino Del Regno 	.io_offset = DSI_6G_REG_SHIFT,
725da326f4SKonrad Dybcio 	.regulator_data = dsi_v1_3_1_regulators,
735da326f4SKonrad Dybcio 	.num_regulators = ARRAY_SIZE(dsi_v1_3_1_regulators),
745da326f4SKonrad Dybcio 	.bus_clk_names = dsi_v1_3_1_clk_names,
755da326f4SKonrad Dybcio 	.num_bus_clks = ARRAY_SIZE(dsi_v1_3_1_clk_names),
76ff83e76bSKonrad Dybcio 	.io_start = {
77ff83e76bSKonrad Dybcio 		{ 0x1a94000, 0x1a96000 },
78ff83e76bSKonrad Dybcio 	},
793f3c8affSAngeloGioacchino Del Regno };
803f3c8affSAngeloGioacchino Del Regno 
81d8810a66SDouglas Anderson static const struct regulator_bulk_data msm8994_dsi_regulators[] = {
82d8810a66SDouglas Anderson 	{ .supply = "vdda", .init_load_uA = 100000 },	/* 1.25 V */
83d8810a66SDouglas Anderson 	{ .supply = "vddio", .init_load_uA = 100000 },	/* 1.8 V */
84d8810a66SDouglas Anderson 	{ .supply = "vcca", .init_load_uA = 10000 },	/* 1.0 V */
85d8810a66SDouglas Anderson 	{ .supply = "vdd", .init_load_uA = 100000 },	/* 1.8 V */
86d8810a66SDouglas Anderson 	{ .supply = "lab_reg", .init_load_uA = -1 },
87d8810a66SDouglas Anderson 	{ .supply = "ibb_reg", .init_load_uA = -1 },
88d8810a66SDouglas Anderson };
89d8810a66SDouglas Anderson 
90d248b61fSHai Li static const struct msm_dsi_config msm8994_dsi_cfg = {
91d248b61fSHai Li 	.io_offset = DSI_6G_REG_SHIFT,
92d8810a66SDouglas Anderson 	.regulator_data = msm8994_dsi_regulators,
93d8810a66SDouglas Anderson 	.num_regulators = ARRAY_SIZE(msm8994_dsi_regulators),
946e0eb52eSArchit Taneja 	.bus_clk_names = dsi_6g_bus_clk_names,
956e0eb52eSArchit Taneja 	.num_bus_clks = ARRAY_SIZE(dsi_6g_bus_clk_names),
96ff83e76bSKonrad Dybcio 	.io_start = {
97ff83e76bSKonrad Dybcio 		{ 0xfd998000, 0xfd9a0000 },
98ff83e76bSKonrad Dybcio 	},
99d248b61fSHai Li };
100d248b61fSHai Li 
101d8810a66SDouglas Anderson static const struct regulator_bulk_data msm8996_dsi_regulators[] = {
102d8810a66SDouglas Anderson 	{ .supply = "vdda", .init_load_uA = 18160 },	/* 1.25 V */
103d8810a66SDouglas Anderson 	{ .supply = "vcca", .init_load_uA = 17000 },	/* 0.925 V */
104d8810a66SDouglas Anderson 	{ .supply = "vddio", .init_load_uA = 100000 },	/* 1.8 V */
105d8810a66SDouglas Anderson };
106d8810a66SDouglas Anderson 
1073a3ff88aSArchit Taneja static const struct msm_dsi_config msm8996_dsi_cfg = {
1083a3ff88aSArchit Taneja 	.io_offset = DSI_6G_REG_SHIFT,
109d8810a66SDouglas Anderson 	.regulator_data = msm8996_dsi_regulators,
110d8810a66SDouglas Anderson 	.num_regulators = ARRAY_SIZE(msm8996_dsi_regulators),
1115da326f4SKonrad Dybcio 	.bus_clk_names = dsi_6g_bus_clk_names,
1125da326f4SKonrad Dybcio 	.num_bus_clks = ARRAY_SIZE(dsi_6g_bus_clk_names),
113ff83e76bSKonrad Dybcio 	.io_start = {
114ff83e76bSKonrad Dybcio 		{ 0x994000, 0x996000 },
115ff83e76bSKonrad Dybcio 	},
1163a3ff88aSArchit Taneja };
1173a3ff88aSArchit Taneja 
1187b8c9e20SJeffrey Hugo static const char * const dsi_msm8998_bus_clk_names[] = {
1197b8c9e20SJeffrey Hugo 	"iface", "bus", "core",
1207b8c9e20SJeffrey Hugo };
1217b8c9e20SJeffrey Hugo 
122d8810a66SDouglas Anderson static const struct regulator_bulk_data msm8998_dsi_regulators[] = {
123d8810a66SDouglas Anderson 	{ .supply = "vdd", .init_load_uA = 367000 },	/* 0.9 V */
124d8810a66SDouglas Anderson 	{ .supply = "vdda", .init_load_uA = 62800 },	/* 1.2 V */
125d8810a66SDouglas Anderson };
126d8810a66SDouglas Anderson 
1277b8c9e20SJeffrey Hugo static const struct msm_dsi_config msm8998_dsi_cfg = {
1287b8c9e20SJeffrey Hugo 	.io_offset = DSI_6G_REG_SHIFT,
129d8810a66SDouglas Anderson 	.regulator_data = msm8998_dsi_regulators,
130d8810a66SDouglas Anderson 	.num_regulators = ARRAY_SIZE(msm8998_dsi_regulators),
1317b8c9e20SJeffrey Hugo 	.bus_clk_names = dsi_msm8998_bus_clk_names,
1327b8c9e20SJeffrey Hugo 	.num_bus_clks = ARRAY_SIZE(dsi_msm8998_bus_clk_names),
133ff83e76bSKonrad Dybcio 	.io_start = {
134ff83e76bSKonrad Dybcio 		{ 0xc994000, 0xc996000 },
135ff83e76bSKonrad Dybcio 	},
1367b8c9e20SJeffrey Hugo };
1377b8c9e20SJeffrey Hugo 
138033f47f7SKonrad Dybcio static const char * const dsi_sdm660_bus_clk_names[] = {
139033f47f7SKonrad Dybcio 	"iface", "bus", "core", "core_mmss",
140033f47f7SKonrad Dybcio };
141033f47f7SKonrad Dybcio 
142d8810a66SDouglas Anderson static const struct regulator_bulk_data sdm660_dsi_regulators[] = {
143d8810a66SDouglas Anderson 	{ .supply = "vdda", .init_load_uA = 12560 },	/* 1.2 V */
144d8810a66SDouglas Anderson };
145d8810a66SDouglas Anderson 
146033f47f7SKonrad Dybcio static const struct msm_dsi_config sdm660_dsi_cfg = {
147033f47f7SKonrad Dybcio 	.io_offset = DSI_6G_REG_SHIFT,
148d8810a66SDouglas Anderson 	.regulator_data = sdm660_dsi_regulators,
149d8810a66SDouglas Anderson 	.num_regulators = ARRAY_SIZE(sdm660_dsi_regulators),
150033f47f7SKonrad Dybcio 	.bus_clk_names = dsi_sdm660_bus_clk_names,
151033f47f7SKonrad Dybcio 	.num_bus_clks = ARRAY_SIZE(dsi_sdm660_bus_clk_names),
152ff83e76bSKonrad Dybcio 	.io_start = {
153ff83e76bSKonrad Dybcio 		{ 0xc994000, 0xc996000 },
154ff83e76bSKonrad Dybcio 	},
155033f47f7SKonrad Dybcio };
156033f47f7SKonrad Dybcio 
1575da326f4SKonrad Dybcio static const char * const dsi_v2_4_clk_names[] = {
15802f7a6caSArchit Taneja 	"iface", "bus",
15902f7a6caSArchit Taneja };
16002f7a6caSArchit Taneja 
1615da326f4SKonrad Dybcio static const struct regulator_bulk_data dsi_v2_4_regulators[] = {
162d8810a66SDouglas Anderson 	{ .supply = "vdda", .init_load_uA = 21800 },	/* 1.2 V */
163*21d6ec5fSKonrad Dybcio 	{ .supply = "refgen" },
164d8810a66SDouglas Anderson };
165d8810a66SDouglas Anderson 
16602f7a6caSArchit Taneja static const struct msm_dsi_config sdm845_dsi_cfg = {
16702f7a6caSArchit Taneja 	.io_offset = DSI_6G_REG_SHIFT,
1685da326f4SKonrad Dybcio 	.regulator_data = dsi_v2_4_regulators,
1695da326f4SKonrad Dybcio 	.num_regulators = ARRAY_SIZE(dsi_v2_4_regulators),
1705da326f4SKonrad Dybcio 	.bus_clk_names = dsi_v2_4_clk_names,
1715da326f4SKonrad Dybcio 	.num_bus_clks = ARRAY_SIZE(dsi_v2_4_clk_names),
172ff83e76bSKonrad Dybcio 	.io_start = {
173da9887adSKonrad Dybcio 		{ 0xae94000, 0xae96000 }, /* SDM845 / SDM670 */
174da9887adSKonrad Dybcio 		{ 0x5e94000 }, /* QCM2290 / SM6115 / SM6125 / SM6375 */
175ff83e76bSKonrad Dybcio 	},
17602f7a6caSArchit Taneja };
17702f7a6caSArchit Taneja 
1789d0118f0SNeil Armstrong static const struct regulator_bulk_data sm8550_dsi_regulators[] = {
1799d0118f0SNeil Armstrong 	{ .supply = "vdda", .init_load_uA = 16800 },	/* 1.2 V */
1809d0118f0SNeil Armstrong };
1819d0118f0SNeil Armstrong 
1829d0118f0SNeil Armstrong static const struct msm_dsi_config sm8550_dsi_cfg = {
1839d0118f0SNeil Armstrong 	.io_offset = DSI_6G_REG_SHIFT,
1849d0118f0SNeil Armstrong 	.regulator_data = sm8550_dsi_regulators,
1859d0118f0SNeil Armstrong 	.num_regulators = ARRAY_SIZE(sm8550_dsi_regulators),
1865da326f4SKonrad Dybcio 	.bus_clk_names = dsi_v2_4_clk_names,
1875da326f4SKonrad Dybcio 	.num_bus_clks = ARRAY_SIZE(dsi_v2_4_clk_names),
188ff83e76bSKonrad Dybcio 	.io_start = {
189ff83e76bSKonrad Dybcio 		{ 0xae94000, 0xae96000 },
190ff83e76bSKonrad Dybcio 	},
1919d0118f0SNeil Armstrong };
1929d0118f0SNeil Armstrong 
193d8810a66SDouglas Anderson static const struct regulator_bulk_data sc7280_dsi_regulators[] = {
194d8810a66SDouglas Anderson 	{ .supply = "vdda", .init_load_uA = 8350 },	/* 1.2 V */
195*21d6ec5fSKonrad Dybcio 	{ .supply = "refgen" },
196d8810a66SDouglas Anderson };
197d8810a66SDouglas Anderson 
19865c391b3SRajeev Nandan static const struct msm_dsi_config sc7280_dsi_cfg = {
19965c391b3SRajeev Nandan 	.io_offset = DSI_6G_REG_SHIFT,
200d8810a66SDouglas Anderson 	.regulator_data = sc7280_dsi_regulators,
201d8810a66SDouglas Anderson 	.num_regulators = ARRAY_SIZE(sc7280_dsi_regulators),
2025da326f4SKonrad Dybcio 	.bus_clk_names = dsi_v2_4_clk_names,
2035da326f4SKonrad Dybcio 	.num_bus_clks = ARRAY_SIZE(dsi_v2_4_clk_names),
204ff83e76bSKonrad Dybcio 	.io_start = {
205ff83e76bSKonrad Dybcio 		{ 0xae94000, 0xae96000 },
206ff83e76bSKonrad Dybcio 	},
20765c391b3SRajeev Nandan };
20865c391b3SRajeev Nandan 
2095dce8d78SKrzysztof Wilczynski static const struct msm_dsi_host_cfg_ops msm_dsi_v2_host_ops = {
2106b16f05aSRob Clark 	.link_clk_set_rate = dsi_link_clk_set_rate_v2,
211c4d8cfe5SSibi Sankar 	.link_clk_enable = dsi_link_clk_enable_v2,
212c4d8cfe5SSibi Sankar 	.link_clk_disable = dsi_link_clk_disable_v2,
213c4d8cfe5SSibi Sankar 	.clk_init_ver = dsi_clk_init_v2,
214c4d8cfe5SSibi Sankar 	.tx_buf_alloc = dsi_tx_buf_alloc_v2,
215c4d8cfe5SSibi Sankar 	.tx_buf_get = dsi_tx_buf_get_v2,
216c4d8cfe5SSibi Sankar 	.tx_buf_put = NULL,
217c4d8cfe5SSibi Sankar 	.dma_base_get = dsi_dma_base_get_v2,
218c4d8cfe5SSibi Sankar 	.calc_clk_rate = dsi_calc_clk_rate_v2,
219c4d8cfe5SSibi Sankar };
220c4d8cfe5SSibi Sankar 
2215dce8d78SKrzysztof Wilczynski static const struct msm_dsi_host_cfg_ops msm_dsi_6g_host_ops = {
2226b16f05aSRob Clark 	.link_clk_set_rate = dsi_link_clk_set_rate_6g,
223c4d8cfe5SSibi Sankar 	.link_clk_enable = dsi_link_clk_enable_6g,
224c4d8cfe5SSibi Sankar 	.link_clk_disable = dsi_link_clk_disable_6g,
225c4d8cfe5SSibi Sankar 	.clk_init_ver = NULL,
226c4d8cfe5SSibi Sankar 	.tx_buf_alloc = dsi_tx_buf_alloc_6g,
227c4d8cfe5SSibi Sankar 	.tx_buf_get = dsi_tx_buf_get_6g,
228c4d8cfe5SSibi Sankar 	.tx_buf_put = dsi_tx_buf_put_6g,
229c4d8cfe5SSibi Sankar 	.dma_base_get = dsi_dma_base_get_6g,
230c4d8cfe5SSibi Sankar 	.calc_clk_rate = dsi_calc_clk_rate_6g,
231c4d8cfe5SSibi Sankar };
232c4d8cfe5SSibi Sankar 
2335dce8d78SKrzysztof Wilczynski static const struct msm_dsi_host_cfg_ops msm_dsi_6g_v2_host_ops = {
2346b16f05aSRob Clark 	.link_clk_set_rate = dsi_link_clk_set_rate_6g,
235c4d8cfe5SSibi Sankar 	.link_clk_enable = dsi_link_clk_enable_6g,
236c4d8cfe5SSibi Sankar 	.link_clk_disable = dsi_link_clk_disable_6g,
237c4d8cfe5SSibi Sankar 	.clk_init_ver = dsi_clk_init_6g_v2,
238c4d8cfe5SSibi Sankar 	.tx_buf_alloc = dsi_tx_buf_alloc_6g,
239c4d8cfe5SSibi Sankar 	.tx_buf_get = dsi_tx_buf_get_6g,
240c4d8cfe5SSibi Sankar 	.tx_buf_put = dsi_tx_buf_put_6g,
241c4d8cfe5SSibi Sankar 	.dma_base_get = dsi_dma_base_get_6g,
242c4d8cfe5SSibi Sankar 	.calc_clk_rate = dsi_calc_clk_rate_6g,
243c4d8cfe5SSibi Sankar };
244c4d8cfe5SSibi Sankar 
245d248b61fSHai Li static const struct msm_dsi_cfg_handler dsi_cfg_handlers[] = {
246c4d8cfe5SSibi Sankar 	{MSM_DSI_VER_MAJOR_V2, MSM_DSI_V2_VER_MINOR_8064,
247c4d8cfe5SSibi Sankar 		&apq8064_dsi_cfg, &msm_dsi_v2_host_ops},
248d248b61fSHai Li 	{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_0,
249c4d8cfe5SSibi Sankar 		&msm8974_apq8084_dsi_cfg, &msm_dsi_6g_host_ops},
25082cf4954SLuca Weiss 	{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_0_2,
25182cf4954SLuca Weiss 		&msm8974_apq8084_dsi_cfg, &msm_dsi_6g_host_ops},
252d248b61fSHai Li 	{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_1,
253c4d8cfe5SSibi Sankar 		&msm8974_apq8084_dsi_cfg, &msm_dsi_6g_host_ops},
254d248b61fSHai Li 	{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_1_1,
255c4d8cfe5SSibi Sankar 		&msm8974_apq8084_dsi_cfg, &msm_dsi_6g_host_ops},
256d248b61fSHai Li 	{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_2,
257c4d8cfe5SSibi Sankar 		&msm8974_apq8084_dsi_cfg, &msm_dsi_6g_host_ops},
258c4d8cfe5SSibi Sankar 	{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_3,
259c4d8cfe5SSibi Sankar 		&msm8994_dsi_cfg, &msm_dsi_6g_host_ops},
260c4d8cfe5SSibi Sankar 	{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_3_1,
261c4d8cfe5SSibi Sankar 		&msm8916_dsi_cfg, &msm_dsi_6g_host_ops},
262c4d8cfe5SSibi Sankar 	{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_4_1,
263c4d8cfe5SSibi Sankar 		&msm8996_dsi_cfg, &msm_dsi_6g_host_ops},
2643f3c8affSAngeloGioacchino Del Regno 	{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_4_2,
2653f3c8affSAngeloGioacchino Del Regno 		&msm8976_dsi_cfg, &msm_dsi_6g_host_ops},
266033f47f7SKonrad Dybcio 	{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_1_0,
267033f47f7SKonrad Dybcio 		&sdm660_dsi_cfg, &msm_dsi_6g_v2_host_ops},
2687b8c9e20SJeffrey Hugo 	{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_2_0,
2697b8c9e20SJeffrey Hugo 		&msm8998_dsi_cfg, &msm_dsi_6g_v2_host_ops},
270c4d8cfe5SSibi Sankar 	{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_2_1,
271c4d8cfe5SSibi Sankar 		&sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops},
27211550636SJonathan Marek 	{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_3_0,
27311550636SJonathan Marek 		&sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops},
27411550636SJonathan Marek 	{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_4_0,
27511550636SJonathan Marek 		&sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops},
2766125bd32SHarigovindan P 	{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_4_1,
27761dbf8d2SKonrad Dybcio 		&sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops},
27865c391b3SRajeev Nandan 	{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_5_0,
27965c391b3SRajeev Nandan 		&sc7280_dsi_cfg, &msm_dsi_6g_v2_host_ops},
280c332881cSDmitry Baryshkov 	{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_6_0,
281c332881cSDmitry Baryshkov 		&sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops},
2829d0118f0SNeil Armstrong 	{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_7_0,
2839d0118f0SNeil Armstrong 		&sm8550_dsi_cfg, &msm_dsi_6g_v2_host_ops},
284d248b61fSHai Li };
285d248b61fSHai Li 
msm_dsi_cfg_get(u32 major,u32 minor)286d248b61fSHai Li const struct msm_dsi_cfg_handler *msm_dsi_cfg_get(u32 major, u32 minor)
287d248b61fSHai Li {
288d248b61fSHai Li 	const struct msm_dsi_cfg_handler *cfg_hnd = NULL;
289d248b61fSHai Li 	int i;
290d248b61fSHai Li 
291d248b61fSHai Li 	for (i = ARRAY_SIZE(dsi_cfg_handlers) - 1; i >= 0; i--) {
292d248b61fSHai Li 		if ((dsi_cfg_handlers[i].major == major) &&
293d248b61fSHai Li 			(dsi_cfg_handlers[i].minor == minor)) {
294d248b61fSHai Li 			cfg_hnd = &dsi_cfg_handlers[i];
295d248b61fSHai Li 			break;
296d248b61fSHai Li 		}
297d248b61fSHai Li 	}
298d248b61fSHai Li 
299d248b61fSHai Li 	return cfg_hnd;
300d248b61fSHai Li }
301