From patchwork Sun Apr 16 10:01:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 674075 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F145C77B78 for ; Sun, 16 Apr 2023 10:01:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229763AbjDPKBv (ORCPT ); Sun, 16 Apr 2023 06:01:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230434AbjDPKBu (ORCPT ); Sun, 16 Apr 2023 06:01:50 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDE1F2728; Sun, 16 Apr 2023 03:01:47 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id ud9so56556977ejc.7; Sun, 16 Apr 2023 03:01:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681639306; x=1684231306; 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=TWsqa83sTmx4CK14m2GZ9My+nHPnLnWz7tV6MAjS1rQ=; b=HEGBwcD/DY4WuMbIgznM76MlZX6bJKtomzKSOVQMyZjArmxpvCfdZ3W2SPt4MS6lXK B2sbtLI9cb2RIBNhoyyyUnvHNbYRnTPrTl7v9Eq6G8wii8chwRtxxVPhmfEgkj07DDbE cai9BHlCN/im3nKw80gqpiF+uEIgKPQGOHHa1OQ57/FsEoRSPxSC/k/OYcq46PlpeJGv ZwDjZdB+5NMpoJFsvtRY2bIOuwawXztldXPyTeVJRefLs6fNE7eVMaf1bqfW4eD1FIL0 4KMqEusFYXel9/FwLSNQjgEOAIvciQ0VYBOvxSHNyySGSVBP8qpHggFkca6jT+HAg2sh 9BTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681639306; x=1684231306; 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=TWsqa83sTmx4CK14m2GZ9My+nHPnLnWz7tV6MAjS1rQ=; b=B5xhqAGi5Y8lobCpJDaf9Nt+u78Ex4QQdsT/oheHqiVqBBre8Ml6+a3Nx3SvgFQ2Lr i33MUIpMlJuOJaZ+84luNAPGiLyyEQG36Xjrf1PnDT9XX0kEbBrs3pl4xOC68slzUgGF zaoR1NaHdiGZ2bokHdQD1lGYqPOJ93e5opXUy0GBGCjY1cAo/z4gstnF0I92edUg4y8Y TnxAzA6VttFwUuJ6+fR+/1ZK/U1KfYkhCdIrInE8O1u5f7hCeo/zal/YJ1TDCF5i13kp ATNReUJ6r/0ciJpRDaS5KT8uzs4gV+FbA11w8O4zzf9wg1iuz2fQpurXp35+tBz2ziL4 UnMQ== X-Gm-Message-State: AAQBX9cEKTg+ZvMxn4GsWBmkQLtdnE9BPQkOXxWUmnDJ7tCjSpxEiwke izZ5HE/Ga6OqY1JtdP0mdUg= X-Google-Smtp-Source: AKy350Z9xR+OH+EwYitIiZ5QPN3aLp0yRg16IndswhdmwxHN8vTG9z8/eII9eLYTbKQKic3TdbH//g== X-Received: by 2002:a17:907:204c:b0:94d:57d2:7632 with SMTP id pg12-20020a170907204c00b0094d57d27632mr4206896ejb.31.1681639306162; Sun, 16 Apr 2023 03:01:46 -0700 (PDT) Received: from localhost.my.domain (83.8.121.70.ipv4.supernova.orange.pl. [83.8.121.70]) by smtp.gmail.com with ESMTPSA id lh22-20020a170906f8d600b0094f6bf5ac9asm145232ejb.22.2023.04.16.03.01.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Apr 2023 03:01:45 -0700 (PDT) From: Artur Weber To: thierry.reding@gmail.com Cc: sam@ravnborg.org, airlied@gmail.com, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Artur Weber Subject: [PATCH 2/3] drm/panel: Add Samsung S6D7AA0 panel controller driver Date: Sun, 16 Apr 2023 12:01:38 +0200 Message-Id: <20230416100139.13741-3-aweber.kernel@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230416100139.13741-1-aweber.kernel@gmail.com> References: <20230416100139.13741-1-aweber.kernel@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Initial driver for S6D7AA0-controlled panels, currently only for the LSL080AL02 panel used in the Samsung Galaxy Tab 3 8.0 family of boards. It should be possible to extend this driver to work with other panels using this IC. Signed-off-by: Artur Weber --- drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 397 ++++++++++++++++++ 3 files changed, 405 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 8eeee71c0000..2ce9d1a45625 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -532,6 +532,13 @@ config DRM_PANEL_SAMSUNG_S6D27A1 This panel can be found in Samsung Galaxy Ace 2 GT-I8160 mobile phone. +config DRM_PANEL_SAMSUNG_S6D7AA0 + tristate "Samsung S6D7AA0 MIPI-DSI video mode panel controller" + depends on OF + depends on BACKLIGHT_CLASS_DEVICE + select DRM_MIPI_DSI + select VIDEOMODE_HELPERS + config DRM_PANEL_SAMSUNG_S6E3HA2 tristate "Samsung S6E3HA2 DSI video mode panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index c05aa9e23907..193f3067865d 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -52,6 +52,7 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_DB7430) += panel-samsung-db7430.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D16D0) += panel-samsung-s6d16d0.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D27A1) += panel-samsung-s6d27a1.o +obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D7AA0) += panel-samsung-s6d7aa0.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2) += panel-samsung-s6e3ha2.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03) += panel-samsung-s6e63j0x03.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0) += panel-samsung-s6e63m0.o diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c new file mode 100644 index 000000000000..c5799be6bb2d --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c @@ -0,0 +1,397 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Samsung S6D7AA0 MIPI-DSI TFT LCD controller drm_panel driver. + * + * Copyright (C) 2022 Artur Weber + */ + +#include +#include +#include +#include +#include +#include +#include + +#include