Skip to content

Commit 71f7390

Browse files
miquelraynalsuperna9999
authored andcommitted
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 <[email protected]> Acked-by: Maxime Ripard <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent a368b40 commit 71f7390

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

drivers/gpu/drm/panel/panel-sitronix-st7789v.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,21 @@ static const struct drm_display_mode t28cp45tn89_mode = {
187187
.flags = DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_NVSYNC,
188188
};
189189

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+
190205
static const struct st7789_panel_info default_panel = {
191206
.mode = &default_mode,
192207
.invert_mode = true,
@@ -203,6 +218,14 @@ static const struct st7789_panel_info t28cp45tn89_panel = {
203218
DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
204219
};
205220

221+
static const struct st7789_panel_info et028013dma_panel = {
222+
.mode = &et028013dma_mode,
223+
.invert_mode = true,
224+
.bus_format = MEDIA_BUS_FMT_RGB666_1X18,
225+
.bus_flags = DRM_BUS_FLAG_DE_HIGH |
226+
DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
227+
};
228+
206229
static int st7789v_get_modes(struct drm_panel *panel,
207230
struct drm_connector *connector)
208231
{
@@ -474,13 +497,15 @@ static void st7789v_remove(struct spi_device *spi)
474497
static const struct spi_device_id st7789v_spi_id[] = {
475498
{ "st7789v", (unsigned long) &default_panel },
476499
{ "t28cp45tn89-v17", (unsigned long) &t28cp45tn89_panel },
500+
{ "et028013dma", (unsigned long) &et028013dma_panel },
477501
{ }
478502
};
479503
MODULE_DEVICE_TABLE(spi, st7789v_spi_id);
480504

481505
static const struct of_device_id st7789v_of_match[] = {
482506
{ .compatible = "sitronix,st7789v", .data = &default_panel },
483507
{ .compatible = "inanbo,t28cp45tn89-v17", .data = &t28cp45tn89_panel },
508+
{ .compatible = "edt,et028013dma", .data = &et028013dma_panel },
484509
{ }
485510
};
486511
MODULE_DEVICE_TABLE(of, st7789v_of_match);

0 commit comments

Comments
 (0)