From patchwork Sun Apr 16 13:16:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 674054 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 81FF4C77B79 for ; Sun, 16 Apr 2023 13:16:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229476AbjDPNQn (ORCPT ); Sun, 16 Apr 2023 09:16:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229881AbjDPNQm (ORCPT ); Sun, 16 Apr 2023 09:16:42 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C91AA2681; Sun, 16 Apr 2023 06:16:40 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-94ed301bba0so174955566b.0; Sun, 16 Apr 2023 06:16:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681650999; x=1684242999; 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=WfDIW5rjyoFm2k6hd0M174LyRPZ8573uTfgcRgpaEoQ=; b=OfV9N5LHXN6YUT8ieqA//I9kn/scefHuy/SXb2SfukWCz5UQ4YuXYeOx8e+cD8hE6S cgkNXO9bn1tSot+Ybujk8IkZrzGvZDJQNgg2DeOK8p++7pclg6Nhaueb9Hzz/IRk9Vsm rfbMrFCzC9LJu0lHxyvmkeOJdyEb9v8HV7hPHv2oKxowEYztkcVz94BxV9QlkzKJgAaV b50Lt1K6hhRIL6q8CWMo7W4UMdLxfRNJ0zCX2GchpfrwjKzeq67fvVaOsz7krOfC1/KQ VXh3p+zJ7Qt1ip4QA4LjdfrYGx00K5AUM8hlJoRTv/TdS3IgXuOJKygu2BHKJTFDB6y4 XgTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681650999; x=1684242999; 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=WfDIW5rjyoFm2k6hd0M174LyRPZ8573uTfgcRgpaEoQ=; b=RKtzlypdLgcWyr67jq2OtzgMCmaVMOj/QLFem6Qn+Bz2h+iSCxW6GFXxdQHVC+Zb1B s//euPoX7lSEPwFTCuEiPIubS76VZ9UHUuexV85M4hPDGi9o3ulb+vN8ggg00lRaHiFa +rdxnuE3H5/dBFizFxo3GIq4VCxycn4Ee2z3UIAs49eJguDDg1m7P4hNBjXvCURXmT51 TeG7n8dEDsBq4c9oubw+SSS1Gj6hTjz26ieNa118x6HZSU7tphvSVllLT4mhrjtadSaY 3T+Sa//QHkerRNPYQvfJkYspQTd92MgHql5bj7MVkuB8OEw388yVVmqkROGHcHDCqKzN UASQ== X-Gm-Message-State: AAQBX9dbnennFYGOGLplfmJ+uBHyy/nAC1n/6Yeo28xmh6/myRCiF0D/ z8VzZeQg2UNc1CbzpjAUy6Y= X-Google-Smtp-Source: AKy350ZenHNVl/GG+d/h/VzSnnnqzGWK4qxf6AG9RITW6+Se/4FyHYe91VRpPyB6eRmsPraV18WRXA== X-Received: by 2002:aa7:d88e:0:b0:504:b325:bd4d with SMTP id u14-20020aa7d88e000000b00504b325bd4dmr10619788edq.12.1681650999143; Sun, 16 Apr 2023 06:16:39 -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 n9-20020a05640204c900b005068d7ccfb0sm2396594edw.83.2023.04.16.06.16.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Apr 2023 06:16:38 -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 v3 1/3] dt-bindings: display: panel: Add Samsung S6D7AA0 LCD panel controller Date: Sun, 16 Apr 2023 15:16:30 +0200 Message-Id: <20230416131632.31673-2-aweber.kernel@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230416131632.31673-1-aweber.kernel@gmail.com> References: <20230416131632.31673-1-aweber.kernel@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 Changed in v3: - Correctly applied suggestions --- .../display/panel/samsung,s6d7aa0.yaml | 52 +++++++++++++++++++ 1 file changed, 52 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..079e2b3a9eaf --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/samsung,s6d7aa0.yaml @@ -0,0 +1,52 @@ +# 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 + - reg + - reset-gpios + - backlight + - enable-supply + +additionalProperties: false + +examples: + - | + #include + + dsi { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "samsung,s6d7aa0-lsl080al02"; + reg = <0>; + reset-gpios = <&gpf0 4 GPIO_ACTIVE_LOW>; + backlight = <&backlight>; + enable-supply = <&lcd_enable_supply>; + }; + }; + +... From patchwork Sun Apr 16 13:16:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 673674 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 C7576C77B73 for ; Sun, 16 Apr 2023 13:16:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230193AbjDPNQu (ORCPT ); Sun, 16 Apr 2023 09:16:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230062AbjDPNQo (ORCPT ); Sun, 16 Apr 2023 09:16:44 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D131211B; Sun, 16 Apr 2023 06:16:42 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-94f0dd117dcso75283966b.3; Sun, 16 Apr 2023 06:16:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681651001; x=1684243001; 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=F8tEvyzIvpzbjYr6Q1/q7uWYtVNIqmUV/GgLrzZUzklH7tEo0/xsNFQ33Qgb4rInw7 ZjyDGWYXoMa6bFboaR5G2CdLh+fuxs/E7kJSWn06G8ibN8UOaiGZXNvpbDkJz0OTniH7 5hQqoBOwno3DrCRHO0wzy4Lj0eqh1Sl44xAH8Ah4uH+srSmuJWMr+ngs2WyKqWVPNVPE jkt9PsjkgUhmlgHhxYC9PDLNEnydpUDCG3vJXMUlAcyfuL5tsdx+ZaGwu1tplghzeQwc r6SlvZpDiJqr2pNyXTu61VUJ1DZiw6005Rnj6bpiNB3Do5r9fXf/tKI66Ja70JKOOcNG p9Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681651001; x=1684243001; 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=H/YN++u0GPJ6mnQEBi07uwrEqW2Z+vC+R+Zf9uUbMFF6DbYsMHTo/eyykaGetWJ+Hm 7p0VqDsoz+VpO0I6AflgMnf5HOTOkDeht9rKNt3EFXOqw0YC0WIcy64znOizv6yPNY8Y 5JR2Uc5C2uQu2LHaNWMErK8iH5kGezTI/1SxpBvIjSC5FxZGcCd65RRdGqZkL3H+laPR C6H22/bxHDYqLIls+pQemHizddVOLoAStWiS4tqGwx6QHZbvF/GmUxDSbyBuEQ/j2/iB OOa5XSTJt/sVXbNo9mboPGroxaXOdBiznlrhfeOrZYFVPXMnTeA1QUPCTudhti3DlStM nCag== X-Gm-Message-State: AAQBX9cI6T4r1L+AbLP7AHnrdx3E9SjTNFHE8vlmCxGZbz9/uV0VOkrA mnrMfRjSJekDP7yQAxWP01c= X-Google-Smtp-Source: AKy350awq4W4Ph+ZFJtXPJSrRs3pkJU433dsRLlg5bL2fqgFm+g9OAaCXaD3g2M5XG09xP+kBDZsog== X-Received: by 2002:aa7:c907:0:b0:504:78aa:4f2d with SMTP id b7-20020aa7c907000000b0050478aa4f2dmr12890319edt.0.1681651000610; Sun, 16 Apr 2023 06:16:40 -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 n9-20020a05640204c900b005068d7ccfb0sm2396594edw.83.2023.04.16.06.16.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Apr 2023 06:16:40 -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 v3 2/3] drm/panel: Add Samsung S6D7AA0 panel controller driver Date: Sun, 16 Apr 2023 15:16:31 +0200 Message-Id: <20230416131632.31673-3-aweber.kernel@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230416131632.31673-1-aweber.kernel@gmail.com> References: <20230416131632.31673-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 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