Re: [PATCH v3 2/2] media: i2c: Add Samsung S5K3T2 image sensor driver

From: armandas.kvietkus

Date: Sat Oct 03 2026 - 04:28:12 EST


Hi Elgin,

Thanks for the review.

On Thu, Oct 01, 2026 at 06:41:29PM +0000, Elgin Perumbilly wrote:
> Remove the unwanted pointers if they are not referenced,
> as they unnecessarily consume memory.

pixel_rate is not used after it is created, so I'll drop it. link_freq
is used in set_fmt, so it stays.

> Curious why 0x6f12 and 0x602a is used repeatedly in sequence here,
> unlike in other drivers, Could you explain it.

This is how these Samsung sensors write to their internal memory.
0x6028 selects the page, 0x602a sets the address, and the words written
to 0x6f12 go to that address and the ones after it. s5k3m5 and s5kjn1
do the same.

The first long block writes 210 words to page 0x2000 at 0x3aec. They
decode as ARM Thumb code, so it looks like code for the sensor's own
CPU. s5k3m5 starts its burst_array_setting with the same six words.

> Could you explain what this register CCI_REG16(0x6028) actually does?

It is the page pointer for the access above. s5k3m5 and s5kjn1 write
the same value at the same point before streaming.

> It seems unusual to write the values to S5K3T2_REG_CHIP_ID (0x0000),
>
> The chip ID register is generally read-only.

s5k3m5 and s5kjn1 do the same two writes to 0x0000, with a different
first value, and mark them as setting the version. I don't have
documentation that says more than that.

I'll fix the rest in v4. It should be ready by Monday, or later if I
need to wait for Sakari's answer on the link frequency.

Armandas