From patchwork Sun Apr 16 13:07:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13213370 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 D1B17C77B72 for ; Mon, 17 Apr 2023 07:22:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3FCA510E386; Mon, 17 Apr 2023 07:21:58 +0000 (UTC) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by gabe.freedesktop.org (Postfix) with ESMTPS id A539110E0F3 for ; Sun, 16 Apr 2023 13:08:07 +0000 (UTC) Received: by mail-ej1-x634.google.com with SMTP id q23so47899545ejz.3 for ; Sun, 16 Apr 2023 06:08:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681650486; x=1684242486; 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=R/HOJNcL7jdKqwCHI8Ml1ezJfov1pJyurOhORPKyJms=; b=fEX+/66QON1CimKQ44axbXAR1jljjeY8kP4tpF8xW4+ZHCVK/yIstCDRUlL4+/ru2F FsXHUEikFbGCkK4q52xoiMAmEACpD8G0sBwkwm2Vg/N+D7g6VMgKSNGywxpoLdC2ZjDN wx1f3PTDcxRRt9ZpTSr0cjVofbrha6NqnvzQOABCmr5oI6SiTgtBLyrOLuO04lkoDvSI ZJzIbtuEiBStgiWTkUcU+WfORGoyxEsbaRAIzBb895Nen5SN8YHTBXBlUAIcTLgov0ID ao4bQQTLoPifrKgqUlAm4zUXTY5q8Xxw6b+Q9siBvtjkXgio8vRKSAAtr4GILLfvIT/b 11aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681650486; x=1684242486; 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=R/HOJNcL7jdKqwCHI8Ml1ezJfov1pJyurOhORPKyJms=; b=WyuQGhZwptDrRoNtr14Yo7Tmg/+BpUlIjnoXE7WzHoSDRe6E/VBfXWBsq/b+6g2AFn +aWzCIeczNkWASeQt8Idx6I1BQz2PiO+TxiQVq4VgBzJa3j4mxj08/6Rti3+c7B5aa2I wbndH2d3pX/IA2wKw29FSkVdvJITzaOmX8HrGW11FFCMZNUhFOXO6yTTvrJxa19Pzktz GA3+ZIz81JIjwh7yHOdHmUeCuLkW+7/89CM2s2/zxQwPTavuLbskO9jMcl+QZia6a8H4 46Syc5H25AnsPN1ZtOnFaHHFZq6I8WH2/FDxvwVH3Z4uvdqx3RMi/hkGVkFSIhLOguI5 dqeg== X-Gm-Message-State: AAQBX9dYCl5ot6jdi31kVXOQ5JBicSKEZCSjEc481Ge9PgGnauHEHQgs mbWHQC14ShrwyNP1WEIF+Hk= X-Google-Smtp-Source: AKy350YWln8BLpm78SWWGr3v55H/L+uHy3iZw/ZKD7WsYnM01aPKEm4birBmq2/3rBDGsvsgoohbDw== X-Received: by 2002:a17:906:6c9:b0:94a:959f:6d58 with SMTP id v9-20020a17090606c900b0094a959f6d58mr5045680ejb.18.1681650485785; Sun, 16 Apr 2023 06:08:05 -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 l12-20020a056402344c00b00504803f4071sm4511609edc.44.2023.04.16.06.08.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Apr 2023 06:08:05 -0700 (PDT) From: Artur Weber To: thierry.reding@gmail.com Subject: [PATCH v2 1/3] dt-bindings: display: panel: Add Samsung S6D7AA0 LCD panel controller Date: Sun, 16 Apr 2023 15:07:33 +0200 Message-Id: <20230416130735.30965-2-aweber.kernel@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230416130735.30965-1-aweber.kernel@gmail.com> References: <20230416130735.30965-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" Add bindings for the S6D7AA0 LCD panel controller, including the S6D7AA0-LSL080AL02 panel used in the Samsung Galaxy Tab 3 8.0 family of tablets. Signed-off-by: Artur Weber --- Changed in v2: - Updated commit message - Applied suggestions from Krzysztof Kozlowski --- .../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 13:07:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13213379 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 5E9AAC77B72 for ; Mon, 17 Apr 2023 07:22:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F2DD10E3A5; Mon, 17 Apr 2023 07:22:29 +0000 (UTC) Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by gabe.freedesktop.org (Postfix) with ESMTPS id C547B10E0F3 for ; Sun, 16 Apr 2023 13:08:09 +0000 (UTC) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-50489b16e6aso5147986a12.1 for ; Sun, 16 Apr 2023 06:08:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681650487; x=1684242487; 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=2Q6rE3PfNCPLK1OsLiKp0cQzaJ0RGZfM7mv5Hv8SmKU=; b=qRScXy3+l6mNv1a0eWf51uT0f4PFSiAR0Mr5foPYyqymbGMoP7O49rNpeA40JIilb9 z4kzAmWMWDLgmbevBiSgiCNXnegIwFETgumFwnkV/wq+s4AJNiRXJghjX5AT9yVjFM7e aTWbrOB0Ea/L3hpvqZl7kEdNHXHUbAHAMSMgmYIOKdr+XBxzb1A6S2nb1mlraFOvE27j wq7JuaPRlJIayltGeL3bJ0GM5ptYRcib5NOCtcKG9yVjaYD51l7aGx69RRiVeyQ4WIep nahURpgmTPSYp4VEDVraFPECG/1lXNroBplYIEKuekU2MuNJesNs4/8WMxd39Gck2ekG aGcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681650487; x=1684242487; 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=2Q6rE3PfNCPLK1OsLiKp0cQzaJ0RGZfM7mv5Hv8SmKU=; b=WzIhqGf2OS+ZenDrjR58PxY9yCAR/gwEI7jb487FrxTN1u7WPiqCaZRsAD7WpQnCnj LW+71Y/TlU0z8CqmVTQwDkePyt5gAiJpncfOAazDMVX5mmAFJ3O9dFg2jEM68dESM8uy 7xqgx3ed9jBX1nRJE2cve5++UfQ7MpF0BUmsQSfYC27y/woextHav/llaMO47LwXZUOU 9XgwmZJH42Joqii1yrm5qIwPYksr8BZTFe0gblwHcwMAFiYB8TcfSnFlX9gN0O6ANOXU QXAz12xvEC7Ir5KkuFYB1k4vf6DnjHKUDg3GXbKthKB/1Cs/AuRs6QNHgBhvw2jH5y+b Y7QA== X-Gm-Message-State: AAQBX9fdjjHyHDNljsgrSD1c8YWGLBCtUKkiEhBTUheNDeZFExDxDYSp ejnhgj4IA12AH81zYOuv9B4= X-Google-Smtp-Source: AKy350aUs5KTgs4AVJ9UlJYk2WPV6shReIWfUkBbXBrlckO6tzzUNO0PYK2IlpnrCVEeee4m0g/oPQ== X-Received: by 2002:aa7:c488:0:b0:504:9394:188c with SMTP id m8-20020aa7c488000000b005049394188cmr10928235edq.9.1681650487159; Sun, 16 Apr 2023 06:08:07 -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 l12-20020a056402344c00b00504803f4071sm4511609edc.44.2023.04.16.06.08.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Apr 2023 06:08:06 -0700 (PDT) From: Artur Weber To: thierry.reding@gmail.com Subject: [PATCH v2 2/3] drm/panel: Add Samsung S6D7AA0 panel controller driver Date: Sun, 16 Apr 2023 15:07:34 +0200 Message-Id: <20230416130735.30965-3-aweber.kernel@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230416130735.30965-1-aweber.kernel@gmail.com> References: <20230416130735.30965-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 tablets. It should be possible to extend this driver to work with other panels using this IC. Signed-off-by: Artur Weber --- Changed in v2: - Removed unused panel_name property from desc struct --- drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 395 ++++++++++++++++++ 3 files changed, 403 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..408e4082de74 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c @@ -0,0 +1,395 @@ +// 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