All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] media: i2c: imx219: Enable variable xclk and 4-lane
@ 2022-04-12 13:55 Adam Ford
  2022-04-12 13:55 ` [PATCH 1/4] media: i2c: imx219: Split common registers from mode tables Adam Ford
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Adam Ford @ 2022-04-12 13:55 UTC (permalink / raw)
  To: linux-media
  Cc: prabhakar.mahadev-lad.rj, tharvey, cstevens, aford,
	laurent.pinchart, Adam Ford, Dave Stevenson,
	Mauro Carvalho Chehab, linux-kernel

The driver currently only supports a 2-lane camera, a fixed external 
clock (XCLK) at 24MHz, a fixed Pixel Rate of 182.4MHz, and a fixed
link rate of 456MHz.  There are a bunch of hard-codec values in a 
table of operating modes which expect the above to be true.

According to the datasheet, the driver is capable of operating in 
either 4-lane with a pixel rate of 280.8MHz and Linux frequency
of 702MHz or 2-lane configured as stated above.  The XCLK can be 
anywhere from 6MHz - 27MHz instead of being fixed at 24MHz.

Split up the hard-coded values into smaller helper functions that
dynamically set the registers of the camera based on the XCLK and
desired number of lanes.

This series was tested on a Beacon RZ/G2M streaming video at 640x480
to an LCD with fbdevsink

media-ctl --links "'rcar_csi2 feaa0000.csi2':1->'VIN0 output':0[1]" -d /dev/media1
media-ctl --set-v4l2 "'imx219 2-0010':0[fmt:SRGGB8_1X8/640x480 field:none]" -d /dev/media1
yavta -w '0x009f0905 2048' /dev/v4l-subdev12
gst-launch-1.0 v4l2src device=/dev/video7 ! video/x-bayer,width=640,height=480,format=rggb ! queue ! bayer2rgb ! fbdevsink

Due to hardware limitations, the XCLK is still 24MHz, so anyone
willing to test this series with a different XCLK would be appreciated.

Due to the video format, streaming video at larger resolution was
not feasible, however individual frames captured at 1920x1080 were
successful.

Adam Ford (4):
  media: i2c: imx219: Split common registers from mode tables
  media: i2c: imx219: Support four-lane operation
  media: i2c: imx219: Enable variable XCLK
  media: i2c: imx219: Create DPHY helper function

 drivers/media/i2c/imx219.c | 340 +++++++++++++++++++++++--------------
 1 file changed, 213 insertions(+), 127 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-04-25 17:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-12 13:55 [PATCH 0/4] media: i2c: imx219: Enable variable xclk and 4-lane Adam Ford
2022-04-12 13:55 ` [PATCH 1/4] media: i2c: imx219: Split common registers from mode tables Adam Ford
2022-04-25 16:20   ` Dave Stevenson
2022-04-25 16:50     ` Adam Ford
2022-04-25 17:17       ` Dave Stevenson
2022-04-12 13:55 ` [PATCH 2/4] media: i2c: imx219: Support four-lane operation Adam Ford
2022-04-25 15:39   ` Dave Stevenson
2022-04-12 13:55 ` [PATCH 3/4] media: i2c: imx219: Enable variable XCLK Adam Ford
2022-04-25 15:58   ` Dave Stevenson
2022-04-25 16:13     ` Dave Stevenson
2022-04-25 17:28       ` Adam Ford
2022-04-25 17:57         ` Dave Stevenson
2022-04-12 13:55 ` [PATCH 4/4] media: i2c: imx219: Create DPHY helper function Adam Ford
2022-04-25 16:07   ` Dave Stevenson
2022-04-25 12:08 ` [PATCH 0/4] media: i2c: imx219: Enable variable xclk and 4-lane Adam Ford

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.