Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1529112rdb; Mon, 8 Jan 2024 02:01:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7GN2BnsuGqPPFZpbbC377O8UKVUFq4zGjUzZNfN748g22iWEScFNkcb9ZIIDou44ySOTW X-Received: by 2002:a17:906:1f52:b0:a27:6615:15ef with SMTP id d18-20020a1709061f5200b00a27661515efmr1146394ejk.121.1704708082093; Mon, 08 Jan 2024 02:01:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704708082; cv=none; d=google.com; s=arc-20160816; b=kr1aOc2Zr4u62rorSzRycrO+3hs9bQbDkXKea5XzW6jj7sfKMbyaQvjowWC9+pxeln MY4f+zuryK9BI8ibmOpB5e1W1ZN9LyQjVDPF2Or2PzcZ59T04ymNLt1ExXsC+JdGYMuc jk1deo1mKb2teOKUqz9eX0LpxYWDoigYPc7p06Aij/tNSDGG/mhs1CcNlcT2SOyamDbW avEQ/bxDuxHqmw7KKZ6Ratag0rlV1c+pqn8mKuOyXXg2woA8rSCPnYx3ji5ieBJimZcT joTLtv7KIqp5aTGrooDGaMsbodbkoDbXxDIlzeIeM9wPuxaToLGItYqDL1ZmqCUNnENl NMaw== 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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19312-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r6-20020a1709067fc600b00a27c67ed1a0si2983573ejs.114.2024.01.08.02.01.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 02:01:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19312-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19312-linux.lists.archive=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 1383F1F221E7 for ; Mon, 8 Jan 2024 10:01:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD1D414012; Mon, 8 Jan 2024 09:59:57 +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: Add support for the 1080x2408 Novatek NT36672E video mode DSI panel driver. Signed-off-by: Ritesh Kumar --- 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