How to use another mipi port data on Xavier

Hi teams

Recently we are using AGX Xavier for development.
We connect four sensors to the platform.
It likes below:

In 960 port0 interface, we have successfully obtained the image data of four camera sensors.Each camera data is obtained from the video 0-3 of the dev node。

960 chip has data mirror function. We want to get the same camera data from 960 port 1 and share it with another Mipi port。Just like the hardware connection of port1 in the picture above。In short, the data of the four cameras are transmitted to two separate 4 lanes Mipi ports to share the data of the underlying cameras

But how can we separate the camera data in Mipi? Do we need to register new video nodes(eg: video4-7) Can you give me some guidance?


Yes need new video nodes for the port1. Just treat it as another four sensors connect to port1.

Hi ShaneCCC

I got it.
The four sensors on port0 are implemented based on imx390,
For another four sensors on port 1,Can I use the same driver framework to register 8 video nodes(like: max9295,max9296 driver model ?
In that case, I just need to modify the DTS file


Yes, you can just modify the dts to support it.

Hi ShaneCCC

I’ve implemented this feature.
it likes below:

The preview display of the first three channels of data image is normal.(sensor a ; sensor b; sensor c is ok)
The sensor d is a little stutters here.

This seems to be caused by a lack of CSI bandwidth.

From the deserializer side,it is enough.

The hardware we use is two 4 lanes MIPI port.
port 0 -----4 lanes MIPI
port 1 -----4 lanes MIPI

From the nvidia “Xavier_TRM_DP09253002_v1.4p.pdf”,
The description is as follows:

I have a little doubt as follows,it said that “MIPI D-PHY supports up to 2.5 Gbits/sec per pair”,
Q1 ) the 2.5 Gbits/sec per pair is two lanes ot two data line. ?
Q2) According to my understanding, The Maximum CSI bandwidth is 10Gbits/sec for 4 lanes MIPI. Is it right or not ?

Could you give me some advice ?

The actual video effect of the last camera is attached
last-camera-little stutters here .zip (1.1 MB)


Try to boost the clock to try.

sudo su
echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee  /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate

Hi ShaneCCC

When I execute the up command,the last channel video still stutters here.
There was no improvement.
The uart log output as below:

Is this a lack of csi bandwidth ?

Any error in the trace log?
How about try lower frame rate?

Hi ShaneCCC

the trace log was attached.
Now,I had not been try lower frame rate.

trace.txt (250.4 KB)


Could you try if only launch the last video only to check if relative with the bandwidth.

Hi ShaneCCC

the result was attached.
my sensor is 1280x720@30fps 4 channels (1.4 MB)

Does the problem still there if only launch one sensor?

Hi ShaneCCC

it still here.

Could you dump below REG from the vi driver for corresponding channel

  • VI_CH*_MATCH_0

Hi ShaneCCC

sorry for the late response.
I only found the below reg:

  • VI_CH0_MATCH_0 Offset: 0x4407
  • VI_CH0_MATCH_DOL_0 Offset: 0x4408
  • VI_CH0_MATCH_VC_HI_0 Offset: 0x4409
  • VI_CH0_MATCH_DATATYPE_0 Offset: 0x440a
  • VI_CH0_MATCH_FRAMEID_0 Offset: 0x440b

there is no base address information.
What is the base address?
Could I use devmem to dump it ?


Could you provide the trace log only launch latest sensor and another trace log for launch one normal sensor.

Hi ShaneCCC

I had got the log,Trace log it as below;

1 ) connect four sensors,launch the abnormal one.
connect-four-sensor-open-latest-sensor.txt (207.8 KB)

2 ) connect four sensors,launch the normal one.
connect-four-sensor-open-normal-sensor.txt (220.2 KB)

Looks like the DS90UB960 chip output four VC data to the bus even only launch one sensor.
Could you configure the DS90UB960 only one channel when only enable one sensor?

Hi ShaneCCC

Yes The up log is connect 4 camera sensors and 960 output 4 channel data,then I lanch the good one and the bad one sensor.

Your meaning is below which one ?

  1. only connect one sensor to 960 input side and 960 output side only configure one channel package data.
  2. only connect one sensor to 960 input side and 960 output side still configre four channel data setting ?

I would like to know the item 1