R-Car/Boards/S4SK-Proto

Introduction
This page is for the Starter Kit prototype board equipped with R-Car S4(ws1.1). This board is not for sale and has limited users. The mass production version is scheduled for 2023. Please look forward to it.

Type name
Y-ASK-RCAR-S4

Hardware feature
 Power connector for 5V input (incl. protection circuit)  LPDDR4X (4 GiB)  Boot device: QSPI (64 MiB)  UFS memory (128GB(Sumsung/SDINFDO4-128G))  uSD-card x1  Ethernet @TSN0 and TSN1: two PHYs for 2500BASE-T1 (88Q4364) with 2-wire automotive Ethernet connectors(Rosenberger/E6S20A-40MT5-x)  Ethernet PHY (100 Mbps) at G4MH  PCIe interfaces available on two OCuLink connectors (2 channels x 2 lanes)  Debug port DBG0 and DBG1  two CAN transceivers (4-pin headers)  one LIN transceiver (4-pin headers)  3 LEDs/buttons

Note
Heat sink and FAN : Tighten all 8 screws on the top of the acrylic board to prevent high temperatures.

AC Adapter
AC adapter is not bundled with the board, please prepare it. Here is the AC adapter information that has been confirmed.

Debug Serial

 * CN13
 * Two serial ports are recognized. Please use the younger number.
 * Baudrate
 * 921600

PCIe

 * CH0(CN30)
 * Root Complex
 * CH1(CN31)
 * Endpoint

How to update the loader

 * If you do not have binaries, please contact the S4SK-Proto board provider.

Windows user
  Connect the Windows PC to the SK4SK-Proto(CN13) with a USB serial cable  baudrate : 921600  SW3 : Set to SCIF Download(DL) mode </li>  Power ON (SW5) </li> SCIF Download mode (w/o verification) (C) Renesas Electronics Corp. -- Load Program to SystemRAM --- please send !  Execute TeraTerm macro "S4SK_nonCX_QSPI_BL31.ttl" </li> Teta Term: Control -> Macro -> S4SK_nonCX_QSPI_BL31.ttl The following log is output: Flash writer for R-Car S4 Series Rev.0.9.0 May 25,2022 > xls2 ===== Qspi/HyperFlash writing Command =============

(snip)  Power OFF (SW5) </li>  SW3 : Set to default mode </li> </ol>

Linux user
$ git clone https://github.com/morimoto/renesas-bsp-rom-writer.git $ cd renesas-bsp-rom-writer $ WORK=`pwd` Please refer to the following file for the writing procedure. ${WORK}/README ${WORK}/board/s4sk-prototype/README ${WORK}/board/s4sk-prototype/linux/README

Host PC
Ubuntu 20.04 LTS (64bit) is recommended as OS. 32bit version is not supported.

Supported OS
Linux

Installation of required tools and libraries
Ubuntu is used as Linux Host PC since Yocto Project Quick Start specifies Ubuntu as one of the distributions. You need to install the required packages as follows. sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ build-essential chrpath socat cpio python3 python3-pip python3-pexpect \ xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa \ libsdl1.2-dev pylint3 xterm libarchive-zip-perl

Build script

 * 1) Build script(build.sh)
 * 2023/02/22 updated
 * 1) build
 * If the build completes successfully, all the necessary files are generated in a following directory:
 * If the build completes successfully, all the necessary files are generated in a following directory:
 * If the build completes successfully, all the necessary files are generated in a following directory:

Manual steps
2022/12/27 updated
 * 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.
 * 1) Clone basic Yocto layers:
 * 2) Switch to proper branches/commits
 * 3) Setup build environment
 * 4) Prepare default configuration files.
 * 5) Start the build
 * 6) 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:
 * and the command prompt should return.
 * 1) Bitbake has generated all the necessary files in ./tmp/deploy/images directory. You can verify its content:
 * Image is a Kernel image, r8a779f0-s4sk-prototype.dtb is a blob file, rcar-image-gateway-s4sk-proto.tar.bz2 is the rootfs, modules-s4sk-proto.tgz is kernel modules.
 * 1) Start the build
 * 2) 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:
 * and the command prompt should return.
 * 1) Bitbake has generated all the necessary files in ./tmp/deploy/images directory. You can verify its content:
 * Image is a Kernel image, r8a779f0-s4sk-prototype.dtb is a blob file, rcar-image-gateway-s4sk-proto.tar.bz2 is the rootfs, modules-s4sk-proto.tgz is kernel modules.
 * 1) Bitbake has generated all the necessary files in ./tmp/deploy/images directory. You can verify its content:
 * Image is a Kernel image, r8a779f0-s4sk-prototype.dtb is a blob file, rcar-image-gateway-s4sk-proto.tar.bz2 is the rootfs, modules-s4sk-proto.tgz is kernel modules.
 * Image is a Kernel image, r8a779f0-s4sk-prototype.dtb is a blob file, rcar-image-gateway-s4sk-proto.tar.bz2 is the rootfs, modules-s4sk-proto.tgz is kernel modules.

Build SDK

 * After building BSP you may build SDK:
 * After build finished the SDK installation script may be found in following path:
 * Install SDK by run the following command and follow instructions on the screen:
 * Install SDK by run the following command and follow instructions on the screen:
 * Install SDK by run the following command and follow instructions on the screen:

Note: Please see the Known issues & Restrictions chapter.

Loading kernel and rootfs via SD card
This section describes steps that are necessary for preparing and booting from SD card.

Preparing SD card
WARNING! These steps will erase the SD card completely. In short, all files will be lost. Follow these steps on the host machine:
 * 1) Partion your SD card to set 1 partition and ID=83 (Linux)
 * Make sure the SD card doesn't contain any important files.
 * 1) Format this partition to ext4
 * 2) Mount this partition on your host to any directory and upack the rcar-image-gateway-s4sk-proto.tar.bz2 into mounted folder.
 * NOTE: probably you need to be a root user, hence use "sudo"
 * 1) Mount this partition on your host to any directory and upack the rcar-image-gateway-s4sk-proto.tar.bz2 into mounted folder.
 * NOTE: probably you need to be a root user, hence use "sudo"
 * NOTE: probably you need to be a root user, hence use "sudo"

Configure U-Boot to boot from SD card

 * Proper U-Boot command to boot from SD:
 * Example of U-Boot environment variables:
 * Example of U-Boot environment variables:

UFS
After starting the Linux, from the start log, there are some messages are showed,

Create partition

Format partition

Read/Write

PCIe Root Complex(CN30) : SSD
Environment:
 * 1) MZVPV512HDGL-0000
 * 2) U.2 to M.2 M-Key NVME SSD and PCIe
 * 3) Oculink to U.2 Cable
 * 4) SATA/IDE AC Adoperq(Japanese site)
 * s4sk_pcie_nvme.jpg

Environments

 * <S4 SK Prototype board : PCIe CH0(CN30)[*1]>  <--- OCuLink cable[*2] --->   Another <S4 SK Prototype board : PCIe CH1(CN31)[*3]>
 * [*1] PCIe CH0(CN30) : Root Complex
 * [*2] Ex) https://store.supermicro.com/supermicro-55cm-oculink-to-oculink-cable-cbl-sast-0818.html
 * [*3] PCIe CH1(CN31) : Endpoint

Create DTB file for Endpoint

 * Disable: Root Complex of PCIe CH0
 * Enable : Endpoint of PCIe CH1

Output: build/tmp/work/s4sk_proto-poky-linux/linux-renesas/5.10.41+xxxx/linux-s4sk_proto-standard-build/arch/arm64/boot/dts/renesas/r8a779f0-s4sk-prototype.dtb
 * Copy r8a779f0-s4sk-prototype.dtb to SD card for Endpoint as r8a779f0-s4sk-prototype_pcie1ep.dtb

pcitest

 * Step 1: Start S4 SK of Endpoint using r8a779f0-s4sk-prototype_pcie1ep.dtb


 * Step 2: Start S4 SK of Root Complex (after Step 1)


 * Log: Root Complex


 * Log: Endpoint

QA site
Please contact the S4SK Prototype board provider for the URL.

Known issues & Restrictions

 * 1) [Known issue] Bitbake error messages when building SDK first time
 * These error message are Poky 3.1.11 bug, it doesn't affect to build output.
 * Ignore error messages.
 * Ignore error messages.

Release History
2022/10/13 : First release 2022/12/27 : Support thermal, UFS, PCIe and Ethernet TSN function 2023/02/22 : Change DDR size to 4GB