From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: linux-kernel@vger.kernel.org
Cc: linux-amarula@amarulasolutions.com,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>,
Jessica Zhang <quic_jesszhan@quicinc.com>,
Linus Walleij <linus.walleij@linaro.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Sam Ravnborg <sam@ravnborg.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
dri-devel@lists.freedesktop.org
Subject: [PATCH 8/8] drm/panel: nt35510: support FRIDA FRD400B25025-A-CTK
Date: Fri, 29 Dec 2023 14:51:23 +0100 [thread overview]
Message-ID: <20231229135154.675946-9-dario.binacchi@amarulasolutions.com> (raw)
In-Reply-To: <20231229135154.675946-1-dario.binacchi@amarulasolutions.com>
The initialization commands are taken from the STMicroelectronics driver
found at https://github.com/STMicroelectronics/STM32CubeF7/blob/master/Drivers/BSP/Components/nt35510/
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
drivers/gpu/drm/panel/panel-novatek-nt35510.c | 75 +++++++++++++++++++
1 file changed, 75 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35510.c b/drivers/gpu/drm/panel/panel-novatek-nt35510.c
index 2a5a624fe447..3cdcc75c4c76 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt35510.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt35510.c
@@ -1,6 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Novatek NT35510 panel driver
+ * Copyright (C) 2023 Dario Binacchi <dario.binacchi@amarulasolutions.com>
+ * Add support to Frida FRD400B25025-A-CTK panel.
+ * Based on code by MCD Application Team (C) 2020 STMicroelectronics
* Copyright (C) 2020 Linus Walleij <linus.walleij@linaro.org>
* Based on code by Robert Teather (C) 2012 Samsung
*
@@ -165,6 +168,49 @@ static const struct panel_init_cmd hydis_hva40wv1_init_cmds[] = {
{},
};
+static const struct panel_init_cmd frida_frd400b25025_init_cmds[] = {
+ _INIT_DCS_CMD(0xF0, 0x55, 0xAA, 0x52, 0x08, 0x01),
+ _INIT_DCS_CMD(0xB0, 0x03, 0x03, 0x03),
+ _INIT_DCS_CMD(0xB6, 0x46, 0x46, 0x46),
+ _INIT_DCS_CMD(0xB1, 0x03, 0x03, 0x03),
+ _INIT_DCS_CMD(0xB7, 0x36, 0x36, 0x36),
+ _INIT_DCS_CMD(0xB2, 0x00, 0x00, 0x02),
+ _INIT_DCS_CMD(0xB8, 0x26, 0x26, 0x26),
+ _INIT_DCS_CMD(0xBF, 0x01),
+ _INIT_DCS_CMD(0xB3, 0x09, 0x09, 0x09),
+ _INIT_DCS_CMD(0xB9, 0x36, 0x36, 0x36),
+ _INIT_DCS_CMD(0xB5, 0x08, 0x08, 0x08),
+ _INIT_DCS_CMD(0xBA, 0x26, 0x26, 0x26),
+ _INIT_DCS_CMD(0xBC, 0x00, 0x80, 0x00),
+ _INIT_DCS_CMD(0xBD, 0x00, 0x80, 0x00),
+ _INIT_DCS_CMD(0xBE, 0x00, 0x50),
+ _INIT_DCS_CMD(0xF0, 0x55, 0xAA, 0x52, 0x08, 0x00),
+ _INIT_DCS_CMD(0xB1, 0xFC, 0x00),
+ _INIT_DCS_CMD(0xB6, 0x03),
+ _INIT_DCS_CMD(0xB5, 0x50),
+ _INIT_DCS_CMD(0xB7, 0x00, 0x00),
+ _INIT_DCS_CMD(0xB8, 0x01, 0x02, 0x02, 0x02),
+ _INIT_DCS_CMD(0xBC, 0x00, 0x00, 0x00),
+ _INIT_DCS_CMD(0xCC, 0x03, 0x00, 0x00),
+ _INIT_DCS_CMD(0xBA, 0x01),
+ _INIT_DCS_CMD(0x35, 0x00),
+ _INIT_DCS_CMD(0x3A, 0x77),
+ _INIT_DELAY_CMD(0xC8),
+ _INIT_DCS_CMD(0x36, 0x00),
+ _INIT_DCS_CMD(0x2A, 0x00, 0x00, 0x01, 0xDF),
+ _INIT_DCS_CMD(0x2B, 0x00, 0x00, 0x03, 0x1F),
+ _INIT_DCS_CMD(0x11),
+ _INIT_DELAY_CMD(0x78),
+ _INIT_DCS_CMD(0x3A, 0x77),
+ _INIT_DCS_CMD(0x51, 0x7F, 0x00),
+ _INIT_DCS_CMD(0x53, 0x2C),
+ _INIT_DCS_CMD(0x55, 0x02),
+ _INIT_DCS_CMD(0x5E, 0xFF),
+ _INIT_DCS_CMD(0x29),
+ _INIT_DCS_CMD(0x2C),
+ {},
+};
+
/**
* struct nt35510 - state container for the NT35510 panel
*/
@@ -606,7 +652,36 @@ static const struct nt35510_config nt35510_hydis_hva40wv1 = {
.init_cmds = hydis_hva40wv1_init_cmds,
};
+/*
+ * The Frida FRD400B25025-A-CTK panel
+ */
+static const struct nt35510_config nt35510_frida_frd400b25025 = {
+ .width_mm = 52,
+ .height_mm = 86,
+ .mode = {
+ .clock = 23000,
+ .hdisplay = 480,
+ .hsync_start = 480 + 34, /* HFP = 34 */
+ .hsync_end = 480 + 34 + 2, /* HSync = 2 */
+ .htotal = 480 + 34 + 2 + 34, /* HBP = 34 */
+ .vdisplay = 800,
+ .vsync_start = 800 + 15, /* VFP = 15 */
+ .vsync_end = 800 + 15 + 12, /* VSync = 12 */
+ .vtotal = 800 + 15 + 12 + 15, /* VBP = 15 */
+ .flags = 0,
+ },
+ .lanes = 2,
+ .format = MIPI_DSI_FMT_RGB888,
+ .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
+ MIPI_DSI_MODE_LPM,
+ .init_cmds = frida_frd400b25025_init_cmds,
+};
+
static const struct of_device_id nt35510_of_match[] = {
+ {
+ .compatible = "frida,frd400b25025",
+ .data = &nt35510_frida_frd400b25025,
+ },
{
.compatible = "hydis,hva40wv1",
.data = &nt35510_hydis_hva40wv1,
--
2.43.0
next prev parent reply other threads:[~2023-12-29 13:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-29 13:51 [PATCH 0/8] Add display support for stm32f769-disco board Dario Binacchi
2023-12-29 13:51 ` [PATCH 1/8] dt-bindings: mfd: stm32f7: Add binding definition for DSI Dario Binacchi
2024-01-01 14:04 ` Conor Dooley
2023-12-29 13:51 ` [PATCH 2/8] ARM: dts: stm32: add DSI support on stm32f769 Dario Binacchi
2023-12-29 13:51 ` [PATCH 3/8] ARM: dts: stm32: rename mmc_vcard to vcc-3v3 on stm32f769-disco Dario Binacchi
2023-12-29 13:51 ` [PATCH 4/8] ARM: dts: stm32: add display support " Dario Binacchi
2023-12-29 13:51 ` [PATCH 5/8] dt-bindings: nt35510: add compatible for FRIDA FRD400B25025-A-CTK Dario Binacchi
2023-12-29 16:21 ` Rob Herring
2023-12-29 17:34 ` Linus Walleij
2023-12-30 11:27 ` Dario Binacchi
2024-01-01 5:26 ` kernel test robot
2023-12-29 13:51 ` [PATCH 6/8] ARM: dts: add stm32f769-disco-mb1225-revb03-mb1166-reva09 Dario Binacchi
2023-12-29 13:51 ` [PATCH 7/8] drm/panel: nt35510: refactor panel initialization Dario Binacchi
2023-12-29 17:43 ` Linus Walleij
2023-12-30 11:29 ` Dario Binacchi
2023-12-29 13:51 ` Dario Binacchi [this message]
2023-12-29 17:46 ` [PATCH 8/8] drm/panel: nt35510: support FRIDA FRD400B25025-A-CTK Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231229135154.675946-9-dario.binacchi@amarulasolutions.com \
--to=dario.binacchi@amarulasolutions.com \
--cc=airlied@gmail.com \
--cc=alexandre.torgue@foss.st.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linus.walleij@linaro.org \
--cc=linux-amarula@amarulasolutions.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_jesszhan@quicinc.com \
--cc=sam@ravnborg.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®