diff --git a/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c b/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c index cfff92ead5e6..e15dae58a19d 100644 --- a/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c +++ b/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c @@ -1374,6 +1374,25 @@ static const struct panel_init_cmd ws_panel_7_a_init[] = { {}, }; +static const struct panel_init_cmd ws_panel_7_c_init[] = { + _INIT_DCS_CMD(0x80, 0x8B), + _INIT_DCS_CMD(0x81, 0x78), + _INIT_DCS_CMD(0x82, 0x84), + _INIT_DCS_CMD(0x83, 0x88), + _INIT_DCS_CMD(0x84, 0xA8), + _INIT_DCS_CMD(0x85, 0xE3), + _INIT_DCS_CMD(0x86, 0x88), + _INIT_DCS_CMD(0x87, 0x5A), + _INIT_DCS_CMD(0xB0, 0x80), + _INIT_DCS_CMD(0xB1, 0x30), + _INIT_DCS_CMD(0xB2, 0x50), + _INIT_DCS_CMD(0x11), + _INIT_DELAY_CMD(120), + _INIT_DCS_CMD(0x29), + _INIT_DELAY_CMD(20), + {}, +}; + static const struct panel_init_cmd ws_panel_5_5_a_init[] = { _INIT_DCS_CMD(0xB9, 0xFF, 0x83, 0x94), _INIT_DCS_CMD(0xBA, 0x61, 0x03, 0x68, 0x6B, 0xB2, 0xC0), @@ -1902,6 +1921,20 @@ static const struct drm_display_mode ws_panel_7_a_mode = { .height_mm = 154, }; +static const struct drm_display_mode ws_panel_7_c_mode = { + .clock = 51700, + .hdisplay = 1024, + .hsync_start = 1024 + 160, + .hsync_end = 1024 + 160 + 10, + .htotal = 1024 + 160 + 10 + 160, + .vdisplay = 600, + .vsync_start = 600 + 12, + .vsync_end = 600 + 12 + 1, + .vtotal = 600 + 12 + 1 + 23, + .width_mm = 154, + .height_mm = 85, +}; + static const struct drm_display_mode ws_panel_5_5_a_mode = { .clock = 65000, .hdisplay = 720, @@ -2201,6 +2234,15 @@ static const struct ws_panel_desc ws_panel_7_inch_a_desc = { .format = MIPI_DSI_FMT_RGB888, }; +static const struct ws_panel_desc ws_panel_7_inch_c_desc = { + .init = ws_panel_7_c_init, + .mode = &ws_panel_7_c_mode, + .mode_flags = MIPI_DSI_MODE_VIDEO_HSE | MIPI_DSI_MODE_VIDEO | + MIPI_DSI_MODE_LPM | MIPI_DSI_CLOCK_NON_CONTINUOUS, + .lanes = 2, + .format = MIPI_DSI_FMT_RGB888, +}; + static const struct ws_panel_desc ws_panel_5_5_inch_a_desc = { .init = ws_panel_5_5_a_init, .mode = &ws_panel_5_5_a_mode, @@ -2258,6 +2300,7 @@ static const struct of_device_id ws_panel_of_match[] = { { .compatible = "waveshare,8.0-dsi-touch-a", &ws_panel_8_inch_a_desc }, { .compatible = "waveshare,7.0-dsi-touch-a", &ws_panel_7_inch_a_desc }, { .compatible = "waveshare,7.0-dsi-touch-b", &ws_panel_7_inch_a_desc }, + { .compatible = "waveshare,7.0-dsi-touch-c", &ws_panel_7_inch_c_desc }, { .compatible = "waveshare,5.5-dsi-touch-a", &ws_panel_5_5_inch_a_desc }, { .compatible = "waveshare,5.0-dsi-touch-a", &ws_panel_5_inch_a_desc },