Thanks,
At first, I cheked the base DTB file /boot/dtb/kernel_tegra234-p3701-0000-p3737-0000.dtb
I found there is no description for the node or port 6 and 7 under tegra-capture-vi and nvcsi@15a00000. I added the descriptions for Port 6 and 7 in overlay DTBO, and overlay it with dtoverlay. The descriptions were in front of those for port0 to port 5 in the DTB generated by fdtoverlay command as below This caussed the issue of the gap between csi port number and VI channel.
port@6 {
reg=<0x06>
status=<okay>
endpoint {
port-index=<0x05>
vc-id=<0x00>
bus-width=<0x04>
status=<okay>
}
}
port@7 {
reg=<0x07>
status=<okay>
endpoint {
port-index=<0x05>
vc-id=<0x00>
bus-width=<0x04>
status=<okay>
}
}
port@0 {
.
.
}
.
.
.
port@5 {
.
.
}
I converted the base DTB to the DTS, then I put the node descriptions for port 6 and 7 under tegra-capture-vi and nvcsi@15a000000 nodes in the base DTB to solve this issue as below.
Eg.
tegra-capture-vi {
.
.
port@0 {
}
.
.
port@5 {
}
port@6 {
reg=<0x06>
status=<okay>
endpoint {
port-index=<0x05>
vc-id=<0x00>
bus-width=<0x04>
status=<okay>
}
}
port@7 {
reg=<0x07>
status=<okay>
endpoint {
port-index=<0x05>
vc-id=<0x01>
bus-width=<0x04>
status=<okay>
}
}
The issue was resolved. But I encountered next issue which the stream id for csi port 5 was 4.
Thes stream id = 4 is assigned to csi port 3 and 4, so the stream id for csi port 5 should be 5.
Sreams id is got from the function csi5_port_to_stream(u32 csi_port) as follows.
#define NVCSI_PORT_E MK_U32(0x4) // in nvidia\include\soc\tegra\camrtc-capture.h
static inline u32 csi5_port_to_stream(u32 csi_port) // in nvidia/drivers/media/platform/tegra/camera/nvcsi/csi5_fops.c.
{
return (csi_port < (NVCSI_PORT_E)) ?
csi_port : (((csi_port - NVCSI_PORT_E) >> 1U) + NVCSI_PORT_E);
}
I tried two approach,
- Changing NVCSI_PORT_E to NVCSI_PORT_F(=5).
- Changing the port-index for port 6 and 7 from 5 to 6
in this case, I also modified the base DTB as follows,
/* nvidia/drivers/media/platform/tegra/camera/fusa-capture/capture-vi.c */
#define MAX_NVCSI_STREAM_IDS U32_C(0x8)
/* base DTB */
tegra-capture-vi {
compatible = "nvidia,tegra-camrtc-capture-vi";
nvidia,vi-devices = <0x248 0x24a>;
nvidia,vi-mapping-size = **<0x07>**;
nvidia,vi-mapping = <0x00 0x00 0x01 0x00 0x02 0x01 0x03 0x01 0x04 0x00 0x05 0x01 0x06 0x01>;
nvidia,vi-mapping-names = "csi-stream-id\0vi-unit-id";
nvidia,vi-max-channels = <0x48>;
num-channels = <0x08>;
phandle = <0x44d>;
Certainly the stream id was changed from 4 to 5, but I still have been getting the following issue.
[ 64.301186] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stop_streaming: csi_pt=5, st_id=4, vc_id=0, pg_mode=0x0
[ 64.301188] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 64.308919] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=4, csi_port=5
I am stuck with this issue.
We discovered that the base DTB file for L4T R35.2.1 (included in Jetpack 5.1) may fix the issue. It looks “unfinished”…
Regards,