From patchwork Mon Jan 8 09:59:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Kumar X-Patchwork-Id: 185885 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:37c1:b0:101:2151:f287 with SMTP id y1csp923848dyq; Mon, 8 Jan 2024 02:02:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXjtASSWmdsmINhHQU6/slEmi2mtCC63ZAmNeHwlXAbrTxXQdC1+vdln5UM2WgXdZs9sGU X-Received: by 2002:a17:902:9001:b0:1d4:a327:f6af with SMTP id a1-20020a170902900100b001d4a327f6afmr3748762plp.38.1704708135639; Mon, 08 Jan 2024 02:02:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704708135; cv=none; d=google.com; s=arc-20160816; b=ClKz2D388lRqU7StmECnkr8tA1yfrOxOXJ6904tfBmXrBvZi40NZPit/t04ZoWmPxU dz/iRJGu0BEPZKH+5EZUC7QltnszhrPTF2OviKlArF66QBBHPEiev442k6TKpn3cGK1V lhYKrKo2cgQsawX/tB9EpWhsTF77s3hBUdFIiY0ozWCEKQl/lmtZLJAMz8kXQWKIM+dx 7SRBfpj4GmiplWvrmDjJ8cZCqGWk7/YmZvTmYbyTrMz79U4CCIl+283FFxDCGw+C52Ui ZLjhNj12B5xKxRAkxo+fj1mt6/ZN/CrjlwdP43z9mEa27RnO3WhHA3xYbfRCGxKfNuCo h4MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=w04YiilGQqUVPeY5ra7zZJ+kxRM3JHkv0NAgQwVb61c=; fh=nrqIME74Uzfz2gHgNxf/SXFomsrZC2a0ACuSuobK8aQ=; b=ltUHz8a831lZVbQEX2hvkgwI6B1H1dT4s5qI6qlpQtzNiBX5VCfQ+o7PpzXqVMmFhw XZsB0XsN/zlbsbVa4wgLgnf+x0B2naa6V0F+vH5Jn5mzcxs69dz46ol0WsF30IMQrajA jlF+Ev94LHrUNZXaGaARfwua82nYb40xIBsUQSkThHlOOwAYJvlQO/HAD9PF2nTaR/9O noiHbpTB2aMbj+ANamq1HL4zZmAwQlaqS7deroSRxJUbqVdxMm95jwZDJ22Ngerq5Gmy 9JlSK89z/ETmbssCJ/woY22x6S4IL/W9mFj6TJu6npYbsNyujA00bmsIzP+fcBosvsoU Zrsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="RCRv/bZV"; spf=pass (google.com: domain of linux-kernel+bounces-19312-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19312-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d11-20020a170902aa8b00b001d3554bb52bsi5765825plr.519.2024.01.08.02.02.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 02:02:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19312-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="RCRv/bZV"; spf=pass (google.com: domain of linux-kernel+bounces-19312-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19312-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 95FA3B21A74 for ; Mon, 8 Jan 2024 10:01:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 88F9C134AC; Mon, 8 Jan 2024 09:59:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="RCRv/bZV" X-Original-To: linux-kernel@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5999134BF; Mon, 8 Jan 2024 09:59:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4089bEHA005327; Mon, 8 Jan 2024 09:59:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references; s= qcppdkim1; bh=w04YiilGQqUVPeY5ra7zZJ+kxRM3JHkv0NAgQwVb61c=; b=RC Rv/bZVyOgDcP7hn8od760+yY8zcTq34Z8P/JK+GFCSbJNgGDVZZl2lKHoGH4ANV5 NEXYFho04+SL7gvYuiE7e7XakWDKmzssSj6cs3m+EDTuFQRMV22Shx1r/O+GqiXq LHBew8Wncf5KdWXT6ntUe3kksyHidHAHKGYoG0z5o2890S8gPtWzUZ7b0b1hU9F5 Hq9iQ6oiX7zFR0lSH7mj8CSWn+FvlJ6OCZZG3trBq+mAxG//tNjhxc6EIoIo8mAN /rGJMxIWm3Y90WEHAmLxWSMSNNWr74JrUs35miD/zx8X943+S3x6h0+e4Cn9+c6b zkZXlezqtBN4/fm/N7mA== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vgch509ny-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 08 Jan 2024 09:59:16 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 4089xDTT022555; Mon, 8 Jan 2024 09:59:13 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3veyxkkdk4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 08 Jan 2024 09:59:13 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 4089xCVb022538; Mon, 8 Jan 2024 09:59:12 GMT Received: from hu-maiyas-hyd.qualcomm.com (hu-riteshk-hyd.qualcomm.com [10.147.241.247]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 4089xC3D022532; Mon, 08 Jan 2024 09:59:12 +0000 Received: by hu-maiyas-hyd.qualcomm.com (Postfix, from userid 2314801) id 3D3335013A9; Mon, 8 Jan 2024 15:29:11 +0530 (+0530) From: Ritesh Kumar To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ritesh Kumar , neil.armstrong@linaro.org, quic_jesszhan@quicinc.com, sam@ravnborg.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, quic_abhinavk@quicinc.com, quic_rajeevny@quicinc.com, quic_vproddut@quicinc.com, sumit.semwal@linaro.org Subject: [v2 2/2] drm/panel: Add support for Novatek NT36672E panel driver Date: Mon, 8 Jan 2024 15:29:02 +0530 Message-Id: <20240108095902.22725-3-quic_riteshk@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240108095902.22725-1-quic_riteshk@quicinc.com> References: <20240108095902.22725-1-quic_riteshk@quicinc.com> X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: c5fXoH8q7De04iIlobEic-bmagXnpFGS X-Proofpoint-GUID: c5fXoH8q7De04iIlobEic-bmagXnpFGS X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 lowpriorityscore=0 malwarescore=0 mlxscore=0 adultscore=0 impostorscore=0 phishscore=0 suspectscore=0 priorityscore=1501 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401080084 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787516038318550896 X-GMAIL-MSGID: 1787516038318550896 Add support for the 1080x2408 Novatek NT36672E video mode DSI panel driver. Signed-off-by: Ritesh Kumar Reviewed-by: Jessica Zhang --- v2: Fixed review comments from Krzysztof - renamed the panel driver file to reflect that this is a novatek IC. - adjusted internal function names to reflect the same. - corrected compatible string accordingly. - updated CONFIG for the same. --- drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-novatek-nt36672e.c | 643 ++++++++++++++++++ 3 files changed, 654 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt36672e.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 99e14dc212ec..052aaef7d6a2 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -429,6 +429,16 @@ config DRM_PANEL_NOVATEK_NT36672A around the Novatek NT36672A display controller, such as some Tianma panels used in a few Xiaomi Poco F1 mobile phones. +config DRM_PANEL_NOVATEK_NT36672E + tristate "Novatek NT36672E DSI 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 Novatek NT36672E DSI Video Mode + LCD panel module. The panel has a resolution of 1080x2408 and uses 24 bit + RGB per pixel. + config DRM_PANEL_NOVATEK_NT39016 tristate "Novatek NT39016 RGB/SPI panel" depends on OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index d10c3de51c6d..93a544a8937c 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -40,6 +40,7 @@ obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35560) += panel-novatek-nt35560.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35950) += panel-novatek-nt35950.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT36523) += panel-novatek-nt36523.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT36672A) += panel-novatek-nt36672a.o +obj-$(CONFIG_DRM_PANEL_NOVATEK_NT36672E) += panel-novatek-nt36672e.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT39016) += panel-novatek-nt39016.o obj-$(CONFIG_DRM_PANEL_MANTIX_MLAF057WE51) += panel-mantix-mlaf057we51.o obj-$(CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO) += panel-olimex-lcd-olinuxino.o diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672e.c b/drivers/gpu/drm/panel/panel-novatek-nt36672e.c new file mode 100644 index 000000000000..d4e85c2fc899 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-novatek-nt36672e.c @@ -0,0 +1,643 @@ +// SPDX-License-Identifier: GPL-2.0-only +// Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include