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: 122108 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp1855763vqt; Tue, 18 Jul 2023 09:12:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlHTaYeRGoIq3At64pzvdtaFxryFzAHW2FFAxhSZuCdJ5twRnBBX3FoPWGL1MaW4J+/mKVfh X-Received: by 2002:a17:90a:6fe1:b0:262:e0aa:bbc8 with SMTP id e88-20020a17090a6fe100b00262e0aabbc8mr14630842pjk.8.1689696760422; Tue, 18 Jul 2023 09:12:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689696760; cv=pass; d=google.com; s=arc-20160816; b=ktC8kzMKr7JIhgqZoiMF5LcWdm3OOfmGfhTHeBRDAhuXPgz1PXWu5fGM1tWT1bO09h 2gh/JdHi8wjGPi3ex4COr43MfRRNFOPCjaqr8CwE2u5CkASRih/yXG4PhAcT+wNVbr8n N4U9DKS11kVfdD16e6/BM+rsm8sR8Pe77XHJf/1Ox36y9M9oQBRsbnzQeN6QYxmlA8EQ lBSNEVPHf5w3QqLwanc18BYBOFUwGOVbHCTzCiW28nUNLTPLPMjCuQ2VCNjv7pdoyee7 peEHKnYi4JYPa6QOzTl8ZdReb0usj3+rTfBL1G3IqNbpP4Y0IggyhipYBl+LmVjsfAIq +ERg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:cc:to:in-reply-to:references :message-id:content-transfer-encoding:subject:date:from :dkim-signature; bh=E87Z7uT6z7qx7Gk1+ooAYQ8xSCRr8WcKOLDoY5saXUY=; fh=Tq5vakelb7Evvy1hSU1bJIwKBl0VAr7pcHQ3+RKee2k=; b=GJv6NyAatAXEvZ1w78aM1kbQp7IEPBCd5tE3P2+KqaJcjo+7AJm1fRylFkBqzbtVp+ vsTkmbA/lzAMbApUVxS0ZHFrpHOJ4iIonMQT230YUTuO0f0Y682TFnKJck7rQbifp7gm +2FB5hXj0Y46MNrpBpj5vMevHkbmvRTw1eLG7qb7rd32tiOBDtNnqKTm82NWxrdZhOvu jUpe9OulEEerUFEHdJWLOS/RKXA4mM2lqU2wkMgr0hhKos9nwGuBekK68+sExV8arFT/ fCPSjP+oPRGzSt6HokV/nI4TevROv88/bSeRUToB3wnau/G6AE4mZ7GJJNwYDH4Gosng PkzQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=c67wFRzG; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g124-20020a636b82000000b0055c82716d17si1746419pgc.830.2023.07.18.09.12.26; Tue, 18 Jul 2023 09:12:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=c67wFRzG; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233703AbjGRPcX (ORCPT + 99 others); Tue, 18 Jul 2023 11:32:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233672AbjGRPcM (ORCPT ); Tue, 18 Jul 2023 11:32:12 -0400 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2077.outbound.protection.outlook.com [40.107.105.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC398198B; Tue, 18 Jul 2023 08:32:05 -0700 (PDT) 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 Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Riesch 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/4Nl0NIAYkCwM7XnsEfToSzdNMSYYU4qvYYY77JEMG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b1vgWGz?= =?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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771775470256552518 X-GMAIL-MSGID: 1771775470256552518 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);