Re: [PATCH v1 2/2] drm/xe/mcu_i2c: Take over control of the controller enabling

From: Raag Jadav

Date: Tue Jun 23 2026 - 10:59:40 EST


On Tue, Jun 23, 2026 at 01:56:53PM +0300, Andy Shevchenko wrote:
> On Mon, Jun 22, 2026 at 01:47:59PM +0200, Heikki Krogerus wrote:
> > Some platforms make an assumption that the i2c controller's
> > enabled state indicates also the power state of the
> > controller. This can create a problem when the controller is
> > in disabled state, because the hardware may assume
> > incorrectly that it is then also in low-power state.
> >
> > To fix this, the controller is kept enabled by taking over
> > the IC_ENABLE register. The controller has to be disabled
> > when the configuration is updated and when the target
> > address or the slave address are assigned, so disabling it
> > when IC_CON, IC_TAR or IC_SAR registers are programmed, and
> > then re-enabling it again.
>
> ...
>
> > +#define IC_CON 0x00
> > +#define IC_TAR 0x04
> > +#define IC_SAR 0x08
> > +#define IC_ENABLE 0x6c
> > +#define IC_ENABLE_STATUS 0x9c
>
> Heh, I would like to have a shared header with the registers, but dunno
> if the prons will weight out the cons.

Perhaps something like i2c-algo-pca.h?

Raag