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: ilitek-ili9882t: Add support for Ilitek IL79900A-based panels

The Ilitek IL79900A display controller is similar to the ILI9882T and can
be supported within the existing `panel-ilitek-ili9882t.c` driver.

This patch extends the ILI9882T driver to handle IL79900A-based panels,
such as the Tianma TL121BVMS07-00. The IL79900A uses a similar command
sequence and initialization flow, with minor differences in power supply
configuration and timing.

Signed-off-by: Langyan Ye <yelangyan@huaqin.corp-partner.google.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20251031100447.253164-3-yelangyan@huaqin.corp-partner.google.com

authored by

Langyan Ye and committed by
Neil Armstrong
2b1ffe04 e147c472

+69
+69
drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
··· 61 61 mipi_dsi_dcs_write_seq_multi(ctx, ILI9882T_DCS_SWITCH_PAGE, \ 62 62 0x98, 0x82, (page)) 63 63 64 + /* IL79900A-specific commands, add new commands as you decode them */ 65 + #define IL79900A_DCS_SWITCH_PAGE 0xFF 66 + 67 + #define il79900a_switch_page(ctx, page) \ 68 + mipi_dsi_dcs_write_seq_multi(ctx, IL79900A_DCS_SWITCH_PAGE, \ 69 + 0x5a, 0xa5, (page)) 70 + 64 71 static int starry_ili9882t_init(struct ili9882t *ili) 65 72 { 66 73 struct mipi_dsi_multi_context ctx = { .dsi = ili->dsi }; ··· 420 413 return ctx.accum_err; 421 414 }; 422 415 416 + static int tianma_il79900a_init(struct ili9882t *ili) 417 + { 418 + struct mipi_dsi_multi_context ctx = { .dsi = ili->dsi }; 419 + 420 + mipi_dsi_usleep_range(&ctx, 5000, 5100); 421 + 422 + il79900a_switch_page(&ctx, 0x06); 423 + mipi_dsi_dcs_write_seq_multi(&ctx, 0x3e, 0x62); 424 + 425 + il79900a_switch_page(&ctx, 0x02); 426 + mipi_dsi_dcs_write_seq_multi(&ctx, 0x1b, 0x20); 427 + mipi_dsi_dcs_write_seq_multi(&ctx, 0x5d, 0x00); 428 + mipi_dsi_dcs_write_seq_multi(&ctx, 0x5e, 0x40); 429 + 430 + il79900a_switch_page(&ctx, 0x07); 431 + mipi_dsi_dcs_write_seq_multi(&ctx, 0X29, 0x00); 432 + 433 + il79900a_switch_page(&ctx, 0x06); 434 + mipi_dsi_dcs_write_seq_multi(&ctx, 0x92, 0x22); 435 + 436 + il79900a_switch_page(&ctx, 0x00); 437 + mipi_dsi_dcs_exit_sleep_mode_multi(&ctx); 438 + 439 + mipi_dsi_msleep(&ctx, 120); 440 + 441 + mipi_dsi_dcs_set_display_on_multi(&ctx); 442 + 443 + mipi_dsi_msleep(&ctx, 80); 444 + 445 + return 0; 446 + }; 447 + 423 448 static inline struct ili9882t *to_ili9882t(struct drm_panel *panel) 424 449 { 425 450 return container_of(panel, struct ili9882t, base); ··· 568 529 .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, 569 530 }; 570 531 532 + static const struct drm_display_mode tianma_il79900a_default_mode = { 533 + .clock = 264355, 534 + .hdisplay = 1600, 535 + .hsync_start = 1600 + 20, 536 + .hsync_end = 1600 + 20 + 4, 537 + .htotal = 1600 + 20 + 4 + 20, 538 + .vdisplay = 2560, 539 + .vsync_start = 2560 + 82, 540 + .vsync_end = 2560 + 82 + 2, 541 + .vtotal = 2560 + 82 + 2 + 36, 542 + .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, 543 + }; 544 + 571 545 static const struct panel_desc starry_ili9882t_desc = { 572 546 .modes = &starry_ili9882t_default_mode, 573 547 .bpc = 8, ··· 593 541 .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | 594 542 MIPI_DSI_MODE_LPM, 595 543 .init = starry_ili9882t_init, 544 + }; 545 + 546 + static const struct panel_desc tianma_tl121bvms07_desc = { 547 + .modes = &tianma_il79900a_default_mode, 548 + .bpc = 8, 549 + .size = { 550 + .width_mm = 163, 551 + .height_mm = 260, 552 + }, 553 + .lanes = 3, 554 + .format = MIPI_DSI_FMT_RGB888, 555 + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | 556 + MIPI_DSI_MODE_LPM, 557 + .init = tianma_il79900a_init, 596 558 }; 597 559 598 560 static int ili9882t_get_modes(struct drm_panel *panel, ··· 745 679 static const struct of_device_id ili9882t_of_match[] = { 746 680 { .compatible = "starry,ili9882t", 747 681 .data = &starry_ili9882t_desc 682 + }, 683 + { .compatible = "tianma,tl121bvms07-00", 684 + .data = &tianma_tl121bvms07_desc 748 685 }, 749 686 { /* sentinel */ } 750 687 };