From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Vladimir Oltean <olteanv@gmail.com>,
Daniel Golle <daniel@makrotopia.org>,
Frank Wunderlich <frankwu@gmx.de>, Andrew Lunn <andrew@lunn.ch>,
Chen Minqiang <ptpt52@gmail.com>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
"Chester A. Unal" <chester.a.unal@arinc9.com>,
DENG Qingfang <dqfext@gmail.com>,
Sean Wang <sean.wang@mediatek.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, netdev@vger.kernel.org
Subject: Re: [PATCH v3 2/2] net: dsa: mt7530: Use GPIO polarity to generate correct reset sequence
Date: Thu, 4 Dec 2025 17:45:30 +0000 [thread overview]
Message-ID: <aTHIulPW055AyLW_@shell.armlinux.org.uk> (raw)
In-Reply-To: <178afbeb-168f-4765-bb0b-fad0bcd29382@kernel.org>
On Thu, Dec 04, 2025 at 06:23:48PM +0100, Krzysztof Kozlowski wrote:
> On 04/12/2025 18:11, Vladimir Oltean wrote:
> > You two are *not* talking about the same thing. I dismissed the
>
> It's the same thing. NOT gate is just pulling some pin down or up.
>
> > probability of there being a NOT gate in the form of a discrete chip on
>
> We do not describe NOT gates as discreet chips. I don't think anyone
> actually places something as NOT gate. It's logical NOT gate, but on
> circuit it is just pull up/down as I said multiple times. The pull +
> resistor is the "NOT gate".
You can get SOT-23 packages that are NOT gates. E.g.
https://www.ti.com/lit/ds/symlink/sn74ahc1g04.pdf?ts=1764851465989
This is a real NOT gate - it's absolute max ratings state that it
can source/sink up to 25mA through its output. So no external
resistor required.
What you describe sounds to me more like a normal transistor though.
Irrespective of this, the exact nature of a device that inverts the
level of a reset signal in the path between a GPIO pin and a device
is irrelevant. What matters is whether there is or is not such a
device.
So, can we stop splitting hairs about what a NOT gate is in this
discussion? It's irrelevant.
> It's so easy and that's why it is potentially so common design.
Do you have any real evidence of this when used with a GPIO pin for
a reset input?
It would make sense if a single GPIO pin is used for resetting
several devices, some of them with an active-high reset input and
others with active-low.
What matters for a GPIO pin used to source a reset signal is "what
is the active level at the GPIO pin for the reset to be asserted to
the connected device(s)."
If we have a device that requires an active-low reset input, but there
is some form of inversion in the path to that input from a GPIO, then
the GPIO _should_ be marked active-high. If the same active-low reset
input is connected directly to a GPIO, the GPIO _should_ be marked as
active-low. Thus, to assert reset, writing '1' through
gpiod_set_value() _should_ assert the reset input on the target device
in both cases.
This is why gpiolib supports software inversion - so software engineers
can think in terms of positive non-inverted logic when programming
GPIOs.
Sadly, we keep having people mark active-low signals as "active high"
in DT, and then have to write '0' to assert the signal. These people
basically don't understand electronics and/or our GPIO model.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2025-12-04 17:46 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-29 23:46 [PATCH v3 1/2] ARM64: dts: mediatek: fix MT7531 reset GPIO polarity on multiple boards Chen Minqiang
2025-11-29 23:46 ` [PATCH v3 2/2] net: dsa: mt7530: Use GPIO polarity to generate correct reset sequence Chen Minqiang
2025-11-30 1:11 ` Andrew Lunn
2025-11-30 8:07 ` Vladimir Oltean
2025-11-30 20:17 ` Andrew Lunn
2025-12-01 7:48 ` Krzysztof Kozlowski
2025-12-02 11:52 ` Frank Wunderlich
2025-12-02 12:20 ` Daniel Golle
2025-12-04 13:16 ` Vladimir Oltean
2025-12-04 13:50 ` Daniel Golle
2025-12-04 15:45 ` Vladimir Oltean
2025-12-04 14:49 ` Krzysztof Kozlowski
2025-12-04 16:02 ` Vladimir Oltean
2025-12-04 16:48 ` Krzysztof Kozlowski
2025-12-04 17:11 ` Vladimir Oltean
2025-12-04 17:23 ` Krzysztof Kozlowski
2025-12-04 17:32 ` Krzysztof Kozlowski
2025-12-04 20:47 ` Russell King (Oracle)
2025-12-04 17:45 ` Russell King (Oracle) [this message]
2025-12-04 18:21 ` Vladimir Oltean
2025-12-04 15:22 ` Andrew Lunn
2025-12-04 15:37 ` Vladimir Oltean
2025-12-04 15:50 ` Andrew Lunn
2025-12-04 15:52 ` Krzysztof Kozlowski
2025-12-04 16:33 ` Vladimir Oltean
2025-11-30 8:22 ` Vladimir Oltean
2025-12-01 7:50 ` Krzysztof Kozlowski
2025-11-30 1:00 ` [PATCH v3 1/2] ARM64: dts: mediatek: fix MT7531 reset GPIO polarity on multiple boards Andrew Lunn
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=aTHIulPW055AyLW_@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chester.a.unal@arinc9.com \
--cc=conor+dt@kernel.org \
--cc=daniel@makrotopia.org \
--cc=dqfext@gmail.com \
--cc=frankwu@gmx.de \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=ptpt52@gmail.com \
--cc=robh@kernel.org \
--cc=sean.wang@mediatek.com \
/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.