Re: [PATCH v2] media: imx355: reuse existing CCS defines

From: Sakari Ailus

Date: Tue Sep 22 2026 - 04:36:47 EST


Hi Jai,

On Fri, Sep 04, 2026 at 12:33:05PM +0530, Jai Luthra wrote:

> the datasheet's recommendations at more than one occasion.
>
> Do note that IMX708 and I assume this one too is not *actually*
> CCS-compliant, just similar enough. The CCS_R_MIPI_CCS_VERSION register
> reads 0x0. So we should take other limit registers with a grain of salt.

Indeed. As I wrote to David, the limit and capability registers are often
where the errors are and this is one of the primary reasons why we have CCS
static data: it avoids having to put the information to registers, which
cost time and (€ || $ || £ || ¤). (The last one is obviously a squirrel
skin, which was used as a currency in Finland in historic times. It's very
nice we have a character for it in ASCII.)

>
> > >
> > > -#define IMX355_REG_LLP CCI_REG16(0x0342)
> > > #define IMX355_LLP_MAX 0xffff
> > >
> > > -#define IMX355_REG_X_ADD_START CCI_REG16(0x0344)
> > > -#define IMX355_REG_Y_ADD_START CCI_REG16(0x0346)
> > > -#define IMX355_REG_X_ADD_END CCI_REG16(0x0348)
> > > -#define IMX355_REG_Y_ADD_END CCI_REG16(0x034a)
> > > -#define IMX355_REG_X_OUT_SIZE CCI_REG16(0x034c)
> > > -#define IMX355_REG_Y_OUT_SIZE CCI_REG16(0x034e)
> > > -
> >
> > But when a whole block comes out like this - that makes me think perhaps
> > the crop control or fmts might just be a common function ?
> >
>
> Indeed common helpers should be possible for typical ops for crop, formats,
> bit depth etc. I've already started working on something like this for the
> common raw sensor framework, but it should be possible to also handle the
> register writes for a whole "class" of sensors like CCS, Sony-CCS-similar
> (like this one, IMX708, IMX576, IMX519, IMX219?) and Starvis series etc.

The imx519 can be controlled using the CCS driver, probably quite a few
others, too. If you need dynamic control of something that doesn't exist in
CCS (I'm talking about semantics, not register address), then that possibly
requires quirks in CCS driver.

--
Regards,

Sakari Ailus