From: Vladimir Zapolskiy <vz@kernel.org>
To: Neil Armstrong <neil.armstrong@linaro.org>,
Jessica Zhang <jesszhan0024@gmail.com>,
Ritesh Kumar <quic_riteshk@quicinc.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org,
Conor Dooley <conor+dt@kernel.org>,
devicetree@vger.kernel.org, Abel Vesa <abelvesa@kernel.org>,
linux-arm-msm@vger.kernel.org
Subject: [PATCH v2 05/10] drm/panel: novatek-nt36672e: Support the bias enable GPIO
Date: Thu, 26 Nov 2026 15:45:03 +0200 [thread overview]
Message-ID: <20261126134508.320700-6-vz@kernel.org> (raw)
In-Reply-To: <20261126134508.320700-1-vz@kernel.org>
Some NT36672E panel modules generate their positive and negative bias
supplies on the module, and expose only a bias enable signal instead of
the AVDD and AVEE supply inputs, add support of such bias enable GPIO.
Signed-off-by: Vladimir Zapolskiy <vz@kernel.org>
---
drivers/gpu/drm/panel/panel-novatek-nt36672e.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672e.c b/drivers/gpu/drm/panel/panel-novatek-nt36672e.c
index de070637c208..4836751b7d5d 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt36672e.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt36672e.c
@@ -37,6 +37,7 @@ struct nt36672e_panel {
struct drm_panel panel;
struct mipi_dsi_device *dsi;
struct gpio_desc *reset_gpio;
+ struct gpio_desc *enable_gpio;
struct regulator_bulk_data *supplies;
struct regulator_bulk_data *bias_supplies;
const struct panel_desc *desc;
@@ -377,6 +378,8 @@ static int nt36672e_power_on(struct nt36672e_panel *ctx)
}
}
+ gpiod_set_value_cansleep(ctx->enable_gpio, 1);
+
/*
* Reset sequence of nt36672e panel requires the panel to be out of reset
* for 10ms, followed by being held in reset for 10ms and then out again.
@@ -397,6 +400,7 @@ static int nt36672e_power_off(struct nt36672e_panel *ctx)
int ret = 0;
gpiod_set_value(ctx->reset_gpio, 1);
+ gpiod_set_value_cansleep(ctx->enable_gpio, 0);
if (ctx->bias_supplies) {
ret = regulator_bulk_disable(ARRAY_SIZE(nt36672e_bias_supplies),
@@ -577,6 +581,16 @@ static int nt36672e_panel_probe(struct mipi_dsi_device *dsi)
if (IS_ERR(ctx->reset_gpio))
return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio), "Failed to get reset-gpios\n");
+ ctx->enable_gpio = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_LOW);
+ if (IS_ERR(ctx->enable_gpio))
+ return dev_err_probe(dev, PTR_ERR(ctx->enable_gpio),
+ "Failed to get enable-gpios\n");
+
+ /* The bias is either supplied to or generated on the panel module */
+ if (ctx->enable_gpio && ctx->bias_supplies)
+ return dev_err_probe(dev, -EINVAL,
+ "enable-gpios and bias supplies are mutually exclusive\n");
+
ctx->dsi = dsi;
mipi_dsi_set_drvdata(dsi, ctx);
--
2.51.0
next prev parent reply other threads:[~2026-11-26 13:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 13:44 [PATCH v2 00/10] drm/panel: novatek-nt36672e: Add SM8450 HDK display card Vladimir Zapolskiy
2026-11-26 13:44 ` [PATCH v2 01/10] dt-bindings: display: panel: novatek,nt36672e: Describe the reset GPIO as active low Vladimir Zapolskiy
2026-11-26 13:44 ` [PATCH v2 01/10] dt-bindings: display: panel: novatek, nt36672e: " Vladimir Zapolskiy
2026-11-26 13:45 ` [PATCH v2 02/10] dt-bindings: display: panel: novatek,nt36672e: Add bias enable GPIO Vladimir Zapolskiy
2026-11-26 13:45 ` [PATCH v2 02/10] dt-bindings: display: panel: novatek, nt36672e: " Vladimir Zapolskiy
2026-11-26 13:45 ` [PATCH v2 03/10] drm/panel: novatek-nt36672e: Fix the reset GPIO polarity Vladimir Zapolskiy
2026-11-26 13:52 ` sashiko-bot
2026-11-26 14:36 ` Vladimir Zapolskiy
2026-11-26 13:45 ` [PATCH v2 04/10] drm/panel: novatek-nt36672e: Make the AVDD and AVEE supplies optional Vladimir Zapolskiy
2026-11-26 13:45 ` Vladimir Zapolskiy [this message]
2026-11-26 13:45 ` [PATCH v2 06/10] drm/panel: novatek-nt36672e: Verify the number of D-PHY data lanes Vladimir Zapolskiy
2026-11-26 13:45 ` [PATCH v2 07/10] drm/panel: novatek-nt36672e: Add support of the C-PHY panel module Vladimir Zapolskiy
2026-11-26 13:45 ` [PATCH v2 08/10] arm64: dts: qcom: sm8450-hdk: Add display card overlay Vladimir Zapolskiy
2026-11-26 13:59 ` sashiko-bot
2026-11-26 13:45 ` [PATCH v2 09/10] arm64: dts: qcom: qcm6490-idp: Fix the panel reset GPIO polarity Vladimir Zapolskiy
2026-11-26 14:13 ` Konrad Dybcio
2026-11-26 13:45 ` [PATCH v2 10/10] arm64: dts: qcom: qcm6490-idp: Describe the panel bias enable GPIO Vladimir Zapolskiy
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=20261126134508.320700-6-vz@kernel.org \
--to=vz@kernel.org \
--cc=abelvesa@kernel.org \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--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=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_riteshk@quicinc.com \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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.