Thread (3 messages) 3 messages, 3 authors, 2025-11-20

Re: [PATCH] ARM64: dts: mediatek: fix MT7531 reset polarity and reset sequence

From: Andrew Lunn <andrew@lunn.ch>
Date: 2025-11-20 21:09:55
Also in: linux-arm-kernel, linux-mediatek, lkml

On Fri, Nov 21, 2025 at 12:22:24AM +0800, Chen Minqiang wrote:
The MT7531 reset pin is active-low, but multiple MediaTek boards describe
the reset-gpios property without GPIO_ACTIVE_LOW or incorrectly mark it
as active-high. With an active-low GPIO, gpiod_set_value(1) drives the
line low (assert reset) and gpiod_set_value(0) drives it high (deassert).

Update all affected DTS files to explicitly use GPIO_ACTIVE_LOW so that
the reset polarity matches the hardware design.

Additionally, adjust the mt7530 driver reset sequence to correctly assert
reset by driving the GPIO low first, wait for the reset interval, and
then deassert reset by driving the GPIO high.

Boards fixed:
 - mt7622-bananapi-bpi-r64
 - mt7622-rfb1
 - mt7986a-bananapi-bpi-r3
 - mt7986a-rfb
 - mt7986b-rfb

This ensures the MT7531 receives a proper low-to-high active-low reset
pulse and initializes reliably.
Please add a comment to the commit message about backwards/forwards
compatibility, how this is safe when booting an old DT blob on a new
kernel. Or a new DT blob on an old kernel. We don't expect regressions
in such cases, and it is good to indicate in the commit message you
have thought about this and don't expect problems.

    Andrew

---
pw-bot: cr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help