From patchwork Tue Mar 7 13:26:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13163501 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 81D59C678D4 for ; Tue, 7 Mar 2023 13:26:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 50F2210E49E; Tue, 7 Mar 2023 13:26:37 +0000 (UTC) Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3F0F210E1BB for ; Tue, 7 Mar 2023 13:26:35 +0000 (UTC) Received: by mail-lj1-x232.google.com with SMTP id h3so13095990lja.12 for ; Tue, 07 Mar 2023 05:26:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678195593; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=/83GeW+k79u272pQGTACZ8P8QoN5s3z+qgGSys7KadQ=; b=eLHscYxdeTg0PAfjF3EYyc6US60bNrQVoEaNdN8SHJaMy1dQ0sqIuUtn57/gpd9Huc iQLE9HNHssAD6k/mFF9oyzToCvJomuxsC9vFPhJ1z7vQ369Tc8Pz+nV69MIma51mT1Hm TExMJ8qOU3KDTCEahwWQJrSK4grIYmOAy6Obld5y9SN66pc+IltBVl4ikHUia+HW4z/z bWQb8V50oGLxdbRYOKKoshDFuDg6q0HCYczARapfFurQn9ZbJFXzGKOPc6xJlH2kaJVL u4xlNvW5v2Owuxd/cCrck9s6bqEFOHhkPWxdYKOPV06Wzhp5Yhf/N0lwLqf5XWwGgQux 1mZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678195593; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/83GeW+k79u272pQGTACZ8P8QoN5s3z+qgGSys7KadQ=; b=MXK1lre0JMPRfrbKJLIVAuhJXJrN6JDUPAhAQKcBXQO3RYqcveR0S4qJS/CDJBG3IQ nbpmwyN5kzzdGjwTK9cfItfY4O5RVd7C9JbkInLhEt+U4mCb5BjKyuJhkMX2OHw8bxRo TQpKNVi6t8UKCv5L2NY3IzAP+ga1MRhb+kIHLbV/zUzomoG0fpYNgWp6wGA0wZLhMUNO v676JUCu57mrLg2Ho79UZwIha4ht95hXPgD84CrphETQd1n+4IM2f1NLIYyJBqTXB0ow EzvjqxjGX+4EUQrONhNnJX6elWnlbI6n2avkrIJLFW47ziddzrRT9rkohwVcy3JDYodn J8zQ== X-Gm-Message-State: AO0yUKVD8894666V0RUvTQ37q8D3zxVoJHuK0CcLfurWJSlPH9TBgTOZ fGvt8qyd2ktrL11oPaqwZDnS+A== X-Google-Smtp-Source: AK7set+m4xPGkwvcjxrsa0xqJiCBCyDCtSpTuDesw6kI58ORRZqHfRWaqwjvJMMJC9W1NNYa9+Momg== X-Received: by 2002:a05:651c:112:b0:290:8289:8cba with SMTP id a18-20020a05651c011200b0029082898cbamr4799799ljb.8.1678195593555; Tue, 07 Mar 2023 05:26:33 -0800 (PST) Received: from [192.168.1.101] (abyj16.neoplus.adsl.tpnet.pl. [83.9.29.16]) by smtp.gmail.com with ESMTPSA id m22-20020ac24256000000b004dc53353d15sm2016169lfl.281.2023.03.07.05.26.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 05:26:33 -0800 (PST) From: Konrad Dybcio Date: Tue, 07 Mar 2023 14:26:27 +0100 Subject: [PATCH v2 1/2] dt-bindings: display/panel: Add Lenovo NT36523W BOE panel MIME-Version: 1.0 Message-Id: <20230217-topic-lenovo-panel-v2-1-2e2c64729330@linaro.org> References: <20230217-topic-lenovo-panel-v2-0-2e2c64729330@linaro.org> In-Reply-To: <20230217-topic-lenovo-panel-v2-0-2e2c64729330@linaro.org> To: Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Neil Armstrong X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678195591; l=1971; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=BL6PgSWTw3k5Fir1Htah32UMjqvFC7StjU4GIG0OqbM=; b=rJQlwZtqp7lJNd9CtmzwgYa0SBSj0oonaAuJF9ITro8esekS7gxHnLDRqJ+Ou/NdexWOeXwAppaX q0NtCAiFDrC0eTEGaxL9o8xmirics2OUrimDr8L4geKq2E+krbVl X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= 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: Konrad Dybcio , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add bindings for the 2000x1200px IPS panel found on Lenovo Tab P11/ XiaoXin Pad devices. Reviewed-by: Rob Herring Signed-off-by: Konrad Dybcio --- .../display/panel/lenovo,nt36523w-boe-j606.yaml | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/lenovo,nt36523w-boe-j606.yaml b/Documentation/devicetree/bindings/display/panel/lenovo,nt36523w-boe-j606.yaml new file mode 100644 index 000000000000..43dcbe3f9f30 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/lenovo,nt36523w-boe-j606.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/lenovo,nt36523w-boe-j606.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NT36523W BOE panel found on Lenovo J606 devices + +maintainers: + - Konrad Dybcio + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: lenovo,nt36523w-boe-j606 + + reg: + maxItems: 1 + description: DSI virtual channel + + vddio-supply: true + reset-gpios: true + rotation: true + port: true + +additionalProperties: false + +required: + - compatible + - reg + - vddio-supply + - reset-gpios + - port + +examples: + - | + #include + dsi { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "lenovo,nt36523w-boe-j606"; + reg = <0>; + + reset-gpios = <&tlmm 82 GPIO_ACTIVE_LOW>; + vddio-supply = <&pm6125_l9>; + + rotation = <180>; + + port { + panel0_in: endpoint { + remote-endpoint = <&mdss_dsi0_out>; + }; + }; + }; + }; +... From patchwork Tue Mar 7 13:26:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13163502 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 350E1C678D4 for ; Tue, 7 Mar 2023 13:26:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9327D10E352; Tue, 7 Mar 2023 13:26:38 +0000 (UTC) Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id A834D10E352 for ; Tue, 7 Mar 2023 13:26:36 +0000 (UTC) Received: by mail-lf1-x133.google.com with SMTP id s20so17018366lfb.11 for ; Tue, 07 Mar 2023 05:26:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678195595; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Oc/OGbTuRvm/cbXl1m7d9ZEb1GiAqnRZkOz3VUWf7Ws=; b=uI3ERHg1QdV7cy7/fW6V6ndFh6ofXIFJFl8bJHzNd6iOFTqeLvxy6X9nRbYCF99sCw coprf9FpjRBPEzUOcueaInjYgUCCLfvvUTB3JJt0E1yqeAhmgj1AAJdh4MsURHcD2t7Z vxiHqLSpqwEvkJdExvyh15ZWMherFCjJiRH8W/Z/WjihrgPEHMYJ4G2H7l87scztapqi 6y1hCD0+Ya28QI1EtRIKWygVqjYmn/OP7fGrx1RGr+L/EjXG/yrddJp6Po9+yGT9HU2K /PkFzaBn3fubHt+mqb7L5JRm3BB+7rHzFA3QqXsp4jIQJznIMJCwlNLDjmhbCHF9yx4h jx6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678195595; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Oc/OGbTuRvm/cbXl1m7d9ZEb1GiAqnRZkOz3VUWf7Ws=; b=Iuw7WJdyNZCPjyG76Lxzdx7Cfl3mHON/VAYCvnidQyN35C8SOWYUb0mo/cjSlbwfil PT46BqUeIPOTA0OCZmrvXIP5uGlg2OBdpPTDMbGgrka9MB28cj9sCTO9G3GANWC5amrE r1KyQv1fsxwKLGu5JIcWBILC1EGZrtkVa8fczIdQzkXSTuhVLSpZc9oMr38tQCU19sz6 ihxl1bp+LAq2npx/LDbDmW7OK4cSNKfA5G0Ok6Pzo66X2SA6hG+fLJnN0mXWGRFN+4R+ 8MonxT4DMv26XuMdXFy1WP2crdOohm3T6T3zP4DEhPfAtfDmsbiby/gIS7n15N9oei80 iSzQ== X-Gm-Message-State: AO0yUKXA0YedKhk3npUf7V9I/cU/sMYfA6qfYYDL7st3KXw37Aaw2H6M a/2bD9tAnMWGCmuzglFmbsn1+xfbcLHs6l2r248= X-Google-Smtp-Source: AK7set/G0oo+RJdJzn7R+pjVspC5GI1UeIqNUWKKvhd8qJEj9yxYxODaxn6AEF6ZvFDM9PV3lj7R8A== X-Received: by 2002:ac2:4a9c:0:b0:4d7:bda4:e6aa with SMTP id l28-20020ac24a9c000000b004d7bda4e6aamr3812680lfp.24.1678195594907; Tue, 07 Mar 2023 05:26:34 -0800 (PST) Received: from [192.168.1.101] (abyj16.neoplus.adsl.tpnet.pl. [83.9.29.16]) by smtp.gmail.com with ESMTPSA id m22-20020ac24256000000b004dc53353d15sm2016169lfl.281.2023.03.07.05.26.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 05:26:34 -0800 (PST) From: Konrad Dybcio Date: Tue, 07 Mar 2023 14:26:28 +0100 Subject: [PATCH v2 2/2] gpu/drm/panel: Add Lenovo NT36523W BOE panel MIME-Version: 1.0 Message-Id: <20230217-topic-lenovo-panel-v2-2-2e2c64729330@linaro.org> References: <20230217-topic-lenovo-panel-v2-0-2e2c64729330@linaro.org> In-Reply-To: <20230217-topic-lenovo-panel-v2-0-2e2c64729330@linaro.org> To: Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Neil Armstrong X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678195591; l=30284; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=VPcjP4dplgorsRMW6vMmjETtMUNhzIzCi/3s5x8Kt9Q=; b=1tCpxlwllgS5Hrgv57jKrqlQLMcpSswPVwD8ubElnXhN/Hixwm/+H5k42WwmYRWmpXcH+UNkWyOj 66wnGnf5AUGjpw30WrORQ/0NQm2NIhB5UBspNbSPVweQyYAejp39 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= 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: Konrad Dybcio , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Introduce support for the BOE panel with a NT36523W touch/driver IC found on some Lenovo Tab P11 devices. It's a 2000x1200, 24bit RGB MIPI DSI panel with integrated DCS-controlled backlight (that expects big-endian communication). Reviewed-by: Neil Armstrong Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/panel/Kconfig | 12 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-lenovo-nt36523w-boe.c | 747 ++++++++++++++++++++++ 3 files changed, 760 insertions(+) diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 8eeee71c0000..2abc89284a77 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -297,6 +297,18 @@ config DRM_PANEL_LEADTEK_LTK500HD1829 24 bit RGB per pixel. It provides a MIPI DSI interface to the host and has a built-in LED backlight. +config DRM_PANEL_LENOVO_NT36523W_BOE + tristate "Lenovo NT36523W BOE panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for BOE display panel with + NT36523W driver/touch IC, found on some Lenovo Tab P11 devices. The + panel has a 2000x1200 resolution and uses 24 bit RGB per pixel. It + provides a MIPI DSI interface to the host and has a built-in LED + backlight. + config DRM_PANEL_SAMSUNG_LD9040 tristate "Samsung LD9040 RGB/SPI panel" depends on OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index c05aa9e23907..7ed908cc83a6 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -27,6 +27,7 @@ obj-$(CONFIG_DRM_PANEL_KHADAS_TS050) += panel-khadas-ts050.o obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04) += panel-kingdisplay-kd097d04.o obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W) += panel-leadtek-ltk050h3146w.o obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) += panel-leadtek-ltk500hd1829.o +obj-$(CONFIG_DRM_PANEL_LENOVO_NT36523W_BOE) += panel-lenovo-nt36523w-boe.o obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) += panel-lg-lb035q02.o obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o obj-$(CONFIG_DRM_PANEL_NEC_NL8048HL11) += panel-nec-nl8048hl11.o diff --git a/drivers/gpu/drm/panel/panel-lenovo-nt36523w-boe.c b/drivers/gpu/drm/panel/panel-lenovo-nt36523w-boe.c new file mode 100644 index 000000000000..ad16622da732 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-lenovo-nt36523w-boe.c @@ -0,0 +1,747 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2023 Linaro Limited + * + * Generated with linux-mdss-dsi-panel-driver-generator with + * some manual adjustments. + */ +#include +#include +#include +#include +#include +#include + +#include