Re: [PATCH 03/17] i3c: renesas: Restore STDBR and EXTBR registers on resume
Frank Li <[email protected]>
| Newsgroups | org.infradead.lists.linux-i3c,org.kernel.vger.linux-kernel,org.kernel.vger.linux-renesas-soc,org.kernel.vger.stable |
|---|---|
| Message-ID | <ahCqF-OHFbV9b5ul@lizhi-Precision-Tower-5810> |
On Fri, May 22, 2026 at 01:18:01PM +0300, Claudiu Beznea wrote: > From: Claudiu Beznea <[email protected]> > > The Renesas RZ/G3S supports a power saving state where power to the most > SoC componentes (including I3C) is lost. > > The STDBR and EXTBR are configured in initialization phase though the > struct i3c_master_controller_ops::bus_init. Set them on resume function > as well to keep the same state of the controller after a suspend with > power loss and a similar initialization sequence as in bus_init. > > Fixes: e7218986319b ("i3c: renesas: Add suspend/resume support") > Cc: [email protected] > Signed-off-by: Claudiu Beznea <[email protected]> > --- > drivers/i3c/master/renesas-i3c.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/drivers/i3c/master/renesas-i3c.c b/drivers/i3c/master/renesas-i3c.c > index 1917549cf6d5..6c23f956ad2a 100644 > --- a/drivers/i3c/master/renesas-i3c.c > +++ b/drivers/i3c/master/renesas-i3c.c > @@ -260,6 +260,7 @@ struct renesas_i3c { > u32 dyn_addr; > u32 i2c_STDBR; > u32 i3c_STDBR; > + u32 extbr; can you keep consisent with above 2 register, use upcase EXTBR, Frank > unsigned long rate; > u8 addrs[RENESAS_I3C_MAX_DEVS]; > struct renesas_i3c_xferqueue xferqueue; > @@ -607,10 +608,9 @@ static int renesas_i3c_bus_init(struct i3c_master_controller *m) > renesas_writel(i3c->regs, STDBR, i3c->i3c_STDBR); > > /* Extended Bit Rate setting */ > - renesas_writel(i3c->regs, EXTBR, EXTBR_EBRLO(od_low_ticks) | > - EXTBR_EBRHO(od_high_ticks) | > - EXTBR_EBRLP(pp_low_ticks) | > - EXTBR_EBRHP(pp_high_ticks)); > + i3c->extbr = EXTBR_EBRLO(od_low_ticks) | EXTBR_EBRHO(od_high_ticks) | > + EXTBR_EBRLP(pp_low_ticks) | EXTBR_EBRHP(pp_high_ticks); > + renesas_writel(i3c->regs, EXTBR, i3c->extbr); > > renesas_writel(i3c->regs, REFCKCTL, REFCKCTL_IREFCKS(cks)); > i3c->refclk_div = cks; > @@ -1447,6 +1447,8 @@ static int renesas_i3c_resume_noirq(struct device *dev) > goto err_tresetn; > > /* Re-store I3C registers value. */ > + renesas_writel(i3c->regs, STDBR, i3c->i3c_STDBR); > + renesas_writel(i3c->regs, EXTBR, i3c->extbr); > renesas_writel(i3c->regs, REFCKCTL, > REFCKCTL_IREFCKS(i3c->refclk_div)); > renesas_writel(i3c->regs, MSDVAD, MSDVAD_MDYADV | > -- > 2.43.0 > -- linux-i3c mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-i3c