Add a GMSL YUV camera driver with AGX Orin (t234)

Hi ,
I’m a newer about bring up new camera with the Jetson platform, please give me some help for that.
Recently we are developing new camera drivers, including MAX96724 and MAX96717. The module has an internal ISP of OAX4000 and a sensor of OX05B1S, which outputs 5MP@30Fps YUV422 8bit format data.
Q1. Does the latest JetPack have support for YUV format camera drivers? If yes, please provide the corresponding version.
Q2. Or has the forum ever provided similar support?
Q3. In addition, which modules need to be modified for driver development? Tegra VI driver, serdes driver, dtsi file?
Please answer the above questions, thank you!

hello Kun_Wang,

according to Camera Architecture Stack.
you should use v4l2 application to fetch the sensor stream directly.

BTW,
please see-also similar forum threads for reference, such as.. Topic 252803, Topic 290064.

Add the kernel log ,
kern.log (73.6 KB)
Add the dtsi file refer ADI github,


tegra234-p3701-0000-p3737-0000-a0-gmsl.dtsi.txt (1.0 KB)
tegra234-p3701-0000-p3737-0000-a0-gmsl-1.dts.txt (693 Bytes)

hello Kun_Wang,

please share your test pipeline, and also the error logs for reference.

Hi Jerry,
Now I have a dts file
tegra234-p3737-camera-fzcam-fg12ch-4lanes.dts.txt (37.7 KB)

can work at JP6.0, but now I would transplant it to JP5.1.1 which my project bases on. How would I do? Thx!

hello wangkun37,

there’re some device tree changes between JP-5 and JP-6.
it’s suggest you download [Driver Package (BSP) Sources] from JP-5, and based-on JP-5 reference driver to integrate your changes.

Hi Jerry,
I have integrated a file, and max96724 can init successfully, but the max96717 init failed, I think the serializer is not power on, how can I check and resolve that? Thx!
kern.log (86.6 KB)


tegra234-p3701-0000-p3737-0000-a0-gmsl.dtsi.txt (1.0 KB)
tegra234-p3701-0000-p3737-0000-a0-gmsl-1.dts.txt (38.1 KB)

hello wangkun37,

is it regulator issue? please try toggle the power directly for confirmation.

Hi Jerry,
I change the CAM12V_POC(AC.07) value to low, this is the test result, you can see the deserializer’s link status is not locked.


And when I change the CAM12V_POC(AC.07) value to high, the result is same. How would I do? Thx!

hello wangkun37,

is it possible to arrange hardware resources to probe the board for confirmation?

Hi Jerry,
I have found the reason, it max96724 register not init correct. I have fixed that like this,
max96724_update_bits(priv, 0x1, 0x30, 0xe0); // bit[5:4] DIS_LOC_CC
max96724_update_bits(priv, 0x319, 0x91, 0x90); // bit[4] GPIO_OUT: is driven to 1
Now the camera module is power on(it’ warm), but the max96717 is still can’t be access by I2C tools.
image
Pls help me to analyze the kernel log, and give some
kern_0526.log (86.6 KB)
, Thx!

hello wangkun37,

it still report some i2c communication failures.
for instance,

[   11.357901] max96717 10-0040: read 0x0000 failed
[   11.471130] max96717 10-0040: Retry 9 waiting for serializer: -121
[   11.478223] max96717: probe of 10-0040 failed with error -121

Hi Jerry,
The max96717F(default work on 3Gbps) has been accessed successfully after I config max96724 register:
max96724_update_bits(priv, 0x10, 0x33, 0x11); // bit[5:4] RX_RATE_PHYB 3Gbps for MAX96717F
max96724_update_bits(priv, 0x11, 0x33, 0x11); // bit[5:4] RX_RATE_PHYB 3Gbps for MAX96717F
but I have another question about manual config GPIO’s value on linux system for debug, when I excuse the command:


Pls help me to resolve it, thx!

may I know which Jetpack release version you’re now using?
please see-also Identifying the GPIO Number section, gpio debugfs it only works with JP-5.

Hi Jerry,
I use Jetpack 5.1.1

hello Kun_Wang,

you cannot export 493 to debugfs since gpio-493 (PAC.07) is already occupied by camera control.

Hi Jerry,
Now the SerDes driver can init successfully, but the /dev/videoX node can’t be created.
How would I do? Pls check the newer dts file, and give me some suggestions,
tegra234-p3701-0000-p3737-0000-a0-gmsl.dtsi.txt (1.0 KB)
tegra234-p3701-0000-p3737-0000-a0-gmsl-1.dts.txt (38.1 KB)
Thx!

hello wangkun37,

FYI, during kernel initialization stage, it’s step for camera device registration to setup a video device node to linux kernel. sensor probing only run once during kernel initialization stage of system boot-up.
for a typical camera application running cycle, the driver will Power On the sensor, Start Sensor Streaming, sending relevant v4l2 controls, and finally power off the sensor.
so… if there’s a error returns, it’ll not register a video node, (i.e. /dev/video0).

Hi Jerry,
Thank your kindly reply. What I mean is if need to change the tagra VI driver codes? If not, my dts files if config correct?If I can optimize the dts file reference an existed VI config sample dts file.Thx!

hello Kun_Wang,

it’s device tree to define the port bindings. you may see-also To verify the port binding result.