R-Car/Boards/Kingfisher

From eLinux.org
< R-Car
Revision as of 01:25, 14 December 2018 by RenesasJa (talk | contribs) (Where to buy)
Jump to: navigation, search

Introduction

This is the official Wiki for Kingfisher Infotainment Board.

Hardware

This section contains information about Kingfisher Board hardware.

Board Layout

Kfisher top specs.png

Kfisher bot specs.png

Hardware Features

  • Ethernet AVB phy
    • KSZ9031 phy
  • MOST interface
    • Support both 3-pin and 6-pin MLB interface
    • Pinout compatible with Microchip evaluation boards
  • LVDS camera interface
    • MAX9286 or TI960 deserializers
    • MIPI CSI2 bus
    • 5V, 9V or 12V selectable supply voltage for camera with current limiting
  • High quality 24-bit audio codec PCM3168A
    • 8 input channels (4 stereo jacks for microphone connection)
    • 6 line out channels (RCA connectors)
    • 6 HP outputs (3 stereo jack connectors for direct headphones connection)
    • 44100/48000 Hz sampling frequency
  • Two USB 3.0 ports
  • USB OTG port
  • SD card slot
    • SD card slot(CN47) supports only 3.3 signal voltage(= Default/High speed class only).
      • If you want to use other cards please use the slot(CN6) on the Starter Kit board.
  • Si4689 base AM/FM/DAB radio
    • Digital audio interface to R-Car M2 CPU
    • Additional flash storage for fast radio boot
    • Supply for active DAB antennas with current limit (5 or 12 V)
  • GPS/GLONASS receiver
    • Serial and i2c interface to R-Car
  • 9-axis sensor:
    • 3D digital linear acceleration sensor
    • 3D digital angular rate sensor
    • 3D digital magnetic sensor
  • WiFi/BT module Texas Instruments WL1837
  • HDMI
    • This board equipped with a HDMI transmitter (ADV7513BSWZ) which support HDMI1.4a.
    • The maximum resolution is 1920x1080i and it connected Digital output port (RGB888) on R-Car Starter Kit.
  • Power supply: 12V, 9 Amps
    • The main power supply domain must be connected to an external AC adapter. The voltage is +12V DC.
    • DO NOT USE R-Car Starter kit AC adapter to connect this board or this board AC adapter to connect R-Car Starter kit. If connect wrong AC adapter then it has serious damage to the board.

Where to buy

Kingfisher board and GMSL Camera board(*) can be ordered from following distributors:

Click to buy Kingfisher board from SHIMAFUJI Electric - World Wide

(*) GMSL Camera board info: http://www.shimafuji.co.jp/DL/EN/InfotainmentCarrierBoard/#GMSL02


Official board documentation

Change point

Function M03 Board to M04 Board M04 Board to M05 Board M05 Board to M06 Board
USB2.0 No difference No difference Change filter(L9), Diode(D6,D7)
WIFI Unmount SMA connector(CN45,CN46) No difference No difference
BLUETOOTH ADD Level conversion IC(U116) / Support BT AUDIO(HFP) No difference No difference
SD CARD Change Power IC(U106) / Not support SD1.8V No difference Change Diode(D44,D45)
SERIAL Change connector shape(CN4 Male to Female) No difference Change Diode(D19~D23)
FPDLink No difference Delete function No difference
Audio In No difference No difference Change Diode(D15~D17)
Audio Out No difference No difference Delete Diode(D24~D40)
POWER AMP ADD Reset Signal(nVRST) Delete function -
MOST ADD Level conversion IC(U118) No difference Change MOST ↔ GPS Function select register (R661~R663) to select SW (SW7)
GPS No difference No difference Change MOST ↔ GPS Function select register (R661~R663) to select SW (SW7)
I2C No difference No difference Chabge I2C repeater (U1, U4)
ETHER ADD Level conversion IC(U117) Delete function No difference

The M06 board has improved the I2C error problem, Fixed a rare start-up problem when turned power on

    < Major modification on M06 >
  1. I2C error modification
    - Replace I2C repeater
    - Changing the resistance value
  2. Booting NG modification
    - Power stabilization
    - Sequence correction the kingfisher board start-up after StarterKit.
  3. Change of MOST-GPS switching method (SW 7)

How to build

Build image

  1. Create a directory and switch to it
    Warning! Yocto builds require a lot of disk space (up to 100 GB). Make sure you have got enough before starting the build.
    mkdir build || exit
    cd build
    WORK=`pwd`
    echo $WORK
    
  2. Clone basic Yocto layers:
    cd $WORK
    git clone git://git.yoctoproject.org/poky
    git clone git://git.linaro.org/openembedded/meta-linaro.git
    git clone git://git.openembedded.org/meta-openembedded
    git clone git://github.com/renesas-rcar/meta-renesas
    git clone git://github.com/CogentEmbedded/meta-rcar.git
    
  3. Switch to proper branches/commits
    1. For Yocto v2.23.1
      cd $WORK/poky
      git checkout -b tmp yocto-2.1.3
      cd $WORK/meta-openembedded
      git checkout -b tmp 55c8a76da5dc099a7bc3838495c672140cedb78e
      cd $WORK/meta-linaro
      git checkout -b tmp 2f51d38048599d9878f149d6d15539fb97603f8f
      cd $WORK/meta-renesas
      git checkout -b tmp 7acbf5e2f99c59478adbc73c6a40d314589a3009
      cd $WORK/meta-rcar
      git checkout -b v2.23.1 remotes/origin/v2.23.1
      
    2. For Yocto v3.9.0
      cd $WORK/poky
      git checkout -b tmp 342fbd6a3e57021c8e28b124b3adb241936f3d9d
      cd $WORK/meta-openembedded
      git checkout -b tmp dacfa2b1920e285531bec55cd2f08743390aaf57
      cd $WORK/meta-linaro
      git checkout -b tmp 75dfb67bbb14a70cd47afda9726e2e1c76731885
      cd $WORK/meta-renesas
      git checkout -b tmp fd078b6ece537d986852cb827bd21e022a797b2f
      cd $WORK/meta-rcar
      git checkout -b v3.9.0 remotes/origin/v3.9.0
      
    3. For Yocto v3.13.0 (Note: https://elinux.org/R-Car/Boards/Yocto-Gen3#Known_issues_and_limitations (No.3))
      This BSP for Kingfisher includes short-term workaround.
      It improves stability on Uboot but performance down.
      cd $WORK/poky
      git checkout -b tmp 7e7ee662f5dea4d090293045f7498093322802cc
      cd $WORK/meta-openembedded
      git checkout -b tmp 352531015014d1957d6444d114f4451e241c4d23
      cd $WORK/meta-linaro
      git checkout -b tmp 75dfb67bbb14a70cd47afda9726e2e1c76731885
      cd $WORK/meta-renesas
      git checkout -b tmp 00f70f062aace04c051fa92d3cd7b887718fc313
      cd $WORK/meta-rcar
      git checkout -b v3.13.0 remotes/origin/v3.13.0
      

    Another versions are not tested for compatibility. Legacy BSP instruction can be found here R-Car Kingfisher legacy

  4. This step is only for Yocto v2.23.1. Apply Linaro-GCC patch file:
    cd $WORK/meta-renesas
    export PATCH_DIR=meta-rcar-gen3/docs/sample/patch/patch-for-linaro-gcc
    patch -p1 < ${PATCH_DIR}/0001-rcar-gen3-add-readme-for-building-with-Linaro-Gcc.patch
    unset PATCH_DIR
    
  5. Unzip downloaded proprietary driver modules to $WORK/proprietary folder.
    You should see the following files:
    1. For Yocto v2.23.1
      $ ls -1 $WORK/proprietary
      R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20170828.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20170828.zip
      
    2. For Yocto v3.9.0
      $ ls -1 $WORK/proprietary/*.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20180627.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20180627.zip
      
    3. For Yocto v3.13.0
      $ ls -1 $WORK/proprietary/*.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20181029.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20181029.zip
      
  6. Populate meta-renesas with proprietary software packages.
    export PKGS_DIR=$WORK/proprietary
    cd $WORK/meta-renesas
    sh meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh -f $PKGS_DIR
    unset PKGS_DIR
    
  7. Setup build environment
    cd $WORK
    source poky/oe-init-build-env
    
  8. Prepare default configuration files.
    1. For Yocto v2.23.1
      [m3ulcb]
      cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/mmp/*.conf ./conf/
      [h3ulcb]
      cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/mmp/*.conf ./conf/
      
      cd $WORK/build
      cp conf/local-wayland.conf conf/local.conf
      
    2. For Yocto v3.9.0 or later
      [m3ulcb]
      cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/mmp/*.conf ./conf/
      [h3ulcb]
      cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/*.conf ./conf/
      
      cd $WORK/build
      cp conf/local-wayland.conf conf/local.conf
      
  9. Edit $WORK/build/conf/local.conf to enable/disable graphics and multimedia proprietary drivers support
  10. Edit local.conf with evaluation packages requirements:
    1. For Yocto v2.23.1 or later (to enable EVA_ prefix during packages install)
      DISTRO_FEATURES_append = " use_eva_pkg"
      
  11. Add layer meta-rcar
    bitbake-layers add-layer ../meta-rcar/meta-rcar-gen3-adas
    
  12. Start the build
    bitbake core-image-weston
    
  13. Building image can take up to a few hours depending on your host system performance.
    After the build has been completed successfully, you should see the output similar to:
    NOTE: Tasks Summary: Attempted 4704 tasks of which 31 didn't need to be rerun and all succeeded.
    

    and the command prompt should return.

  14. Bitbake has generated all the necessary files in ./tmp/deploy/images directory.
    You can verify its content:
    $ ls -1 `find ./tmp/deploy/images/m3ulcb/ -maxdepth 1 -type l -print`
    ./tmp/deploy/images/m3ulcb/core-image-weston-m3ulcb.cpio.gz
    ./tmp/deploy/images/m3ulcb/core-image-weston-m3ulcb.ext4
    ./tmp/deploy/images/m3ulcb/core-image-weston-m3ulcb.manifest
    ./tmp/deploy/images/m3ulcb/core-image-weston-m3ulcb.tar.bz2
    ./tmp/deploy/images/m3ulcb/Image
    ./tmp/deploy/images/m3ulcb/Image-m3ulcb.bin
    ./tmp/deploy/images/m3ulcb/Image-r8a7796-m3ulcb-kf.dtb
    ./tmp/deploy/images/m3ulcb/modules-m3ulcb.tgz
    ./tmp/deploy/images/m3ulcb/u-boot.bin
    ./tmp/deploy/images/m3ulcb/u-boot-elf-m3ulcb.srec
    ./tmp/deploy/images/m3ulcb/u-boot-elf.srec
    ./tmp/deploy/images/m3ulcb/u-boot-m3ulcb.bin
    

    Image is a Kernel image, *.dtb is a blob file, core-image-weston-m3ulcb.tar.bz2 is the rootfs, modules-m3ulcb.tgz are kernel modules.

  15. You can now proceed with running Yocto images

After all these steps you can start working with boards and apps.

Build with MOST

MOST and GPS share the same R-CAR SoC pins and GPS is used by default.
In order to use MOST one need to perform h/w modifications on KF board:

- M04, M05
move resistor from R661 -> R660
move resistor from R663 -> R662
- M06
Slide SW7 to "MOST" side.

And enable MOST in BSP by adding option to local.conf:

KF_ENABLE_MOST = "1"

Build with SD3 (CN47)

SD3 and WIFI share the same R-CAR SoC resource and WIFI is used by default.
In order to use SD on CN47 instead WIFI add following option to local.conf:

KF_ENABLE_SD3 = "1"

Build SDK

After building image run this command to build SDK

bitbake core-image-weston -c populate_sdk

After build success the SDK installation script must appears in ./tmp/deploy/sdk directory:

 tmp/deploy/sdk/poky-glibc-x86_64-core-image-weston-aarch64-toolchain-2.1.3.sh

To install SDK run this command and follow instructions on the screen:

./tmp/deploy/sdk/poky-glibc-x86_64-core-image-weston-aarch64-toolchain-2.1.3.sh

Build scripts examples

  1. Build preparation
    1. For Yocto v2.23.1
      #!/bin/sh
      
      mkdir build || exit
      cd build
      WORK=`pwd`
      echo $WORK
      
      git clone git://git.yoctoproject.org/poky
      git clone git://git.linaro.org/openembedded/meta-linaro.git
      git clone git://git.openembedded.org/meta-openembedded
      git clone git://github.com/renesas-rcar/meta-renesas.git
      git clone git://github.com/CogentEmbedded/meta-rcar.git
      
      cd $WORK/poky
      git checkout -b tmp yocto-2.1.3
      cd $WORK/meta-linaro
      git checkout -b tmp 2f51d38048599d9878f149d6d15539fb97603f8f
      cd $WORK/meta-openembedded
      git checkout -b tmp 55c8a76da5dc099a7bc3838495c672140cedb78e
      cd $WORK/meta-renesas
      git checkout -b tmp 7acbf5e2f99c59478adbc73c6a40d314589a3009
      cd $WORK/meta-rcar
      git checkout -b v2.23.1 remotes/origin/v2.23.1
      
      cd $WORK/meta-renesas
      export PATCH_DIR=meta-rcar-gen3/docs/sample/patch/patch-for-linaro-gcc
      patch -p1 < ${PATCH_DIR}/0001-rcar-gen3-add-readme-for-building-with-Linaro-Gcc.patch
      unset PATCH_DIR
      
      cd $WORK/
      PKGS_DIR=$WORK/proprietary
      cd $WORK/meta-renesas
      #sh meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh -f $PKGS_DIR
      sh meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh -f $PKGS_DIR
      
    2. For Yocto v3.9.0
      #!/bin/sh
      
      mkdir build || exit
      cd build
      WORK=`pwd`
      echo $WORK
      
      git clone git://git.yoctoproject.org/poky
      git clone git://git.linaro.org/openembedded/meta-linaro.git
      git clone git://git.openembedded.org/meta-openembedded
      git clone git://github.com/renesas-rcar/meta-renesas
      git clone git://github.com/CogentEmbedded/meta-rcar.git
      
      cd $WORK/poky
      git checkout -b tmp 342fbd6a3e57021c8e28b124b3adb241936f3d9d
      cd $WORK/meta-openembedded
      git checkout -b tmp dacfa2b1920e285531bec55cd2f08743390aaf57
      cd $WORK/meta-linaro
      git checkout -b tmp 75dfb67bbb14a70cd47afda9726e2e1c76731885
      cd $WORK/meta-renesas
      git checkout -b tmp fd078b6ece537d986852cb827bd21e022a797b2f
      cd $WORK/meta-rcar
      git checkout -b v3.9.0 remotes/origin/v3.9.0
      
      cd $WORK/
      PKGS_DIR=$WORK/proprietary
      cd $WORK/meta-renesas
      #sh meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh -f $PKGS_DIR
      sh meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh -f $PKGS_DIR
      
    3. For Yocto v3.13.0
      #!/bin/sh
      
      mkdir build || exit
      cd build
      WORK=`pwd`
      echo $WORK
      
      git clone git://git.yoctoproject.org/poky
      git clone git://git.linaro.org/openembedded/meta-linaro.git
      git clone git://git.openembedded.org/meta-openembedded
      git clone git://github.com/renesas-rcar/meta-renesas
      git clone git://github.com/CogentEmbedded/meta-rcar.git
      
      cd $WORK/poky
      git checkout -b tmp 7e7ee662f5dea4d090293045f7498093322802cc
      cd $WORK/meta-openembedded
      git checkout -b tmp 352531015014d1957d6444d114f4451e241c4d23
      cd $WORK/meta-linaro
      git checkout -b tmp 75dfb67bbb14a70cd47afda9726e2e1c76731885
      cd $WORK/meta-renesas
      git checkout -b tmp 00f70f062aace04c051fa92d3cd7b887718fc313
      cd $WORK/meta-rcar
      git checkout -b v3.13.0 remotes/origin/v3.13.0
      
      cd $WORK/
      PKGS_DIR=$WORK/proprietary
      cd $WORK/meta-renesas
      #sh meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh -f $PKGS_DIR
      sh meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh -f $PKGS_DIR
      
  2. Building yocto
    1. For Yocto v2.23.1
      #!/bin/sh
      
      cd build
      WORK=`pwd`
      echo $WORK
      
      cd $WORK
      source poky/oe-init-build-env
      
      #cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/bsp/*.conf ./conf/.
      #cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/gfx-only/*.conf ./conf/.
      cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/mmp/*.conf ./conf/.
      
      cd $WORK/build
      cp conf/local-wayland.conf conf/local.conf
      echo "DISTRO_FEATURES_append = \" use_eva_pkg\"" >> $WORK/build/conf/local.conf
      # uncomment for ADAS HAD board only:
      #echo "MACHINE_FEATURES_append = \" h3ulcb-had\"" >> $WORK/build/conf/local.conf
      
      bitbake-layers add-layer ../meta-rcar/meta-rcar-gen3-adas
      
      bitbake core-image-weston
      bitbake core-image-weston -c populate_sdk
      
    1. For Yocto v3.9.0 or later
      #!/bin/sh
      
      cd build
      WORK=`pwd`
      echo $WORK
      
      cd $WORK
      source poky/oe-init-build-env
      
      #cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/*.conf ./conf/.
      #cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/*.conf ./conf/.
      cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/*.conf ./conf/.
      
      cd $WORK/build
      cp conf/local-wayland.conf conf/local.conf
      echo "DISTRO_FEATURES_append = \" use_eva_pkg\"" >> $WORK/build/conf/local.conf
      # uncomment for ADAS HAD board only:
      #echo "MACHINE_FEATURES_append = \" h3ulcb-had\"" >> $WORK/build/conf/local.conf
      
      bitbake-layers add-layer ../meta-rcar/meta-rcar-gen3-adas
      
      bitbake core-image-weston
      bitbake core-image-weston -c populate_sdk
      

Running Yocto images

Refer to "Running Yocto images" of Yocto-Gen3.

[NOTE] DTB file for Kingfisher: Image-r8a7795-h3ulcb-kf.dtb, Image-r8a7795-h3ulcb-4x2g-kf.dtb(*), Image-r8a7796-m3ulcb-kf.dtb
(*) The "4x2g" means DDR8GiB SK board. Refer to "H3 SK variation".

S/W support status

Functions Yocto v2.23.1 Yocto v3.7.0 Yocto v3.9.0
WiFi ok ok ok
Bluetooth ok  ok ok
Gyro ok ok ok
GPS ok ok ok
CAN ok ok ok
LVDS Camera(CN10/CN11) ok ok ok
CMOS Camera ok ok ok
Raspberry Pi camera Rev 1.3 ok ok ok
USB2.0(CN13) Host ok ok ok
USB2.0(CN13) Func(g_mass_storage) ok ok ok
USB3.0(CN2) Host ok (H3 only) ok (H3 only) ok (H3 only)
Multichannel Audio ok ok ok
HDMI Out ok ok ok
LVDS Out ok ok ok
Serial(CN4) ok ok ok
Mini PCIe ok ok ok
M.2 ok ok ok
MOST ok ok ok

Note:
"ok" - Function succeeded in the simple test as below.
"NT" - Function wasn't tested

How to test some capabilities

WiFi

To check wifi and scan available WAPs run:

 $ ifconfig wlan0 up
 $ iwlist wlan0 scan

Bluetooth

To check bluetooth and scan available BT devices run:

 $ hciconfig hci0 up
 $ hcitool -i hci0 scan

Gyro

 $ cat /sys/bus/iio/devices/iio\:device0/*_raw (Accelerometer, Magnetometer)
 $ cat /sys/bus/iio/devices/iio\:device1/*_raw (Gyroscope)

GPS

$ cat /dev/ttySC3 (Yocto v2.23.1)
$ cat /dev/ttySC2 (Yocto v3.x)

CAN

Ex) loop back
Connect the following pins of CN17 and CN18:

 CN17 1pin - CN18 1pin
 CN17 2pin - CN18 2pin
  (*)Note: SW2 ON of KF. (defalt:ON)
 $ ip link set can0 up type can bitrate 125000
 $ ip link set can1 up type can bitrate 125000
 $ candump can0&
 $ cangen can1
 can0  08D   [3]  B5 F4 3C
 can0  34E   [3]  7C A1 70
 can0  717   [6]  95 C5 67 4A 41 42
 can0  7F1   [8]  CA B9 E9 3E AE 71 FC 52

Serial

Ex) loop back
For KF M03: Connect the following pins on CN4:

pin3(RxD) - pin5(TxD)
pin4(RTS) - pin6(CTS)

For KF M04 or later: Connect the following pins on CN4:

pin2(TxD) - pin4(RxD)
pin1(RTS) - pin3(CTS)

For Yocto v2.23.1:

$ stty -F /dev/ttySC2 -echo
$ stty -F /dev/ttySC2
speed 9600 baud; line = 0;
-brkint -imaxbel
-echo
$ cat /dev/ttySC2 &
$ echo  123435452345 > /dev/ttySC2
123435452345

For Yocto v3.x:

$ stty -F /dev/ttySC3 -echo
$ stty -F /dev/ttySC3
speed 9600 baud; line = 0;
-brkint -imaxbel
-echo
$ cat /dev/ttySC3 &
$ echo  123435452345 > /dev/ttySC3
123435452345

LVDS Camera

<GMSL>
Camera board: GMSL02
Camera: IMI RDACM21-01
or
<FPD Link>
Camera board: FPDL01
Camera: IMI RDACM24-01
*Note:
  H3 can use CN10 and CN11
  M3 can use CN10

Ex1)

 $ killall weston
 $ capture -d /dev/video0 -F -f rgb32 -L 0 -T 0 -W 1280 -H 1080 -c 1000 -z

Ex2)

 $ gst-launch-1.0 v4l2src device=/dev/video0 io-mode=dmabuf ! video/x-raw,format=BGRA,width=1280,height=1080,framerate=30/1 ! waylandsink

CMOS Camera

Ex)

 $ systemctl stop weston
 $ capture -d /dev/video0 -F -f rgb32 -L 0 -T 0 -W 1280 -H 720 -c 1000 -t 60 -z

Raspberry Pi camera Rev 1.3(OV5647) / 2(IMX219)

In case of v2(IMX219):
Add the following option to local.conf:

KF_ENABLE_IMX219 = "1"

Ex)

 $ systemctl stop weston                                                                
 $ capture -d /dev/video0 -o -f bggr8 -W 2592 -H 1944 -c 1 -t 30 > video.bggr 
 [ 2475.196942] rcar_csi2 fea80000.csi2: Timeout of reading the PHY clock lane
 [ 2475.203851] rcar_csi2 fea80000.csi2: Timeout of reading the PHY data lane
 Ubuntu PC$ ./bayer2rgb  -i video.bggr -o video.rgb24 -w 2592 -v 1944 -b 8 -f BGGR
  * https://github.com/jdthomas/bayer2rgb.git
 Ubuntu PC$ rawtoppm -rgb 2592 1944 video.rgb24 > video24.ppm
 Ubuntu PC$ display video24.ppm

Multichannel Audio

Ex1) CN12/32 on KF

 $ speaker-test -c 8 -t wav -W /usr/share/sounds/alsa/

Ex2)

 <KF>
 $ pactl set-default-sink pcm3168a_output
 $ speaker-test -c 8 -t wav -W /usr/share/sounds/alsa/
 <SK>
 $ pactl set-default-sink ak4613_output 
 $ amixer -c 1 sset "DVC Out" 10%
 $ speaker-test -c 2 -t wav -W /usr/share/sounds/alsa/

Ex3)

 <KF>
 $ paplay -d pcm3168a_output sample.wav
 <SK>
 $ amixer -c 1 sset "DVC Out" 10%
 $ paplay -d ak4613_output sample.wav

MOST

Ex)
1. Connect OS81092 board(Physical+ Interface Board OS81092) and CN22 of KF.
2. Connect Audio board(OS81092 Audio Demo Board) and OS819092 board with exclusive cable.
3. Connect Audio board and CN5 of SK with USB cable.
4. Run the linux kernel
5. cd /usr/share/most/
6. ./most_setup.sh

$./most_setup.sh 
--Setting up RX channel with MLB[  217.636328] aim_sound: PCM format is 16-bit stereo
 addr 0x03 (0x06)--
--S[  217.642675] aim_sound: PCM format is 16-bit stereo
etting up TX channel wit[  217.649647] aim_sound: PCM format is 16-bit stereo
h MLB addr 0x04 (0x08)--
--Setting up TX channel with MLB addr 0x06 (0x0C)--
--Creating char devices--
--Creating ALSA devices--

7../setup-audio-50 &

$./setup-audio-50 &
Configuration:
        Timing Slave (Audio Sink)
! ET_NS_MSVAL_ERROR a MSVAL Error is reported from the NS: 0x0010 MSVAL_ERR_STARTUP_FAILED
MSVAL_E_SHUTDOWN
App reset
MSVAL_E_SHUTDOWN
App reset
! ET_NS_MSVAL_ERROR a MSVAL Error is reported from the NS: 0x0011 MSVAL_ERR_STARTUP_BUSY
! ET_NS_MSVAL_ERROR a MSVAL Error is reported from the NS: 0x0011 MSVAL_ERR_STARTUP_BUSY
(snip)

8. Push the "Switch" button on the Audio board

-> MostAllowRemoteAccess(allow)
-> SourceInfo.Status 1 (Inst_ID: 0x1, FB: 0x24, Adr: 0x400)
-> SourceInfo.Status 2 (Inst_ID: 0x1, FB: 0x24, Adr: 0x400)
-> Amplifier.Volume.Set 100

9. Push the "Switch" button on the Audio board again

<- FB_AuxIn_Allocate_StartResult Node: 0x01, Ifn: 0x02

10. Push the "Switch" button on the Audio board again

<- FB_AuxIn_Allocate_StartResult Node: 0x01, Ifn: 0x01

11. ./most_play.sh ${PATH}/hoge.mp3 5

$./most_play.sh /home/root/hoge.mp3 5
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstAudioSinkClock

Connection-confirmed Hardware information

Connector No Function name Connection confirmed Hardware
CN7 LVDS display BD101LCC1 https://boundarydevices.com/product/bd101lcc1-10-1-1280x800-display/
CN10, CN11 LVDS camera IMI RDACM21(Need camera board: GMSL02)
IMI RDACM24 (Need camera board: FPDL01)
CN15 Mini PCIe Intel 512AN-MMW
CN48 Raspberry Pi camera Raspberry Pi camera Rev 1.3(OV5647)
Raspberry Pi camera Rev 2.0(IMX219)
CN49 HDMI display GeChic Onlap 1502x, 1503x
CN22 MOST "Physical+ Interface Board OS81092" and "OS81092 Audio Demo Board"
CN29 CMOS camera https://www.amazon.com/Arducam-Megapixels-OV5642-Sensor-Camera/dp/B013JO53AU

How to update of Sample Loader and MiniMonitor

New version:

 Sample Loader: V3.02
 MiniMonitor: V3.02

Down load:

File:UpdateFile v302.zip

Why update?:

ComEx Mechanical Specification: Durability: 30 mating cycles.
This new version(V3.02) can update the firmware(*) while keeping Starter Kit(SK) and Kingfisher(KF) connected.
 (*)firmware: bootparam_sa0.srec, bl2-h3ulcb/m3ulcb.srec, cert_header_sa6.srec, bl31-h3ulcb/m3ulcb.srec, tee-h3ulcb/m3ulcb.srec, u-boot-elf.srec 


How to update:

  1. Power off the KF and remove SK from KF
  2. Turn off SW5
    Remove SK from KF
    
  3. Set SW of SK as follows:
  4. SW1:OFF
    SW6:OFF/OFF/OFF/OFF
    SW2:OFF/OFF/OFF/OFF
    
  5. Power on the SK (This means that you need to prepare a 5V AC-adapter for SK)
  6. Press SW8
    SCIF Download mode starts
    
  7. Send the following file from console(Ex: minicom):
  8. type "ctrl+A S" and select upload method "ascii", then choose file for uploading the following file.
    Case of M3SK:
    	BoardID_Writer_SCIF_64bit_ID=0x10(StarterKit-Pro_Rev1.0).mot
    Case of H3SK:
    	BoardID_Writer_SCIF_64bit_ID=0x58(StarterKit-Premier_Rev1.0OB).mot
    
    NOTE: Under Linux, if you got problem transferring this file, it may because of special character in its name.
    
    Solution is to open a new terminal then manually launch the transfer with the following command with double quote around filename (Ex: serial link on ttyUSB0 for M3SK):
    # /usr/bin/ascii-xfr -dsv "BoardID_Writer_SCIF_64bit_ID=0x10(StarterKit-Pro_Rev1.0).mot" > /dev/ttyUSB0
    

    You can confirm the following log (Ex: M3SK):

    +---------------------------------+
    |  Board ID Writer V01 2017.06.23 |
    +---------------------------------+
     Product Code : R-Car M3 ES1.0
    
     Now Board ID : Unknown Board Rev7 (0xFF)
     New Board ID : Starter Kit Rev0 (0x10)
     Wrote Board ID : Starter Kit Rev0 (0x10)
    
    Writer Program End.
    
  9. Power off the SK
  10. Press SW8
    
  11. Set SW as follows:
  12. M3SK = SW6:OFF/ON/OFF/OFF
    H3SK = SW6:OFF/OFF/OFF/OFF
    
  13. Power on the SK
  14. Press SW8
    SCIF Download mode starts
    
  15. Send the following file from console:
  16. type "ctrl+A S" and select upload method "ascii", then choose file for uploading the following file.
    Case of M3SK:
    	AArch32_Gen3_H3_M3_Scif_MiniMon_V3.02.mot
    Case of H3SK:
    	AArch64_Gen3_H3_M3_Scif_MiniMon_V3.02.mot
    

    You can confirm the following log (Ex: M3SK):

    R-Car Gen3 Scif Download MiniMonitor V3.02 2017.07.04
     Work Memory     : SystemRAM
     Board Judge     : Used Board-ID	<-- Attention!!
     DDR_Init        : boardcnf[3] Starter Kit (M3SIP)
     Board Name      : Starter Kit Pro
     Product Code    : R-Car M3 ES1.0
    
    >
    
  17. Flash AArch64_Gen3_H3_M3_SPI_LOADER_V3.02.mot. In console execute xls command (load program to hyper flash) and provide the following inputs:
  18. xls
    1
    y
    y
    y
    1
    type "ctrl+A S" and select upload method "ascii", then choose file for uploading "AArch64_Gen3_H3_M3_SPI_LOADER_V3.02.mot", after upload finished press y key
    
  19. Flash AArch64_Gen3_Spi_MiniMon_V3.02_E6330000.mot. In console execute xls command (load program to hyper flash) and provide the following inputs:
  20. xls
    1
    y
    y
    y
    3
    e6330000
    type "ctrl+A S" and select upload method "ascii", then choose file for uploading "AArch64_Gen3_Spi_MiniMon_V3.02_E6330000.mot", after upload finished press y key
    
  21. Power off the SK
  22. Press SW8
    
  23. Verify Sample Loader and MiniMonitor version
  24. SW1:OFF
    M3SK
     SW6[1]=OFF, SW6[2]=OFF, SW6[3]=OFF, SW6[4]=ON
    H3SK
     ws1.0: SW6[all]=OFF
     ws1.1/ws2.0: SW6[1]=ON, SW6[2]=ON, SW6[3]=OFF, SW6[4]=ON
    
    Press SW8
    

    You can confirm the following log (Ex: H3SK):

    R-Car Gen3 Sample Loader V3.02 2017.07.04		<-- !! V3.02 !!
     For Salvator , Kriek , and StarterKit.
     Board Judge     : Used Board-ID
     DDR_Init        : boardcnf[7] Salvator / Starter Kit (H3SIP_VER2.0)
     INITIAL SETTING : Starter Kit Premier / R-Car H3 ES2.0
     CPU             : AArch64 CA57
     DRAM            : LPDDR4 DDR3200
     DEVICE          : QSPI Flash(S25FS128) at 40MHz DMA
     BOOT            : Normal Boot
     BACKUP          : DDR Cold Boot
     jump to 0xE6330000
    
    R-Car Gen3 MiniMonitor V3.02 2017.07.04		<-- !! V3.02 !!
     Work Memory     : SystemRAM
     Board Name      : Starter Kit Premier
     Product Code    : R-Car H3 ES2.0
    
    >
    
  25. Set SW(Kernel boot mode) as follows:
  26. SW1:ON
    M3SK = SW6[all]:ON
    H3SK
     ws1.0 = SW6:OFF/OFF/OFF/ON
     ws1.1 = SW6:ON/OFF/ON/ON
     ws2.0 = SW6[all]:ON
    
  27. You can update the firmware with SK connected to KF.
  28. How to update:
    http://elinux.org/R-Car/Boards/M3SK#Flashing_firmware
    http://elinux.org/R-Car/Boards/H3SK#Flashing_firmware

FAQ

  1. Failed to DRAM initialize (-1).
    If you face the following error please update(*) IPL and u-boot to the latest versopm.
    NOTICE:  BL2: R-Car Gen3 Initial Program Loader(CA57) Rev.1.0.12
    NOTICE:  BL2: PRR is R-Car M3 ES1.0
    NOTICE:  BL2: Boot device is HyperFlash(80MHz)
    NOTICE:  BL2: LCM state is CM
    NOTICE:  BL2: AVS setting succeeded. DVFS_SetVID=0x52
    NOTICE:  BL2: DDR3200(rev.0.20)[COLD_BOOT]..1
    NOTICE:  BL2: Failed to DRAM initialize (-1).
    ERROR:   
    ERROR:   BL2: System WDT overflow, occured address is 0xe630d3cc
    

    (*)How to update
    http://elinux.org/R-Car/Boards/Kingfisher#How_to_update_of_Sample_Loader_and_MiniMonitor
    http://elinux.org/R-Car/Boards/M3SK#Flashing_firmware
    http://elinux.org/R-Car/Boards/H3SK#Flashing_firmware

Known Issues

  1. USB3.0(CN2) cannot use with M3 SK.
  2. Refer to: http://elinux.org/R-Car/Boards/M3SK#Known_Issues

  3. H/W limitations
    - Board type name: "SBEV-RCAR-KF-M03"
     1. MOST is not supported.
    
    - Board type name: "SBEV-RCAR-KF-M03" and "SBEV-RCAR-KF-S03"
     1. BT-Audio(HFP)is not supported.
    
    - Board type name: "SBEV-RCAR-KF-M03", "SBEV-RCAR-KF-S03" and "SBEV-RCAR-KF-M04"
     1. Cannot use JTAG(CN3 on SK).
    
  4. Power supply
    SBEV-RCAR-KF-M03 and SBEV-RCAR-KF -S03 boards may not turn on even if you turn on SW6.
    In that case please turn on SW6 again.
  5. (SW limitation)Raspberry Pi camera
    v2(Sony IMX219) camera does not support. (v1(ov5647)is supported)
    --> Yocto v3.9.0 or later support v2 camera.