From patchwork Mon May 1 18:51:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13227901 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 29488C77B7C for ; Mon, 1 May 2023 18:51:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0173910E26D; Mon, 1 May 2023 18:51:16 +0000 (UTC) Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2899010E0FD for ; Mon, 1 May 2023 18:51:14 +0000 (UTC) Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-50bc1612940so3708355a12.2 for ; Mon, 01 May 2023 11:51:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682967072; x=1685559072; 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=SYiX1kIaDSc0tISjTp3CF+Qs2kF5135CE7l+f2phEaA=; b=aZlEm1MUUd0y46ppigHOw/ChK7rnbaoRpn+nynKdJWDXN75+qRS2iogzUdK6WEsH1s A9MY66RcO3hZxrfBwFiCz0Tf/AhrvCUHT6aAVYw+KYFd+3pCjAYX8evPI07fUX0IiGPg Dgkr25/qIfZumVG5oopGBVfLiPn9G8OyqWYbtgt2WC7BDoRLDmci2SZlrCkWfRVLf0R4 yfi6pO1RQWxgEbBXz/bRreSwRTXMrqP1a425/Mi+wH4LWonfa62NwU+onPosdVBWbwV8 wafMJB7gxfcscYxywKGlRLn4tsg4v3Y663EEqGcdzITIlXj4fSPjCQ/1+wlbmJYB0CpA PgVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682967072; x=1685559072; 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=SYiX1kIaDSc0tISjTp3CF+Qs2kF5135CE7l+f2phEaA=; b=HpJEiSI1uDkyKiEfoH7ZqFNfuUUdWMmqPKIG3Ws0ytALBS9tgnxYHkDsy19e87hku8 zzz+0wi0LI9JFGQQMjHKHu9m8PkM9swhPXmQWvYa3sVYc+u5WrsAr4RitLKjiPJcmM8D ec206WS2Iiie0no8Vr4KviKewguVe4uXzSQNpvNDYLvWyb9M7//URbGWf5rt/ipirhis fXOSN7ZejmSECoKBa4lwWyT+BMscQk5i9urTLxAPhL0EEUB/cmszgtt7aVCgd/RxbFta NjpY+GkchoYnf8dyOCURxWBBO748pNN/r0jtQJi1vYr0xYlcUPzU5uipO6u9YYshx8PP dk2A== X-Gm-Message-State: AC+VfDxpnabjydkqXJYFj69aLWWu3sJcnaAgXeZBUvtKvTiTvxt89Kil W3BZJ4fRhFgJtfpI/owJWrg= X-Google-Smtp-Source: ACHHUZ7JKuFFRMBI7s0DooN1jTc7B1Nlu4lwgQB5ev6TA6Q7ajR1hJkv1WtGCogARxhFZKxjtCWoAg== X-Received: by 2002:a50:ef0e:0:b0:4fe:97a2:4b86 with SMTP id m14-20020a50ef0e000000b004fe97a24b86mr6841785eds.8.1682967072203; Mon, 01 May 2023 11:51:12 -0700 (PDT) Received: from localhost.my.domain (83.8.115.30.ipv4.supernova.orange.pl. [83.8.115.30]) by smtp.gmail.com with ESMTPSA id g10-20020a170906594a00b008cecb8f374asm15028335ejr.0.2023.05.01.11.51.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 May 2023 11:51:11 -0700 (PDT) From: Artur Weber To: Thierry Reding Subject: [PATCH v4 1/3] dt-bindings: display: panel: Add Samsung S6D7AA0 LCD panel controller Date: Mon, 1 May 2023 20:51:01 +0200 Message-Id: <20230501185103.25939-2-aweber.kernel@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230501185103.25939-1-aweber.kernel@gmail.com> References: <20230501185103.25939-1-aweber.kernel@gmail.com> MIME-Version: 1.0 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 , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , ~postmarketos/upstreaming@lists.sr.ht, Krzysztof Kozlowski , 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, and the S6D7AA0-LSL080AL03 and S6D7AA0-LTL101AT01 panels used in the Samsung Galaxy Tab A 8.0 and 9.7 2015. Signed-off-by: Artur Weber --- Changed in v2: - Updated commit message - Applied suggestions from Krzysztof Kozlowski Changed in v3: - Correctly applied suggestions Changed in v4: - Added LSL080AL03, LTL101AT01 compatibles - Added description to reset-gpios - Added vmipi-supply, renamed enable-supply to power-supply --- .../display/panel/samsung,s6d7aa0.yaml | 68 +++++++++++++++++++ 1 file changed, 68 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..918f62a78ecd --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/samsung,s6d7aa0.yaml @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: GPL-2.0 +%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: + enum: + # 1280x800 LSL080AL02 panel + - samsung,s6d7aa0-lsl080al02 + # 1024x768 LSL080AL03 panel + - samsung,s6d7aa0-lsl080al03 + # 1024x768 LTL101AT01 panel + - samsung,s6d7aa0-ltl101at01 + + reg: true + + backlight: + description: | + Backlight to use for the panel. If this property is set on panels + that have DSI-based backlight control (LSL080AL03 and LTL101AT01), + it overrides the DSI-based backlight. + + reset-gpios: + description: Reset GPIO pin, usually GPIO_ACTIVE_LOW. + + power-supply: + description: | + Main power supply for the panel; the exact voltage differs between + panels, and is usually somewhere around 3.3-5v. + + vmipi-supply: + description: VMIPI supply, usually 1.8v. + +required: + - compatible + - reg + - reset-gpios + +additionalProperties: false + +examples: + - | + #include + + dsi { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "samsung,s6d7aa0-lsl080al02"; + reg = <0>; + power-supply = <&display_3v3_supply>; + reset-gpios = <&gpf0 4 GPIO_ACTIVE_LOW>; + backlight = <&backlight>; + }; + }; + +... From patchwork Mon May 1 18:51:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13227902 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 42A13C77B7F for ; Mon, 1 May 2023 18:51:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C13C010E356; Mon, 1 May 2023 18:51:18 +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 B460410E267 for ; Mon, 1 May 2023 18:51:15 +0000 (UTC) Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-94f6c285d92so569165066b.3 for ; Mon, 01 May 2023 11:51:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682967074; x=1685559074; 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=MLmRnoWF7GSL9uIEnEwgKiCLmKJ3pfKNObWjnWGe/8A=; b=pIbdh/qoCWEaYkdF8wlqLF/Kf+r/SoeXVIA26yOmllQEH58I17Cc6TkpijzrWK7/vL wk72zvZtFwVhBXqodmlp5prpu57Np8usE/eii5m1rCKTtKhjMYR9okj1v8Fb4xmg8PWg DienOTHetSO/gZhnwtJfoqVq6tZEkuv+OqJcCVVjS0PvPBGY5q+KNn/WndVaK/9B7gqY fYQ5B7Lr+tbfYfFojcInSnUcvKGE4VDywtZIPjHevIpdbWTM9hQ3QNepJ20witLJT9aB yIY9ceyfI6/95aljLKYeJMAbDvDpsltBHh38pVQP+vVJt2s+lo54LB/bXVR3SRlWxoT8 C6cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682967074; x=1685559074; 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=MLmRnoWF7GSL9uIEnEwgKiCLmKJ3pfKNObWjnWGe/8A=; b=kXAIPElkhLawdJTeTSLGbYWpyJfGsTMxUSLQlqA+HrV/0HtcA6tk21GjBswVM5F+26 rH6Hfm47SONppmgbsg72XVJG7qKAmLZw5Dv8cAjd97//D0mSrw1O6n8r7EiQ7cJZ/VjQ kvMpTS1bP504R1x1Z2ziOP6mX+uzkzdjlSAmqU+Gf0ICTOH6/0tRfz0Uf7Am6fw1oWoM nhsrJrKmVuVpHOv/i4SZ1HmlkqxTfVMUFdchEJqO3O+L/Mg2rLGp1BDYWF+LWdZ+7E39 AB3IrVO1HHQ8CP7Xc8FK9v7FdU2tn4RKgKPepm46Yo550RGe/QlkLAwQXRX9GEzXOvMy Ku3w== X-Gm-Message-State: AC+VfDyKVO4aGxzP6IUl/aJYvQ9qT30JfY+fagIXiHDKYPvZsmNb4MfA tos1zx7M6Mx6++RmofdWG0w= X-Google-Smtp-Source: ACHHUZ7rU3+63xoCrAVtYmeN/ypFOEnC+Gi8uOlDqkOWjPmBLuUgrK23fy5cRnZ+rs7FQ1TKfz5lUg== X-Received: by 2002:a17:907:7207:b0:94f:2efa:a3eb with SMTP id dr7-20020a170907720700b0094f2efaa3ebmr13354509ejc.33.1682967073701; Mon, 01 May 2023 11:51:13 -0700 (PDT) Received: from localhost.my.domain (83.8.115.30.ipv4.supernova.orange.pl. [83.8.115.30]) by smtp.gmail.com with ESMTPSA id g10-20020a170906594a00b008cecb8f374asm15028335ejr.0.2023.05.01.11.51.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 May 2023 11:51:13 -0700 (PDT) From: Artur Weber To: Thierry Reding Subject: [PATCH v4 2/3] drm/panel: Add Samsung S6D7AA0 panel controller driver Date: Mon, 1 May 2023 20:51:02 +0200 Message-Id: <20230501185103.25939-3-aweber.kernel@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230501185103.25939-1-aweber.kernel@gmail.com> References: <20230501185103.25939-1-aweber.kernel@gmail.com> MIME-Version: 1.0 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 , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , ~postmarketos/upstreaming@lists.sr.ht, Krzysztof Kozlowski , Nikita Travkin , Artur Weber Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Initial driver for S6D7AA0-controlled panels. Currently, the following panels are supported: - S6D7AA0-LSL080AL02 (Samsung Galaxy Tab 3 8.0) - S6D7AA0-LSL080AL03 (Samsung Galaxy Tab A 8.0 2015) - S6D7AA0-LTL101AT01 (Samsung Galaxy Tab A 9.7 2015) It should be possible to extend this driver to work with other panels using this IC. Tested-by: Nikita Travkin #ltl101at01 Signed-off-by: Artur Weber --- Changed in v2: - Removed unused panel_name property from desc struct Changed in v4: - Added LSL080AL03 and LTL101AT01 panels - Added DSI-controlled backlight support for panels that support it - Renamed command defines: CMD_* -> MCS_* - Dropped s6d7aa0_bl_ctl_on (not universal across panels) - Dropped MIPI_DSI_MODE_LPM flag - Added vmipi-supply, renamed enable-supply to power-supply --- drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 585 ++++++++++++++++++ 3 files changed, 593 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 2b9d6db7860b..203c0ef0bbfd 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -553,6 +553,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 ff169781e82d..30cf553c8d1d 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -54,6 +54,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..f839ef14790f --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c @@ -0,0 +1,585 @@ +// 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