• Home
  • Raw
  • Download

Lines Matching full:mipi

22 #include <drm/tinydrm/mipi-dbi.h>
118 struct mipi_dbi *mipi = mipi_dbi_from_tinydrm(tdev); in st7586_fb_dirty() local
123 if (!mipi->enabled) in st7586_fb_dirty()
136 ret = st7586_buf_copy(mipi->tx_buf, fb, &clip); in st7586_fb_dirty()
144 mipi_dbi_command(mipi, MIPI_DCS_SET_COLUMN_ADDRESS, in st7586_fb_dirty()
147 mipi_dbi_command(mipi, MIPI_DCS_SET_PAGE_ADDRESS, in st7586_fb_dirty()
151 ret = mipi_dbi_command_buf(mipi, MIPI_DCS_WRITE_MEMORY_START, in st7586_fb_dirty()
152 (u8 *)mipi->tx_buf, in st7586_fb_dirty()
169 struct mipi_dbi *mipi = mipi_dbi_from_tinydrm(tdev); in st7586_pipe_enable() local
175 ret = mipi_dbi_poweron_reset(mipi); in st7586_pipe_enable()
179 mipi_dbi_command(mipi, ST7586_AUTO_READ_CTRL, 0x9f); in st7586_pipe_enable()
180 mipi_dbi_command(mipi, ST7586_OTP_RW_CTRL, 0x00); in st7586_pipe_enable()
184 mipi_dbi_command(mipi, ST7586_OTP_READ); in st7586_pipe_enable()
188 mipi_dbi_command(mipi, ST7586_OTP_CTRL_OUT); in st7586_pipe_enable()
189 mipi_dbi_command(mipi, MIPI_DCS_EXIT_SLEEP_MODE); in st7586_pipe_enable()
190 mipi_dbi_command(mipi, MIPI_DCS_SET_DISPLAY_OFF); in st7586_pipe_enable()
194 mipi_dbi_command(mipi, ST7586_SET_VOP_OFFSET, 0x00); in st7586_pipe_enable()
195 mipi_dbi_command(mipi, ST7586_SET_VOP, 0xe3, 0x00); in st7586_pipe_enable()
196 mipi_dbi_command(mipi, ST7586_SET_BIAS_SYSTEM, 0x02); in st7586_pipe_enable()
197 mipi_dbi_command(mipi, ST7586_SET_BOOST_LEVEL, 0x04); in st7586_pipe_enable()
198 mipi_dbi_command(mipi, ST7586_ENABLE_ANALOG, 0x1d); in st7586_pipe_enable()
199 mipi_dbi_command(mipi, ST7586_SET_NLINE_INV, 0x00); in st7586_pipe_enable()
200 mipi_dbi_command(mipi, ST7586_DISP_MODE_GRAY); in st7586_pipe_enable()
201 mipi_dbi_command(mipi, ST7586_ENABLE_DDRAM, 0x02); in st7586_pipe_enable()
203 switch (mipi->rotation) { in st7586_pipe_enable()
217 mipi_dbi_command(mipi, MIPI_DCS_SET_ADDRESS_MODE, addr_mode); in st7586_pipe_enable()
219 mipi_dbi_command(mipi, ST7586_SET_DISP_DUTY, 0x7f); in st7586_pipe_enable()
220 mipi_dbi_command(mipi, ST7586_SET_PART_DISP, 0xa0); in st7586_pipe_enable()
221 mipi_dbi_command(mipi, MIPI_DCS_SET_PARTIAL_AREA, 0x00, 0x00, 0x00, 0x77); in st7586_pipe_enable()
222 mipi_dbi_command(mipi, MIPI_DCS_EXIT_INVERT_MODE); in st7586_pipe_enable()
226 mipi_dbi_command(mipi, MIPI_DCS_SET_DISPLAY_ON); in st7586_pipe_enable()
228 mipi_dbi_enable_flush(mipi, crtc_state, plane_state); in st7586_pipe_enable()
234 struct mipi_dbi *mipi = mipi_dbi_from_tinydrm(tdev); in st7586_pipe_disable() local
238 if (!mipi->enabled) in st7586_pipe_disable()
241 mipi_dbi_command(mipi, MIPI_DCS_SET_DISPLAY_OFF); in st7586_pipe_disable()
242 mipi->enabled = false; in st7586_pipe_disable()
249 static int st7586_init(struct device *dev, struct mipi_dbi *mipi, in st7586_init() argument
255 struct tinydrm_device *tdev = &mipi->tinydrm; in st7586_init()
258 mutex_init(&mipi->cmdlock); in st7586_init()
260 mipi->tx_buf = devm_kmalloc(dev, bufsize, GFP_KERNEL); in st7586_init()
261 if (!mipi->tx_buf) in st7586_init()
279 mipi->rotation = rotation; in st7586_init()
330 struct mipi_dbi *mipi; in st7586_probe() local
335 mipi = devm_kzalloc(dev, sizeof(*mipi), GFP_KERNEL); in st7586_probe()
336 if (!mipi) in st7586_probe()
339 mipi->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); in st7586_probe()
340 if (IS_ERR(mipi->reset)) { in st7586_probe()
342 return PTR_ERR(mipi->reset); in st7586_probe()
353 ret = mipi_dbi_spi_init(spi, mipi, a0); in st7586_probe()
358 mipi->read_commands = NULL; in st7586_probe()
362 * but setting mipi->swap_bytes makes mipi_dbi_typec3_command() do the in st7586_probe()
367 mipi->swap_bytes = true; in st7586_probe()
369 ret = st7586_init(&spi->dev, mipi, &st7586_pipe_funcs, &st7586_driver, in st7586_probe()
374 spi_set_drvdata(spi, mipi); in st7586_probe()
376 return devm_tinydrm_register(&mipi->tinydrm); in st7586_probe()
381 struct mipi_dbi *mipi = spi_get_drvdata(spi); in st7586_shutdown() local
383 tinydrm_shutdown(&mipi->tinydrm); in st7586_shutdown()