CSI Manual on Pi 5: Difference between revisions

No edit summary
No edit summary
Line 12: Line 12:
: If (and only if) you have a device such as the C790 that supports the 22pin connector with all 4 lanes wired out, and are using a Compute Module with the CAM1 connector that also has all 4 lanes wired up, you can use:
: If (and only if) you have a device such as the C790 that supports the 22pin connector with all 4 lanes wired out, and are using a Compute Module with the CAM1 connector that also has all 4 lanes wired up, you can use:
: <pre>dtoverlay=tc358743,4lane=1</pre>
: <pre>dtoverlay=tc358743,4lane=1</pre>
:Check the amount of memory assigned to the CMA heap with “dmesg | grep cma”. The first line should be along the lines of:
: <pre>dmesg | grep cma</pre>
: <pre>[0.000000] cma: Reserved 256 MiB at 0x000000001ec00000</pre>
:If it reports less than '''96MB''' assigned to CMA, then edit /boot/cmdline.txt and add to the start of the line. Do NOT add any carriage returns.
:<pre>cma=96M</pre>


: Then '''reboot''' the raspberry Pi board, '''this is very important!DON'T miss this step!'''
: Then '''reboot''' the raspberry Pi board, '''this is very important!DON'T miss this step!'''
: <pre>sudo reboot</pre>
: <pre>sudo reboot</pre>


:If all is well you should get a '''/dev/video0''' device as following:
:After adding the driver configuration, restart the Raspberry Pi for it to take effect. If the configuration is correct, execute '''ls /dev/video*''' in the terminal, and you should see video devices listed:
:<pre>ls /dev/video0</pre>
:<pre>ls /dev/video*</pre>
:<pre>/dev/video0</pre>
:<pre>/dev/video0 /dev/video19  /dev/video20  /dev/video22  /dev/video24  /dev/video26  /dev/video28  /dev/video3  /dev/video31  /dev/video33  /dev/video35  /dev/video5  /dev/video7</pre>
:<pre>/dev/video1  /dev/video2  /dev/video21  /dev/video23  /dev/video25  /dev/video27  /dev/video29  /dev/video30  /dev/video32  /dev/video34  /dev/video4  /dev/video6</pre>


2. Execute the following command to find the '''media node''' corresponding to the CSI as '''media0''', under the '''rp1-cfe (platform: 1f00128000.csi)''' field:
2. Execute the following command to find the '''media node''' corresponding to the CSI as '''media0''', under the '''rp1-cfe (platform: 1f00128000.csi)''' field: