Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/panel: sitronix-st7789v: Add EDT ET028013DMA panel support

This panel from Emerging Display Technologies Corporation features an
ST7789V2 LCD controller panel inside which is almost identical to what
the Sitronix panel driver supports.

In practice, the module physical size is specific, and experiments show
that the display will malfunction if any of the following situation
occurs:
* Pixel clock is above 3MHz
* Pixel clock is not inverted
I could not properly identify the reasons behind these failures, scope
captures show valid input signals.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230714013756.1546769-19-sre@kernel.org

authored by

Miquel Raynal and committed by
Neil Armstrong
71f73908 a368b408

+25
+25
drivers/gpu/drm/panel/panel-sitronix-st7789v.c
··· 187 187 .flags = DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_NVSYNC, 188 188 }; 189 189 190 + static const struct drm_display_mode et028013dma_mode = { 191 + .clock = 3000, 192 + .hdisplay = 240, 193 + .hsync_start = 240 + 38, 194 + .hsync_end = 240 + 38 + 10, 195 + .htotal = 240 + 38 + 10 + 10, 196 + .vdisplay = 320, 197 + .vsync_start = 320 + 8, 198 + .vsync_end = 320 + 8 + 4, 199 + .vtotal = 320 + 8 + 4 + 4, 200 + .width_mm = 43, 201 + .height_mm = 58, 202 + .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, 203 + }; 204 + 190 205 static const struct st7789_panel_info default_panel = { 191 206 .mode = &default_mode, 192 207 .invert_mode = true, ··· 214 199 .mode = &t28cp45tn89_mode, 215 200 .invert_mode = false, 216 201 .bus_format = MEDIA_BUS_FMT_RGB565_1X16, 202 + .bus_flags = DRM_BUS_FLAG_DE_HIGH | 203 + DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, 204 + }; 205 + 206 + static const struct st7789_panel_info et028013dma_panel = { 207 + .mode = &et028013dma_mode, 208 + .invert_mode = true, 209 + .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 217 210 .bus_flags = DRM_BUS_FLAG_DE_HIGH | 218 211 DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, 219 212 }; ··· 497 474 static const struct spi_device_id st7789v_spi_id[] = { 498 475 { "st7789v", (unsigned long) &default_panel }, 499 476 { "t28cp45tn89-v17", (unsigned long) &t28cp45tn89_panel }, 477 + { "et028013dma", (unsigned long) &et028013dma_panel }, 500 478 { } 501 479 }; 502 480 MODULE_DEVICE_TABLE(spi, st7789v_spi_id); ··· 505 481 static const struct of_device_id st7789v_of_match[] = { 506 482 { .compatible = "sitronix,st7789v", .data = &default_panel }, 507 483 { .compatible = "inanbo,t28cp45tn89-v17", .data = &t28cp45tn89_panel }, 484 + { .compatible = "edt,et028013dma", .data = &et028013dma_panel }, 508 485 { } 509 486 }; 510 487 MODULE_DEVICE_TABLE(of, st7789v_of_match);