How to specify I2C detect sequence

Hello NVIDIA,

We have a Jetson Nano developer kit and develop our own driver of CSI-MIPI camera.

[Connection]
CAM0:CSI-MIPI Camera1 at addr 0x5c
CAM1:CSI-MIPI Camera2 at addr 0x5d

At startup, there are patterns in which I2C Detect starts from CAM0 and patterns in which I2C Detect starts from CAM1.

We want to start I2C from CAM0 every time.
Is there any way to solve it?

[Log] I2C Detect starts from CAM0

[    3.642748] pscam: PSCAM C10 (264) I2C driver revision 1
[    3.642757] pscam_c10_264 7-005c: pscam_probe: probing v4l2 sensor at addr 0x5c
[    3.642762] pscam_c10_264 7-005c: pscam_probe: probing id.name = pscam_c10_264, id.driver_data = 202
[    3.642810] pscam: Called pscam_parse_dt
[    3.642875] pscam_c10_264 7-005c: pscam_parse_dt: mclk name not present, assume sensor driven externally
[    3.642880] pscam_c10_264 7-005c: pscam_parse_dt: avdd, iovdd and/or dvdd reglrs. not present, assume sensor powered independently
[    3.642882] pscam: End of pscam_parse_dt successfully
[    3.642884] pscam: Called pscam_power_get
[    3.642887] pscam: End of pscam_power_get on err = 0
[    3.643069] pscam_c10_264 7-005c: tegracam sensor driver:pscam_c10_264_v2.0.6
[    3.643073] pscam: Called pscam_board_setup
[    3.643075] pscam: Called pscam_power_on
[    3.643079] pscam_c10_264 7-005c: pscam_power_on: power on
[    3.643081] pscam: Force GPIO-reset
[    3.643084] pscam: Skip power sequence
[    3.643086] pscam: Force GPIO-reset
[    3.643581] pscam_c10_548 8-005d: pscam_probe: probing v4l2 sensor at addr 0x5d
[    3.643586] pscam_c10_548 8-005d: pscam_probe: probing id.name = pscam_c10_548, id.driver_data = 202
[    3.643683] pscam_c10_548 8-005d: pscam_parse_dt: mclk name not present, assume sensor driven externally
[    3.643688] pscam_c10_548 8-005d: pscam_parse_dt: avdd, iovdd and/or dvdd reglrs. not present, assume sensor powered independently
[    3.643808] pscam_c10_548 8-005d: tegracam sensor driver:pscam_c10_548_v2.0.6
[    3.643811] pscam_c10_548 8-005d: pscam_power_on: power on
[    3.666371] pscam: End of pscam_power_on successfully
[    3.666376] pscam: Read I2C byte addr = 0x3001
[    3.667299] pscam: Read data = 0xCA
[    3.667310] pscam_c10_264 7-005c: Connected PSCAM model number = 0x00CA (264)
[    3.667313] pscam: Called pscam_power_off
[    3.667317] pscam_c10_264 7-005c: pscam_power_off: power off
[    3.667319] pscam: Force GPIO-reset
[    3.667352] pscam: End of pscam_power_off successfully
[    3.667355] pscam: End of pscam_board_setup width err = 0
[    3.667358] pscam: Start to "tegracam_v4l2subdev_register"
[    3.667397] vi 54080000.vi: subdev pscam_c10_264 7-005c bound
[    3.669969] pscam: End of "tegracam_v4l2subdev_register" with err = 0
[    3.669976] pscam_c10_264 7-005c: pscam_probe: detected pscam sensor module
[    3.669978] pscam: End of pscam_probe
[    3.671300] pscam_c10_548 8-005d: Connected PSCAM model number = 0x00CA (548)
[    3.671306] pscam_c10_548 8-005d: pscam_power_off: power off
[    3.671378] vi 54080000.vi: subdev pscam_c10_548 8-005d bound
[    3.672063] pscam_c10_548 8-005d: pscam_probe: detected pscam sensor module
[    4.438778] pscam_c10_264 7-005c: pscam_open:
[    4.443896] pscam_c10_548 8-005d: pscam_open:

[Log] I2C Detect starts from CAM1

[    3.618822] pscam_c10_548 8-005d: pscam_probe: probing v4l2 sensor at addr 0x5d
[    3.618829] pscam_c10_548 8-005d: pscam_probe: probing id.name = pscam_c10_548, id.driver_data = 202
[    3.618963] pscam_c10_548 8-005d: pscam_parse_dt: mclk name not present, assume sensor driven externally
[    3.618968] pscam_c10_548 8-005d: pscam_parse_dt: avdd, iovdd and/or dvdd reglrs. not present, assume sensor powered independently
[    3.619135] pscam_c10_548 8-005d: tegracam sensor driver:pscam_c10_548_v2.0.6
[    3.619140] pscam_c10_548 8-005d: pscam_power_on: power on
[    3.629131] pscam: PSCAM C10 (264) I2C driver revision 1
[    3.629142] pscam_c10_264 7-005c: pscam_probe: probing v4l2 sensor at addr 0x5c
[    3.629147] pscam_c10_264 7-005c: pscam_probe: probing id.name = pscam_c10_264, id.driver_data = 202
[    3.629216] pscam: Called pscam_parse_dt
[    3.629300] pscam_c10_264 7-005c: pscam_parse_dt: mclk name not present, assume sensor driven externally
[    3.629305] pscam_c10_264 7-005c: pscam_parse_dt: avdd, iovdd and/or dvdd reglrs. not present, assume sensor powered independently
[    3.629307] pscam: End of pscam_parse_dt successfully
[    3.629309] pscam: Called pscam_power_get
[    3.629312] pscam: End of pscam_power_get on err = 0
[    3.629436] pscam_c10_264 7-005c: tegracam sensor driver:pscam_c10_264_v2.0.6
[    3.629440] pscam: Called pscam_board_setup
[    3.629442] pscam: Called pscam_power_on
[    3.629445] pscam_c10_264 7-005c: pscam_power_on: power on
[    3.629447] pscam: Force GPIO-reset
[    3.629450] pscam: Skip power sequence
[    3.629452] pscam: Force GPIO-reset
[    3.644909] pscam_c10_548 8-005d: Connected PSCAM model number = 0x00CA (548)
[    3.644916] pscam_c10_548 8-005d: pscam_power_off: power off
[    3.647863] vi 54080000.vi: subdev pscam_c10_548 8-005d bound
[    3.654765] pscam: End of pscam_power_on successfully
[    3.654771] pscam: Read I2C byte addr = 0x3001
[    3.656653] pscam_c10_548 8-005d: pscam_probe: detected pscam sensor module
[    3.657229] pscam: Read data = 0xCA
[    3.657239] pscam_c10_264 7-005c: Connected PSCAM model number = 0x00CA (264)
[    3.657242] pscam: Called pscam_power_off
[    3.657246] pscam_c10_264 7-005c: pscam_power_off: power off
[    3.657248] pscam: Force GPIO-reset
[    3.661279] pscam: End of pscam_power_off successfully
[    3.661288] pscam: End of pscam_board_setup width err = 0
[    3.661290] pscam: Start to "tegracam_v4l2subdev_register"
[    3.661375] vi 54080000.vi: subdev pscam_c10_264 7-005c bound
[    3.664992] pscam: End of "tegracam_v4l2subdev_register" with err = 0
[    3.665002] pscam_c10_264 7-005c: pscam_probe: detected pscam sensor module
[    3.665004] pscam: End of pscam_probe
[    4.289111] pscam_c10_264 7-005c: pscam_open:
[    4.292670] pscam_c10_548 8-005d: pscam_open:

May I know why need this request?

We want CAM0 to be set to /dev/Video0.
However, when I2C Detect starts from CAM1, CAM1 becomes /dev/Video0 and CAM0 becomes /dev/Video1.

You can modify the video_register_device() to assign video # for your case.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.