From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: khendry@reliablecontrols.com
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Magnus Damm <magnus.damm@gmail.com>,
Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] clk: renesas: r9a06g032: Add reset controller
Date: Wed, 25 Nov 2026 20:04:28 +0100 [thread overview]
Message-ID: <awcxPKer4G5oXQKo@shikoro> (raw)
In-Reply-To: <20261125-rzn1-miic-resets-v3-2-f25a4b656d71@reliablecontrols.com>
[-- Attachment #1: Type: text/plain, Size: 1511 bytes --]
Hi Kyle,
> The rzn1 system controller has two resets that need to be cleared for the
> mii converter to work. They are not directly associated with any clocks
> so they need a reset controller to set them.
>
> They are documented in the PWRCTRL_SWITCHCTRL (0x4000C188) register as:
>
> Bit 3: RSTN_CLK25 - Active low Reset for Timestamp signal selection logic
> Bit 4: RSTN_ETH - Active low Reset for RGMII/RMII Converter (50 MHz).
>
> Add a reset controller and add resets for those bits.
>
> Signed-off-by: Kyle Hendry <khendry@reliablecontrols.com>
Sashiko's comment about selecting RESET_CONTROLLER is still true.
> +static int r9a06g032_reset_set(struct reset_controller_dev *rcdev,
> + bool set, unsigned long id)
> +{
> + struct r9a06g032_priv *priv = priv_from_rcdev(rcdev);
> + unsigned long flags;
> +
> + spin_lock_irqsave(&priv->lock, flags);
> + clk_rdesc_set(priv, r9a06g032_resets[id], set);
> + spin_unlock_irqrestore(&priv->lock, flags);
I checked the docs again. (Do you have them? You can find the relevant
part here[1]). Figure 7.3 and 7.4 mention a reset propagation time of
5us. So, it is not describing a pulse of 5us. But every access to the
RSTN register needs this delay for propagation. So, despite the U-Boot
code not having the delay, I think we should add a 'udelay(5)' here
after the unlock. What do you think?
[1] https://lv.mouser.com/datasheet/2/698/r01uh0750ej0150_rzn1_introduction-2931374.pdf
Happy hacking,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-11-25 19:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 15:53 [PATCH v3 0/3] clk: renesas: r9a06g032: Add reset controller to clear resets for mii converter Kyle Hendry via B4 Relay
2026-11-25 15:53 ` Kyle Hendry
2026-11-25 15:53 ` [PATCH v3 1/3] dt-bindings: clock: r9a06g032-sysctrl: Document reset cells Kyle Hendry via B4 Relay
2026-11-25 15:53 ` Kyle Hendry
2026-11-25 18:59 ` Wolfram Sang
2026-11-25 15:53 ` [PATCH v3 2/3] clk: renesas: r9a06g032: Add reset controller Kyle Hendry via B4 Relay
2026-11-25 15:53 ` Kyle Hendry
2026-11-25 16:16 ` sashiko-bot
2026-11-25 19:04 ` Wolfram Sang [this message]
2026-11-25 19:50 ` Kyle Hendry
2026-11-25 15:53 ` [PATCH v3 3/3] ARM: dts: renesas: r9a06g032: Add #reset-cells to system controller node Kyle Hendry via B4 Relay
2026-11-25 15:53 ` Kyle Hendry
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=awcxPKer4G5oXQKo@shikoro \
--to=wsa+renesas@sang-engineering.com \
--cc=bmasney+clk@redhat.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fabrizio.castro.jz@renesas.com \
--cc=geert+renesas@glider.be \
--cc=jbrunet+clk@baylibre.com \
--cc=khendry@reliablecontrols.com \
--cc=krzk+dt@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
/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.