Skip to content

IMX708 ccs and link frequency changes - #7605

Open
naushir wants to merge 5 commits into
raspberrypi:rpi-6.18.yfrom
naushir:imx708_ccs_link_freq
Open

naushir wants to merge 5 commits into
raspberrypi:rpi-6.18.yfrom
naushir:imx708_ccs_link_freq

Conversation

@naushir

@naushir naushir commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread drivers/media/i2c/imx708.c Outdated
Comment thread drivers/media/i2c/imx708.c Outdated
Comment thread drivers/media/i2c/imx708.c Outdated
@naushir
naushir force-pushed the imx708_ccs_link_freq branch from 4f58560 to e8f0ba8 Compare September 8, 2026 14:32
@naushir

naushir commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@6by9 and @jailuthra are you both ok for me to merge this change?

@6by9 6by9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, thought I'd submitted this review.

The last two patches feel awkward as it is still defining fixed link frequencies.

Can we do similar to imx355 where as long as the link frequency is valid, we adopt it? In this case it will need to have a list of min link_frequency for each step of line_length_pck because imx708 wants discrete values. Perhaps we do that as a refinement if it doesn't fall out easily.

Comment thread drivers/media/i2c/imx708.c Outdated
Comment thread drivers/media/i2c/imx708.c Outdated
Comment thread drivers/media/i2c/imx708.c
Comment thread drivers/media/i2c/imx708.c Outdated
Comment thread drivers/media/i2c/imx708.c
@6by9

6by9 commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

I've just noticed that 4dba86f in my 4 lane support patch set does change it to validate the DT link frequency, and then advertise that value. My validation is via computation rather than ccs_pll though.

@naushir

naushir commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

All fixed. @jailuthra I've updated your patches a bit and added my SoB tag to them.

I'll work on the more flexible link-frequency updates on top of this.

@naushir
naushir force-pushed the imx708_ccs_link_freq branch from e8f0ba8 to 8a2118d Compare October 27, 2026 09:39
@naushir

naushir commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

@6by9 ready for you to have another check.

@6by9 6by9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor nit picks. It'll do as is, but there are some cleanups possible.

Comment thread drivers/media/i2c/imx708.c Outdated
{ CCI_REG8(0x3cbd), 0x3c },
{ CCI_REG8(0x3cbe), 0x00 },
{ CCI_REG8(0x3cbf), 0x00 },
{ CCI_REG8(0x0202), 0x0a },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional clean up not required for this patchset:

  • merge the relevant registers into CCI_REG16.
  • 0x0202/3 is actually coarse integration time, defined as IMX708_REG_EXPOSURE and set by V4L2_CID_EXPOSURE, so these values have no business being in the modes table.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the exposure regs, but I'll leave out the folding into CCI_REG16() as that will severely trample Jai's patch.

Comment thread drivers/media/i2c/imx708.c Outdated
Comment thread drivers/media/i2c/imx708.c Outdated
.pixel_rate = 595200000,
.timings = {
{
.line_length_pix = 0x3d20,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for the line length to be in hex?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No specific reason, just following similar convention of reg values as hex.

jailuthra and others added 5 commits October 28, 2026 13:57
…ites

Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
When the PLL is configured in DUAL_MODE (separate VT and OP trees) and
the sensor's FIFOs allow derating and/or overrating, the VT pixel rate
might be higher or lower than OP pixel rate.

Support such usecases by allowing an optional input for the target VT
pixel rate.

Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Replace the PLL dividers and multipliers hard coded into the mode and link
frequency register lists with a call to the CCS PLL calculator, describing
the sensor clock tree limits from its manual. The pre-PLL dividers are
pinned to the values those register lists used, so the tree the calculator
arrives at is the one the driver has always programmed, which was confirmed
against every mode at every link frequency.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Give each mode an array of timings rather than one fixed set, so that
a mode can run faster when the link has the bandwidth for it. A mode
uses the higest link frequency timings specified.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Add timings for a 960MHz link frequency, which gives the full resolution
mode enough bandwidth to reach 30fps and roughly doubles the rate of the
binned modes.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
@naushir
naushir force-pushed the imx708_ccs_link_freq branch from 8a2118d to 9c32129 Compare October 28, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants