From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: Jonas Rebmann <jre@pengutronix.de>, Andrew Lunn <andrew@lunn.ch>,
imx@lists.linux.dev, linux-kernel@vger.kernel.org,
Eric Dumazet <edumazet@google.com>,
Fabio Estevam <festevam@gmail.com>, Rob Herring <robh@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
devicetree@vger.kernel.org, Conor Dooley <conor+dt@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
linux-sound@vger.kernel.org, Mark Brown <broonie@kernel.org>,
linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
Shengjiu Wang <shengjiu.wang@nxp.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Vladimir Oltean <olteanv@gmail.com>,
Shawn Guo <shawnguo@kernel.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH 1/4] dt-bindings: net: dsa: nxp,sja1105: Add reset-gpios property
Date: Wed, 10 Sep 2025 17:43:28 +0300 [thread overview]
Message-ID: <20250910144328.do6t5ilfeclm2xa4@skbuf> (raw)
In-Reply-To: <20250910143044.jfq5fsv2rlsrr5ku@pengutronix.de>
On Wed, Sep 10, 2025 at 04:30:44PM +0200, Marco Felsch wrote:
> Can you please elaborate a bit more? I was curious and checked the
> AH1704, it says:
>
> "The RST_N signal must be kept low for at least 5 us after all power
> supplies and reference clock signals become stable."
>
> This is very common, so the driver only needs to ensure that the pin was
> pulled low for at least 5us but not exact 5us.
The statement says that during power-up, when the supply voltages and
clocks rise in order to become within spec, the reset signal must be
held low. This requirement lasts for up to 5 us more after the other
signals are in spec.
> > Additionally, routing the reset signal to a host SoC GPIO does not bring
> > any particular benefit, since the switch can be (and is) also reset by
> > the driver over SPI.
>
> I don't know the switch but it's also common that a so called
> software-reset may not reset all registers, state machines, etc.
Neither should you assume that RST_N resets everything. I can't be a lot
more specific, but asserting RST_N at runtime is essentially equivalent
to a cold reset as done over SPI, as done by sja1105pqrs_reset_cmd().
> There it's common practice that the driver tries to pull the hw reset
> line and if not present falls back to a software reset.
>
> > So, at least for this particular switch, having a "reset-gpios" actively
> > points towards a potential violation of its POR timing requirements.
>
> Really? Please see my above comment.
>
> > That is, unless the power rails are also software-controlled. But they
> > aren't.
>
> AH1704 Fig.10 just illustrate a reset and power-on sequence. I highly
> doubt that the host can't pull the hw rest line if the supplies and the
> clock is already running.
I didn't say that it can't pull the reset line if the supplies/clocks
are in spec.
I said that _while the supplies and clocks aren't in spec and 5 us after
they become in spec_, RST_N has to be kept low.
And if you plan to do that from the GPIO function of your SoC, the SoC
might be busy doing other stuff, like booting, and no one might be
driving the RST_N voltage to a defined state.
It really depends on a lot of factors including the reset timing and
supply voltage distribution of the PCB, but RST_N has essentially 2
purposes. One is ensuring proper POR sequencing, the other is cold
resetting at runtime. You can do the latter over SPI with identical
outcome, which leaves proper POR sequencing, which is not best served by
a GPIO in my experience.
> You're right about the fact that the driver is currently not able to do
> a proper power-on sequence, so the kernel relies on the prev. firmware
> or the hw-setup. But this is another problem.
>
> Regards,
> Marco
next prev parent reply other threads:[~2025-09-10 14:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-10 12:35 [PATCH 0/4] Mainline Protonic PRT8ML board Jonas Rebmann
2025-09-10 12:35 ` [PATCH 1/4] dt-bindings: net: dsa: nxp,sja1105: Add reset-gpios property Jonas Rebmann
2025-09-10 12:56 ` Vladimir Oltean
2025-09-10 14:30 ` Marco Felsch
2025-09-10 14:43 ` Vladimir Oltean [this message]
2025-09-10 15:09 ` Mark Brown
2025-09-10 15:34 ` Vladimir Oltean
2025-09-10 15:43 ` Mark Brown
2025-09-10 15:53 ` Marco Felsch
2025-09-10 16:42 ` Vladimir Oltean
2025-09-10 16:55 ` Marco Felsch
2025-09-15 0:08 ` Rob Herring
2025-09-10 12:35 ` [PATCH 2/4] ASoC: dt-bindings: asahi-kasei,ak4458: Reference common DAI properties Jonas Rebmann
2025-09-15 0:11 ` Rob Herring (Arm)
2025-09-10 12:35 ` [PATCH 3/4] dt-bindings: arm: fsl: Add Protonic PRT8ML Jonas Rebmann
2025-09-15 0:12 ` Rob Herring (Arm)
2025-09-10 12:35 ` [PATCH 4/4] arm64: dts: add Protonic PRT8ML board Jonas Rebmann
2025-09-16 21:41 ` (subset) [PATCH 0/4] Mainline " Mark Brown
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=20250910144328.do6t5ilfeclm2xa4@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=andrew@lunn.ch \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=jre@pengutronix.de \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=m.felsch@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=shengjiu.wang@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).