From patchwork Sun Apr 16 10:01:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13213374 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 CBC11C77B72 for ; Mon, 17 Apr 2023 07:22:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4D06B10E390; Mon, 17 Apr 2023 07:22:21 +0000 (UTC) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 00D7710E31C for ; Sun, 16 Apr 2023 10:01:46 +0000 (UTC) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-504ecbfddd5so3202596a12.0 for ; Sun, 16 Apr 2023 03:01:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681639305; x=1684231305; 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=ifmHqQmj9ZpKE5qeUf2zOsOombCp0CdZ4s2CBALGYW8=; b=SgHTx1h8KHwCv9z+bn5VGDN8r6XKvNFuH2jqNCFw37FqJUt9kfEMNhpTapioXdMzru XIOjC3hLT7VtaE2umtbsVd1xzM5YNFch+5fjtOq6ehrPujIYDABTHwxBB1c8NO8yhINU qH6nLWdMW4lSzPaQkw88PY5Z3stZk4Pcs99cdQle2hhXw1t21JAGJ94O29fPa6PZsNMT fO2mgHvyJocDORRX01IIxn3JJCn/PM285UtO3IEMy+3pYCFM0rpU8aiwRQUuwRTFJzd9 noSLqZd4n57u395S2rtXQxHnULWcS+ke2Nv/AkPtDmoWcLtx6MKVJODpR764J47r75FL p64Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681639305; x=1684231305; 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=ifmHqQmj9ZpKE5qeUf2zOsOombCp0CdZ4s2CBALGYW8=; b=iRXKtIrg/ybDEDg9UFlsPJ3Ljzw+un2SXivcGucpvepxCWdzFm8/WlU/9yeIjlwVtN jJfV2ClTMXZZ7zR+iqzaPADuHA24sVw+XJipxAPkogZXso91BZZu/G6ddvj3Ls/BYKpg S8BVJdl52b4fXNuLT2cHfO37ldVowi5L0Ih7yXnIPlp6FTtnj/R40B4S1e87sVeXws3M Kq+kfzMQbG8R35yxjumfuzklng97utLThRq/LxxbU8pBAyKXrsrgQ4PbTRj3131IfiZJ XjRdTaycBz3ApJ3OE79kL3l2aoD3FOdh/25cEGrYboiVu/pEmElK5aJnHzY7JO9IPqaL TMgQ== X-Gm-Message-State: AAQBX9d75ojjjBjYous0SoEZbJz95xl09sbpYCwyhJ2wqX28hJCk4IpA 2qVIuwA6FowdQrw9EUi/kHM= X-Google-Smtp-Source: AKy350YvjEqcVlLEalKOluRbrTlxGidK5ID3dL5VEztZsyzq+4AHgYCg68FJCeW/2AnEIa1ucNy0lQ== X-Received: by 2002:a05:6402:216:b0:4fd:23c9:11ed with SMTP id t22-20020a056402021600b004fd23c911edmr9586434edv.17.1681639304618; Sun, 16 Apr 2023 03:01:44 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Apr 2023 03:01:44 -0700 (PDT) From: Artur Weber To: thierry.reding@gmail.com Subject: [PATCH 1/3] dt-bindings: panel: Add Samsung S6D7AA0 LCD controller bindings Date: Sun, 16 Apr 2023 12:01:37 +0200 Message-Id: <20230416100139.13741-2-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 X-Mailman-Approved-At: Mon, 17 Apr 2023 07:21:51 +0000 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, sam@ravnborg.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, robh+dt@kernel.org, ~postmarketos/upstreaming@lists.sr.ht, krzysztof.kozlowski+dt@linaro.org, Artur Weber Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Signed-off-by: Artur Weber --- .../display/panel/samsung,s6d7aa0.yaml | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/samsung,s6d7aa0.yaml diff --git a/Documentation/devicetree/bindings/display/panel/samsung,s6d7aa0.yaml b/Documentation/devicetree/bindings/display/panel/samsung,s6d7aa0.yaml new file mode 100644 index 000000000000..969cef7738b8 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/samsung,s6d7aa0.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/samsung,s6d7aa0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung S6D7AA0 MIPI-DSI LCD panel controller + +maintainers: + - Artur Weber + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: samsung,s6d7aa0-lsl080al02 + + reg: true + reset-gpios: true + backlight: true + + enable-supply: + description: Enable supply + +required: + - compatible + - reset-gpios + - enable-supply + - backlight + +additionalProperties: false + +examples: + - | + #include + + dsi { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "samsung,s6d7aa0-lsl080al02"; + reg = <0>; + enable-supply = <&lcd_enable_supply>; + reset-gpios = <&gpf0 4 GPIO_ACTIVE_LOW>; + backlight = <&backlight>; + }; + }; + +... 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: 13213362 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 2021CC77B70 for ; Mon, 17 Apr 2023 07:21:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2DC4E10E362; Mon, 17 Apr 2023 07:21:52 +0000 (UTC) Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by gabe.freedesktop.org (Postfix) with ESMTPS id BEC5D10E31B for ; Sun, 16 Apr 2023 10:01:46 +0000 (UTC) Received: by mail-ej1-x62c.google.com with SMTP id vc20so1816208ejc.10 for ; Sun, 16 Apr 2023 03:01:46 -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=ZUI5Sy+7gaOVH/PSLMzDq07cBNQBdiKWpGQL9yOiCCQjVWuGM2SfASQSeFWD0/3xfb ElYplav2pcNkyUxDa/Cki15Bs0lN/lrLCNga4Lfit8YwqywASQ9ZAkMxCYeDLkhvYbDu 2G5NX/PgtkrRb03yeF896f1Gv/0WdJmOM87PZPIGiMEk0WljL+eypCIf7h4LfZcmFoqO rKh3MN4JeZBrt5+46oG8SDvEgQdDY16omG/cqoBP9mAB6J3uxcRwVruyGCIsHdHSOLoG 1LvNHsnaZoemObr31sntRggZC4LaNoRQS1nm9jRbTy5PhQQ1LFAcB+nnmNJTjBEbdQjt aDRQ== X-Gm-Message-State: AAQBX9dSFS6pMEzVI/tVmPjcqG+cKsc7rQCj4ENkoS7kawvDk08v0Njx 4byGdH0a9hA48DCsmpGQeac= 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 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 X-Mailman-Approved-At: Mon, 17 Apr 2023 07:21:51 +0000 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, sam@ravnborg.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, robh+dt@kernel.org, ~postmarketos/upstreaming@lists.sr.ht, krzysztof.kozlowski+dt@linaro.org, Artur Weber Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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