Re: [PATCH net v2] net: pcs: rzn1-miic: Reset PRCMD state before unprotect sequence
From: Lad, Prabhakar
Date: Thu Sep 17 2026 - 04:56:00 EST
Hi Yoshihisa-san,
Thank you for the patch.
On Thu, Sep 17, 2026 at 3:55 AM Yoshihisa Yamamoto
<yoshihisa.yamamoto.xn@xxxxxxxxxxx> wrote:
>
> On RZ/T2H MIIC, writing 0x0000 to PRCMD resets the command state
> machine to the IDLE state.
>
> Reset PRCMD before issuing the unprotect sequence so that it always
> starts from a known state, regardless of any previous PRCMD activity.
>
Please add the Fixes tag; the rest looks good to me.
Cheers,
Prabhakar
> Signed-off-by: Yoshihisa Yamamoto <yoshihisa.yamamoto.xn@xxxxxxxxxxx>
> ---
>
> v2:
> - Fix indentation
>
> drivers/net/pcs/pcs-rzn1-miic.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/pcs/pcs-rzn1-miic.c b/drivers/net/pcs/pcs-rzn1-miic.c
> index 2b72fa98d..818756bb8 100644
> --- a/drivers/net/pcs/pcs-rzn1-miic.c
> +++ b/drivers/net/pcs/pcs-rzn1-miic.c
> @@ -270,6 +270,9 @@ static struct miic_port *phylink_pcs_to_miic_port(struct phylink_pcs *pcs)
>
> static void miic_unlock_regs(struct miic *miic)
> {
> + /* Reset PRCMD state before unprotect sequence */
> + writel(0x0000, miic->base + MIIC_PRCMD);
> +
> /* Unprotect register writes */
> writel(0x00A5, miic->base + MIIC_PRCMD);
> writel(0x0001, miic->base + MIIC_PRCMD);
> --
> 2.34.1