From patchwork Fri Feb 17 11:29:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13144581 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 55F16C6379F for ; Fri, 17 Feb 2023 11:29:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 924A910EF7D; Fri, 17 Feb 2023 11:29:18 +0000 (UTC) Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7C98010EF6F for ; Fri, 17 Feb 2023 11:29:14 +0000 (UTC) Received: by mail-lj1-x22a.google.com with SMTP id i14so2490659ljn.5 for ; Fri, 17 Feb 2023 03:29:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=7AqLHjqWw3Y0LRj/PHpfrE4GfH6Ukw47h6oB0vSykns=; b=OE1WISk2/iDW9dWFPQHqKj8OWgqPwW8oe8DJRC+7DV9Aabe96DF3OX3l9Gty7sD7g6 fpyzuoBF8WD/telyfqYHaMcJdppawu8RNpCbSrIfTt5L4FPbkC1SV+h0q9qKGe/bIVmV JG/HAVam1GZl7XyQ4avp+XY0bdTzwuwSzsUbZHzpVM4VA10AYhMmxJPGwxfVoWqgSLNf VMHUyrOjV03dWl6gt1o7CbPBObnEYshRbMj3a9OdNTjcSOxeiXRTGwaDKxFxcMaUj1WC KU1Viyesa6zWyMN0IdpIH3tuW4eGPtS9mJz28bPetYURv5wiOZ6SukGUqGsfyVn/9WOm +xLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=7AqLHjqWw3Y0LRj/PHpfrE4GfH6Ukw47h6oB0vSykns=; b=T9VHHBY6KhLVeDGvLr95T/8I3SnsoFhgYoh5W2e2Z1jMSOTA/KI58+I9ZD2U8Kic41 H08hPueAsnex+hEW8j9XfYomaHjREqHefJOyPzTF/RWuc0gv/FwDmm8GodhzbyNBPGhI j0DLI7ioOj9U33fvuSEXPLK9VhPjNHaicwPUZEqgtAFqUfqg05znIRyJB8z3MoeoL7ri xVESGdoZC8aEg8l5HuikSB28TI3IjoVlttKxGfdqkECj4v6byZ2+WikV4Sc8u3zy3rl0 MRjxNNdaaG7nXJqomSZaziGApzuG0DD6MEurj6iVF8VqOHDviqs0x1o5z/E/ykLi3OG0 veFQ== X-Gm-Message-State: AO0yUKVp9590GEm3Hw7ZaLsUEJpUi9jxyGpV2/MBJ/rpSk6vZ2IZfxtx lupyswa5ZdE8d9eREgBDElhLtg== X-Google-Smtp-Source: AK7set9oLBT8FkKW65/OObzRcR3BXcTlHY1k5Jr5wUf4Y94k8+KCmF/iA9lVJzJBg6uPMyNUwBZHhA== X-Received: by 2002:a05:651c:554:b0:290:6533:42d4 with SMTP id q20-20020a05651c055400b00290653342d4mr150517ljp.37.1676633352640; Fri, 17 Feb 2023 03:29:12 -0800 (PST) Received: from [192.168.1.101] (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id t6-20020a2e9546000000b00267232d0652sm564505ljh.46.2023.02.17.03.29.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 03:29:12 -0800 (PST) From: Konrad Dybcio Date: Fri, 17 Feb 2023 12:29:08 +0100 Subject: [PATCH 2/2] gpu/drm/panel: Add Lenovo NT36523W BOE panel MIME-Version: 1.0 Message-Id: <20230217-topic-lenovo-panel-v1-2-9d7ee1602089@linaro.org> References: <20230217-topic-lenovo-panel-v1-0-9d7ee1602089@linaro.org> In-Reply-To: <20230217-topic-lenovo-panel-v1-0-9d7ee1602089@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=1676633349; l=30303; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=2DK7q9EPSJ02gs0gALClr/HUDroTQsAHImFFwsWDmKY=; b=NVORirdoRdok4TjATgslLl3Oou7GCUbA5KgAOWV5T8rTV+MmtnD6qvCYVJmXzZFmuT5jKXXsU4+q mbEEjcRsA46b7NeyFLfefyCbDZT3VVcLmiUdT/PEq+EHEQp24A+M 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). Signed-off-by: Konrad Dybcio Reviewed-by: Neil Armstrong --- drivers/gpu/drm/panel/Kconfig | 12 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-lenovo-nt36523w-boe.c | 751 ++++++++++++++++++++++ 3 files changed, 764 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..83478e471493 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-lenovo-nt36523w-boe.c @@ -0,0 +1,751 @@ +// 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