From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
To: cristian_ci@protonmail.com
Cc: Neil Armstrong <neil.armstrong@linaro.org>,
Jessica Zhang <jesszhan0024@gmail.com>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht,
phone-devel@vger.kernel.org
Subject: Re: [PATCH 2/6] drm/panel: Add driver for Novatek NT35532
Date: Sun, 8 Mar 2026 21:27:39 +0200 [thread overview]
Message-ID: <kvq4py5svidg7c4tu2kxwpj6fnsod66kq555pwchd44nfdjejk@yvpk4ismso7r> (raw)
In-Reply-To: <20260308-rimob-new-features-v1-2-aa2c330572c0@protonmail.com>
On Sun, Mar 08, 2026 at 04:52:42PM +0100, Cristian Cozzolino via B4 Relay wrote:
> From: Cristian Cozzolino <cristian_ci@protonmail.com>
>
> Add support for Novatek NT35532-based 1080p video mode DSI panel.
>
> Signed-off-by: Cristian Cozzolino <cristian_ci@protonmail.com>
> ---
> MAINTAINERS | 1 +
> drivers/gpu/drm/panel/Kconfig | 11 +
> drivers/gpu/drm/panel/Makefile | 1 +
> drivers/gpu/drm/panel/panel-novatek-nt35532.c | 767 ++++++++++++++++++++++++++
> 4 files changed, 780 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 12243feb0b27..d854804dc8cc 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -8143,6 +8143,7 @@ DRM DRIVER FOR NOVATEK NT35532 PANELS
> M: Cristian Cozzolino <cristian_ci@protonmail.com>
> S: Maintained
> F: Documentation/devicetree/bindings/display/panel/novatek,nt35532.yaml
> +F: drivers/gpu/drm/panel/panel-novatek-nt35532.c
>
> DRM DRIVER FOR NOVATEK NT35560 PANELS
> M: Linus Walleij <linusw@kernel.org>
> diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
> index 307152ad7759..4eb9691ab552 100644
> --- a/drivers/gpu/drm/panel/Kconfig
> +++ b/drivers/gpu/drm/panel/Kconfig
> @@ -500,6 +500,17 @@ config DRM_PANEL_NOVATEK_NT35510
> around the Novatek NT35510 display controller, such as some
> Hydis panels.
>
> +config DRM_PANEL_NOVATEK_NT35532
> + tristate "Novatek NT35532-based DSI video mode panel"
> + depends on OF
> + depends on DRM_MIPI_DSI
> + depends on BACKLIGHT_CLASS_DEVICE
> + select VIDEOMODE_HELPERS
> + select DRM_KMS_HELPER
> + help
> + Say Y or M here if you want to enable support for Novatek
> + NT35532-based 1080p video mode DSI panels.
> +
> config DRM_PANEL_NOVATEK_NT35560
> tristate "Novatek NT35560 DSI command mode panel"
> depends on OF
> diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
> index aeffaa95666d..f2b3d9b7abee 100644
> --- a/drivers/gpu/drm/panel/Makefile
> +++ b/drivers/gpu/drm/panel/Makefile
> @@ -49,6 +49,7 @@ obj-$(CONFIG_DRM_PANEL_NEC_NL8048HL11) += panel-nec-nl8048hl11.o
> obj-$(CONFIG_DRM_PANEL_NEWVISION_NV3051D) += panel-newvision-nv3051d.o
> obj-$(CONFIG_DRM_PANEL_NEWVISION_NV3052C) += panel-newvision-nv3052c.o
> obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35510) += panel-novatek-nt35510.o
> +obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35532) += panel-novatek-nt35532.o
> 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
> diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35532.c b/drivers/gpu/drm/panel/panel-novatek-nt35532.c
> new file mode 100644
> index 000000000000..51ba548d0a8b
> --- /dev/null
> +++ b/drivers/gpu/drm/panel/panel-novatek-nt35532.c
> @@ -0,0 +1,767 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree.
> + * Copyright (c) 2026 Cristian Cozzolino <cristian_ci@protonmail.com>
> + */
> +
> +#include <linux/delay.h>
> +#include <linux/gpio/consumer.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/module.h>
> +#include <linux/regulator/consumer.h>
> +
> +#include <drm/drm_mipi_dsi.h>
> +#include <drm/drm_modes.h>
> +#include <drm/drm_panel.h>
> +#include <drm/drm_probe_helper.h>
> +
> +struct novatek_nt35532 {
> + struct drm_panel panel;
> + struct mipi_dsi_device *dsi;
> + struct regulator_bulk_data *supplies;
> + struct gpio_desc *reset_gpio;
> +};
> +
> +static const struct regulator_bulk_data nt35532_supplies[] = {
> + { .supply = "vsn" },
> + { .supply = "vsp" },
> +};
> +
> +static inline struct novatek_nt35532 *to_novatek_nt35532(struct drm_panel *panel)
> +{
> + return container_of(panel, struct novatek_nt35532, panel);
> +}
> +
> +static void nt35532_reset(struct novatek_nt35532 *ctx)
> +{
> + gpiod_set_value_cansleep(ctx->reset_gpio, 0);
> + usleep_range(10000, 11000);
> + gpiod_set_value_cansleep(ctx->reset_gpio, 1);
> + usleep_range(5000, 6000);
> + gpiod_set_value_cansleep(ctx->reset_gpio, 0);
> + usleep_range(10000, 11000);
> +}
> +
> +static int nt35532_on(struct novatek_nt35532 *ctx)
> +{
> + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
> +
> + mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xff, 0x01);
> + mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0x6e, 0x80);
> + mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0x68, 0x13);
> + mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xfb, 0x01);
> + mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xff, 0x02);
If this goes to be resent for any reason, could you please insert an
empty line before 0xff, 0xNN wries?
> + mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xfb, 0x01);
[...]
> + mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0x11, 0x00);
I suppose this is MIPI_DCS_EXIT_SLEEP_MODE,
> + mipi_dsi_msleep(&dsi_ctx, 120);
> + mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0x29, 0x00);
MIPI_DCS_SET_DISPLAY_ON
> + mipi_dsi_msleep(&dsi_ctx, 50);
> +
> + return dsi_ctx.accum_err;
> +}
> +
--
With best wishes
Dmitry
next prev parent reply other threads:[~2026-03-08 19:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-08 15:52 [PATCH 0/6] Enable new features for flipkart-rimob Cristian Cozzolino via B4 Relay
2026-03-08 15:52 ` [PATCH 1/6] dt-bindings: display: panel: Add Novatek NT35532 LCD DSI Cristian Cozzolino via B4 Relay
2026-03-08 16:13 ` Krzysztof Kozlowski
2026-03-08 21:46 ` Claude review: " Claude Code Review Bot
2026-03-08 15:52 ` [PATCH 2/6] drm/panel: Add driver for Novatek NT35532 Cristian Cozzolino via B4 Relay
2026-03-08 19:27 ` Dmitry Baryshkov [this message]
2026-03-08 21:46 ` Claude review: " Claude Code Review Bot
2026-03-08 15:52 ` [PATCH 3/6] arm64: dts: qcom: msm8953-flipkart-rimob: Enable display and GPU Cristian Cozzolino via B4 Relay
2026-03-08 15:01 ` Dmitry Baryshkov
2026-03-08 21:46 ` Claude review: " Claude Code Review Bot
2026-03-08 15:52 ` [PATCH 4/6] arm64: dts: qcom: msm8953-flipkart-rimob: Enable WiFi/Bluetooth Cristian Cozzolino via B4 Relay
2026-03-08 15:08 ` Dmitry Baryshkov
2026-03-08 21:46 ` Claude review: " Claude Code Review Bot
2026-03-08 15:52 ` [PATCH 5/6] arm64: dts: qcom: msm8953-flipkart-rimob: Enable touchscreen Cristian Cozzolino via B4 Relay
2026-03-08 21:46 ` Claude review: " Claude Code Review Bot
2026-03-08 15:52 ` [PATCH 6/6] arm64: dts: qcom: msm8953-flipkart-rimob: Enable Hall sensor Cristian Cozzolino via B4 Relay
2026-03-08 15:14 ` Dmitry Baryshkov
2026-03-08 21:46 ` Claude review: " Claude Code Review Bot
2026-03-08 21:46 ` Claude review: Enable new features for flipkart-rimob Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=kvq4py5svidg7c4tu2kxwpj6fnsod66kq555pwchd44nfdjejk@yvpk4ismso7r \
--to=dmitry.baryshkov@oss.qualcomm.com \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=cristian_ci@protonmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=phone-devel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox