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 Inanbo T28CP45TN89 support

UNI-T UTi260b has a Inanbo T28CP45TN89 v17 panel. I could not find
proper documentation for the panel apart from a technical drawing, but
according to the vendor U-Boot it is based on a Sitronix st7789v chip.
I generated the init sequence by modifying the default one until proper
graphics output has been seen on the device.

Reviewed-by: Michael Riesch <michael.riesch@wolfvision.net>
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-14-sre@kernel.org

authored by

Sebastian Reichel and committed by
Neil Armstrong
a411558c e4572f99

+25
+25
drivers/gpu/drm/panel/panel-sitronix-st7789v.c
··· 173 173 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, 174 174 }; 175 175 176 + static const struct drm_display_mode t28cp45tn89_mode = { 177 + .clock = 6008, 178 + .hdisplay = 240, 179 + .hsync_start = 240 + 38, 180 + .hsync_end = 240 + 38 + 10, 181 + .htotal = 240 + 38 + 10 + 10, 182 + .vdisplay = 320, 183 + .vsync_start = 320 + 8, 184 + .vsync_end = 320 + 8 + 4, 185 + .vtotal = 320 + 8 + 4 + 4, 186 + .width_mm = 43, 187 + .height_mm = 57, 188 + .flags = DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_NVSYNC, 189 + }; 190 + 176 191 static const struct st7789_panel_info default_panel = { 177 192 .mode = &default_mode, 178 193 .invert_mode = true, 179 194 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 180 195 .bus_flags = DRM_BUS_FLAG_DE_HIGH | 181 196 DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, 197 + }; 198 + 199 + static const struct st7789_panel_info t28cp45tn89_panel = { 200 + .mode = &t28cp45tn89_mode, 201 + .invert_mode = false, 202 + .bus_format = MEDIA_BUS_FMT_RGB565_1X16, 203 + .bus_flags = DRM_BUS_FLAG_DE_HIGH | 204 + DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, 182 205 }; 183 206 184 207 static int st7789v_get_modes(struct drm_panel *panel, ··· 469 446 470 447 static const struct spi_device_id st7789v_spi_id[] = { 471 448 { "st7789v", (unsigned long) &default_panel }, 449 + { "t28cp45tn89-v17", (unsigned long) &t28cp45tn89_panel }, 472 450 { } 473 451 }; 474 452 MODULE_DEVICE_TABLE(spi, st7789v_spi_id); 475 453 476 454 static const struct of_device_id st7789v_of_match[] = { 477 455 { .compatible = "sitronix,st7789v", .data = &default_panel }, 456 + { .compatible = "inanbo,t28cp45tn89-v17", .data = &t28cp45tn89_panel }, 478 457 { } 479 458 }; 480 459 MODULE_DEVICE_TABLE(of, st7789v_of_match);