MIPI CSI camera with RAW12 using Toshiba bridge

Hi,

I am using a camera using a Toshiba bridge (the camera provides parallel so Toshiba bridge does parallel to MIPI conversion).

I am using a custom board with Jetson TX2 NX and I want to avoid as much as possible the ISP in the TX2 NX.

My questions are:

  1. How should I configure the Jetson device tree to support such sensor? should I put it as RAW12, is that supported in TX2 NX?
  2. The Toshiba bridge sends the RAW 12 as 2 pixels packed as 3 bytes (seems to me to be as defined by the MIPI standard) is this mode supported by the TX2 NX?
  3. Is there a mode where I can just have the VI/CSI parts take the data sent via MIPI and just dump it using v4l2-ctl without any interpretation of the content (and don’t do debayer/etc.)?

hello urielom8ug,

(1) please refer to Camera Architecture Stack, you may going through v4l2src to bypass internal ISP.
(2) Raw12 is supported, you may download TX2 TRM to check [27.10 PIXFMT] for the support input formats.
(3) as mentioned by (1), you may calling v4l2 directly. here’s sample pipeline for reference.
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=2592,height=1944,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.raw

no, this is not supported. [EDIT] it’s supported.

So according to MIPI CSI specification RAW12 is sent as 2 pixels in 3 bytes like I sent above.

I looked in the TRM and it mentions RAW12 is supported so how is NVCSI expecting this to be sent to him?

Is using RAW8 can be a workaround? NVCSI should just forward it to VI as bytes?

See screenshot (from public available draft in the internet https://caxapa.ru/thumbs/799244/MIPI_Alliance_Specification_for_Camera_S.pdf):

it’s saving to memory as following…

That is the memory format which is after it goes trough nvcsi, vi and pixfmt.

I am asking what goes over MIPI (and read by nvcsi), over mipi RAW12 is sent as 3 bytes for 2 pixels. You said that it isn’t supported in TX2 NX which means that it doesn’t support RAW12.

Can you please check this?

it’s packing the 12-bit pixel data to looks like 8-bit data format, (i.e. 2 pixels in 3 bytes), whereas we support sensor that output Raw12 directly.

Are you sure about that? where is that written in the documenation?

RAW12 in MIPI is sent this way, the T_R16_I is what you store in memory.

If RAW12 sent this way isn’t supported, RAW8 is supported? is there a way to tell NVCSI/VI to ignore MIPI CSI type and treat everything as RAW8?

RAW8 in MIPI is just byte boundary:

@JerryChang any update?

let me revise my comments, Raw12 is supported by TX2 NX.

Supported per the standartd? i.e. 2 pixels in 3 bytes?

Is there an example of a sensor configuration for RAW12?

you may visit linux-tegra-r3275 to download [Driver Package (BSP) Sources].
here’re reference drivers,
$public_sources/kernel_src/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-modules/tegra186-camera-imx185-a00.dtsi
$public_sources/kernel_src/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-modules/tegra186-camera-imx390-a00.dtsi

Went over both, as you said they are using raw12 and based on imx185 datasheet raw12 is done using 3 bytes for 2 pixels.

I will use the same config and report back, thank you

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.