From patchwork Fri May 19 17:03:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13248586 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 3E2F5C7EE29 for ; Fri, 19 May 2023 17:04:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3182710E5AD; Fri, 19 May 2023 17:04:11 +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 5C69010E591 for ; Fri, 19 May 2023 17:04:05 +0000 (UTC) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-510b56724caso2121816a12.1 for ; Fri, 19 May 2023 10:04:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684515843; x=1687107843; 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=tMbfgZNtYeRwD9smgGxKkhNix43UFfi2sTWJFSMwRx0=; b=P4xVhmOOzmp4vBNC/eDpPzNpBkI7hhNpQEDfnWtU7yM3gMpNfpZHU8JcOOzqUyrig1 lb1stbTLqOeeVbFDPQwMfKCKJMSLcUsSWHSGznckf3/eXD2brfFmt2cuFucD0w3kdPHO nF7XQ8MS7ZjZTzpVtG4sNBuzAAlOuHRjeLZDBmn1GBEvtA56Rm2eq6FVP24jn2kFKb4j S4oAuJb24IkACLDtLOw+DGL4afM1QkRctlTt9rlOfcUPxFru6KZouAT+nTNqrHvWspQs sE2FOuoo9AoKorvldkWNE4qIDKopllcrgQQ9a4jd6Wdvoi8ccLV3Ay9edGJhxLCXshCE BcKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684515843; x=1687107843; 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=tMbfgZNtYeRwD9smgGxKkhNix43UFfi2sTWJFSMwRx0=; b=cp8rRpoLmwAttGByo8PUXJeyNplZWo/fLOK+XeevZVb59APt5Ia0Q0Y07nEau5cbdd euAtZXZjOdckQv2UzIrIEwnL4cd8QpGsGRrpK2isfis+sWNTJ8xYyiJPxtmWuSHoraQy uAN3upgUN24C05cvpnd2gNSMBdQrq7SJbIFeeVj8CplgVhzZC/aIlVVFdTZUtvZYTOqu 0If3K4mryslEPF5PKRwoV1lyC7qDreUPT0PrmUvlcdumCcgLRTn4Eb/T0PO1We+McVZr 9m19rk/xmBOOtyfHkSv3tlhu3SCrGkgVgshrGPv8FtUd6Hzad0KG7JGEOKU1gantL5GV qH0w== X-Gm-Message-State: AC+VfDzhPg9Ayuoll0E3e+emWAw/R1e8D63zO0uKMXlj+e5qBOfPLGgS C9pBiPrDxo2JJqzA5zN29nA= X-Google-Smtp-Source: ACHHUZ4kGmVmCGrd+bXfst09wD0FQoK/I6kxSeXm7KDAEPwXQJc939EXnwfTfV8PBLtqAtuhCcQh8A== X-Received: by 2002:a17:907:961c:b0:967:4bc7:38c0 with SMTP id gb28-20020a170907961c00b009674bc738c0mr2641931ejc.9.1684515843333; Fri, 19 May 2023 10:04:03 -0700 (PDT) Received: from localhost.my.domain (83.11.222.198.ipv4.supernova.orange.pl. [83.11.222.198]) by smtp.gmail.com with ESMTPSA id mf13-20020a170906cb8d00b00965ffb8407asm2489988ejb.87.2023.05.19.10.04.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 10:04:02 -0700 (PDT) From: Artur Weber To: thierry.reding@gmail.com Subject: [PATCH v5 1/3] dt-bindings: display: panel: Add Samsung S6D7AA0 LCD panel controller Date: Fri, 19 May 2023 19:03:52 +0200 Message-Id: <20230519170354.29610-2-aweber.kernel@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230519170354.29610-1-aweber.kernel@gmail.com> References: <20230519170354.29610-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, Conor Dooley , Neil Armstrong , 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" 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 Reviewed-by: Conor Dooley --- Changed in v2: - Updated commit message - Added reg to required properties - Reordered required properties Changed in v3: - Fixed patch that didn't apply Changed in v4: - Added LSL080AL03, LTL101AT01 compatibles - Added description to reset-gpios - Added vmipi-supply, renamed enable-supply to power-supply Changed in v5: - Changed compatibles to avoid concatenating multiple model numbers - Removed '|' from multiline descriptions - Fixed license --- .../display/panel/samsung,s6d7aa0.yaml | 70 +++++++++++++++++++ 1 file changed, 70 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..45a236d2cc70 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/samsung,s6d7aa0.yaml @@ -0,0 +1,70 @@ +# 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: + items: + - enum: + # 1280x800 LSL080AL02 panel + - samsung,lsl080al02 + # 1024x768 LSL080AL03 panel + - samsung,lsl080al03 + # 1024x768 LTL101AT01 panel + - samsung,ltl101at01 + - const: samsung,s6d7aa0 + + 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,lsl080al02", "samsung,s6d7aa0"; + reg = <0>; + power-supply = <&display_3v3_supply>; + reset-gpios = <&gpf0 4 GPIO_ACTIVE_LOW>; + backlight = <&backlight>; + }; + }; + +... From patchwork Fri May 19 17:03:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13248587 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 DC852C7EE26 for ; Fri, 19 May 2023 17:04:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CF3FE10E5A6; Fri, 19 May 2023 17:04:15 +0000 (UTC) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by gabe.freedesktop.org (Postfix) with ESMTPS id 334BD10E5AD for ; Fri, 19 May 2023 17:04:07 +0000 (UTC) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-510d8d7f8eeso5736079a12.0 for ; Fri, 19 May 2023 10:04:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684515845; x=1687107845; 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=+mWDhNT3SMFA+v1ZbZMYCZbkIn1/LuleqGRVWsB+Jow=; b=UgXVhO+5yZsmGzn0PFot/4Kn0BNDlg1KOqu2UR5vikznCDWWNxGVcSfLRebtAFH+zl NE4gH6s4NaMH3YCS2tgoUxoP2RbwmAEf6014WOXsrMUkK5yA8IOTgoNIAdzeMjOwbrf7 Ke8qQHwzvuXocaiYdS/CRP4P8kJ2aspVA5qspIlX/dmn2xalNa8xXK9qC8Yl1j4lqTVh 7fQ4RFsO0Ci7hwdE1P7uUN1fhHQ+TS51P8lzqfQtCoFjnmjOT6DthQttFMOL/yimCqjx VsGj9yjWpX6N9HiGRg7GhVygGHhdR2TgSLAII1Mn3fL27wb0EEFnsdthOeJfPV7Bl/Kq 8T5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684515845; x=1687107845; 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=+mWDhNT3SMFA+v1ZbZMYCZbkIn1/LuleqGRVWsB+Jow=; b=L8+C7gY90qrk7uxrgNGu2xSDB5AW6bRzqVeD/2p7dfdiKjVlC8xyXkPuiFAmIiWQVM AVzVrTjYAx9CfV+JpYQ2bKcWPup4JVM9msXU4hfqav8IBZGMGvrO40KWy2t6JJFfKbtW EK7906YkHPcwuWs2KPIA3PUlDMU5XDwDBcaivU1gfCv3czW5+5bFiaCr+HtwyqcHvO47 pFGD4Vv0NtKEu3XsZ8bIEs6yqYa5TbnyJrufwDZPhfmrTxkxjKVF4mr+GKqKM56t5WGQ mg97BBUnQIVl6uxAm+St+ncIAY0t5AiGmrhBPk1DWPSp75dNlm3LzPPNINHlOTaSycTC OOIg== X-Gm-Message-State: AC+VfDxXQGlxpv0SA9ZSM+0eTEK+XHu9yMIgFaoh6A17s5rEYTnAhQGb bUtiuJs/k3XOYCDPTLCQEvs= X-Google-Smtp-Source: ACHHUZ68FfQMml39vnCEAqx6gkR0pWqPv0Aw6UrHhiOl3YAVeJ5P1Bx2u1AKgk1c/hxs3SbehNACGA== X-Received: by 2002:a17:907:928b:b0:969:faf3:7dba with SMTP id bw11-20020a170907928b00b00969faf37dbamr2432478ejc.52.1684515844971; Fri, 19 May 2023 10:04:04 -0700 (PDT) Received: from localhost.my.domain (83.11.222.198.ipv4.supernova.orange.pl. [83.11.222.198]) by smtp.gmail.com with ESMTPSA id mf13-20020a170906cb8d00b00965ffb8407asm2489988ejb.87.2023.05.19.10.04.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 10:04:04 -0700 (PDT) From: Artur Weber To: thierry.reding@gmail.com Subject: [PATCH v5 2/3] drm/panel: Add Samsung S6D7AA0 panel controller driver Date: Fri, 19 May 2023 19:03:53 +0200 Message-Id: <20230519170354.29610-3-aweber.kernel@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230519170354.29610-1-aweber.kernel@gmail.com> References: <20230519170354.29610-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, Conor Dooley , Neil Armstrong , 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 Reviewed-by: Neil Armstrong --- 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 Changed in v5: - Changed compatible to avoid concatenating multiple model numbers --- 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..f532aa018428 --- /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