From bf0f4ab2ce7e8524223cd8a9d4d799fcc09b1a4a Mon Sep 17 00:00:00 2001 From: Konrad Dybcio Date: Wed, 30 Dec 2020 22:08:42 +0100 Subject: [PATCH] drm/panel-simple: Add nt36672a Truly FHD+ panel This adds support for nt36672a Truly FHD+ (2520x1080) video mode panel as found on Sony Xperia 10 (kirin) devices. Due to the nature of phone manufacturing, it is impossible to retrieve the actual panel name, hence the replacement one, detailing the device it's used on. Signed-off-by: Konrad Dybcio --- .../display/panel/panel-simple-dsi.yaml | 2 ++ drivers/gpu/drm/panel/panel-simple.c | 33 +++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml index fbd71669248f..ed6f96ab6aa5 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml +++ b/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml @@ -55,6 +55,8 @@ properties: - samsung,sofef00 # Shangai Top Display Optoelectronics 7" TL070WSH30 1024x600 TFT LCD panel - tdo,tl070wsh30 + # Sony Kirin nt36672a Truly FHD+ IPS LCD panel + - sony,kirin-nt36672a-truly reg: maxItems: 1 diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index eb475a3a774b..a1524d91667e 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -4187,6 +4187,36 @@ static const struct panel_desc_dsi osd101t2045_53ts = { .lanes = 4, }; +static const struct drm_display_mode sony_kirin_nt36672a_truly_mode = { + .clock = (1080 + 25 + 12 + 120) * (2520 + 12 + 4 + 10) * 60 / 1000, + .hdisplay = 1080, + .hsync_start = 1080 + 25, + .hsync_end = 1080 + 25 + 12, + .htotal = 1080 + 25 + 12 + 120, + .vdisplay = 2520, + .vsync_start = 2520 + 12, + .vsync_end = 2520 + 12 + 4, + .vtotal = 2520 + 12 + 4 + 10, + .width_mm = 60, + .height_mm = 139, +}; + +static const struct panel_desc_dsi sony_kirin_nt36672a_truly = { + .desc = { + .modes = &sony_kirin_nt36672a_truly_mode, + .num_modes = 1, + .bpc = 8, + .size = { + .width = 60, + .height = 139, + }, + }, + .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | + MIPI_DSI_CLOCK_NON_CONTINUOUS, + .format = MIPI_DSI_FMT_RGB888, + .lanes = 4, +}; + static const struct of_device_id dsi_of_match[] = { { .compatible = "auo,b080uan01", @@ -4209,6 +4239,9 @@ static const struct of_device_id dsi_of_match[] = { }, { .compatible = "osddisplays,osd101t2045-53ts", .data = &osd101t2045_53ts + }, { + .compatible = "sony,kirin-nt36672a-truly", + .data = &sony_kirin_nt36672a_truly }, { /* sentinel */ }