lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0070f2ca-551d-4c55-9ff7-2ef6d93d4cb9@kernel.org>
Date: Mon, 1 Dec 2025 08:50:15 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Chen Minqiang <ptpt52@...il.com>, 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>, Andrew Lunn <andrew@...n.ch>
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
 linux-mediatek@...ts.infradead.org, netdev@...r.kernel.org
Subject: Re: [PATCH v3 2/2] net: dsa: mt7530: Use GPIO polarity to generate
 correct reset sequence

On 30/11/2025 00:46, Chen Minqiang wrote:
> The MT7530/MT7531 reset pin is active-low in hardware, but the driver
> historically hardcoded a high-active reset sequence by toggling the GPIO
> as 0 → 1. This only worked because several DTS files incorrectly marked
> the reset GPIO as active-high, making both DTS and driver wrong in the
> same way.
> 
> This patch changes the driver to respect the GPIO polarity using
> gpiod_is_active_low(), and generates the reset sequence as:
> 
>     assert   = drive logical active level
>     deassert = drive logical inactive level
> 
> As a result, both cases now correctly produce the required
> high → low → high transition on the actual reset pin.
> 
> Compatibility
> -------------
> 
> This change makes the driver fully backward-compatible with older,
> incorrect DTS files that marked the reset line as GPIO_ACTIVE_HIGH:
> 

You must describe all cases, so old DTS using inverter, thus described
as active-low. This is perfectly possible setup.

>  * Old DTS marked active-high:
>        is_active_low = 0
>        driver drives 0 → 1
>        actual levels: high → low → high  (correct)
> 
>  * New DTS marked active-low:
>        is_active_low = 1
>        driver drives 1 → 0
>        actual levels: high → low → high  (correct)
> 

And new DTS working with inverter, so described with active-high.


Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ