[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <893308f9-18c0-4489-81be-e233d50d16da@lunn.ch>
Date: Sun, 30 Nov 2025 02:00:41 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Chen Minqiang <ptpt52@...il.com>
Cc: Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
"Chester A. Unal" <chester.a.unal@...nc9.com>,
Daniel Golle <daniel@...rotopia.org>,
DENG Qingfang <dqfext@...il.com>,
Sean Wang <sean.wang@...iatek.com>, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, netdev@...r.kernel.org
Subject: Re: [PATCH v3 1/2] ARM64: dts: mediatek: fix MT7531 reset GPIO
polarity on multiple boards
On Sun, Nov 30, 2025 at 07:46:02AM +0800, Chen Minqiang wrote:
> The MT7531 reset pin is active-low, but several DTS files configured the
> reset-gpios property without GPIO_ACTIVE_LOW. This causes the reset GPIO
> to behave as active-high and prevents the switch from being properly reset.
>
> Update all affected DTS files to correctly use GPIO_ACTIVE_LOW so that
> the reset polarity matches the hardware design.
>
> Boards fixed:
> - mt7622-bananapi-bpi-r64
> - mt7622-rfb1
> - mt7986a-bananapi-bpi-r3
> - mt7986a-rfb
> - mt7986b-rfb
>
> Note: the previous DTS description used the wrong polarity but the
> driver also assumed the opposite polarity, resulting in a matched pair
> of bugs that worked together. Updating the DTS requires updating the
> driver at the same time; old kernels will not reset the switch correctly
> when used with this DTS.
>
> Compatibility
> -------------
>
> Correcting the polarity creates intentional incompatibility:
>
> * New kernel + old DTS:
> The driver now expects active-low, but out-of-tree DTS still marks
> active-high, causing the reset sequence to invert.
>
> * Old kernel + new DTS:
> The old driver toggles reset assuming active-high, which now
> conflicts with the corrected active-low DTS.
>
> This was unavoidable because the original DTS was factually wrong.
So, the real question is, are the regressions you are going to cause
by breaking backwards compatibility worth it?
What happens if we don't fix this? Does anything break if we leave it
as it is?
I personally think it be better to just document the issue in the
device tree binding.
Andrew
Powered by blists - more mailing lists