mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Felipe Calliari <calliarifelipe@gmail.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Felipe Calliari <calliarifelipe@gmail.com>,
	linux-media@vger.kernel.org, Hans de Goede <hansg@kernel.org>,
	Bryan O'Donoghue <bod@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Dan Scally <dan.scally@ideasonboard.com>,
	Tomas Moro <tmorolias@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/5] media: ov02c10: Split the PLL registers off the mode tables
Date: Mon, 26 Oct 2026 00:44:24 -0300	[thread overview]
Message-ID: <20261026034425.74516-1-calliarifelipe@gmail.com> (raw)
In-Reply-To: <asAYI3pjBMHAdnTv@kekkonen.localdomain>

Hi Sakari,

Thanks for the review.

On Fri, Oct 02, 2026 at 11:46:27PM +0300, Sakari Ailus wrote:
> On Wed, Sep 23, 2026 at 08:40:58PM -0300, Felipe Calliari wrote:
> >  static const struct reg_sequence sensor_1928x1092_30fps_setting[] = {
> > -	{0x0301, 0x08},
> > -	{0x0303, 0x06},
>
> I haven't tried to figure out what this register exatly is, but this patch
> changes how this register is programmed. After this patch, the value of
> this register is always 5.

It was always 5 before this patch too. ov02c10_enable_streams() writes
the common table and then the per-lane table, and both per-lane tables
write 0x0303 and 0x0305 again:

  common table:  0x0303 = 0x06, 0x0305 = 0xe0
  1-lane table:  0x0303 = 0x05, 0x0305 = 0x90
  2-lane table:  0x0303 = 0x05, 0x0305 = 0x90

The tables are written every time streaming starts, after the sensor
is powered up, and the sensor only starts streaming afterwards, when
0x0100 is set. So when streaming starts, 0x0303 is always 0x05 and
0x0305 always 0x90, before and after this patch.

The tables come from the out-of-tree driver [1], where each mode table
has the same pair: 0x06 and 0xe0 at the top, and 0x05 and 0x90 under a
"// plls" comment at its end.

Still, you're right that the patch changes how the register is
programmed, and the commit message didn't say so. In v4 the series no
longer touches these writes: the common table is left alone, 0x0303 =
0x06 and 0x0305 = 0xe0 included, and only the "plls" block of the
per-lane tables moves into the PLL table, which is written right after
the common table. Every register write is kept, with the same value, so
0x0303 still starts at 0x06 and is then set to 0x05, and there is no
change in behaviour.

If you'd like the repeated writes in the common table dropped, I can do
that in a separate patch after this series is merged.

> > +static const struct reg_sequence sensor_pll_19_2mhz_setting[] = {
>
> I guess some of these settings are determining link frequency or pixel
> rate, so they're not generic to anything using 19,2 MHz external clock.

You're right, they set both. I have no PLL documentation, but sweeping
the registers on my 26 MHz unit shows that 0x0304/0x0305 is the
multiplier for the link and 0x0315/0x0316 the one for the pixel clock.
0x031c divides the pixel clock, and 0x0301 and 0x0303 act on the link.

In v4 the PLL table goes with the link frequency instead, as in
ov08x40: a link_freq_configs[] array indexed like
link_freq_menu_items[], each entry holding the PLL table and the
external clock rate it is for. Probe picks the first link frequency
listed by the firmware that the external clock can produce.

There were no comments on patches 4 and 5, so I'll send v4 once I've
tested it on my hardware.

[1] https://github.com/intel/ipu6-drivers/blob/master/drivers/media/i2c/ov02c10.c

--
Regards,
Felipe

  reply	other threads:[~2026-10-26  3:44 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Tms-fUHfw0sPf1-YX_rgSNq7z1MNyvtfCImHXhxAUQAoTq-fwKvZF-p8a3ozCxAJ7kJCo-lKEU_JSkfUJy6oIA==@protonmail.internalid>
2026-09-05  3:07 ` [PATCH 1/3] media: ov02c10: Drop duplicate register write Felipe Calliari
2026-09-05  3:07   ` [PATCH 2/3] media: ov02c10: Implement get_selection Felipe Calliari
2026-09-08  9:07     ` Bryan O'Donoghue
2026-09-05  3:07   ` [PATCH 3/3] media: ov02c10: Accept a 26 MHz external clock Felipe Calliari
2026-09-08  8:06     ` Sakari Ailus
2026-09-09  2:55       ` Felipe Calliari
2026-09-08  9:21     ` Bryan O'Donoghue
2026-09-22  6:35     ` Tomas Moro
2026-09-08  9:04   ` [PATCH 1/3] media: ov02c10: Drop duplicate register write Bryan O'Donoghue
2026-09-23 14:42   ` [PATCH v2 0/3] media: ov02c10: get_selection and 26 MHz clock support Felipe Calliari
2026-09-23 14:42     ` [PATCH v2 1/3] media: ov02c10: Drop duplicate register write Felipe Calliari
2026-09-23 14:42     ` [PATCH v2 2/3] media: ov02c10: Implement get_selection Felipe Calliari
2026-09-23 14:42     ` [PATCH v2 3/3] media: ov02c10: Accept a 26 MHz external clock Felipe Calliari
2026-09-23 20:54       ` Sakari Ailus
2026-09-23 23:40     ` [PATCH v3 0/5] media: ov02c10: get_selection and 26 MHz clock support Felipe Calliari
2026-09-23 23:40       ` [PATCH v3 1/5] media: ov02c10: Drop duplicate register write Felipe Calliari
2026-09-23 23:40       ` [PATCH v3 2/5] media: ov02c10: Implement get_selection Felipe Calliari
2026-09-23 23:40       ` [PATCH v3 3/5] media: ov02c10: Split the PLL registers off the mode tables Felipe Calliari
2026-10-02 20:46         ` Sakari Ailus
2026-10-26  3:44           ` Felipe Calliari [this message]
2026-09-23 23:40       ` [PATCH v3 4/5] media: ipu-bridge: Add the OV02C10 26 MHz link frequency Felipe Calliari
2026-09-23 23:41       ` [PATCH v3 5/5] media: ov02c10: Add support for a 26 MHz external clock Felipe Calliari
2026-10-26  3:50       ` [PATCH v4 0/5] media: ov02c10: get_selection and 26 MHz clock support Felipe Calliari
2026-10-26  3:50         ` [PATCH v4 1/5] media: ov02c10: Drop duplicate register write Felipe Calliari
2026-10-26  3:50         ` [PATCH v4 2/5] media: ov02c10: Implement get_selection Felipe Calliari
2026-10-26  3:50         ` [PATCH v4 3/5] media: ov02c10: Split the PLL registers off the mode tables Felipe Calliari
2026-10-26  3:50         ` [PATCH v4 4/5] media: ipu-bridge: Add the OV02C10 26 MHz link frequency Felipe Calliari
2026-10-26  3:50         ` [PATCH v4 5/5] media: ov02c10: Add support for a 26 MHz external clock Felipe Calliari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261026034425.74516-1-calliarifelipe@gmail.com \
    --to=calliarifelipe@gmail.com \
    --cc=bod@kernel.org \
    --cc=dan.scally@ideasonboard.com \
    --cc=hansg@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tmorolias@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®