]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: cadence: cdns-csi2rx: Support multiple pixels per clock cycle
authorJai Luthra <jai.luthra@ideasonboard.com>
Mon, 11 Aug 2025 08:20:17 +0000 (13:50 +0530)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Mon, 25 Aug 2025 13:40:42 +0000 (15:40 +0200)
commit7b78fa862296f8931e42ecaec3703e307e4044d2
tree26d8e468191931b42ba4e04232e123292e8b023d
parent4d09706dfa0c57b01ff45005166eb6acefee8835
media: cadence: cdns-csi2rx: Support multiple pixels per clock cycle

The output pixel interface is a parallel bus (32 bits), which
supports sending multiple pixels (1, 2 or 4) per clock cycle for
smaller pixel widths like RAW8-RAW16.

Dual-pixel and Quad-pixel modes can be a requirement if the export rate
of the Cadence IP in Single-pixel mode maxes out before the maximum
supported DPHY-RX frequency, which is the case with TI's integration of
this IP [1].

So, we export a function that lets the downstream hardware block request
a higher pixel-per-clock on a particular output pad.

We check if we can support the requested pixels per clock given the
known maximum for the currently configured format. If not, we set it
to the highest feasible value and return this value to the caller.

[1] Section 12.6.1.4.8.14 CSI_RX_IF Programming Restrictions of AM62 TRM

Link: https://www.ti.com/lit/pdf/spruj16
Tested-by: Yemike Abhilash Chandra <y-abhilashchandra@ti.com> (on SK-AM68)
Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
MAINTAINERS
drivers/media/platform/cadence/cdns-csi2rx.c
include/media/cadence/cdns-csi2rx.h [new file with mode: 0644]