From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: linux-kernel@vger.kernel.org
Cc: Amarula patchwork <linux-amarula@amarulasolutions.com>,
michael@amarulasolutions.com,
Neil Armstrong <neil.armstrong@linaro.org>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>,
Jessica Zhang <quic_jesszhan@quicinc.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Sam Ravnborg <sam@ravnborg.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
dri-devel@lists.freedesktop.org
Subject: [PATCH v4 09/10] drm/panel: ilitek-ili9805: add support for Tianma TM041XDHG01 panel
Date: Tue, 5 Dec 2023 11:52:56 +0100 [thread overview]
Message-ID: <20231205105341.4100896-10-dario.binacchi@amarulasolutions.com> (raw)
In-Reply-To: <20231205105341.4100896-1-dario.binacchi@amarulasolutions.com>
From: Michael Trimarchi <michael@amarulasolutions.com>
Tianma TM041XDHG01 utilizes the Ilitek ILI9805 controller.
Add this panel's initialzation sequence and timing to ILI9805 driver.
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
Changes in v4:
- Add Reviewed-by tag of Neil Armstrong
drivers/gpu/drm/panel/panel-ilitek-ili9805.c | 53 ++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9805.c b/drivers/gpu/drm/panel/panel-ilitek-ili9805.c
index e36984b46e14..5054d1a2b2f5 100644
--- a/drivers/gpu/drm/panel/panel-ilitek-ili9805.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9805.c
@@ -87,6 +87,36 @@ static const struct ili9805_instr gpm1780a0_init[] = {
ILI9805_INSTR(0, 0xB9, 0x02, 0x00),
};
+static const struct ili9805_instr tm041xdhg01_init[] = {
+ ILI9805_INSTR(100, ILI9805_EXTCMD_CMD_SET_ENABLE_REG, ILI9805_SETEXTC_PARAMETER1,
+ ILI9805_SETEXTC_PARAMETER2, ILI9805_SETEXTC_PARAMETER3),
+ ILI9805_INSTR(100, 0xFD, 0x0F, 0x13, 0x44, 0x00),
+ ILI9805_INSTR(0, 0xf8, 0x18, 0x02, 0x02, 0x18, 0x02, 0x02, 0x30, 0x01,
+ 0x01, 0x30, 0x01, 0x01, 0x30, 0x01, 0x01),
+ ILI9805_INSTR(0, 0xB8, 0x74),
+ ILI9805_INSTR(0, 0xF1, 0x00),
+ ILI9805_INSTR(0, 0xF2, 0x00, 0x58, 0x40),
+ ILI9805_INSTR(0, 0xFC, 0x04, 0x0F, 0x01),
+ ILI9805_INSTR(0, 0xEB, 0x08, 0x0F),
+ ILI9805_INSTR(0, 0xe0, 0x01, 0x0d, 0x15, 0x0e, 0x0f, 0x0f, 0x0b, 0x08, 0x04,
+ 0x07, 0x0a, 0x0d, 0x0c, 0x15, 0x0f, 0x08),
+ ILI9805_INSTR(0, 0xe1, 0x01, 0x0d, 0x15, 0x0e, 0x0f, 0x0f, 0x0b, 0x08, 0x04,
+ 0x07, 0x0a, 0x0d, 0x0c, 0x15, 0x0f, 0x08),
+ ILI9805_INSTR(10, 0xc1, 0x15, 0x03, 0x03, 0x31),
+ ILI9805_INSTR(10, 0xB1, 0x00, 0x12, 0x14),
+ ILI9805_INSTR(10, 0xB4, 0x02),
+ ILI9805_INSTR(0, 0xBB, 0x14, 0x55),
+ ILI9805_INSTR(0, MIPI_DCS_SET_ADDRESS_MODE, 0x0a),
+ ILI9805_INSTR(0, MIPI_DCS_SET_PIXEL_FORMAT, 0x77),
+ ILI9805_INSTR(0, 0x20),
+ ILI9805_INSTR(0, 0xB0, 0x00),
+ ILI9805_INSTR(0, 0xB6, 0x01),
+ ILI9805_INSTR(0, 0xc2, 0x11),
+ ILI9805_INSTR(0, 0x51, 0xFF),
+ ILI9805_INSTR(0, 0x53, 0x24),
+ ILI9805_INSTR(0, 0x55, 0x00),
+};
+
static inline struct ili9805 *panel_to_ili9805(struct drm_panel *panel)
{
return container_of(panel, struct ili9805, panel);
@@ -227,6 +257,20 @@ static const struct drm_display_mode gpm1780a0_timing = {
.vtotal = 480 + 2 + 4 + 10,
};
+static const struct drm_display_mode tm041xdhg01_timing = {
+ .clock = 26227,
+
+ .hdisplay = 480,
+ .hsync_start = 480 + 10,
+ .hsync_end = 480 + 10 + 2,
+ .htotal = 480 + 10 + 2 + 36,
+
+ .vdisplay = 768,
+ .vsync_start = 768 + 2,
+ .vsync_end = 768 + 10 + 4,
+ .vtotal = 768 + 2 + 4 + 10,
+};
+
static int ili9805_get_modes(struct drm_panel *panel,
struct drm_connector *connector)
{
@@ -331,8 +375,17 @@ static const struct ili9805_desc gpm1780a0_desc = {
.height_mm = 65,
};
+static const struct ili9805_desc tm041xdhg01_desc = {
+ .init = tm041xdhg01_init,
+ .init_length = ARRAY_SIZE(tm041xdhg01_init),
+ .mode = &tm041xdhg01_timing,
+ .width_mm = 42,
+ .height_mm = 96,
+};
+
static const struct of_device_id ili9805_of_match[] = {
{ .compatible = "giantplus,gpm1790a0", .data = &gpm1780a0_desc },
+ { .compatible = "tianma,tm041xdhg01", .data = &tm041xdhg01_desc },
{ }
};
MODULE_DEVICE_TABLE(of, ili9805_of_match);
--
2.43.0
next prev parent reply other threads:[~2023-12-05 10:54 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-05 10:52 [PATCH v4 00/10] Add displays support for bsh-smm-s2/pro boards Dario Binacchi
2023-12-05 10:52 ` [PATCH v4 01/10] drm/bridge: Fix bridge disable logic Dario Binacchi
2023-12-05 10:52 ` [PATCH v4 02/10] drm/bridge: Fix a use case in the " Dario Binacchi
2023-12-05 15:39 ` Dave Stevenson
2023-12-06 13:26 ` Dario Binacchi
2023-12-06 13:31 ` Jagan Teki
2023-12-06 13:57 ` Michael Nazzareno Trimarchi
2023-12-13 11:59 ` Dario Binacchi
2023-12-13 12:02 ` Jagan Teki
2023-12-13 12:17 ` Maxime Ripard
2023-12-05 10:52 ` [PATCH v4 03/10] drm: bridge: samsung-dsim: enter display mode in the enable() callback Dario Binacchi
2023-12-05 10:52 ` [PATCH v4 04/10] drm: bridge: samsung-dsim: complete the CLKLANE_STOP setting Dario Binacchi
2023-12-05 10:52 ` [PATCH v4 05/10] dt-bindings: display: panel: Add synaptics r63353 panel controller Dario Binacchi
2023-12-05 10:52 ` [PATCH v4 06/10] drm/panel: Add Synaptics R63353 panel driver Dario Binacchi
2023-12-07 5:26 ` Dan Carpenter
2023-12-05 10:52 ` [PATCH v4 07/10] dt-bindings: display: panel: Add Ilitek ili9805 panel controller Dario Binacchi
2023-12-06 14:33 ` Rob Herring
2023-12-07 9:29 ` Krzysztof Kozlowski
2023-12-07 9:41 ` Maxime Ripard
2023-12-05 10:52 ` [PATCH v4 08/10] drm/panel: Add Ilitek ILI9805 panel driver Dario Binacchi
2023-12-05 10:52 ` Dario Binacchi [this message]
2023-12-05 10:52 ` [PATCH v4 10/10] arm64: dts: imx8mn-bsh-smm-s2/pro: add display setup Dario Binacchi
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=20231205105341.4100896-10-dario.binacchi@amarulasolutions.com \
--to=dario.binacchi@amarulasolutions.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-amarula@amarulasolutions.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=michael@amarulasolutions.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