From patchwork Wed Jun 26 14:22:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 13713019 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 EF782C27C4F for ; Wed, 26 Jun 2024 14:22:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6510E10E8DA; Wed, 26 Jun 2024 14:22:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="EIhfiAYp"; dkim-atps=neutral Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3C37710E8D7 for ; Wed, 26 Jun 2024 14:22:35 +0000 (UTC) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4217926991fso57563475e9.3 for ; Wed, 26 Jun 2024 07:22:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1719411753; x=1720016553; darn=lists.freedesktop.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=rwpzrw+8a9jskXuzzJFLsA7zHzZayXfGDHG3CFsewrw=; b=EIhfiAYpRpeQrLyCQSWC3MvO9hfA5lsS0lVGsQv/9aD6fwV9E16dMfd7J/FMZe5llb xzOYEIAh2lghX7D34o4eJi2+z7oAtx/Ei7THoVGQyy/oeg78K2xoTy2QULsB/75QIvjo pZhJ1ePF2uCIGzvjZk8CDLVX7ivXA8xu7irC7+k9zOlDdmN57LqNU+jOVz3aSHR8ZRwu Bh8YN/tNo5e6PZ304h9REGx5xpYndQUuS3LwqQpS7XEzfHdZXaQKrDM47ZdtC8t+dgI3 R5/Bs5CJGuZqrGGtlY5fnpCjFeDxZYMhGX6ovm4SzXvkfz4n0YBRI10lzUoikX8d8o0h W5ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719411753; x=1720016553; 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=rwpzrw+8a9jskXuzzJFLsA7zHzZayXfGDHG3CFsewrw=; b=rDe0jM3i1/GMmSLmz6fFBwANoMXWYMzKvkEKEl7y7VrB+ai2eMEQAuXiykWMmC5zVk ZFA+ZYNCgjlHfbZAs83px6Jpvx8z1jsteEBhX1G5zlikcwTa6gbHHVLlqhTRAl15/Vh3 FVSfqPtByEQoWPTOWjv+tJ9YrnZo3RnxpIN80KItYpACY0cQIul9/i9WjdXYmCLj0SZD tbj3T6dPt01eFZDbA7dQkgSs1fJ3jIE6PKxjTfkcBVuox4eB+3VmlwXQ/Ac3Wx9EtZJX WxfzYxkLiNg3EgTGjMufukbzlnMjvRTvf4MsMJ4xLDX8qJ6ywtaCb6kofhOLeOyw7FjS HXyg== X-Forwarded-Encrypted: i=1; AJvYcCUOC5+FjUiCItd5kWKnYSPjYX0Ecsav//pRlmxtcq4G4NYOx9i+eaIvAPRJFwewvUHpfkt28rS3v0L8jLsid2QvxSlu89T/izFQNFitIKLI X-Gm-Message-State: AOJu0YwXUzmQORyhYL81tewXtydRKTqOYnTk59EI0vuL4zip7jPMhhxw wu+6UFFQXuCL1bwguwGfhwP05D3QhZb+kdR2xujp/IXd0/7P2fQPR/+UvcTe+Pc= X-Google-Smtp-Source: AGHT+IG/zVNbdytUxpsnA6murZW7/z/3aHbXG+Dmjm/+e+zRYJz7j+BhZMDSlRfAtJ1/OJNNs+ud1Q== X-Received: by 2002:a05:600c:3510:b0:424:76d7:2cca with SMTP id 5b1f17b1804b1-4248b9363d3mr70141385e9.4.1719411753185; Wed, 26 Jun 2024 07:22:33 -0700 (PDT) Received: from toaster.lan ([2a01:e0a:3c5:5fb1:7be7:aef1:af9e:fff6]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-424c823c28asm27141105e9.5.2024.06.26.07.22.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 07:22:32 -0700 (PDT) From: Jerome Brunet To: Neil Armstrong , Jessica Zhang , Sam Ravnborg , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter Cc: Jerome Brunet , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , dri-devel@lists.freedesktop.org, Dmitry Baryshkov Subject: [PATCH v2 3/3] drm/panel: add lincolntech lcd197 support Date: Wed, 26 Jun 2024 16:22:09 +0200 Message-ID: <20240626142212.1341556-4-jbrunet@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240626142212.1341556-1-jbrunet@baylibre.com> References: <20240626142212.1341556-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add support for the Lincoln Technologies LCD197 1080x1920 DSI panel. Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong --- drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-lincolntech-lcd197.c | 262 ++++++++++++++++++ 3 files changed, 274 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-lincolntech-lcd197.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index bf4eadfe21cb..30206be56f68 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -328,6 +328,17 @@ config DRM_PANEL_LEADTEK_LTK500HD1829 24 bit RGB per pixel. It provides a MIPI DSI interface to the host and has a built-in LED backlight. +config DRM_PANEL_LINCOLNTECH_LCD197 + tristate "Lincoln Technologies lcd197 panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for lincolntech lcd197 + TFT-LCD modules. The panel has a 1080x1920 resolution and uses + 24 bit RGB per pixel. It provides a MIPI DSI interface to + the host. + config DRM_PANEL_LG_LB035Q02 tristate "LG LB035Q024573 RGB panel" depends on GPIOLIB && OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 051b75b3df7b..7706ff9087d8 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -33,6 +33,7 @@ obj-$(CONFIG_DRM_PANEL_KHADAS_TS050) += panel-khadas-ts050.o obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04) += panel-kingdisplay-kd097d04.o obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W) += panel-leadtek-ltk050h3146w.o obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) += panel-leadtek-ltk500hd1829.o +obj-$(CONFIG_DRM_PANEL_LINCOLNTECH_LCD197) += panel-lincolntech-lcd197.o obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) += panel-lg-lb035q02.o obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o obj-$(CONFIG_DRM_PANEL_LG_SW43408) += panel-lg-sw43408.o diff --git a/drivers/gpu/drm/panel/panel-lincolntech-lcd197.c b/drivers/gpu/drm/panel/panel-lincolntech-lcd197.c new file mode 100644 index 000000000000..032c542aab0f --- /dev/null +++ b/drivers/gpu/drm/panel/panel-lincolntech-lcd197.c @@ -0,0 +1,262 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2024 BayLibre, SAS + * Author: Jerome Brunet + */ + +#include +#include +#include +#include + +#include