Re: [PATCH 0/4] media: i2c: imx219: Enable variable xclk and 4-lane

From: Adam Ford
Date: Mon Apr 25 2022 - 08:08:47 EST


On Tue, Apr 12, 2022 at 8:55 AM Adam Ford <aford173@xxxxxxxxx> wrote:
>
> 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.
>

Any comments from anyone on this series?

> 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
>