From nobody Fri Dec 26 23:31:49 2025 Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6206D134A9 for ; Fri, 29 Dec 2023 13:52:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="CFfUtJ/W" Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2ccebd0377fso9287371fa.3 for ; Fri, 29 Dec 2023 05:52:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1703857949; x=1704462749; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=I04AycXU2gthDovU4fhTPLpGwaRhcBOoWll3dN0DmSw=; b=CFfUtJ/WP6Yl21Yn9J7mNsctuMeS7Mk8+AMzKP4/Q3Ap1JFStnfBnAK3ibgoHQj1vA BgGkgYTYF1YGK8bHv4+1ZAHLp/bMGNuivxRA/ozG0lFbOob+YGXrQMHNr85vgoHRTKyF MQSiu+VsZRE80Kst4ujygQnsc55v8sRHgv0Q0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703857949; x=1704462749; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I04AycXU2gthDovU4fhTPLpGwaRhcBOoWll3dN0DmSw=; b=bBEtKFMeQhe5LTahgFYlQ5VPuTxjyvv6tP2JbiVxEND+s1n/bDrEH6R8Y9D1/WCsbb HRj+XDOqyndlwQdhjXklq2UgVdhzK3x8e4kPlVmbV03s2BnWxXfSmfLxpoaMCyUYDc/j 2ABzetZuzV4RXPmrAm0MsqM2/mlIdVcJ2+9ZbSKOK+flZyhTd2zdp2UitbB34ogd3Ke8 HgNgjooU3qLxjyVNy15XeeYajYhNgbzkwFXhpMhV8SL97BxTfrpOE1F84PQkrU/i5j/5 mcVxMP3UiCYjAIf48ke5GGXjhOwiUUBhfxPpKCcmKSFiiyxLZ19czNDmj0/SKSK+zzwE 8ocQ== X-Gm-Message-State: AOJu0YwndEbWm1xtzgGUfvmEcDSYJv91A2ZcoWlLyWnDj5+4Qa3A1Izz VNhIugj1jfvveJps4s1Fqbh+xc9j9qf5RQckO7L1z4P/Q9o= X-Google-Smtp-Source: AGHT+IHOtc5IkKmhCbd0Ze1jDDKCs0xUxs7gN1zGo15FKjOCb36qByeeIpxGR4YJYMTK8KBp1srJgg== X-Received: by 2002:a2e:3c19:0:b0:2cc:df53:5309 with SMTP id j25-20020a2e3c19000000b002ccdf535309mr798204lja.91.1703857949279; Fri, 29 Dec 2023 05:52:29 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-49-57-70.retail.telecomitalia.it. [79.49.57.70]) by smtp.gmail.com with ESMTPSA id i16-20020aa7c710000000b00553b243b1a8sm11019160edq.92.2023.12.29.05.52.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 05:52:28 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Alexandre Torgue , Dario Binacchi , Daniel Vetter , David Airlie , Jessica Zhang , Linus Walleij , Maarten Lankhorst , Maxime Ripard , Neil Armstrong , Sam Ravnborg , Thomas Zimmermann , 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 Message-ID: <20231229135154.675946-9-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231229135154.675946-1-dario.binacchi@amarulasolutions.com> References: <20231229135154.675946-1-dario.binacchi@amarulasolutions.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The initialization commands are taken from the STMicroelectronics driver found at https://github.com/STMicroelectronics/STM32CubeF7/blob/master/Driv= ers/BSP/Components/nt35510/ Signed-off-by: Dario Binacchi --- 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/dr= m/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 + * Add support to Frida FRD400B25025-A-CTK panel. + * Based on code by MCD Application Team (C) 2020 STMicroelectronics * Copyright (C) 2020 Linus Walleij * Based on code by Robert Teather (C) 2012 Samsung * @@ -165,6 +168,49 @@ static const struct panel_init_cmd hydis_hva40wv1_init= _cmds[] =3D { {}, }; =20 +static const struct panel_init_cmd frida_frd400b25025_init_cmds[] =3D { + _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_hva40= wv1 =3D { .init_cmds =3D hydis_hva40wv1_init_cmds, }; =20 +/* + * The Frida FRD400B25025-A-CTK panel + */ +static const struct nt35510_config nt35510_frida_frd400b25025 =3D { + .width_mm =3D 52, + .height_mm =3D 86, + .mode =3D { + .clock =3D 23000, + .hdisplay =3D 480, + .hsync_start =3D 480 + 34, /* HFP =3D 34 */ + .hsync_end =3D 480 + 34 + 2, /* HSync =3D 2 */ + .htotal =3D 480 + 34 + 2 + 34, /* HBP =3D 34 */ + .vdisplay =3D 800, + .vsync_start =3D 800 + 15, /* VFP =3D 15 */ + .vsync_end =3D 800 + 15 + 12, /* VSync =3D 12 */ + .vtotal =3D 800 + 15 + 12 + 15, /* VBP =3D 15 */ + .flags =3D 0, + }, + .lanes =3D 2, + .format =3D MIPI_DSI_FMT_RGB888, + .mode_flags =3D MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | + MIPI_DSI_MODE_LPM, + .init_cmds =3D frida_frd400b25025_init_cmds, +}; + static const struct of_device_id nt35510_of_match[] =3D { + { + .compatible =3D "frida,frd400b25025", + .data =3D &nt35510_frida_frd400b25025, + }, { .compatible =3D "hydis,hva40wv1", .data =3D &nt35510_hydis_hva40wv1, --=20 2.43.0