From patchwork Tue Jul 18 15:31:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 13317417 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B3E1BEB64DA for ; Tue, 18 Jul 2023 15:32:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D878F10E370; Tue, 18 Jul 2023 15:32:03 +0000 (UTC) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2065.outbound.protection.outlook.com [40.107.105.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 001FA10E36C for ; Tue, 18 Jul 2023 15:31:59 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q0OOxmV3ZDrdZRLWoYuukASZtQ0b+L1b15ncoEjWuWg4uZeLnIX/c0sWTiXBYtFNlOat+kDtWzhLK6k5bazSc/T2QtWhsvk24sv4mcxmGMV9bm9DriJPOG7CiQ+iYbgbkR09l6jFEAjbK+EVyMF+avFUWFezu/ycKqW48PPiBdmtNcugWdPmvRsxv8lM7yyzGfZioeR8bRfXTiLVXVugdAUcSod3K0cE/XEBs9RxmYwFwq1AkdgNeTI2hcG6x0KUl2CvadZ5PT9BtWFnE8AMcI8RtZsYiyFMh5KqZntKdSJJ6OAlEXtSKvFhja8uOwOGsGPjY1EDVIQ/5ZvzNUCHpA== 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=E87Z7uT6z7qx7Gk1+ooAYQ8xSCRr8WcKOLDoY5saXUY=; b=nfB1W/lXLvyeCNMVHnM5fml1tS47syeiIGrtCiDoyOw2gq7u5WyFSwkq8sxVWUqN1D4VyNnv+W94GaC9eEZSP4Wgd6kauspAXnYbvunRfGBDwTU/0lXaqlIKzQ6qBql5Ib9iKLmtqWJyjUZaFxBouNUCIWFiC3sjanEwn+Jx7BXjr6RneJNH8YAB+sz4syAYapnftNyWBan1q/ZJVYtKQpWw7wMvCN/h4aKJhi7vXRmWPZdDyvNzRakOzmx8DIlmIxaWpEecYYh0mEomYDLG8L6+NucWpWvhsh1/3Ms8vpXgJU9FI82IQYtUejKZAUrd+4v42xgjBEuZiUGNjPn00A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E87Z7uT6z7qx7Gk1+ooAYQ8xSCRr8WcKOLDoY5saXUY=; b=c67wFRzGK3B0LvyKLVq7OTMhY9HZlQvhlIixhrE6f9s3u3Y02aTb3EgLG3Yy7P/ixOXCTRa8GtgI8efEAR7MMGdowrDRSu70P1AahJIC9m1eYHW+2J3FD8kQagHl31EFxiqkTw6QYfjZhwvdNk2OEGiDn8/7rOZSEKPG6rwzPa4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) by DU2PR08MB10201.eurprd08.prod.outlook.com (2603:10a6:10:496::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.31; Tue, 18 Jul 2023 15:31:57 +0000 Received: from DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::4fd7:91a9:a92b:295a]) by DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::4fd7:91a9:a92b:295a%4]) with mapi id 15.20.6588.031; Tue, 18 Jul 2023 15:31:57 +0000 From: Michael Riesch Date: Tue, 18 Jul 2023 17:31:53 +0200 Subject: [PATCH 4/4] drm/panel: sitronix-st7789v: add jasonic jt240mhqs-hwt-ek-e3 support Message-Id: <20230718-feature-lcd-panel-v1-4-e9a85d5374fd@wolfvision.net> References: <20230718-feature-lcd-panel-v1-0-e9a85d5374fd@wolfvision.net> In-Reply-To: <20230718-feature-lcd-panel-v1-0-e9a85d5374fd@wolfvision.net> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Maxime Ripard , Miquel Raynal , Sebastian Reichel , Gerald Loacker X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1689694312; l=2707; i=michael.riesch@wolfvision.net; s=20230406; h=from:subject:message-id; bh=3CXXeclMl8UbRa/nfxaHx3QccSPNJDBj5k/+SOWhXZc=; b=55lyc4dEUzB69ng9wtyDdOSCDI9uxJicLGUUm5FrE1nzs7H0lGGnPHOhWmAXIlP7QdHBcfLWP xJ6etJRRhrRCyBBE+VjAFoCrl5Vj+uGsJzxxVb8iV9wx+uEwEG99z78 X-Developer-Key: i=michael.riesch@wolfvision.net; a=ed25519; pk=G03kuYHL670EcdsWaNfVA7KnHWmkSpj98XziQm/hjbk= X-ClientProxiedBy: VI1PR0102CA0027.eurprd01.prod.exchangelabs.com (2603:10a6:802::40) To DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR08MB9155:EE_|DU2PR08MB10201:EE_ X-MS-Office365-Filtering-Correlation-Id: 80327518-0a33-471d-63e9-08db87a41f25 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r9H37OKA0wmdctUa76lrDfS0RJpZaDJPrE0Gk3K4BGeolLm4he3vVvVEVUwvo3vu1j9SsGFQjlRZUOGLaxCZe2rOsGVI4kGuS9tkkPuVKHCvZTtUsmgwTGBxyCq2X/8oQg5Elyx2pWOSfJDkqtalpuFhSQMgASqob8R/DoqGsWh8REVzPHQHhHUfmhrAVqAPqH4BuFE9FKzo9fYdvvU99pGf/SOM7ucgaA7p3qI9SKjHuRvsa3xVraFjTAu5DTqCjkW5V8CETEp030xVfrIULQuiwlLiNK52cqkcljWA1If38euxMamXa7z4iH/6qSL8DX2Wez/DtSwjmfyrkPOiQVtgPXUwaNK0TPIzWjivScXuKgm8R5U6p+WNnKraKMhzejN77U5HRM0LNSRSfROWZsIHoPiH3EFYIxBeHd68edrJwLTIGb7VlS2U//PVIh6qvZKTffDs8sqKCbhXri0rItJQM5vHXtLUACJFaY/ESzTSJPIO3RlpopY4L7Uz56F5stq6ajrj7VOWm0z0BPknThz0yrswdB1y04knwJFJt9+I7WKemPwEfBaqVIAXR7rIQzE3eUMaDPnl9uLLwnE7OnpXwCgtnUGL5itHioRhQAxZSGGOMof5Pobqhwqn23UvZpP0V0GLUPF2SQrr1crnVQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR08MB9155.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(376002)(136003)(366004)(39840400004)(346002)(451199021)(6486002)(107886003)(52116002)(26005)(6506007)(6512007)(38350700002)(2616005)(83380400001)(86362001)(38100700002)(921005)(186003)(36756003)(8676002)(8936002)(2906002)(41300700001)(478600001)(7416002)(5660300002)(4326008)(6636002)(316002)(66556008)(66946007)(66476007)(44832011)(110136005)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?K3T+akKMh4B5PxHMtQtBImRV8nT+?= =?utf-8?q?cRYMkv/4Nl0NIAYkCwM7XnsEfToSzdNMSYYU4qvYYY77JEMGoC5szn8y2yzEtq67H?= =?utf-8?q?Uh1Tjo+1kx4BFNYmHWt7y1zcyw7yHQMHM8ZMMhLGUvNKQXt/sgOyeZiaqtfjXvSxi?= =?utf-8?q?VI+NiaYeoE2VV1nprnuo46NQodh3Q2ZvdASJW4M7fCyt3gJPiI94J2LcTitwpFVO+?= =?utf-8?q?OeYWK4nDeCKTz4tT+EQ3wFu5qpWSVocXxU92AnP8wXSKGRojFYgmJ5TY3qoyi1a7K?= =?utf-8?q?7IV4JFe/is7xZxNZU2178VyMGr9MvNV85yZRFWCQEnfqSDgSabfRrVyLKBgzMBxyO?= =?utf-8?q?8h2pOAIni2jMPco53C5yRdPH2HeaHB2PKWFuFES9Yuq4YIhW2lCrNpWstueXxi574?= =?utf-8?q?WInrRJL8N7Yh/iDn97HKhaawCFxywXXofk3HD/QHgJNCBT9mP9YJGqzhyq6uG5wbE?= =?utf-8?q?dFpdQ9useSvcRuVFjvudVI5ilXFDOOwfReUzmQ6jUkFIJeABpgrG2i8sglI0nYx7T?= =?utf-8?q?ZMZao/s+5UOd2yVFTUZqbogvbpQsFWKh5xtBxR39iMTOIrYtkO57unbOifBQSsI+9?= =?utf-8?q?gebs4MwGqbwfg0flYLMu34dGH4LJtk+Ns6AcNsZfbgHju8zF7NfGcJ6q/1NxAsZiV?= =?utf-8?q?qvAB1bBZZdg5cDgV+FPqQrMOU9Zd0EVipoFmMLsFDjbPKc3i17TXkalO2rjkwvJea?= =?utf-8?q?tk8M3v3kUxYfP37pi4TQY+k29O7ww55nUOl2rsdZPbkXBN74njdZ8mxMzAmgM2PZC?= =?utf-8?q?/wU1sHS7vTBMsqbWaufXiSX+5CjjJlhcVmn7oZcssujXXk8Laic85zEMhDZqFXfpO?= =?utf-8?q?JicCYFtuntGsA6zcgUb0X5kz5J8AsEqoTLYNs7k7koJWs2ZZqkkPhIWO2zmUqXmC1?= =?utf-8?q?RXqWHQKq28MTCKtSXOeclRsH128KNifAQZtPMuFaJFbR1DOBWBpZcwvH3zb1vgWGz?= =?utf-8?q?HpUkZ1bdqvGaAPEZD727EjxJ9uykE/kTmcw4LSuI1uWOs0DWX62N15bohjJFRCGsS?= =?utf-8?q?kcty+E9liiitR8CBfmh+OzCk5+IZ+lA37HpRfYze7VMYzQNO0AJFKXGQKzdzxQKzX?= =?utf-8?q?VGRfpyPxv0QzNIaQDm2rzloRY/a515rLRlFSieFRwmrP1EprNtT5XwDklvptuWTFH?= =?utf-8?q?asAF//cKyZj+eP0h5jvjyigMIUQ1OyMDB95g9NorYFN+26SW617b3+EEeIJAMnl6h?= =?utf-8?q?Dogp/oDfV8WnMMsRvvashYXep0aQlCQ+Z4lOkXDQ5KZRmgIXgX1BGBhd2N9vU3afZ?= =?utf-8?q?ItBupFOy/f8BfCiMGoo4JplmgRQ06utLQFxIo47LG8BudE4IuLewkFDn+9yYdHjqF?= =?utf-8?q?kZ0A7DpfC+7ZMVJWNHgbbiWqzdzNRL1LaeBYb7dBh03RosjB1h8YlMX8H9zfiTyiB?= =?utf-8?q?u+cqQrTezSJgsjORsdkIlqnGDoPYvg8ovUYRjv1LfFTSzYTNCQmS+uxF2S8TnJdFd?= =?utf-8?q?w7c2hn/7JvsV8DYKa67m5UtrcjtHmJbbHwrl2l5wYlNsK9RLXQ9A2jN6Gq7mP7XRX?= =?utf-8?q?CFZ0vdnZt4hLCyIsmQtFea5w7CHcB3dELg=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 80327518-0a33-471d-63e9-08db87a41f25 X-MS-Exchange-CrossTenant-AuthSource: DU0PR08MB9155.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2023 15:31:57.0923 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hGVXgCda025YxcFsFZRjWV6PsKQG7Rz6j26jQ/aE0ACxG0PelEgYk5AAV4kbW8Wmif/H5ALfm+EC6ICIwUaquPKGWzcpeP3kW5vb+vCG2Dc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR08MB10201 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Riesch Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The Jasonic JT240MHQS-HWT-EK-E3 is a custom panel using the Sitronix ST7789V controller. While the controller features a resolution of 320x240, only an area of 280x240 is visible by design. Signed-off-by: Michael Riesch --- drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c index 729d8d7dbf7f..4c6aed993ba1 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c @@ -278,6 +278,21 @@ static const struct drm_display_mode et028013dma_mode = { .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, }; +static const struct drm_display_mode jt240mhqs_hwt_ek_e3_mode = { + .clock = 6000, + .hdisplay = 240, + .hsync_start = 240 + 28, + .hsync_end = 240 + 28 + 10, + .htotal = 240 + 28 + 10 + 10, + .vdisplay = 280, + .vsync_start = 280 + 8, + .vsync_end = 280 + 8 + 4, + .vtotal = 280 + 8 + 4 + 4, + .width_mm = 43, + .height_mm = 37, + .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, +}; + static const struct st7789_panel_info default_panel = { .mode = &default_mode, .invert_mode = true, @@ -302,6 +317,17 @@ static const struct st7789_panel_info et028013dma_panel = { DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, }; +static const struct st7789_panel_info jt240mhqs_hwt_ek_e3_panel = { + .mode = &jt240mhqs_hwt_ek_e3_mode, + .invert_mode = true, + .bus_format = MEDIA_BUS_FMT_RGB666_1X18, + .bus_flags = DRM_BUS_FLAG_DE_HIGH | + DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, + .partial_mode = true, + .partial_start = 38, + .partial_end = 318, +}; + static int st7789v_get_modes(struct drm_panel *panel, struct drm_connector *connector) { @@ -612,6 +638,7 @@ static const struct spi_device_id st7789v_spi_id[] = { { "st7789v", (unsigned long) &default_panel }, { "t28cp45tn89-v17", (unsigned long) &t28cp45tn89_panel }, { "et028013dma", (unsigned long) &et028013dma_panel }, + { "jt240mhqs-hwt-ek-e3", (unsigned long) &jt240mhqs_hwt_ek_e3_panel }, { } }; MODULE_DEVICE_TABLE(spi, st7789v_spi_id); @@ -620,6 +647,8 @@ static const struct of_device_id st7789v_of_match[] = { { .compatible = "sitronix,st7789v", .data = &default_panel }, { .compatible = "inanbo,t28cp45tn89-v17", .data = &t28cp45tn89_panel }, { .compatible = "edt,et028013dma", .data = &et028013dma_panel }, + { .compatible = "jasonic,jt240mhqs-hwt-ek-e3", + .data = &jt240mhqs_hwt_ek_e3_panel }, { } }; MODULE_DEVICE_TABLE(of, st7789v_of_match);