HDMI Camera - ADV7480 - CSI - ORIN NX

Where do I find documentation for custom carrier adaptation of the following scenario:

HDMI Camera connected to ADV748x connected to CSI interface for an ORIN NX.

The official documentation mentions tegra194-camera-imx185-a00.dtsi
I also found the tegra194-camera-imx274-hdmi.dtsi that might be helpful.

Are these the right files for ORIN NX?
Is there a use-case example?


Thank you.

hello velorin0,

are you going to develop HDMI2CSI driver?
for instance,
tegra194-camera-imx185-a00.dtsi this is a normal bayer sensor that connect to CSI directly.
tegra194-camera-imx274-hdmi.dtsi its IMX274 plus a HDMI2CSI bridge driver, toshiba,tc358840.
however, tc358840 isn’t available for Orin series, you may check another bridge driver LT6911UXC for reference.
you may check similar discussion thread, such as Topic 285908 as see-also.

Hello Jerry,
I am not going to develop a driver. It is already developed. (kernel/kernel-5.10/drivers/media/i2c/adv748x/).

My question is related to how to do the port binding in such situation. The binding instruction on kernel/kernel-5.10/Documentation/devicetree/bindings/media/i2c/adv748x.txt is a good start.

My questions are:
Where should I do this port binding, in which dtsi file?
Also what would be the logic ADV748 → CSI in → CSI out → VI or NVCSI? I did some progress but there is no /dev/video0 char device created. How should I make sure that the video node will be instantiated?

Thank you

hello velorin0,

the connection logic is… ADV748 → CSI in → CSI out → VI in
you should have device tree settings to define them, please refer to developer guide, Port Binding.

please see-also Device Registration section,
you need to create a device-tree overlay file to register the camera module.

Hello Jerry,

I used that documentation as a guide.
The problem is that the driver gets loaded, the probing is sucessful … see below

… but the /dev/video0 is not created.

I have searched this forum for these issue a lot, and my conclusion is that there might be a problem withe the bindings.

But here is a bit confusing for me.

In some of the provided dtsi files (in the source files) I saw that there is a tegra-capture-vi node. In your answer and in the documentation the node is called simply vi.
there is also the host1x@13e00000 node that includes the nvcsi@15a00000 node.
In the documentation there is also the nvcsi node at the same level as vi node.
In the dtsi files from the sources, the nvcsi node is actually … the child of host1x.
In some other posts I saw people putting the vi also inside host1x, and at the same time also keeping tegra-capture-vi outside of it (with the same ports and children, except for labeling ofc)

Could you please shine some light on this, or point me into the right documentation direction?

  1. Is the vi same as tegra-capture-vi (meaning should it be inside or outside host1x?
  2. In the documentation example, the nodes have no unit-address. Does this mean that these should not have any reg properties? should I add the unit address from the memmap or not?
  3. in the nvcsi, what are the channels0,1,2… what do they represent? Are they CSI bricks or are depiction of the real ports of the ORIN NX module? Is there a block diagram for this?

… or did I get this all wrong

Thank you

hello velorin0,

please use tegra-capture-vi since you’re now using JP-5.1.1 (i.e. rel-35 code-line)

did you meant reg properties as following? (i.e. reg = <0x00>;)
yes, please add that for each node.
you may check reference drivers for development.

to put it simply, channels0,1,2 it is the number of cameras in your system.
it’s port-index=<x> to specify the CSI brick it’s using.
please see-also Port Index section.

Hi Jerry,

Thanks for the answer.
So the tegra-capture-vi node should be outside host1x, but the nvcsi inside it? Or should I avoid host1x completly? This is still unclear to me, if you could please help.

Thank you

hello velorin0,

Orin series has two physical VI devices.
as you can see in the Orin TRM, by checking… [Figure 1.1 External Connectivity Diagram] in page-538.

VI and NVCSI all under host1x.
for instance,

        host1x@13e00000 {
                vi0@15c00000 {...}
                vi1@14c00000 {...}
                nvcsi@15a00000 {...}

actually, tegra-capture-vi is vi_base, which is also point-to vi0 and vi1.
as you can see…

 	tegra-capture-vi {
 		compatible = "nvidia,tegra-camrtc-capture-vi";
 		nvidia,vi-devices = <&vi0 &vi1>;

hope this helps.

Everything seems to be exactly like described. But /dev/video0 still is not mapped… Should I look towards other direction? Is there a checklist I could follow for such situations?
Is there a problem with JP 5.1.1 for these types of issues?

hello velorin0,

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.

if there’s a error returns, it’ll not register a video node, (/dev/video0).