-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Add Waveshare 6.25-DSI-TOUCH-A display support #7478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: rpi-6.18.y
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1393,6 +1393,139 @@ static const struct panel_init_cmd ws_panel_7_c_init[] = { | |
| {}, | ||
| }; | ||
|
|
||
| static const struct panel_init_cmd ws_panel_6_25_a_4lane_init[] = { | ||
| _INIT_DCS_CMD(0x60, 0x71, 0x23, 0xa2), | ||
| _INIT_DCS_CMD(0x60, 0x71, 0x23, 0xa3), | ||
| _INIT_DCS_CMD(0x60, 0x71, 0x23, 0xa4), | ||
| _INIT_DCS_CMD(0xB0, 0x22, 0x61, 0x11, 0x6B, 0x25, 0x39, 0x39), | ||
| _INIT_DCS_CMD(0xB7, 0x00, 0x00, 0x64, 0x64), | ||
| _INIT_DCS_CMD(0xBF, 0x95, 0x95), | ||
| _INIT_DCS_CMD(0xC8, 0x00, 0x00, 0x10, 0x1F, 0x3A, 0x00, 0x66, 0x03, | ||
| 0xA8, 0x04, 0x11, 0x02, 0x06, 0x73, 0x01, 0x21, 0xC1, | ||
| 0x02, 0x01, 0x02, 0x22, 0x3E, 0x00, 0x84, 0x09, 0x32, | ||
| 0xE9, 0x0B, 0x3B, 0x0D, 0xF3, 0x7E, 0x0D, 0xB2, 0xE6, | ||
| 0x03, 0xFC), | ||
| _INIT_DCS_CMD(0xC9, 0x00, 0x00, 0x10, 0x1F, 0x3A, 0x00, 0x66, 0x03, | ||
| 0xA8, 0x04, 0x11, 0x02, 0x06, 0x73, 0x01, 0x21, 0xC1, | ||
| 0x02, 0x01, 0x02, 0x22, 0x3E, 0x00, 0x84, 0x09, 0x32, | ||
| 0xE9, 0x0B, 0x3B, 0x0D, 0xF3, 0x7E, 0x0D, 0xB2, 0xE6, | ||
| 0x03, 0xFC), | ||
| _INIT_DCS_CMD(0xD7, 0x10, 0x12, 0x49, 0x3B, 0x0C, 0x0C), | ||
| _INIT_DCS_CMD(0x90, 0x71, 0x23, 0x5A, 0x20, 0x24, 0x09, 0x09), | ||
| _INIT_DCS_CMD(0xA3, 0x80, 0x01, 0x88, 0x30, 0x05, 0x00, 0x00, 0x00, | ||
| 0x00, 0x00, 0x46, 0x00, 0x00, 0x1E, 0x5C, 0x1E, 0x80, | ||
| 0x00, 0x4F, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, | ||
| 0x00, 0x00, 0x1E, 0x5C, 0x1E, 0x80, 0x00, 0x6F, 0x58, | ||
| 0x00, 0x00, 0x00, 0xFF), | ||
| _INIT_DCS_CMD(0xA6, 0x50, 0x00, 0x24, 0x55, 0x3A, 0x00, 0x00, 0x01, | ||
| 0x54, 0x54, 0x91, 0xFF, 0x00, 0x24, 0x55, 0x3B, 0x00, | ||
| 0x00, 0x00, 0x54, 0x54, 0x91, 0xFF, 0x00, 0x24, 0x11, | ||
| 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0x91, 0xFF, 0x00, | ||
| 0xAC, 0x11, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0xFF, | ||
| 0xFF, 0x00, 0x08, 0x80, 0x08, 0x80, 0x06, 0x00, 0x00, | ||
| 0x00, 0x00), | ||
| _INIT_DCS_CMD(0xA7, 0x1D, 0x1D, 0x80, 0x64, 0x40, 0x07, 0x16, 0x41, | ||
| 0x02, 0x48, 0x07, 0x54, 0x54, 0x91, 0xFF, 0x08, 0x80, | ||
| 0x64, 0x40, 0x25, 0x34, 0x43, 0x04, 0x06, 0x05, 0x54, | ||
| 0x54, 0x91, 0xFF, 0x08, 0x80, 0x64, 0x40, 0x00, 0x00, | ||
| 0x40, 0x00, 0x00, 0x00, 0x54, 0x54, 0x91, 0xFF, 0x08, | ||
| 0x80, 0x64, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, | ||
| 0x54, 0x54, 0x84, 0xFF, 0x08, 0x80, 0x44), | ||
| _INIT_DCS_CMD(0xAC, 0x1C, 0x02, 0x09, 0x0B, 0x12, 0x10, 0x18, 0x19, | ||
| 0x1C, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x08, 0x0A, | ||
| 0x13, 0x11, 0x18, 0x19, 0x1C, 0x03, 0x00, 0x00, 0x00, | ||
| 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00), | ||
| _INIT_DCS_CMD(0xAD, 0xF0, 0x00, 0x46, 0x00, 0x05, 0x50, 0x50, 0xFF, | ||
| 0xFF, 0xF0, 0x40, 0x06, 0x01, 0x07, 0x42, 0x42, 0xFF, | ||
| 0xFF, 0x01, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF), | ||
| _INIT_DCS_CMD(0xAE, 0xFF, 0x03, 0x00, 0xFF, 0x03, 0x00, 0x01), | ||
| _INIT_DCS_CMD(0xB2, 0x15, 0x19, 0x05, 0x23, 0x49, 0xAF, 0x03, 0x2E, | ||
| 0x5C, 0xD2, 0xFF, 0x10, 0x20, 0xFD, 0x20, 0xC0, 0x00), | ||
| _INIT_DCS_CMD(0xE8, 0x20, 0x6F, 0x04, 0x7C, 0x7C, 0x3E, 0x04, 0xDC, | ||
| 0xDC, 0x3E, 0x06, 0xFA, 0x26, 0x3E), | ||
| _INIT_DCS_CMD(0x75, 0x03, 0x04), | ||
| _INIT_DCS_CMD(0xE7, 0x3B, 0x00, 0x00, 0x7C, 0xA1, 0x8C, 0x20, 0x1A, | ||
| 0xF0, 0xB1, 0x50, 0x00, 0x50, 0xB1, 0x50, 0xB1, 0x50, | ||
| 0xD8, 0x00, 0x55, 0x00, 0xB1, 0x00, 0x45, 0xC9, 0x6A, | ||
| 0xFF, 0x5A, 0xD8, 0x18, 0x88, 0x15, 0xB1, 0x01, 0x01, | ||
| 0x77), | ||
| _INIT_DCS_CMD(0xEA, 0x13, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x2C), | ||
| _INIT_DCS_CMD(0x60, 0x71, 0x23, 0x00), | ||
| _INIT_DCS_CMD(0x11), | ||
| _INIT_DELAY_CMD(120), | ||
| _INIT_DCS_CMD(0x29), | ||
| _INIT_DELAY_CMD(50), | ||
| {}, | ||
| }; | ||
|
|
||
| static const struct panel_init_cmd ws_panel_6_25_a_init[] = { | ||
| _INIT_DCS_CMD(0x60, 0x71, 0x23, 0xa2), | ||
| _INIT_DCS_CMD(0x60, 0x71, 0x23, 0xa3), | ||
| _INIT_DCS_CMD(0x60, 0x71, 0x23, 0xa4), | ||
| _INIT_DCS_CMD(0xB0, 0x22, 0x61, 0x11, 0x6B, 0x25, 0x39, 0x39), | ||
| _INIT_DCS_CMD(0xB7, 0x00, 0x00, 0x64, 0x64), | ||
| _INIT_DCS_CMD(0xBF, 0x95, 0x95), | ||
| _INIT_DCS_CMD(0xA4, 0x31), | ||
| _INIT_DCS_CMD(0xC8, 0x00, 0x00, 0x10, 0x1F, 0x3A, 0x00, 0x66, 0x03, | ||
| 0xA8, 0x04, 0x11, 0x02, 0x06, 0x73, 0x01, 0x21, 0xC1, | ||
| 0x02, 0x01, 0x02, 0x22, 0x3E, 0x00, 0x84, 0x09, 0x32, | ||
| 0xE9, 0x0B, 0x3B, 0x0D, 0xF3, 0x7E, 0x0D, 0xB2, 0xE6, | ||
| 0x03, 0xFC), | ||
| _INIT_DCS_CMD(0xC9, 0x00, 0x00, 0x10, 0x1F, 0x3A, 0x00, 0x66, 0x03, | ||
| 0xA8, 0x04, 0x11, 0x02, 0x06, 0x73, 0x01, 0x21, 0xC1, | ||
| 0x02, 0x01, 0x02, 0x22, 0x3E, 0x00, 0x84, 0x09, 0x32, | ||
| 0xE9, 0x0B, 0x3B, 0x0D, 0xF3, 0x7E, 0x0D, 0xB2, 0xE6, | ||
| 0x03, 0xFC), | ||
| _INIT_DCS_CMD(0xD7, 0x10, 0x12, 0x49, 0x3B, 0x0C, 0x0C), | ||
| _INIT_DCS_CMD(0x90, 0x71, 0x23, 0x5A, 0x20, 0x24, 0x09, 0x09), | ||
| _INIT_DCS_CMD(0xA3, 0x80, 0x01, 0x88, 0x30, 0x05, 0x00, 0x00, 0x00, | ||
| 0x00, 0x00, 0x46, 0x00, 0x00, 0x1E, 0x5C, 0x1E, 0x80, | ||
| 0x00, 0x4F, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, | ||
| 0x00, 0x00, 0x1E, 0x5C, 0x1E, 0x80, 0x00, 0x6F, 0x58, | ||
| 0x00, 0x00, 0x00, 0xFF), | ||
| _INIT_DCS_CMD(0xA6, 0x50, 0x00, 0x24, 0x55, 0x3A, 0x00, 0x00, 0x01, | ||
| 0x54, 0x54, 0x91, 0xFF, 0x00, 0x24, 0x55, 0x3B, 0x00, | ||
| 0x00, 0x00, 0x54, 0x54, 0x91, 0xFF, 0x00, 0x24, 0x11, | ||
| 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0x91, 0xFF, 0x00, | ||
| 0xAC, 0x11, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0xFF, | ||
| 0xFF, 0x00, 0x08, 0x80, 0x08, 0x80, 0x06, 0x00, 0x00, | ||
| 0x00, 0x00), | ||
| _INIT_DCS_CMD(0xA7, 0x1D, 0x1D, 0x80, 0x64, 0x40, 0x07, 0x16, 0x41, | ||
| 0x02, 0x48, 0x07, 0x54, 0x54, 0x91, 0xFF, 0x08, 0x80, | ||
| 0x64, 0x40, 0x25, 0x34, 0x43, 0x04, 0x06, 0x05, 0x54, | ||
| 0x54, 0x91, 0xFF, 0x08, 0x80, 0x64, 0x40, 0x00, 0x00, | ||
| 0x40, 0x00, 0x00, 0x00, 0x54, 0x54, 0x91, 0xFF, 0x08, | ||
| 0x80, 0x64, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, | ||
| 0x54, 0x54, 0x84, 0xFF, 0x08, 0x80, 0x44), | ||
| _INIT_DCS_CMD(0xAC, 0x1C, 0x02, 0x09, 0x0B, 0x12, 0x10, 0x18, 0x19, | ||
| 0x1C, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x08, 0x0A, | ||
| 0x13, 0x11, 0x18, 0x19, 0x1C, 0x03, 0x00, 0x00, 0x00, | ||
| 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00), | ||
| _INIT_DCS_CMD(0xAD, 0xF0, 0x00, 0x46, 0x00, 0x05, 0x50, 0x50, 0xFF, | ||
| 0xFF, 0xF0, 0x40, 0x06, 0x01, 0x07, 0x42, 0x42, 0xFF, | ||
| 0xFF, 0x01, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF), | ||
| _INIT_DCS_CMD(0xAE, 0xFF, 0x03, 0x00, 0xFF, 0x03, 0x00, 0x01), | ||
| _INIT_DCS_CMD(0xB2, 0x15, 0x19, 0x05, 0x23, 0x49, 0xAF, 0x03, 0x2E, | ||
| 0x5C, 0xD2, 0xFF, 0x10, 0x20, 0xFD, 0x20, 0xC0, 0x00), | ||
| _INIT_DCS_CMD(0xE8, 0x20, 0x6F, 0x04, 0x7C, 0x7C, 0x3E, 0x04, 0xDC, | ||
| 0xDC, 0x3E, 0x06, 0xFA, 0x26, 0x3E), | ||
| _INIT_DCS_CMD(0x75, 0x03, 0x04), | ||
| _INIT_DCS_CMD(0xE7, 0x3B, 0x00, 0x00, 0x7C, 0xA1, 0x8C, 0x20, 0x1A, | ||
| 0xF0, 0xB1, 0x50, 0x00, 0x50, 0xB1, 0x50, 0xB1, 0x50, | ||
| 0xD8, 0x00, 0x55, 0x00, 0xB1, 0x00, 0x45, 0xC9, 0x6A, | ||
| 0xFF, 0x5A, 0xD8, 0x18, 0x88, 0x15, 0xB1, 0x01, 0x01, | ||
| 0x77), | ||
| _INIT_DCS_CMD(0xEA, 0x13, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x2C), | ||
| _INIT_DCS_CMD(0x60, 0x71, 0x23, 0x00), | ||
| _INIT_DCS_CMD(0x11), | ||
| _INIT_DELAY_CMD(120), | ||
| _INIT_DCS_CMD(0x29), | ||
| _INIT_DELAY_CMD(50), | ||
| {}, | ||
| }; | ||
|
|
||
| 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), | ||
|
|
@@ -1935,6 +2068,34 @@ static const struct drm_display_mode ws_panel_7_c_mode = { | |
| .height_mm = 85, | ||
| }; | ||
|
|
||
| static const struct drm_display_mode ws_panel_6_25_a_4lane_mode = { | ||
| .clock = 93000, | ||
| .hdisplay = 720, | ||
| .hsync_start = 720 + 40, | ||
| .hsync_end = 720 + 40 + 20, | ||
| .htotal = 720 + 40 + 20 + 40, | ||
| .vdisplay = 1560, | ||
| .vsync_start = 1560 + 320, | ||
| .vsync_end = 1560 + 320 + 2, | ||
| .vtotal = 1560 + 320 + 2 + 16, | ||
| .width_mm = 62, | ||
| .height_mm = 110, | ||
| }; | ||
|
|
||
| static const struct drm_display_mode ws_panel_6_25_a_mode = { | ||
| .clock = 83000, | ||
| .hdisplay = 720, | ||
| .hsync_start = 720 + 20, | ||
| .hsync_end = 720 + 20 + 20, | ||
| .htotal = 720 + 20 + 20 + 20, | ||
| .vdisplay = 1560, | ||
| .vsync_start = 1560 + 200, | ||
| .vsync_end = 1560 + 200 + 8, | ||
| .vtotal = 1560 + 200 + 8 + 10, | ||
| .width_mm = 62, | ||
| .height_mm = 110, | ||
| }; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As it works over 2 lanes at 60Hz, what is the gain in having the 4 lane mode? |
||
|
|
||
| static const struct drm_display_mode ws_panel_5_5_a_mode = { | ||
| .clock = 65000, | ||
| .hdisplay = 720, | ||
|
|
@@ -2243,6 +2404,24 @@ static const struct ws_panel_desc ws_panel_7_inch_c_desc = { | |
| .format = MIPI_DSI_FMT_RGB888, | ||
| }; | ||
|
|
||
| static const struct ws_panel_desc ws_panel_6_25_inch_a_4lane_desc = { | ||
| .init = ws_panel_6_25_a_4lane_init, | ||
| .mode = &ws_panel_6_25_a_4lane_mode, | ||
| .mode_flags = MIPI_DSI_MODE_VIDEO_HSE | MIPI_DSI_MODE_VIDEO | | ||
| MIPI_DSI_MODE_LPM | MIPI_DSI_CLOCK_NON_CONTINUOUS, | ||
| .lanes = 4, | ||
| .format = MIPI_DSI_FMT_RGB888, | ||
| }; | ||
|
|
||
| static const struct ws_panel_desc ws_panel_6_25_inch_a_desc = { | ||
| .init = ws_panel_6_25_a_init, | ||
| .mode = &ws_panel_6_25_a_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, | ||
|
|
@@ -2301,6 +2480,9 @@ static const struct of_device_id ws_panel_of_match[] = { | |
| { .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,6.25-dsi-touch-a,4lane", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AIUI Additional commas are not allowed in compatible strings. |
||
| &ws_panel_6_25_inch_a_4lane_desc }, | ||
| { .compatible = "waveshare,6.25-dsi-touch-a", &ws_panel_6_25_inch_a_desc }, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the 4 lane version is |
||
| { .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 }, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit text
It's only 93MHz in 4 lane mode.