Re: [PATCH v3 2/3] clk: renesas: r9a06g032: Add reset controller

From: Wolfram Sang

Date: Wed Nov 25 2026 - 14:04:37 EST


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@xxxxxxxxxxxxxxxxxxxx>

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: signature.asc
Description: PGP signature