From 2f1a193e2ccb637657c6a59bda7846c704699866 Mon Sep 17 00:00:00 2001 From: Srihitha Tangudu Date: Tue, 14 May 2024 19:39:52 +0530 Subject: [PATCH 1/5] linux-yocto: Add Novatek NT36672E LCD DSI panel Add support for the Novatek NT36672E LCD DSI panel driver. Signed-off-by: Srihitha Tangudu --- ...ings-display-panel-Add-Novatek-NT366.patch | 94 +++ ...el-Add-support-for-Novatek-NT36672E-.patch | 707 ++++++++++++++++++ ...el-novatek-nt36672e-Include-linux-of.patch | 42 ++ recipes-kernel/linux/linux-yocto_6.6.bbappend | 3 + 4 files changed, 846 insertions(+) create mode 100644 recipes-kernel/linux/linux-yocto/qcm6490-drivers/0001-UPSTREAM-dt-bindings-display-panel-Add-Novatek-NT366.patch create mode 100644 recipes-kernel/linux/linux-yocto/qcm6490-drivers/0002-UPSTREAM-drm-panel-Add-support-for-Novatek-NT36672E-.patch create mode 100644 recipes-kernel/linux/linux-yocto/qcm6490-drivers/0003-UPSTREAM-drm-panel-novatek-nt36672e-Include-linux-of.patch diff --git a/recipes-kernel/linux/linux-yocto/qcm6490-drivers/0001-UPSTREAM-dt-bindings-display-panel-Add-Novatek-NT366.patch b/recipes-kernel/linux/linux-yocto/qcm6490-drivers/0001-UPSTREAM-dt-bindings-display-panel-Add-Novatek-NT366.patch new file mode 100644 index 000000000..2fc3f95ea --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/qcm6490-drivers/0001-UPSTREAM-dt-bindings-display-panel-Add-Novatek-NT366.patch @@ -0,0 +1,94 @@ +From ce8e9425b8492ac17b5ea9f849f8b08b5383507f Mon Sep 17 00:00:00 2001 +From: Ritesh Kumar +Date: Mon, 8 Jan 2024 15:29:01 +0530 +Subject: [PATCH 1/3] UPSTREAM: dt-bindings: display: panel: Add Novatek + NT36672E LCD DSI + +Document Novatek NT36672E FHD+ LCD DSI panel. + +Signed-off-by: Ritesh Kumar +Reviewed-by: Krzysztof Kozlowski +Link: https://lore.kernel.org/r/20240108095902.22725-2-quic_riteshk@quicinc.com +Signed-off-by: Neil Armstrong +Link: https://patchwork.freedesktop.org/patch/msgid/20240108095902.22725-2-quic_riteshk@quicinc.com +Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 30cc664f0962ed1e62d9009a34bf04b48e1a5a4a] +--- + .../display/panel/novatek,nt36672e.yaml | 66 +++++++++++++++++++ + 1 file changed, 66 insertions(+) + create mode 100644 Documentation/devicetree/bindings/display/panel/novatek,nt36672e.yaml + +diff --git a/Documentation/devicetree/bindings/display/panel/novatek,nt36672e.yaml b/Documentation/devicetree/bindings/display/panel/novatek,nt36672e.yaml +new file mode 100644 +index 000000000000..dc4672f3d01d +--- /dev/null ++++ b/Documentation/devicetree/bindings/display/panel/novatek,nt36672e.yaml +@@ -0,0 +1,66 @@ ++# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause ++%YAML 1.2 ++--- ++$id: http://devicetree.org/schemas/display/panel/novatek,nt36672e.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# ++ ++title: Novatek NT36672E LCD DSI Panel ++ ++maintainers: ++ - Ritesh Kumar ++ ++allOf: ++ - $ref: panel-common.yaml# ++ ++properties: ++ compatible: ++ const: novatek,nt36672e ++ ++ reg: ++ maxItems: 1 ++ description: DSI virtual channel ++ ++ vddi-supply: true ++ avdd-supply: true ++ avee-supply: true ++ port: true ++ reset-gpios: true ++ backlight: true ++ ++required: ++ - compatible ++ - reg ++ - vddi-supply ++ - avdd-supply ++ - avee-supply ++ - reset-gpios ++ - port ++ ++additionalProperties: false ++ ++examples: ++ - | ++ #include ++ dsi { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ panel@0 { ++ compatible = "novatek,nt36672e"; ++ reg = <0>; ++ ++ reset-gpios = <&tlmm 44 GPIO_ACTIVE_HIGH>; ++ ++ vddi-supply = <&vreg_l8c_1p8>; ++ avdd-supply = <&disp_avdd>; ++ avee-supply = <&disp_avee>; ++ ++ backlight = <&pwm_backlight>; ++ ++ port { ++ panel0_in: endpoint { ++ remote-endpoint = <&dsi0_out>; ++ }; ++ }; ++ }; ++ }; ++... +-- +2.34.1 + diff --git a/recipes-kernel/linux/linux-yocto/qcm6490-drivers/0002-UPSTREAM-drm-panel-Add-support-for-Novatek-NT36672E-.patch b/recipes-kernel/linux/linux-yocto/qcm6490-drivers/0002-UPSTREAM-drm-panel-Add-support-for-Novatek-NT36672E-.patch new file mode 100644 index 000000000..87f3cdb2b --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/qcm6490-drivers/0002-UPSTREAM-drm-panel-Add-support-for-Novatek-NT36672E-.patch @@ -0,0 +1,707 @@ +From 549f07fc13e85ca147bacd3fd12c5d3480db40f3 Mon Sep 17 00:00:00 2001 +From: Ritesh Kumar +Date: Mon, 8 Jan 2024 15:29:02 +0530 +Subject: [PATCH 2/3] UPSTREAM: drm/panel: Add support for Novatek NT36672E + panel driver + +Add support for the 1080x2408 Novatek NT36672E video mode +DSI panel driver. + +Signed-off-by: Ritesh Kumar +Reviewed-by: Jessica Zhang +Link: https://lore.kernel.org/r/20240108095902.22725-3-quic_riteshk@quicinc.com +Signed-off-by: Neil Armstrong +Link: https://patchwork.freedesktop.org/patch/msgid/20240108095902.22725-3-quic_riteshk@quicinc.com +Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ea4f9975625af861c2795c557b8fab2b492ff749] +--- + 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 869e535faefa..ac5405ba41fc 100644 +--- a/drivers/gpu/drm/panel/Kconfig ++++ b/drivers/gpu/drm/panel/Kconfig +@@ -409,6 +409,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 433e93d57949..02270e57b00e 100644 +--- a/drivers/gpu/drm/panel/Makefile ++++ b/drivers/gpu/drm/panel/Makefile +@@ -38,6 +38,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