* [PATCH 1/2] drm/bridge: tc358762: fix reset gpio handling
2026-11-24 11:54 [PATCH 0/2] drm/bridge: tc358762: fix reset handling Andreas Kemnade
@ 2026-11-24 11:54 ` Andreas Kemnade
2026-11-24 11:54 ` [PATCH 2/2] ARM: dts: st: stm32mp15xx-dhsom: fix bridge reset polarity Andreas Kemnade
2026-11-24 13:44 ` [PATCH 0/2] drm/bridge: tc358762: fix reset handling Tomi Valkeinen
2 siblings, 0 replies; 5+ messages in thread
From: Andreas Kemnade @ 2026-11-24 11:54 UTC (permalink / raw)
To: Neil Armstrong, Dmitry Baryshkov, Robert Foss, Laurent Pinchart,
Jernej Skrabec, Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Christoph Niedermaier,
Marek Vasut, Maxime Coquelin, Alexandre Torgue, Tomi Valkeinen
Cc: dri-devel, devicetree, kernel, linux-stm32, linux-arm-kernel,
Andreas Kemnade
Reset gpio is asserted when the chip should be active, deasserted when
the chip is enabled. That is the wrong way. Apparently users are working
around this by using GPIO_ACTIVE_HIGH to compensate for that bug but that
is not correcly describing the hardware. Ignore GPIO polarity for now
to ease transition hoping that nobody has an inverter in the signal path.
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
drivers/gpu/drm/bridge/tc358762.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/tc358762.c b/drivers/gpu/drm/bridge/tc358762.c
index 76564d5e4f69f..404420c7b517e 100644
--- a/drivers/gpu/drm/bridge/tc358762.c
+++ b/drivers/gpu/drm/bridge/tc358762.c
@@ -164,7 +164,7 @@ static void tc358762_post_disable(struct drm_bridge *bridge,
ctx->pre_enabled = false;
if (ctx->reset_gpio)
- gpiod_set_value_cansleep(ctx->reset_gpio, 0);
+ gpiod_set_raw_value_cansleep(ctx->reset_gpio, 0);
ret = regulator_disable(ctx->regulator);
if (ret < 0)
@@ -182,7 +182,7 @@ static void tc358762_pre_enable(struct drm_bridge *bridge,
dev_err(ctx->dev, "error enabling regulators (%d)\n", ret);
if (ctx->reset_gpio) {
- gpiod_set_value_cansleep(ctx->reset_gpio, 1);
+ gpiod_set_raw_value_cansleep(ctx->reset_gpio, 1);
usleep_range(5000, 10000);
}
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] ARM: dts: st: stm32mp15xx-dhsom: fix bridge reset polarity
2026-11-24 11:54 [PATCH 0/2] drm/bridge: tc358762: fix reset handling Andreas Kemnade
2026-11-24 11:54 ` [PATCH 1/2] drm/bridge: tc358762: fix reset gpio handling Andreas Kemnade
@ 2026-11-24 11:54 ` Andreas Kemnade
2026-11-24 13:44 ` [PATCH 0/2] drm/bridge: tc358762: fix reset handling Tomi Valkeinen
2 siblings, 0 replies; 5+ messages in thread
From: Andreas Kemnade @ 2026-11-24 11:54 UTC (permalink / raw)
To: Neil Armstrong, Dmitry Baryshkov, Robert Foss, Laurent Pinchart,
Jernej Skrabec, Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Christoph Niedermaier,
Marek Vasut, Maxime Coquelin, Alexandre Torgue, Tomi Valkeinen
Cc: dri-devel, devicetree, kernel, linux-stm32, linux-arm-kernel,
Andreas Kemnade
Reset is active low. It is apparently set to active high to work around
a driver bug but not to indicate an additional inverter in the signal
path. Correcly describe the hardware.
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
arch/arm/boot/dts/st/stm32mp15xx-dhsom-overlay-panel-dsi-rpi7inch.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/st/stm32mp15xx-dhsom-overlay-panel-dsi-rpi7inch.dtsi b/arch/arm/boot/dts/st/stm32mp15xx-dhsom-overlay-panel-dsi-rpi7inch.dtsi
index 518c269a1dba1..6342a6e757c12 100644
--- a/arch/arm/boot/dts/st/stm32mp15xx-dhsom-overlay-panel-dsi-rpi7inch.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp15xx-dhsom-overlay-panel-dsi-rpi7inch.dtsi
@@ -35,7 +35,7 @@ &dsi {
bridge@0 {
compatible = "toshiba,tc358762";
reg = <0>;
- reset-gpios = <&attiny 0 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&attiny 0 GPIO_ACTIVE_LOW>;
vddc-supply = <&attiny>;
status = "okay";
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 0/2] drm/bridge: tc358762: fix reset handling
2026-11-24 11:54 [PATCH 0/2] drm/bridge: tc358762: fix reset handling Andreas Kemnade
2026-11-24 11:54 ` [PATCH 1/2] drm/bridge: tc358762: fix reset gpio handling Andreas Kemnade
2026-11-24 11:54 ` [PATCH 2/2] ARM: dts: st: stm32mp15xx-dhsom: fix bridge reset polarity Andreas Kemnade
@ 2026-11-24 13:44 ` Tomi Valkeinen
2026-11-24 14:23 ` Andreas Kemnade
2 siblings, 1 reply; 5+ messages in thread
From: Tomi Valkeinen @ 2026-11-24 13:44 UTC (permalink / raw)
To: Andreas Kemnade
Cc: dri-devel, devicetree, kernel, linux-stm32, linux-arm-kernel,
Neil Armstrong, Dmitry Baryshkov, Robert Foss, Laurent Pinchart,
Jernej Skrabec, Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Christoph Niedermaier,
Marek Vasut, Maxime Coquelin, Alexandre Torgue
Hi,
On 24/11/2026 13:54, Andreas Kemnade wrote:
> The bridge driver desserts reset after disable and asserts that
> upon enbale. That requires users to workaround that by declaring
> the reset gpio wrongfully active high. As an interim solution,
> ignore polarity, until things have settled to fix it afterwards.
> That will break setups with an additional inverter in the signal
> patch but those should be uncommon, at least not seen in in-tree
> devicetrees. Fix polarity in the one device tree actually declaring
> a reset line. That patch has to go in after the bridge fix.
>
> The issue came to sight during experiments with reset lines on the
> Epson Moverio BT-200.
Indeed, the driver has it the wrong way... But what is the way to fix
this? Fixing it will always break the backward compatibility with dtbs.
Is it worth it? Or is it easier to just adjust the bindings doc to
mention about it, and add a note to the driver that the gpio is set the
wrong way "on purpose".
Or, if this is to be merged, I think the code around the
gpiod_set_raw_value_cansleep calls should have a comment to highlight
why it's calling raw funcs and what the plan is.
Tomi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] drm/bridge: tc358762: fix reset handling
2026-11-24 13:44 ` [PATCH 0/2] drm/bridge: tc358762: fix reset handling Tomi Valkeinen
@ 2026-11-24 14:23 ` Andreas Kemnade
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Kemnade @ 2026-11-24 14:23 UTC (permalink / raw)
To: Tomi Valkeinen
Cc: dri-devel, devicetree, kernel, linux-stm32, linux-arm-kernel,
Neil Armstrong, Dmitry Baryshkov, Robert Foss, Laurent Pinchart,
Jernej Skrabec, Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Christoph Niedermaier,
Marek Vasut, Maxime Coquelin, Alexandre Torgue
On Tue, 24 Nov 2026 15:44:40 +0200
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> wrote:
> Hi,
>
> On 24/11/2026 13:54, Andreas Kemnade wrote:
> > The bridge driver desserts reset after disable and asserts that
> > upon enbale. That requires users to workaround that by declaring
> > the reset gpio wrongfully active high. As an interim solution,
> > ignore polarity, until things have settled to fix it afterwards.
> > That will break setups with an additional inverter in the signal
> > patch but those should be uncommon, at least not seen in in-tree
> > devicetrees. Fix polarity in the one device tree actually declaring
> > a reset line. That patch has to go in after the bridge fix.
> >
> > The issue came to sight during experiments with reset lines on the
> > Epson Moverio BT-200.
> Indeed, the driver has it the wrong way... But what is the way to fix
> this? Fixing it will always break the backward compatibility with dtbs.
>
> Is it worth it? Or is it easier to just adjust the bindings doc to
> mention about it, and add a note to the driver that the gpio is set the
> wrong way "on purpose".
>
I am a bit wondering whether to use the reset-gpio driver as aux device,
and then we would need correct dts. There are two chips sharing a single
reset line, so I have to deal with shared gpios. It seems not to work
that well directly. But first I try to have things working with well-defined
boot state.
That reset-gpio stuff was invented exactly for that case, see commit
cee544a40e4426040946e685988b1489f13e6600.
> Or, if this is to be merged, I think the code around the
> gpiod_set_raw_value_cansleep calls should have a comment to highlight
> why it's calling raw funcs and what the plan is.
>
Yes, the comment should be there.
Sashiko suggested to add an entry to
of_gpio_try_fixup_polarity()
to have fixups.
Regards,
Andreas
^ permalink raw reply [flat|nested] 5+ messages in thread