Difference between revisions of "RZ-A/Boards/GR-PEACH-audiocamerashield"

From eLinux.org
Jump to: navigation, search
(Software)
m (s/Pach/Peach/)
Line 28: Line 28:
 
To use GR-Peach audiocamera shield on top of a mainline Linux release the following not yet merged components are required:
 
To use GR-Peach audiocamera shield on top of a mainline Linux release the following not yet merged components are required:
  
* A driver for GR-Pach Capture Engine Unit (CEU)
+
* A driver for GR-Peach Capture Engine Unit (CEU)
 
* Device tree updates to make use of the CEU interface
 
* Device tree updates to make use of the CEU interface
 
* A device tree source file for the audiocamera shield and the camera module
 
* A device tree source file for the audiocamera shield and the camera module

Revision as of 11:47, 13 November 2017

This page describes how to use GR-Peach Audiocamera Shield within Linux.

For instructions on how to run mainline Linux on GR-Peach please refer to RZ-A/Boards/GR-PEACH-mainline

Hardware

Audiocamera Shield

The audiocamera shield is better described by its official website, where schematics and other resources are available.

https://os.mbed.com/teams/Renesas/wiki/Audio_Camera-shield

https://www.core.co.jp/product/m2m/gr-peach/audio-camera.html

Camera Module

The shield is said not to come with any camera module, and mt9m111-based modules seems to be the suggested ones.

Some vendors (eg. Digikey) ships the shield with a camera module which has a connector compatible with CN15, but uses a sensor not currently supported by mainline Linux (mt9v111).

Several camera modules exist on the market with image sensors supported by Linux, just make sure their pin out is compatible with CN15 connector on camera module, or make your own adapter to use other modules.

Camera Clock

Camera modules with on-board oscillator do not need any external reference clock. Most of the camera modules on the market ship with no oscillator installed and need an external clock source to work properly.

Audiocamera shield allows to install an oscillator with a frequency that matches the one required by the selected image sensor. The oscillator can be soldered on the bottom side of the board, indicated with 'X1' silk-screen label.

Software

To use GR-Peach audiocamera shield on top of a mainline Linux release the following not yet merged components are required:

  • A driver for GR-Peach Capture Engine Unit (CEU)
  • Device tree updates to make use of the CEU interface
  • A device tree source file for the audiocamera shield and the camera module

All of these components can be found at git://jmondi.org/linux gr-peach-ceu-elinux-v1

The tag includes a not-yet-upstream driver for CEU interface replacing the existing sh_mobile_ceu one, adds a new CEU sub-node entry to r7s72100.dtsi and creates a gr-peach-audiocamerashield.dtsi file which describes the audiocamera shield used in conjunction with a OV7670 camera module.

The new CEU driver supports capturing images in 3 different formats, two planar formats (NV12/NV16 and NV21/NV61 variants) and one non-planar YUYV format. The image resolution is limited by the image sensor capabilities (VGA sizes, 640x480).

Capturing Images

It is possible to capture images using standard V4L2 tools, such as yavta.

Due to the limited amount of available memory in GR-Peach only a few buffers can be reserved for capturing images, even if with limited resolution.

An example command line to capture images in NV12 or YUYV formats are

yavta /dev/video0 -c 2 -n 2 -f YUYV -s 640x480 -F"yuyv#.bin"
yavta /dev/video0 -c 2 -n 2 -f NV12 -s 320x240 -F"nv12#.bin"