Difference between revisions of "SK-RZG1M:RZGEXT"
Line 186: | Line 186: | ||
Edit $WORK/build/conf/local.conf with your favorite text editor, and add at the end: | Edit $WORK/build/conf/local.conf with your favorite text editor, and add at the end: | ||
<pre> | <pre> | ||
− | MACHINE_FEATURES_append = "skrzg1m-ext02 | + | MACHINE_FEATURES_append = "skrzg1m-ext02 lvds avb" |
</pre> | </pre> | ||
</li> | </li> |
Revision as of 08:14, 1 July 2016
Introduction
This is the official Wiki for Renesas RZ/G1M Expansion Board.
Please refer to RZ-G/Boards/SK-RZG1M for Renesas RZ/G1M board.
Hardware
This section contains information about RZ/G1M Expansion Board hardware.
Board Layout
Hardware Features
- Ethernet AVB phy
- KSZ9031 phy
- LVDS camera interface
- MAX9272 deserializer
- 8-bit wide video bus connected to VI2 interface of R-Car M2 CPU
- 5V or 12V selectable supply voltage for camera with current limiting
- CMOS camera interface (x2)
- 8-bit wide bus with Hsync and Vsync
- Up to 100 MHz pixelclock
- High quality 24-bit audio codec PCM3168A
- 6 input channels (3 stereo jacks for microphone connection)
- 8 line out channels (RCA connectors)
- 8 HP outputs (3 stereo jack connectors for direct headphones connection)
- 44100/48000 Hz sampling frequency
- RS-232 interface with flow control
- Additional connector with 2xUART, SSI and several GPIOs
CMOS camera interface 2 (CN20) share VIN2 with LVDS camera deserializer. So only one type of camera can be used simultaneously.
CMOS camera interface 1 (CN19) share pins with WthAVB interface. So only EthAVB or CMOS camera can be used simultaneously.
Jumper Positions
J1 - voltage select for LVDS camera
"5V" - supply 5V to LVDS camera "12V" - supply 12V from CN4 to LVDS camera open - do not supply power to LVDS camera
SW1 Switch Positions
SW1.1
OFF - CMOS Camera on VIN2 active (CN20)
ON - LVDS Camera on VIN2 active (CN5)
SW1.2
OFF - CMOS Camera on VIN1 active (CN19)
ON - EthernetAVB port active (CN1)
SW1.1 | SW1.2 | Mode |
---|---|---|
off | off | CMOS(CN20)+CMOS(CN19) |
off | on | CMOS(CN20)+EthAVB |
on | off | LVDS(CN5)+CMOS(CN19) |
on | on | LVDS(CN5)+EthAVB |
LEDs Explanation
LED1 - EthAVB activity LED2 - EthAVB link LED3 - LVDS camera deserializer status LED4 - LVDS camera deserializer LOCK indicator LED5 - +3.3V overcurrent on CN23
CN19/CN20 Pinout
N | Dir | Description |
---|---|---|
1 | - | +3.3V |
2 | - | GND |
3 | <-- | I2C-SCL |
4 | <-> | I2C-SDA |
5 | --> | VI*_VSYNC |
6 | --> | VI*_HSYNC |
7 | --> | VI*_CLK |
8 | <-- | 24MHz CLK |
9 | --> | VI*_DATA7 |
10 | --> | VI*_DATA6 |
11 | --> | VI*_DATA5 |
12 | --> | VI*_DATA4 |
13 | --> | VI*_DATA3 |
14 | --> | VI*_DATA2 |
15 | --> | VI*_DATA1 |
16 | --> | VI*_DATA0 |
17 | <-- | Power Down |
18 | <-- | Reset |
19 | - | n.u. (alternative Reset) |
20 | - | n.u. (alternative Power Down) |
Pinout is compatible with several camera modules from ArduCAM.
Additional Connector
+3.3V output current limited at 250mA
Multi-Channel Audio
Hardware
PCM3168A: 24-Bit, 96-kHz/192-kHz, 6-In/8-Out Audio Codec with Differential Input/Output
TPA6133A2: Stereo Headphone Amplifiers for Headphones outputs
OPA2134: High Performance Audio Operational Amplifiers for Line-outs and Microphone/Line-ins
Connected to R-Car M2 processor through SSI3 and 4 in I2S TDM mode (Time Division Multiplexed Audio Interface).
Software
From SW point of view PCM3168A codec is represented as 8-ch playback and 8-ch capture device. Due to share of WS and BCLK pins between SSI3 and SSI4 both playback and capture can be done with same sample rate only (48000 or 44100).
Using a PulseAudio soundcard can be splitted to several sink/sources.
EthernetAVB
R-Car M2 SoC provides Ethernet AVB functionality with 1000Mbps speed. This IP block shares pins with Ethernet MAC so only one of these interfaces can be used. RZ/G1M Board provides Ethernet MAC with KSZ8041RNLI PHY and Ethernet AVB connector (CN3). You can find this connector on the Porter hardware page(similar). Thus it is necessary to disconnect KSZ8041RNLI PHY before using Ethernet AVB. To achieve this you should remove resistor R321. Resistors R1005 and R1006 allows to connect PHY reset pin to different SoC pins. Please, check that resistor R1005 is installed and R1006 is not.
This resistor connects KSZ8041RNLI PHY reset pin with R-Car M2 SoC. Without this resistor MAC PHY remains in the reset mode and does not use shared pins.
Next step you should set JP7 in open state. Pext01 board generates own 125MHz refclock.
Modification
You need to connect test point CP104 to the test point TP17 to make VIN1 work properly.
Schematics
RZ/G1M Expansion Board schematics can be found in File:Skrzg1m-ext02-V1-Schematic.pdf
Building the Yocto image
To build Yocto image with Ethernet AVB support for RZ/G1M board, follow this procedure carfully:
- Do all steps specified on RZ-G/Boards/Yocto and stop before executing bitbake core-image-weston or bitbake core-image-x11
-
Edit $WORK/build/conf/local.conf with your favorite text editor, and add at the end:
MACHINE_FEATURES_append = "skrzg1m-ext02 lvds avb"
- Complete all steps on RZ-G/Boards/Yocto.
To boot Linux kernel use uImage with:
r8a7743-skrzg1m-ext02-cmos1-cmos2.dtb or r8a7743-skrzg1m-ext02-avb-cmos2.dtb or r8a7743-skrzg1m-ext02-cmos1-lvds.dtb or r8a7743-skrzg1m-ext02-avb-lvds.dtb
or uImage+dtb. Please refer to Switch Position section table to use the right combintaion.
To change the order of cameras, connected to the RZ/G1M Expansion Board, you need to edit board-skrzg1m-reference.c file.
By default
SKRZG1M_CAMERA(1, "ov5642", 1, 0x3c, NULL, RCAR_VIN_BT601);
and
SKRZG1M_CAMERA(2, "mt9d111", 0, 0x48, NULL, RCAR_VIN_BT601);
parameters are set. But you can change VIN number and/or camera name.
How to test some capabilities of RZ/G1M Expansion Board
1. Gigabit Ethernet port:
Connect port to workstation/network via Ethernet switch or directly. Set up eth0 interface:
$ ifconfig eth0 up
Set up network address (via dhcp, for example):
$ udhcpc -i eth0
After that you can optionaly check speed of Ethernet port by iperf util (add it to IMAGE_INSTALL_append in local.conf or build directly by bitbake and install via ipk):
$ iperf -s
Now run on your host machine iperf client: $ iperf -c <porter_ext01_ip>
2.Sound:
Check existence of sound devices via aplay/arecord:
$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: pcm3168a [pcm3168a], device 0: rsnd-dai.0-pcm3168a pcm3168a-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: ak464x [ak464x], device 0: rsnd-dai.1-ak4642-hifi ak4642-hifi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
$ arecord -l **** List of CAPTURE Hardware Devices **** card 0: pcm3168a [pcm3168a], device 0: rsnd-dai.0-pcm3168a pcm3168a-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: ak464x [ak464x], device 0: rsnd-dai.1-ak4642-hifi ak4642-hifi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
gst-launch-1.0 filesrc location=./test.mp3 ! \ mad ! \ audioconvert ! audioresample ! \ audio/x-raw,channels=8,rate=48000,format=S32LE ! \ alsasink sync=false #device='hw:1,0'
3. OV5 Camera:
/etc/init.d/weston stop openvt -s -- weston --idle-time=0 --use-v4l2 gst-launch-1.0 -v v4l2src device=/dev/video1 io-mode=dmabuf ! 'video/x-raw,format=RGB16,width=1200,height=720' ! waylandsink
4. MT9D Camera:
/etc/init.d/weston stop openvt -s -- weston --idle-time=0 --use-v4l2 gst-launch-1.0 -v v4l2src device=/dev/video2 io-mode=dmabuf ! 'video/x-raw,format=RGB16,width=1600,height=1200' ! waylandsink
Installing RZ/G1M Expansion Board
Use the following procedure to install RZ/G1M Expansion Board to the RZ/G1M Board.
1. Find EXIO and Ethernet AVB connectors on both RZ/G1M and RZ/G1M Expansion boards.
2. Align and carefully push them to each other until Ethernet AVB and EXIO connectors are fully inserted.
3. When boards are reliably mounted to each other, use 12V power supply splitter cables to connect RZ/G1M and RZ/G1M Expansion board's power plugs to the same adapter.
Some peripheral components: