Re: [PATCH v4 02/15] media: ov8858: support 19.2 MHz clock and CHT gain setup

From: Andy Shevchenko

Date: Mon Aug 31 2026 - 05:39:41 EST


On Fri, Aug 28, 2026 at 06:14:44PM +0200, Maurizio Casciano wrote:
> The Yoga Book drives its OV8858 from a 19.2 MHz platform clock, while
> the existing mode tables program the sensor PLL for 24 MHz. Reusing
> those settings produces incorrect internal and CSI-2 clocks.
>
> Accept both input rates and use the actual rate for the reset delay. For
> 19.2 MHz, apply the Cherry Trail MRD PLL and black-level settings after
> the generic mode table.
>
> The 19.2 MHz platform uses the per-channel manual white-balance
> registers for digital gain. Program registers 0x5032, 0x5034 and 0x5036
> and expose their 1x-to-4x range, while retaining the existing
> long-exposure gain block for 24 MHz systems.
>
> The manual white-balance register definitions and programming follow
> the GPL-2.0 Intel OV5670 driver, so retain its 2017 Intel copyright
> notice in this file. No proprietary source or tuning binary is included.
>
> Tested on the Lenovo Yoga Book YB1-X91L OV8858 with full-range test bars
> and real 10-bit Bayer frames.

...

> -#define OV8858_LINK_FREQ 360000000U
> -#define OV8858_XVCLK_FREQ 24000000
> +#define OV8858_LINK_FREQ (360 * HZ_PER_MHZ)
> +#define OV8858_XVCLK_FREQ_19_2MHZ (192 * HZ_PER_MHZ / 10)
> +#define OV8858_XVCLK_FREQ_24MHZ (24 * HZ_PER_MHZ)

I believe the idea was not to touch these. Again I haven't seen the reply on
why both comments (Sakari's and mine) were ignored.

...

> - return ov8858_write(ov8858, OV8858_REG_LONG_DIGIGAIN, long_gain, NULL);
> + return ov8858_write(ov8858, OV8858_REG_LONG_DIGIGAIN,
> + long_gain, NULL);

Stray change.

...

I stopped here, Please, give a full reply to *each* of the comments you
disagree with.

--
With Best Regards,
Andy Shevchenko