OV5693_V4l2 changing from CSI_C to CSI_A

In Jetson TX1, ov5693_v4l2 driver uses CSI_C and 2-lane configuration.
In my camera prototype hardware, we are using CSI_A with 2 lane.
So which changes need to be done in driver file and/or board or dtsi files?
Can somebody suggest me the list of files i need to modify?

Generally it is decided by you not camera hardware to choose which CSI port of TX1 to drive your camera. Can’t you use CSI_C port to connect camera?

Ya that’s right.

Actually by mistake i have designed our camera carrier board using CSI-A. Later on after studying hardware and driver in details we realize that onboard ov5693 uses CSI-C. And i am developing sensor driver for TC358748 taking reference of ov5693_v4l2.

So is it difficult to modify driver for CSI-A?

I have added driver iin /media/i2c/soc_camera and added platform device in board file. And i am getting

ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
vi vi: CSI 0 syncpt timeout, syncpt = 7, err = -11
vi vi: TEGRA_CSI_CSI_CIL_STATUS 0x00000000
vi vi: TEGRA_CSI_CSI_CILX_STATUS 0x00000001
vi vi: TEGRA_VI_CSI_ERROR_STATUS 0x00000000
vi vi: MW_ACK_DONE syncpoint time out!

So i think its problem in CSI initialization as i am read/write sensor data via I2C.
So do i need to modify any pinmux or dtsi or board file?

Actually, if using the v4l2 framework, it is now difficult at all :)

Take a look at section “Video for Linux User Guide” of the documentation for L4T.

The CSI in use is defined in file:
For tegra TX1 it is this one:

/* OV5693 on CSI C of E3326 */
static struct camera_common_pdata t210ref_ov5693_e3326_data = {
	.regulators = {
		.avdd = "vana",
		.iovdd = "vif",
	.reset_gpio = 148, /* TEGRA_GPIO_PS4 */
	.pwdn_gpio = 151, /* TEGRA_GPIO_PS7 */

static struct i2c_board_info t210ref_ov5693_e3326_camera_i2c_device = {
	I2C_BOARD_INFO("ov5693_v4l2", 0x36),

static struct tegra_camera_platform_data
t210ref_ov5693_e3326_camera_platform_data = {
	.flip_v			= 0,
	.flip_h			= 0,
	.lanes			= 2,
	.continuous_clk		= 0,

static struct soc_camera_link ov5693_e3326_iclink = {
	.bus_id		= 0, /* This must match the .id of tegra_vi01_device */
	.board_info	= &t210ref_ov5693_e3326_camera_i2c_device,
	.module_name	= "ov5693_v4l2",
	.i2c_adapter_id	= 6, /* VI2 I2C controller */
	.power		= t210ref_ov5693_power,
	.priv		= &t210ref_ov5693_e3326_camera_platform_data,
	.dev_priv	= &t210ref_ov5693_e3326_data,

static struct platform_device t210ref_ov5693_e3326_soc_camera_device = {
	.name	= "soc-camera-pdrv",
	.id	= 0,
	.dev	= {
		.platform_data = &ov5693_e3326_iclink,


Hmm, now I see that you have already done that probably.

So I got same error when:

  1. no output from camera, verify this with oscilloscope
  2. framesize doesn’t match specified, even by a single pixel
  3. format specified to VI doesn’t match one that camera is outputting

The camera user lib will parse csi and sensor mode information from kernel device tree,
such as for csi lane and its port number,

num_lanes = "4"; 
tegra_sinterface = "serial_a";

You can search those key words under $TOP/kernel/arch/arm64/boot/dts to get the reference.

So if i want to add new soc_camera sensor driver, i need to add entries in dtsi file for new sensor and also in board file.

So i am getting CSI syncpoint error because i haven’t done any entry in dtsi file right? But i have defined CSI-A and lane detail in board file. That’s not enough right?

Correct, user lib queries sensor capabilities and csi pad configuration from dtsi file.

Actually, this post is not accurate, sorry for the confusing.
I’d like to recommend you guys who are reading here to glance the below topic and its following Q&A to get better understanding to our current camera arch and future design,