All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Adil Hüsrev Tepe" <tadilhusrev@gmail.com>
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v5 2/2] drm/panel: Add Novatek NT36525 panel driver
Date: Sat, 05 Dec 2026 03:33:02 +0000	[thread overview]
Message-ID: <sashiko-outbox-250985@kernel.org> (raw)
In-Reply-To: <20261205-nt36525-v5-2-8c3f07ee3311@gmail.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] drm/panel: nt36525_unprepare() disables vddio before
  asserting reset_gpio
- [Low] drm/panel: nt36525 uses mipi_dsi_msleep(1) instead of
  mipi_dsi_usleep_range()
--

commit d1ea9a8be5efeab14d7d9759b6739e475ac7c1ef
Author: Adil Hüsrev Tepe <tadilhusrev@gmail.com>

drm/panel: Add Novatek NT36525 panel driver

This commit adds a MIPI-DSI panel driver for Novatek NT36525-based
panels, initially supporting the 720x1480 CSOT panel used in the
Samsung Galaxy XCover5 (SM-G525F).

> diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36525.c b/drivers/gpu/drm/panel/panel-novatek-nt36525.c
> new file mode 100644
> index 0000000000000..91ce09cf91dfe
> --- /dev/null
> +++ b/drivers/gpu/drm/panel/panel-novatek-nt36525.c
> @@ -0,0 +1,513 @@

[ ... ]

> +static int samsung_xcover5_csot_init_seq(struct mipi_dsi_multi_context *dsi_ctx)
> +{
> +	mipi_dsi_dcs_write_seq_multi(dsi_ctx, 0xff, 0x20);
> +	mipi_dsi_msleep(dsi_ctx, 1);
> +	mipi_dsi_dcs_write_seq_multi(dsi_ctx, 0xfb, 0x01);

[Severity: Low]
Should the ten 1 ms delays after 0xff page switches in
samsung_xcover5_csot_init_seq() use mipi_dsi_usleep_range() instead of
mipi_dsi_msleep()?

mipi_dsi_msleep() wraps jiffy-based msleep(), sleeping 1-2 jiffies per
call (4-8 ms at HZ=250) and turning 10 ms of delays into 40-80 ms on
every panel power-on and resume.  mipi_dsi_usleep_range(dsi_ctx, 1000,
1500) would avoid the overshoot.

[ ... ]

> +assert_reset:
> +	gpiod_set_value_cansleep(ctx->reset_gpio, 1);
> +	regulator_disable(ctx->vddneg);
> +	usleep_range(1000, 1500);
> +disable_vddpos:
> +	regulator_disable(ctx->vddpos);
> +	usleep_range(5000, 5500);
> +disable_vddio:
> +	regulator_disable(ctx->vddio);
> +	return ret;
> +}
> +
> +static int nt36525_unprepare(struct drm_panel *panel)
> +{
> +	struct nt36525 *ctx = to_nt36525(panel);
> +	struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
> +
> +	mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
> +	mipi_dsi_msleep(&dsi_ctx, 20);
> +	mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
> +	mipi_dsi_msleep(&dsi_ctx, 60);
> +
> +	usleep_range(3000, 3500);
> +	regulator_disable(ctx->vddneg);
> +	usleep_range(1000, 1500);
> +	regulator_disable(ctx->vddpos);
> +	usleep_range(5000, 5500);
> +	regulator_disable(ctx->vddio);
> +	msleep(30);
> +	gpiod_set_value_cansleep(ctx->reset_gpio, 1);
> +
> +	return 0;
> +}

[Severity: Medium]
Does nt36525_unprepare() disable vddio while reset_gpio is still
deasserted?

Because reset_gpio is active low, logical 0 drives the physical reset
pin high.  Disabling vddio 30 ms before asserting reset_gpio leaves the
pin driven high into an unpowered I/O rail, which can back-power vddio
through the ESD clamp and contradicts assert_reset in nt36525_prepare().

Similarly, because nt36525_probe() requests reset_gpio with
GPIOD_OUT_LOW, failing regulator_enable() for vddpos or vddneg jumps to
disable_vddio or disable_vddpos and turns off vddio without asserting
reset_gpio.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261205-nt36525-v5-0-8c3f07ee3311@gmail.com?part=2

      reply	other threads:[~2026-12-05  3:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-05  3:20 [PATCH v5 0/2] drm/panel: Add Novatek NT36525 (Samsung Galaxy XCover5) Adil Hüsrev Tepe
2026-12-05  3:20 ` [PATCH v5 1/2] dt-bindings: display: panel: novatek,nt36672a: Add NT36525 CSOT panel Adil Hüsrev Tepe
2026-12-05  3:32   ` sashiko-bot
2026-12-05  3:20 ` [PATCH v5 2/2] drm/panel: Add Novatek NT36525 panel driver Adil Hüsrev Tepe
2026-12-05  3:33   ` sashiko-bot [this message]

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=sashiko-outbox-250985@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tadilhusrev@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.