From nobody Sun Feb 8 05:23:30 2026 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03hn2244.outbound.protection.outlook.com [52.100.14.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1988A1AD9E0 for ; Thu, 4 Jul 2024 12:27:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.100.14.244 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720096029; cv=fail; b=WDBbmlp2+40TuXz5xi2ltkh9UxlPTM8hELXflgjVOk2TG26ZxCSY0ddr07HeXrODwfQfi4r/VcvPy3YNZmoB5ansp+7YduguYMB07zb2VaE1BvNQ+HprUgAFmu6Wy76fjTact2i6NOFW1rOHgrprJpHt82vEzjOYKckJ5w1SYWU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720096029; c=relaxed/simple; bh=4DpgH2f7S33MR6/M99OVeqprx9nQesNjyaSGSlv7e88=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=BfxZR7lAfxgAABz06Gdonbko5cKErafPz6dRoGIEDF4d/6Cwp/+ww7qspTPfhGaUyXI7W6mfpSSp4e7KXaafr+LOtICHoMBfuC41Wqjx050lfx12WH3y3R75RWfT/+YcpMx8k+DxB9V/EPMecVnWMRRicdRwYKTvVpBF3/tqiJM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arri.de; spf=pass smtp.mailfrom=arri.de; dkim=pass (1024-bit key) header.d=arri.de header.i=@arri.de header.b=JGubVhPy; arc=fail smtp.client-ip=52.100.14.244 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arri.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arri.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arri.de header.i=@arri.de header.b="JGubVhPy" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eexpjCmnznbaOvL9PZkYwIN30dJIyBM35gGrJQRHcX6J5+Rwi+6RJA0U2bqao3+4pJTlY+FtWTSB6mgHQiZOGlbNBloaXlByL8bStXM1Ob03I5MHyNfEEu016kU/kQIKX6RwBWOYlwlLGPqUPRjGmI/KSrlBY6Kqc7PNnTJH8XeuD4dtX4hRMd2oxhugiouvkM6ybdO7L7RCS7STCKZ9rkzUpCzMRcmjw7rXQ9XwpAbo2QRVHQEZooQJuLNeRUYXgbgvZ+7P+kzu4D5BqkEQtXZJGoNaYFE/DjCMXLUT5usdtXkunWe0rypO6V40quXmprmRY8UigSN/ECO0kysMpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QeUGYAqAc589YKBG9jO3O+XEEZ3XCcAxJf90M/Ew8S8=; b=EEEyBCKcHPCqz+B6cAesY8OQg8qALeOaT+AJZnTGVpc5C399hAhqgXASQBMYd1SX7vbrsR+HnHXRva1RjS4HMwA9+d3GKHjdd+Ifut/aiQLVjXmUScxYvPjFEUhpt0AT6Nvkvi4Nax/Dj4biIjo/hT0wjIqyc+SF2PVLQH1A5y0QFnDxh82ZR24Gi70qU4d8saCAdHsFsQ9y0ugdh5Ds4Wu0VzjaQTmsJqNqr+mGMY7TALoEwcoxURqo/RoI0apMkvXPrz11sJYB8GEuwSACzViynM552/+9elqtrIR6Q7MaQnyIl7sKeoNImRIIJfcU7lbczRlT/Tn1s4EEfkFl0w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 217.111.95.7) smtp.rcpttodomain=linux.intel.com smtp.mailfrom=arri.de; dmarc=fail (p=none sp=none pct=100) action=none header.from=arri.de; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arri.de; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QeUGYAqAc589YKBG9jO3O+XEEZ3XCcAxJf90M/Ew8S8=; b=JGubVhPyO62V4I7XTF54VGSwGd3dEUUjZWKJHRWEAms8EbPVF481hKVviB+dbsIVSEqXqfWW3BZD4jzQteJ7I20YhwKG/kiVefSx+qCMzrdqqXdb6dRiQCfQUZsXT0h4owtIbjud/AY482TEJhp2Clj1uI54xAjw7Nak7TgYIt0= Received: from AS4P251CA0029.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d3::19) by DBBPR07MB7482.eurprd07.prod.outlook.com (2603:10a6:10:1f3::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.25; Thu, 4 Jul 2024 12:27:01 +0000 Received: from AMS0EPF000001AB.eurprd05.prod.outlook.com (2603:10a6:20b:5d3:cafe::49) by AS4P251CA0029.outlook.office365.com (2603:10a6:20b:5d3::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.29 via Frontend Transport; Thu, 4 Jul 2024 12:27:01 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 217.111.95.7) smtp.mailfrom=arri.de; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=arri.de; Received-SPF: Fail (protection.outlook.com: domain of arri.de does not designate 217.111.95.7 as permitted sender) receiver=protection.outlook.com; client-ip=217.111.95.7; helo=mta.arri.de; Received: from mta.arri.de (217.111.95.7) by AMS0EPF000001AB.mail.protection.outlook.com (10.167.16.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.18 via Frontend Transport; Thu, 4 Jul 2024 12:27:00 +0000 Received: from N9W6SW14.arri.de (10.30.4.245) by mta.arri.de (10.10.18.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Thu, 4 Jul 2024 14:26:59 +0200 From: Christian Eggers To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter CC: David Lechner , =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= , , , , Christian Eggers Subject: [RFC PATCH RESEND] drm/tiny: Add support for Sitronix ST7539 Date: Thu, 4 Jul 2024 14:26:42 +0200 Message-ID: <20240704122642.22906-1-ceggers@arri.de> X-Mailer: git-send-email 2.43.0 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 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS0EPF000001AB:EE_|DBBPR07MB7482:EE_ X-MS-Office365-Filtering-Correlation-Id: 75b256d6-debc-487f-65b4-08dc9c249a65 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|34020700016|376014|36860700013|7416014|1800799024|82310400026|12100799063; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?djcgNQVRvzmlcktBTc+4Ll4fvmZ/t9Glhg+l373Ryl7MYaHEQALpd1DyYzoR?= =?us-ascii?Q?vjlNS7nHS+H14ZoEqRQ3MP1kSGY483kP5KpBRdhmQ4KUSi+ChzQwaw4vd7Tx?= =?us-ascii?Q?l6nhQSkhP8ptw5czL90oB7mp5UEApB6NWup8163a3Ch7dfSaCXmc60/xpXWl?= =?us-ascii?Q?o8Q0AnPr4fay96bWl2OXsa3zjufGSPih+1iWJWHCP+U7yda2Lqg50H+fzS4T?= =?us-asc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G9IeDwQ4kG/?= =?us-ascii?Q?8UzVEKhe+SCYvptVXZh3bP6XBSHm6t1x1iMrlAkdMF8WiUsZf0Z7fu5wFMwQ?= =?us-ascii?Q?gP4K5jYWdH68U61DRcYyHC+eTXcNyPnL4bl9jXrpXwTzgZykpOunOMtZKPfT?= =?us-ascii?Q?rMl2adlUL2WzaSp+ta/r51H5VIU+L+yiV5K1J3e6sPczIi0U7f0+XdW2+VY6?= =?us-ascii?Q?U0OQxIWXFu+9zruP7gvz/fD0YLu1xUT3lJ5iTjJggvk/dplgBOTAPfZhZ0Rf?= =?us-ascii?Q?EZBlj1Dq2hqHFOleYITGPZKgVhzq?= X-Forefront-Antispam-Report: CIP:217.111.95.7;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mta.arri.de;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(34020700016)(376014)(36860700013)(7416014)(1800799024)(82310400026)(12100799063);DIR:OUT;SFP:1501; X-OriginatorOrg: arri.de X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2024 12:27:00.2391 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 75b256d6-debc-487f-65b4-08dc9c249a65 X-MS-Exchange-CrossTenant-Id: e6a73a5a-614d-4c51-b3e3-53b660a9433a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e6a73a5a-614d-4c51-b3e3-53b660a9433a;Ip=[217.111.95.7];Helo=[mta.arri.de] X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF000001AB.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR07MB7482 Content-Type: text/plain; charset="utf-8" Resend because the 1st transmission got HTML'ed by my company's mail server. Based on the existing ST7586 driver. But the ST7539 ... - is monochrome only - has 8 VERTICAL pixels per byte - doesn't support any MIPI DCS commands - has (a few) 16 bit commands - doesn't support setting a clipping rect when writing to the RAM - doesn't support rotation (only mirroring of X and/or Y axis) Questions/TODO: - should drivers for such old displays be mainlined? - shall I use mipi_dbi_ although the display doesn't implement MIPI DCS (and has some 16 bit commands)? - can the conversion to 8 vertical pixels/byte (taken from solomon/ssd130x.c) be avoided / simplified / made more efficient? - how to implement setting of the display contrast (required by my application)? - add device tree binding Signed-off-by: Christian Eggers --- MAINTAINERS | 6 + drivers/gpu/drm/tiny/Kconfig | 11 + drivers/gpu/drm/tiny/Makefile | 1 + drivers/gpu/drm/tiny/st7539.c | 424 ++++++++++++++++++++++++++++++++++ 4 files changed, 442 insertions(+) create mode 100644 drivers/gpu/drm/tiny/st7539.c diff --git a/MAINTAINERS b/MAINTAINERS index e7d543cf9f6c..7191206c1ae3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7116,6 +7116,12 @@ S: Maintained F: Documentation/devicetree/bindings/display/panel/samsung,s6d7aa0.yaml F: drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c =20 +DRM DRIVER FOR SITRONIX ST7539 PANELS +M: Christian Eggers +S: Maintained +T: git https://gitlab.freedesktop.org/drm/misc/kernel.git +F: drivers/gpu/drm/tiny/st7539.c + DRM DRIVER FOR SITRONIX ST7586 PANELS M: David Lechner S: Maintained diff --git a/drivers/gpu/drm/tiny/Kconfig b/drivers/gpu/drm/tiny/Kconfig index f6889f649bc1..220d2aee9354 100644 --- a/drivers/gpu/drm/tiny/Kconfig +++ b/drivers/gpu/drm/tiny/Kconfig @@ -186,6 +186,17 @@ config TINYDRM_REPAPER =20 If M is selected the module will be called repaper. =20 +config TINYDRM_ST7539 + tristate "DRM support for Sitronix ST7539 display panels" + depends on DRM && SPI + select DRM_KMS_HELPER + select DRM_GEM_DMA_HELPER + select DRM_MIPI_DBI + help + DRM driver for Sitronix ST7539 panels. + + If M is selected the module will be called st7539. + config TINYDRM_ST7586 tristate "DRM support for Sitronix ST7586 display panels" depends on DRM && SPI diff --git a/drivers/gpu/drm/tiny/Makefile b/drivers/gpu/drm/tiny/Makefile index 76dde89a044b..0bd217779995 100644 --- a/drivers/gpu/drm/tiny/Makefile +++ b/drivers/gpu/drm/tiny/Makefile @@ -14,5 +14,6 @@ obj-$(CONFIG_TINYDRM_ILI9341) +=3D ili9341.o obj-$(CONFIG_TINYDRM_ILI9486) +=3D ili9486.o obj-$(CONFIG_TINYDRM_MI0283QT) +=3D mi0283qt.o obj-$(CONFIG_TINYDRM_REPAPER) +=3D repaper.o +obj-$(CONFIG_TINYDRM_ST7539) +=3D st7539.o obj-$(CONFIG_TINYDRM_ST7586) +=3D st7586.o obj-$(CONFIG_TINYDRM_ST7735R) +=3D st7735r.o diff --git a/drivers/gpu/drm/tiny/st7539.c b/drivers/gpu/drm/tiny/st7539.c new file mode 100644 index 000000000000..9a6aeea006ef --- /dev/null +++ b/drivers/gpu/drm/tiny/st7539.c @@ -0,0 +1,424 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * DRM driver for Sitronix ST7539 panels + * + * Copyright 2024 Christian Eggers + * + * based on st7586.c + * Copyright 2017 David Lechner + */ + +#include +#include +#include +#include +#include +#include