From patchwork Fri Aug 4 13:02:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 13341791 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 6FFB8C001DB for ; Fri, 4 Aug 2023 13:02:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6252F10E6F2; Fri, 4 Aug 2023 13:02:53 +0000 (UTC) Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2052.outbound.protection.outlook.com [40.107.247.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id 50FF410E6F4 for ; Fri, 4 Aug 2023 13:02:49 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M/A4NkRCYay+aadn4im/HFEfnENW2hiWsCpUl/B/oMcSmujlXQFtN4gwei+yKo+gt2FPPm9rBkA8JKxHVQpeC9Ri5aj4NxPdYPxE/NEIfKI2ENUdrrNDfvNmIMTvP3Lo62dPxmizGeWlX9wmszymS5SjHNpSwSDqtLsfV/PJly9v/IoXDZ1S9hIJ81n03Op1HfEt/QT7n4ib3d7oEdDv5/vAnLMS9zY8U+yCPsy098ZUh+K+9vJmdsNZkaLLWoneYuxPRe6UddpC76tAf2mHGU6mXcHCx2SbhVDJKFNdp95qp2JMh38qU+5uwp9gS00jop4lGyIFFC5gld1oM1GmYA== 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=Hsn3c0RGoeCkDm1NLEXg6HgBH949T2CLuU8Bhe+3b0U=; b=GYvMRXC8XcljYXjvgfT9y7hg1FTnHs1Mms1GLrjBs7/exbJsQuPxxA6LAp9NTWUZTj0+KnewBBLe0gYq0fS1cuGhpWD3E9I5ZMUh/RNjYL0fj7tFRB80kds/o7jYefC+/YlrZkkSqwSuGjG3BmiygEG6hwMiRHatu8kcmnOUnVG3c+H1CYdcYdmCE/IDKJp2yIVysyyxnP+Cn3gXM9Aa9EeZn+IcUmykoTtkxQnSKb14mLElH8eIdRGndrNyXL7Jv//5VU1DWs3zDjtXtBdgmTA4XlFm+Xv91XwuZEzJAIE6OrQUR5k2TT+fLJJHWsHMITPwLIAUGHaZqNEZOstsxQ== 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=Hsn3c0RGoeCkDm1NLEXg6HgBH949T2CLuU8Bhe+3b0U=; b=dpQ9vLaqVdYAzoNna+82+9Gdk6If1sgMmVNHZ22Ed8TGGdru/GKoppXXKVY7zUlYQzhPDZPXiyrcaMBC9KdvgW+GeT3nTUqYOahGtsyrB6bxaSTN+4dlb9gDNDLBwa5iXFr53MHhjduUnmGWFmd0yjsUeLZx0AY2MFREnkbjxQw= 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 AM0PR08MB5348.eurprd08.prod.outlook.com (2603:10a6:208:189::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.21; Fri, 4 Aug 2023 13:02:43 +0000 Received: from DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::9d1a:4539:a8f8:dd60]) by DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::9d1a:4539:a8f8:dd60%7]) with mapi id 15.20.6631.046; Fri, 4 Aug 2023 13:02:43 +0000 From: Michael Riesch Date: Fri, 04 Aug 2023 15:02:35 +0200 Subject: [PATCH v2 4/4] drm/panel: sitronix-st7789v: add jasonic jt240mhqs-hwt-ek-e3 support Message-Id: <20230718-feature-lcd-panel-v2-4-2485ca07b49d@wolfvision.net> References: <20230718-feature-lcd-panel-v2-0-2485ca07b49d@wolfvision.net> In-Reply-To: <20230718-feature-lcd-panel-v2-0-2485ca07b49d@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=1691154158; l=2707; i=michael.riesch@wolfvision.net; s=20230425; h=from:subject:message-id; bh=cXTYdavmo4hFsusdgsAm73qug20kIR6Ap3YAIMZ140w=; b=Ht7w5AjpBh3lxgll+qiafR/sBy6FZDw2Ik9zg48EVHTO7keHTFvcJafH1BjhsRyBvoZFAf2hL yMRFpZg6KAYBw4jWlgYBPTN7Oa0nd7BDAtEEKgJRH5oU9xKvKo+B3aG X-Developer-Key: i=michael.riesch@wolfvision.net; a=ed25519; pk=1QQdXA2QbwdxaQn/VQK0hz04C8IBYhDowbK0hlNU4Ng= X-ClientProxiedBy: VI1P189CA0023.EURP189.PROD.OUTLOOK.COM (2603:10a6:802:2a::36) To DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR08MB9155:EE_|AM0PR08MB5348:EE_ X-MS-Office365-Filtering-Correlation-Id: 1ed2b378-cf73-49d7-3b1b-08db94eb17a3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2rcnUiVV8JU3QOmYjxw+AZa4bgdXYivmkzK92k7KRZQ+68Qc1zLeXKPkKHZF5S1d2q6jQzocb3lqclAGvWBzIxq4bgybXpclkiFmHOJDQzQGiZiZj94Se+6QpsgCQR24bE9LqvK6AGzipf8guI3OJGxeRC+QwvG+Ov9mhPTRblpE75c59j/iMg4vYnqdlBBKNHei7x5cjD9l+O125oLCx7pceOW+HkL4EJUYqy19eUTUetClGWj/Du9s7Zr+tHhKq6NI804ogqmY0xNPHGO4zzaSkb7vOGQPPoLnmRPXRnFjgqbd5a8s6Og9ztOWK7ojYCRzN3it+lscAAdm8doD51l4DhzG9SyjR//ySyW15Ngn/Fp1KNZvHPgDwEOjfKMOdjXvJjvzCHgkKy+pFqpXVtfSgag4Wurk9u/r2LDfEUz1JHTZLHHEGPR3NlzjuTB0twn8I04QcSgXgxneYnYt6IjjBV8ILy2L9TtBEfMnv9+6is9mk6rmSpRrq7sO3w8lNu/2RPmRTg+KS1OfS2eTpwEQHfoSYqkvx4llfTqL1Iu8IA8vaVCM6FPtaV8gtkR4PT910nrfRXuNH396+G6u4MTS9I0MQ01Mvq+DdOmk9K7PQLkaOISmbtpFJXCbgLT+xHRDjqJr4pfL0yP46KnHfA== 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)(136003)(366004)(376002)(346002)(39840400004)(451199021)(186006)(1800799003)(6486002)(52116002)(6666004)(6512007)(86362001)(26005)(6506007)(107886003)(36756003)(2616005)(83380400001)(38100700002)(921005)(38350700002)(66556008)(66476007)(66946007)(4326008)(2906002)(316002)(6636002)(5660300002)(7416002)(44832011)(41300700001)(8936002)(8676002)(478600001)(110136005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?iv+J30kevCT2lwV2xUzlvSCSFV0k?= =?utf-8?q?D+pbLlAKL/dV7FfDSb2eN482aJEWcZJrSY005Awk2XULfVbH6COWbpvwlfGSqBDSm?= =?utf-8?q?es4YROFUcgKC79mOBOabgjr3GhkYmq3zM0khYT6wxT6UNG2ZykzjtAgfhKPeUQV5j?= =?utf-8?q?aYK2+FmAAtqOdAG7l1DvsBL4m6Ba/cj0pUPl45k8XGFmcAQrgAATJXRixV5xQbxJF?= =?utf-8?q?u5UQBsdwsY7BN9E1FD+xOON9xaJoaz4U3JKgwuOD6Lx8UlQsCJBw06rw12OeXw3Tj?= =?utf-8?q?jdvxykBDSCrgP7bdu2hWEC8ELqaAQgDrzUPKhZADnUl6yQ6oEyLVRJ0UG3so5RQhL?= =?utf-8?q?yQsqSxj/6Rr00dC98XAEncnLXde8w4SGfR2iOivPk6jo7FwymjxGQtZzXrbZVnc6c?= =?utf-8?q?jRM2ReDJrNC1N7nB2onbkWMUaVEqo1/okuNhwFjOnFPXXQuuM0bxI9XJWWxCURZGe?= =?utf-8?q?3Mgv+BjGn8YBI3MU75CMxdTkfJVIwZELXLCccqdXM+vjVqGOCl7Eyh+2svHMl0JKC?= =?utf-8?q?nj+iLCMxXw4wcS6Vkfajpwnu4f88g0hJkZocy1Tc+mVqnW1OLdmeD7EaX9nyIujUi?= =?utf-8?q?LbBD/Pq+G+T5fEQkzvt+EYsKmBxWkVSEeCUWmHqVNdee/PJ4J/I4pdxvg5aZTKKsR?= =?utf-8?q?pXXKRNtNc9bU1NUDgMKLMFd5Gclqzm3J8js3GLA1KHoTkMj1yPKIf21P+SRZ4tRJS?= =?utf-8?q?g8EHdGk5qIz6yof47lRYCvRmmtRZABnFvE5Zvz+gHwKw4J+Z/IMXmKccEu3awoGIg?= =?utf-8?q?H4MJegfyKK+/rw0j3ZpK1i5ZibA1eYOe52LPdn+IzGQ96blQH7IV16Kbo8YcK7tXi?= =?utf-8?q?wQQo72blABkgEoujqV4v4dRYdyxyuCY9S+pkQH/3SYzhAGpy57zX9snyUirvYA4BW?= =?utf-8?q?2f2GnO5d6kIZQ9rvLCmkV9UQD3P690bFozqdgoJRCHmmGDnBDqgY8zyzfKLtrYnMO?= =?utf-8?q?pCX+9WjvPupLzAwRyxi3rO3Rgk6EHxV/5PHgjo8GanxXETmieyjOGFTgz6KkyaP/s?= =?utf-8?q?d5m1POMk9nRwRldOa9sg28WrtApxGlbQFH33KRxYBo8xzf9SwxCOclwGSSnI4h93x?= =?utf-8?q?IbxW0zf65BlPhXGFANy4ZgLgBjpo00LtGVG2TNwijXKrghfaKj1V6xqpo/HHh0/Eh?= =?utf-8?q?Uc6hvb8MCj2KtrtAH9UbR5O7T9YMRazNOm5DGGjzNVB5jWdvkMO86HIncV3HnF0XY?= =?utf-8?q?3Lq6ExyyecjXepHzjFaSDkPl7JAlSSZP9Re+OS/cEmTYjHzTkbAByLkopfWf5IbM8?= =?utf-8?q?yGkQjVMRTX7RALtuYyu2STaloBb+cbYQOIE8gw8DrT/e4fvrGgEP/9UQzWYKmtSCB?= =?utf-8?q?Pw34370TIeQBy5QHCBJ8zzq/X5r3Z6yH9LsOidncYSw1bWNIAq0RurR8vv2dqcgHf?= =?utf-8?q?/10J/YgXVF/Obm7qr9KDath/c+r4xVN6Iy+y2UHIbaGaBAuwBCoxa7UogKXxq4sqU?= =?utf-8?q?uRuQfI58M7PjfGhloCjGYVpLOXztMNiuKRpcpbHsZMbmtMneh/Bl5NpcZ+VDMRQPM?= =?utf-8?q?Ynwy09NBeGnU33T/+b8Y7HkkujQzZv434w=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 1ed2b378-cf73-49d7-3b1b-08db94eb17a3 X-MS-Exchange-CrossTenant-AuthSource: DU0PR08MB9155.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2023 13:02:43.8725 (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: J7m2JzLnXMTaOqU8mk3/Etnj2biDUryazqnnitrGcsFImDTgzKByAZIl6EcLwN+fZrajx09KBNdcPI8dXW/iI5wbdw/b5l0vqi5KSM5xlvo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB5348 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 Reviewed-by: Neil Armstrong --- 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 ebc9a3bd6db3..88e80fe98112 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c @@ -279,6 +279,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, @@ -303,6 +318,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) { @@ -635,6 +661,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); @@ -643,6 +670,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);