Lines Matching +full:dt +full:- +full:node

1 // SPDX-License-Identifier: GPL-2.0+
24 #define master_to_driver(a) (a->dsim_lcd_drv)
25 #define master_to_device(a) (a->dsim_lcd_dev)
45 return -EFAULT; in exynos_mipi_dsi_register_lcd_device()
48 if (!lcd_dev->name) { in exynos_mipi_dsi_register_lcd_device()
50 return -EFAULT; in exynos_mipi_dsi_register_lcd_device()
56 return -EFAULT; in exynos_mipi_dsi_register_lcd_device()
59 dsim_ddi->dsim_lcd_dev = lcd_dev; in exynos_mipi_dsi_register_lcd_device()
61 list_add_tail(&dsim_ddi->list, &dsim_ddi_list); in exynos_mipi_dsi_register_lcd_device()
73 lcd_dev = dsim_ddi->dsim_lcd_dev; in exynos_mipi_dsi_find_lcd_device()
77 if (lcd_drv->id >= 0) { in exynos_mipi_dsi_find_lcd_device()
78 if ((strcmp(lcd_drv->name, lcd_dev->name)) == 0 && in exynos_mipi_dsi_find_lcd_device()
79 lcd_drv->id == lcd_dev->id) { in exynos_mipi_dsi_find_lcd_device()
84 dsim_ddi->bus_id = lcd_dev->bus_id; in exynos_mipi_dsi_find_lcd_device()
89 if ((strcmp(lcd_drv->name, lcd_dev->name)) == 0) { in exynos_mipi_dsi_find_lcd_device()
94 dsim_ddi->bus_id = lcd_dev->bus_id; in exynos_mipi_dsi_find_lcd_device()
113 return -EFAULT; in exynos_mipi_dsi_register_lcd_driver()
116 if (!lcd_drv->name) { in exynos_mipi_dsi_register_lcd_driver()
118 return -EFAULT; in exynos_mipi_dsi_register_lcd_driver()
124 return -EFAULT; in exynos_mipi_dsi_register_lcd_driver()
127 dsim_ddi->dsim_lcd_drv = lcd_drv; in exynos_mipi_dsi_register_lcd_driver()
129 debug("registered panel driver(%s) to mipi-dsi driver.\n", in exynos_mipi_dsi_register_lcd_driver()
130 lcd_drv->name); in exynos_mipi_dsi_register_lcd_driver()
145 lcd_drv = dsim_ddi->dsim_lcd_drv; in exynos_mipi_dsi_bind_lcd_ddi()
146 lcd_dev = dsim_ddi->dsim_lcd_dev; in exynos_mipi_dsi_bind_lcd_ddi()
150 debug("lcd_drv->id = %d, lcd_dev->id = %d\n", in exynos_mipi_dsi_bind_lcd_ddi()
151 lcd_drv->id, lcd_dev->id); in exynos_mipi_dsi_bind_lcd_ddi()
153 if ((strcmp(lcd_drv->name, name) == 0)) { in exynos_mipi_dsi_bind_lcd_ddi()
154 lcd_dev->master = dsim; in exynos_mipi_dsi_bind_lcd_ddi()
156 dsim->dsim_lcd_dev = lcd_dev; in exynos_mipi_dsi_bind_lcd_ddi()
157 dsim->dsim_lcd_drv = lcd_drv; in exynos_mipi_dsi_bind_lcd_ddi()
166 /* define MIPI-DSI Master operations. */
182 return -EFAULT; in exynos_mipi_dsi_init()
186 dsim_config = dsim_pd->dsim_config; in exynos_mipi_dsi_init()
189 return -EFAULT; in exynos_mipi_dsi_init()
192 dsim->pd = dsim_pd; in exynos_mipi_dsi_init()
193 dsim->dsim_config = dsim_config; in exynos_mipi_dsi_init()
194 dsim->master_ops = &master_ops; in exynos_mipi_dsi_init()
197 dsim_ddi = exynos_mipi_dsi_bind_lcd_ddi(dsim, dsim_pd->lcd_panel_name); in exynos_mipi_dsi_init()
200 return -ENOSYS; in exynos_mipi_dsi_init()
202 if (dsim_pd->lcd_power) in exynos_mipi_dsi_init()
203 dsim_pd->lcd_power(); in exynos_mipi_dsi_init()
205 if (dsim_pd->mipi_power) in exynos_mipi_dsi_init()
206 dsim_pd->mipi_power(); in exynos_mipi_dsi_init()
209 if (dsim_pd->phy_enable) in exynos_mipi_dsi_init()
210 dsim_pd->phy_enable(0, 1); in exynos_mipi_dsi_init()
219 exynos_mipi_dsi_set_display_mode(dsim, dsim->dsim_config); in exynos_mipi_dsi_init()
221 /* initialize mipi-dsi client(lcd panel). */ in exynos_mipi_dsi_init()
222 if (dsim_ddi->dsim_lcd_drv && dsim_ddi->dsim_lcd_drv->mipi_panel_init) { in exynos_mipi_dsi_init()
223 dsim_ddi->dsim_lcd_drv->mipi_panel_init(dsim); in exynos_mipi_dsi_init()
224 dsim_ddi->dsim_lcd_drv->mipi_display_on(dsim); in exynos_mipi_dsi_init()
227 debug("mipi-dsi driver(%s mode) has been probed.\n", in exynos_mipi_dsi_init()
228 (dsim_config->e_interface == DSIM_COMMAND) ? in exynos_mipi_dsi_init()
234 int exynos_dsim_config_parse_dt(const void *blob, struct mipi_dsim_config *dt, in exynos_dsim_config_parse_dt() argument
237 int node; in exynos_dsim_config_parse_dt() local
239 node = fdtdec_next_compatible(blob, 0, COMPAT_SAMSUNG_EXYNOS_MIPI_DSI); in exynos_dsim_config_parse_dt()
240 if (node <= 0) { in exynos_dsim_config_parse_dt()
241 printf("exynos_mipi_dsi: Can't get device node for mipi dsi\n"); in exynos_dsim_config_parse_dt()
242 return -ENODEV; in exynos_dsim_config_parse_dt()
245 dt->e_interface = fdtdec_get_int(blob, node, in exynos_dsim_config_parse_dt()
246 "samsung,dsim-config-e-interface", 0); in exynos_dsim_config_parse_dt()
248 dt->e_virtual_ch = fdtdec_get_int(blob, node, in exynos_dsim_config_parse_dt()
249 "samsung,dsim-config-e-virtual-ch", 0); in exynos_dsim_config_parse_dt()
251 dt->e_pixel_format = fdtdec_get_int(blob, node, in exynos_dsim_config_parse_dt()
252 "samsung,dsim-config-e-pixel-format", 0); in exynos_dsim_config_parse_dt()
254 dt->e_burst_mode = fdtdec_get_int(blob, node, in exynos_dsim_config_parse_dt()
255 "samsung,dsim-config-e-burst-mode", 0); in exynos_dsim_config_parse_dt()
257 dt->e_no_data_lane = fdtdec_get_int(blob, node, in exynos_dsim_config_parse_dt()
258 "samsung,dsim-config-e-no-data-lane", 0); in exynos_dsim_config_parse_dt()
260 dt->e_byte_clk = fdtdec_get_int(blob, node, in exynos_dsim_config_parse_dt()
261 "samsung,dsim-config-e-byte-clk", 0); in exynos_dsim_config_parse_dt()
263 dt->hfp = fdtdec_get_int(blob, node, in exynos_dsim_config_parse_dt()
264 "samsung,dsim-config-hfp", 0); in exynos_dsim_config_parse_dt()
266 dt->p = fdtdec_get_int(blob, node, in exynos_dsim_config_parse_dt()
267 "samsung,dsim-config-p", 0); in exynos_dsim_config_parse_dt()
268 dt->m = fdtdec_get_int(blob, node, in exynos_dsim_config_parse_dt()
269 "samsung,dsim-config-m", 0); in exynos_dsim_config_parse_dt()
270 dt->s = fdtdec_get_int(blob, node, in exynos_dsim_config_parse_dt()
271 "samsung,dsim-config-s", 0); in exynos_dsim_config_parse_dt()
273 dt->pll_stable_time = fdtdec_get_int(blob, node, in exynos_dsim_config_parse_dt()
274 "samsung,dsim-config-pll-stable-time", 0); in exynos_dsim_config_parse_dt()
276 dt->esc_clk = fdtdec_get_int(blob, node, in exynos_dsim_config_parse_dt()
277 "samsung,dsim-config-esc-clk", 0); in exynos_dsim_config_parse_dt()
279 dt->stop_holding_cnt = fdtdec_get_int(blob, node, in exynos_dsim_config_parse_dt()
280 "samsung,dsim-config-stop-holding-cnt", 0); in exynos_dsim_config_parse_dt()
282 dt->bta_timeout = fdtdec_get_int(blob, node, in exynos_dsim_config_parse_dt()
283 "samsung,dsim-config-bta-timeout", 0); in exynos_dsim_config_parse_dt()
285 dt->rx_timeout = fdtdec_get_int(blob, node, in exynos_dsim_config_parse_dt()
286 "samsung,dsim-config-rx-timeout", 0); in exynos_dsim_config_parse_dt()
288 lcd_dt->name = fdtdec_get_config_string(blob, in exynos_dsim_config_parse_dt()
289 "samsung,dsim-device-name"); in exynos_dsim_config_parse_dt()
291 lcd_dt->id = fdtdec_get_int(blob, node, in exynos_dsim_config_parse_dt()
292 "samsung,dsim-device-id", 0); in exynos_dsim_config_parse_dt()
294 lcd_dt->bus_id = fdtdec_get_int(blob, node, in exynos_dsim_config_parse_dt()
295 "samsung,dsim-device-bus_id", 0); in exynos_dsim_config_parse_dt()
297 lcd_dt->reverse_panel = fdtdec_get_int(blob, node, in exynos_dsim_config_parse_dt()
298 "samsung,dsim-device-reverse-panel", 0); in exynos_dsim_config_parse_dt()
309 if (exynos_dsim_config_parse_dt(gd->fdt_blob, &dsim_config_dt, in exynos_init_dsim_platform_data()
322 vid->dsim_platform_data_dt = &dsim_platform_data_dt; in exynos_init_dsim_platform_data()