SERDES camera streaming

tegra194-p3509-0000-camera-onsemi-sensor-driver-a00.dtsi (1.7 KB)
tegra194-p3509-camera-onsemi-sensor-driver.dtsi (3.6 KB)
Hi,

I have my own custom board, I am able to bring up camera (streaming as expected) via our heardboard. I am able to add two entry and both are streaming as per my requirement with /dev/video0 and /dev/video1

Now I want to bringup SERDES, I have mounted MAX9296 Deserializer as this driver is supported by NX kernel (I am refering IMX390). My serdes is setting on I2C bus-1 and I can see i2c detecting 0x6C (MAX9296 ), 0x62 (MAX9295 ) and 0x10 AR0233 on same I2C bus-1.
I have requiremnt of using headboard and serdes camera together, I have created 2 driver, one w/o SERDES setup and one with SERDES setup (as recomended by IMX390) And last I have added DTSI entry for dser/ser. But when boots up I dont see any /dev/video0 and /dev/video1; as well not seeing sensor I2C on bus-1.

Could you help me to understand what configuration I am missing for all video node creation and configuring proper mipi lane for serdes? I have attached my dtsi for your reference.

Below is the schematic which connect Jetson NX to our headboard and DSER.

Kernel Log:
6.984052] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 6.991198] usb usb2: Product: xHCI Host Controller
[ 6.995845] usb usb2: Manufacturer: Linux 5.10.104-tegra xhci-hcd
[ 7.001888] usb usb2: SerialNumber: 3610000.xhci
[ 7.007088] hub 2-0:1.0: USB hub found
[ 7.010420] hub 2-0:1.0: 4 ports detected
[ 7.016684] onsemi_serdes_driver 1-0010: found reset gpio
[ 7.019983] onsemi_serdes_driver 1-0010: tegracam sensor driver:onsemi_serdes_driver_v2.0.6
[ 7.054392] max9296 1-006c: max9296_write_reg:i2c write failed, 0x10 = 1
[ 7.055061] max9296 1-006c: max9296_write_reg:i2c write failed, 0x10 = 21
[ 7.162374] max9295 1-0062: max9295_write_reg:i2c write failed, 0x0 = c4
[ 7.163036] max9295 1-0062: max9295_write_reg:i2c write failed, 0x10 = 21
[ 7.163320] max9295 1-0062: max9295_setup_control: ERROR: ser device not found
[ 7.163485] onsemi_serdes_driver 1-0010: gmsl serializer setup failed
[ 7.163967] max9296 1-006c: max9296_write_reg:i2c write failed, 0x332 = f0
[ 7.164249] onsemi_serdes_driver 1-0010: onsemi_serdes_probe gmsl serdes setup failed
[ 7.164497] onsemi_serdes_driver: probe of 1-0010 failed with error -121
[ 7.165351] irq: IRQ273: trimming hierarchy from :pmc@c360000
[ 7.165675] OF: graph: no port node found in /i2c@31e0000/typec-portc@22
[ 7.166090] OF: graph: no port node found in /i2c@31e0000/typec-portc@22/connector
[ 7.166293] OF: graph: no port node found in /i2c@31e0000/typec-portc@22/connector
[ 7.176732] typec_fusb302 8-0022: name: 8-0022 FUSB302 probe successful
[ 7.178201] tegradc 15210000.display: disp1 connected to head1->sor
[ 7.178429] tegradc 15210000.display: parse_dp_settings: No dp-lt-settings node
[ 7.178701] tegradc 15210000.display: DT parsed successfully
[ 7.178922] tegradc 15210000.display: Display dc.(ptrval) registered with id=1
[ 7.179053] nvethernet 2490000.ethernet: Adding to iommu group 28
[ 7.181418] tegradc 15210000.display: vblank syncpt # 13 for dc 1
[ 7.188085] nvethernet 2490000.ethernet: failed to read skip mac reset flag, default 0
[ 7.193849] tegradc 15210000.display: vpulse3 syncpt # 14 for dc 1

tegra194-camera-onsemi-sensor-driver-a00.dtsi (9.5 KB)

Looks like HW problem to detect max929x

Hi,

After comminting one GPIO I am able to detect max9296 as well 9295.

Can you help me to understand below log " invalid GPIO -2":
------------[ cut here ]------------
[ 6.994651] tegradc 15210000.display: vpulse3 syncpt # 14 for dc 1
[ 7.002460] tegradc 15210000.display: probed
[ 7.005592] invalid GPIO -2
[ 7.005657] WARNING: CPU: 2 PID: 106 at drivers/gpio/gpiolib.c:122 gpio_to_desc+0xb4/0x100
[ 7.052039] Modules linked in:
[ 7.052077] CPU: 2 PID: 106 Comm: kworker/2:3 Not tainted 5.10.104-tegra #18
[ 7.054930] tegradc 15210000.display: fb registered
[ 7.062269] Hardware name: Unknown NVIDIA Jetson Xavier NX Developer Kit/NVIDIA Jetson Xavier NX Developer Kit, BIOS 1.0-d7fb19b 08/10/2022
[ 7.062282] Workqueue: events deferred_probe_work_func
[ 7.062299] pstate: 60800009 (nZCv daif -PAN +UAO -TCO BTYPE=–)
[ 7.062308] pc : gpio_to_desc+0xb4/0x100
[ 7.070709] hpd: state 7 (Takeover from bootloader), hpd 0, pending_hpd_evt 1
[ 7.079772] lr : gpio_to_desc+0xb4/0x100
[ 7.079780] sp : ffff800010b9ba60
[ 7.079789] x29: ffff800010b9ba60 x28: ffffbbbef1865380
[ 7.084863] hpd: switching from state 7 (Takeover from bootloader) to state 0 (Reset)
[ 7.090624] x27: ffff043c402c4cf4 x26: ffff043c44cc2820
[ 7.090651] x25: ffffbbbef145e8c8 x24: ffffbbbef145e5c0
[ 7.094410] hpd: state 0 (Reset), hpd 0, pending_hpd_evt 0

[ 7.101911] x23: ffffbbbef21e4940 x22: ffff043c44cc2820
[ 7.101918] x21: ffffbbbef214f6e8 x20: 00000000fffffffe
[ 7.101925] x19: 0000000000000000 x18: 0000000000000001
[ 7.156341] x17: 0000000000000007 x16: 0000000000000068
[ 7.156350] x15: ffff043c42fbeaf0 x14: ffffffffffffffff
[ 7.156357] x13: ffffbbbef2107de8 x12: ffffbbbef2107a16
[ 7.156382] tegradc 15210000.display: blank - powerdown
[ 7.156403] x11: 0000000000000040 x10: 0000000000000a80
[ 7.161883] extcon-disp-state external-connection:disp-state: cable 44 state 0 already set.

[ 7.167622] x9 : ffff800010b9ba60 x8 : ffff800010b9ba60
[ 7.167629] x7 : ffff800010b9ba60 x6 : 000000002d8dd199
[ 7.167640] x5 : 000000000000000c
[ 7.172973] Extcon DP: HPD disabled
[ 7.178136] x4 : 00000000fffff2a7
[ 7.183472] hpd: switching from state 0 (Reset) to state 1 (Check Plug)
[ 7.191857] x3 : 00000000ffffffff x2 : ffffbbbef1e078e0
[ 7.191865] x1 : 0000000000000000 x0 : 0000000000000000
[ 7.191873] Call trace:
[ 7.191878] gpio_to_desc+0xb4/0x100
[ 7.191886] max9296_power_on+0xbc/0x100
[ 7.191890] onsemi_probe+0x904/0xa20
[ 7.191898] i2c_device_probe+0xb0/0x2e0
[ 7.191927] really_probe+0xf8/0x3d0
[ 7.193437] hpd: state 1 (Check Plug), hpd 0, pending_hpd_evt 0
[ 7.198514] driver_probe_device+0x60/0xc0
[ 7.198520] __device_attach_driver+0x8c/0xd0
[ 7.198525] bus_for_each_drv+0x8c/0xe0
[ 7.198550] __device_attach+0xf8/0x160
[ 7.203868] hpd: switching from state 1 (Check Plug) to state 3 (Disabled)
[ 7.207433] device_initial_probe+0x28/0x40
[ 7.207439] bus_probe_device+0xa4/0xb0
[ 7.207462] deferred_probe_work_func+0x90/0xd0
[ 7.207473] process_one_work+0x1c4/0x4a0
[ 7.298002] worker_thread+0x200/0x430
[ 7.301783] kthread+0x148/0x170
[ 7.305091] ret_from_fork+0x10/0x24
[ 7.308765] —[ end trace a8725fff385ba79f ]—
[ 7.313950] ------------[ cut here ]------------
[ 7.318405] invalid GPIO -2
[ 7.321056] WARNING: CPU: 2 PID: 106 at drivers/gpio/gpiolib.c:122 gpio_to_desc+0xb4/0x100
[ 7.329238] Modules linked in:
[ 7.332567] CPU: 2 PID: 106 Comm: kworker/2:3 Tainted: G W 5.10.104-tegra #18
[ 7.341045] Hardware name: Unknown NVIDIA Jetson Xavier NX Developer Kit/NVIDIA Jetson Xavier NX Developer Kit, BIOS 1.0-d7fb19b 08/10/2022
[ 7.353239] Workqueue: events deferred_probe_work_func
[ 7.358641] pstate: 60800009 (nZCv daif -PAN +UAO -TCO BTYPE=–)
[ 7.364065] pc : gpio_to_desc+0xb4/0x100
[ 7.367829] lr : gpio_to_desc+0xb4/0x100
[ 7.371844] sp : ffff800010b9ba60
[ 7.374912] x29: ffff800010b9ba60 x28: ffffbbbef1865380
[ 7.380338] x27: ffff043c402c4cf4 x26: ffff043c44cc2820
[ 7.386019] x25: ffffbbbef145e8c8 x24: ffffbbbef145e5c0
[ 7.391446] x23: ffffbbbef21e4940 x22: ffff043c44cc2820
[ 7.396869] x21: ffffbbbef214f6e8 x20: 00000000fffffffe
[ 7.402294] x19: 0000000000000000 x18: 0000000000000010
[ 7.407632] x17: 0000000000000007 x16: 0000000000000068
[ 7.412887] x15: ffff043c42fbeaf0 x14: ffffffffffffffff
[ 7.418658] x13: ffff800090b9b707 x12: ffff800010b9b70f
[ 7.423912] x11: 0000000000000040 x10: 0000000000000a80
[ 7.429595] x9 : ffff800010b9ba60 x8 : 000000000004dbc5
[ 7.435109] x7 : ffffbbbef07f1cd0 x6 : c0000000ffffefff
[ 7.440619] x5 : 0000000000057fa8 x4 : ffffbbbef1e07968
[ 7.445788] x3 : 00000000ffffffff x2 : ffffbbbef1e078e0
[ 7.451383] x1 : 0000000000000000 x0 : 0000000000000000
[ 7.456735] Call trace:
[ 7.459174] gpio_to_desc+0xb4/0x100
[ 7.462674] max9296_power_on+0xcc/0x100
[ 7.466628] onsemi_probe+0x904/0xa20
[ 7.470111] i2c_device_probe+0xb0/0x2e0
[ 7.473874] really_probe+0xf8/0x3d0
[ 7.477548] driver_probe_device+0x60/0xc0
[ 7.481573] __device_attach_driver+0x8c/0xd0
[ 7.485876] bus_for_each_drv+0x8c/0xe0
[ 7.489623] __device_attach+0xf8/0x160
[ 7.493561] device_initial_probe+0x28/0x40
[ 7.497342] bus_probe_device+0xa4/0xb0
[ 7.501348] deferred_probe_work_func+0x90/0xd0
[ 7.505640] process_one_work+0x1c4/0x4a0
[ 7.510099] worker_thread+0x200/0x430
[ 7.513602] kthread+0x148/0x170
[ 7.517098] ret_from_fork+0x10/0x24
[ 7.520773] —[ end trace a8725fff385ba7a0 ]—
[ 7.525227] tegra_cec 3960000.tegra_cec: Can’t find physical address.
[ 7.531643] tegra_cec 3960000.tegra_cec: tegra_cec_init Done.
[ 7.537508] ------------[ cut here ]------------
[ 7.541900] invalid GPIO -2
[ 7.544694] WARNING: CPU: 2 PID: 106 at drivers/gpio/gpiolib.c:122 gpio_to_desc+0xb4/0x100
[ 7.553145] Modules linked in:
[ 7.555960] CPU: 2 PID: 106 Comm: kworker/2:3 Tainted: G W 5.10.104-tegra #18
[ 7.564525] Hardware name: Unknown NVIDIA Jetson Xavier NX Developer Kit/NVIDIA Jetson Xavier NX Developer Kit, BIOS 1.0-d7fb19b 08/10/2022
[ 7.576967] Workqueue: events deferred_probe_work_func
[ 7.582027] pstate: 60800009 (nZCv daif -PAN +UAO -TCO BTYPE=–)
[ 7.587800] pc : gpio_to_desc+0xb4/0x100
[ 7.591390] lr : gpio_to_desc+0xb4/0x100
[ 7.595324] sp : ffff800010b9ba60
[ 7.598907] x29: ffff800010b9ba60 x28: ffffbbbef1865380
[ 7.604178] x27: ffff043c402c4cf4 x26: ffff043c44cc2820
[ 7.609846] x25: ffffbbbef145e8c8 x24: ffffbbbef145e5c0
[ 7.615012] x23: ffffbbbef21e4940 x22: ffff043c44cc2820
[ 7.620694] x21: ffffbbbef214f6e8 x20: 00000000fffffffe
[ 7.626119] x19: 0000000000000000 x18: 0000000000000010
[ 7.631458] x17: 0000000000000007 x16: 0000000000000068
[ 7.636713] x15: ffff043c42fbeaf0 x14: ffffffffffffffff
[ 7.642482] x13: ffff800090b9b707 x12: ffff800010b9b70f
[ 7.647908] x11: 0000000000000040 x10: 0000000000000a80
[ 7.653163] x9 : ffff800010b9ba60 x8 : 00000000000844cc
[ 7.658933] x7 : ffffbbbef07f1cd0 x6 : c0000000ffffefff
[ 7.664187] x5 : 0000000000057fa8 x4 : ffffbbbef1e07968
[ 7.669869] x3 : 00000000ffffffff x2 : ffffbbbef1e078e0
[ 7.675208] x1 : 0000000000000000 x0 : 0000000000000000
[ 7.680543] Call trace:
[ 7.683012] gpio_to_desc+0xb4/0x100
[ 7.686498] max9296_power_on+0xe8/0x100
[ 7.690178] onsemi_probe+0x904/0xa20
[ 7.693936] i2c_device_probe+0xb0/0x2e0
[ 7.697440] really_probe+0xf8/0x3d0
[ 7.701115] driver_probe_device+0x60/0xc0
[ 7.705398] __device_attach_driver+0x8c/0xd0
[ 7.709428] bus_for_each_drv+0x8c/0xe0
[ 7.713447] __device_attach+0xf8/0x160
[ 7.717385] device_initial_probe+0x28/0x40
[ 7.721153] bus_probe_device+0xa4/0xb0
[ 7.724915] deferred_probe_work_func+0x90/0xd0
[ 7.729735] process_one_work+0x1c4/0x4a0
[ 7.733923] worker_thread+0x200/0x430
[ 7.737426] kthread+0x148/0x170
[ 7.740681] ret_from_fork+0x10/0x24
[ 7.744595] —[ end trace a8725fff385ba7a1 ]—
[ 7.883614] max9295 1-0062: max9295_write_reg:i2c[0x62] write success, 0x0 = c4
[ 7.884369] max9295 1-0062: max9295_write_reg:i2c[0x62] write success, 0x10 = 21
[ 7.991579] max9295 1-0062: max9295_write_reg:i2c[0x62] write success, 0x6b = 12
[ 7.992365] max9295 1-0062: max9295_write_reg:i2c[0x62] write success, 0x73 = 13
[ 7.993105] max9295 1-0062: max9295_write_reg:i2c[0x62] write success, 0x7b = 33
[ 7.993867] max9295 1-0062: max9295_write_reg:i2c[0x62] write success, 0x83 = 33
[ 7.994624] max9295 1-0062: max9295_write_reg:i2c[0x62] write success, 0x93 = 33
[ 7.995416] max9295 1-0062: max9295_write_reg:i2c[0x62] write success, 0x9b = 33
[ 7.996215] max9295 1-0062: max9295_write_reg:i2c[0x62] write success, 0xa3 = 33
[ 7.996973] max9295 1-0062: max9295_write_reg:i2c[0x62] write success, 0xab = 33
[ 7.997757] max9295 1-0062: max9295_write_reg:i2c[0x62] write success, 0x8b = 33
[ 7.998555] max9295 1-0062: max9295_write_reg:i2c[0x62] write success, 0x44 = 20
[ 7.999339] max9295 1-0062: max9295_write_reg:i2c[0x62] write success, 0x45 = 20
[ 8.000126] max9295 1-0062: max9295_write_reg:i2c[0x62] write success, 0x2be = 90
[ 8.000909] max9295 1-0062: max9295_write_reg:i2c[0x62] write success, 0x2bf = 60
[ 8.001723] max9295 1-0062: max9295_write_reg:i2c[0x62] write success, 0x3f1 = 89
[ 8.147570] onsemi_sensor_driver 1-0010: onsemi_probe[769]