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: 65486 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2433278wrd; Tue, 7 Mar 2023 05:38:27 -0800 (PST) X-Google-Smtp-Source: AK7set+40jHk0Qo8Hss8XsKp255xeyA+PFkSg33C/3qnBaVEI+E2baDIa4PapbrYyzA3hQ2rrq2d X-Received: by 2002:a17:906:4c8e:b0:8af:447a:ff8e with SMTP id q14-20020a1709064c8e00b008af447aff8emr12890966eju.20.1678196307798; Tue, 07 Mar 2023 05:38:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678196307; cv=none; d=google.com; s=arc-20160816; b=D4aSSvIBpxAy9e/4gTQ6iKhhZqihR1usJmjzK39Wlgz5La72Ng6GuxD14Zb5IQBgVA P2xtD08m8/kx6HMQ+KB4HAC8Y6Dxk7IYSgBV5EA8aAUek/025uT/fqSEbfcnNsfuuQpg 3S9fCHfxjEwPZfKO0/bEbZi/NUpxe+15EqEJ6ozM30tEt4GVQni0qPwTXSDDXJnj3hu5 Apf23J3FVwd4Sjt0JWjHC7yvD5QdlFwiLfO+8VeGuxXu4PID8XVuUnNmeqEwINUHJGAa C2ODLjDfL+NSl92qsRsw8qPxYmnOZzXQg705Nv5d4jy5K0EZIZcY838bjks8+crLUlUH ULcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=Oc/OGbTuRvm/cbXl1m7d9ZEb1GiAqnRZkOz3VUWf7Ws=; b=d9It9JV6USnmQ+lB53MsyEgNWRRZfAgGO1XD0q4D+kB/oY3I3nNWM6PGNh+I3nAhWZ V0u6Da2q63sBzhQS7p4j0QRb8y38JrYNUfVBXfFr8lZ2+7EbOzMABKLU6Yk4ya8K3vEk iWZ+YWR5KqHqHuBWpzoR6gXv77iez2o2TNb7Yyr2a0G2KxGB1Ue2BCLmq/pTekSfdU3e Am7C2Xc7r2HV0YRCieZ/QjQ3CYOD1dZYiCv2yJKPpId1cGBdNRrNal4qnRvGW8maviCd iOrYwi0MnOl8tGA6bblzqIN/vA536kyydM8H2j/2fbgigGUGqym82wP6y1q6Jg7Q1a0F mJPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uI3ERHg1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i13-20020a17090671cd00b008d41e170aa3si2088003ejk.557.2023.03.07.05.38.03; Tue, 07 Mar 2023 05:38:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uI3ERHg1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230121AbjCGN1E (ORCPT + 99 others); Tue, 7 Mar 2023 08:27:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230062AbjCGN0w (ORCPT ); Tue, 7 Mar 2023 08:26:52 -0500 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C10C7D89 for ; Tue, 7 Mar 2023 05:26:36 -0800 (PST) Received: by mail-lf1-x12c.google.com with SMTP id r27so17023554lfe.10 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=F39roS9ud3EW6opMPtOeeuGm2jFFc9iU0ePBxZ6VPhFcWfAz2n52Ii+nmAv4jb9tBH I4gJ0JZXBQv6q6SbMaFtmXxehiKI5wQmBy28ExoY28odI1Z3B4gyZ+itfoxKfs31JseF 3OckC+HTogo6ABLXsKaBtYG2E60NRoPwj2ZOWQ20ndBNRvG+6SO4+CNVRraaUH6a/Z+6 hOptsWp1HXfwl6wJ4zGzacOjfhG4kXcCkQ0dVJgQkyZkmvGT1wZ+xbmWZnVzuvR6xuvr BcQh5/eIR4o815lJBnUr27Q1xYLYOP1tDkCrWCbLTGiUDHKMxcR0JlCb3fQCTqwGgGzM DM4Q== X-Gm-Message-State: AO0yUKVJA1OU7jglicR1eAlJDwwdE2GchqdpNx7nxt+Qlfe8kiWGhSA/ 9rZ3VPg1BNoYiIN8SmKu2NKF6Q== 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 Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio 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-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_HTTP,RCVD_IN_SORBS_SOCKS,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759716371721756248?= X-GMAIL-MSGID: =?utf-8?q?1759716371721756248?= 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