HTML |
---|
<font size=5><B>RZ/G2L, RZ/G2LC, RZ/G2UL SMARC Board by Renesas</B></font> |
This page is for the RZ/G2L, RZ/G2LC, and RZ/G2UL evaluation boards.
GeneralImage AddedRZ/G2L
RZ/G2LC
RZ/G2UL
Renesas adds to RZ/G2 line with three Cortex-A55 SoCs
Articles
📄 Board User Manual
┌─────┬─────┬─────┐
│ │ SOM │ │
│ └─────┘ │
│ Carrier Board │
│ ┌─┐ │
└─────┴─┴─────────┘
↑
SD Card So
Note | ||
---|---|---|
| ||
⚠️ The BSP will only build in Ubuntu 20.04 |
These instructions are for using the output files from the Yocto build to prepare an SD Card and boot into Linux.
The evaluation boards boot from SPI Flash (boot loaders), then can run Linux from either eMMC on the board or an external SD Card.
$ wget https://raw.githubusercontent.com/renesas-rz/rzg2_bsp_scripts/master/usb_sd_partition/usb_sd_partition.sh
$ chmod +x usb_sd_partition.sh
$ ./usb_sd_partition.sh
# Change to the Yocto output directory that contains the files
$ cd build/tmp/deploy/images/smarc-rzg2l # RZ/G2L
$ cd build/tmp/deploy/images/smarc-rzg2lc # RZ/G2LC
$ cd build/tmp/deploy/images/smarc-rzg2ul # RZ/G2UL
# Copy the Linux kernel to partition 1
$ sudo cp -v Image-smarc-rzg2l.bin /media/$USER/RZ_FAT # RZ/G2L
$ sudo cp -v Image-smarc-rzg2lc.bin /media/$USER/RZ_FAT # RZ/G2LC
$ sudo cp -v Image-smarc-rzg2ul.bin /media/$USER/RZ_FAT # RZ/G2UL
# Copy the Device Tree to partition 1
$ sudo cp -v Image-r9a07g044l2-smarc.dtb /media/$USER/RZ_FAT # RZ/G2L
$ sudo cp -v Image-r9a07g044c2-smarc.dtb /media/$USER/RZ_FAT # RZ/G2LC
$ sudo cp -v Image-r9a07g043u11-smarc.dtb /media/$USER/RZ_FAT # RZ/G2UL
# Copy and expand the Root File System to partition 2
$ sudo tar -xvf core-image-minimal-smarc-rzg2l.tar.gz -C /media/$USER/RZ_ext # RZ/G2L
$ sudo tar -xvf core-image-minimal-smarc-rzg2lc.tar.gz -C /media/$USER/RZ_ext # RZ/G2LC
$ sudo tar -xvf core-image-minimal-smarc-rzg2ul.tar.gz -C /media/$USER/RZ_ext # RZ/G2UL
(or if using graphics)
$ sudo tar -xvf core-image-weston-smarc-rzg2l.tar.gz -C /media/$USER/RZ_ext # RZ/G2L
$ sudo tar -xvf core-image-weston-smarc-rzg2lc.tar.gz -C /media/$USER/RZ_ext # RZ/G2LC
$ sudo tar -xvf core-image-bsp-smarc-rzg2ul.tar.gz -C /media/$USER/RZ_ext # RZ/G2UL
# Make sure all files are finished writing before removing the USB card reader from the PC
$ sync
[Recommended Settings] [Advanced Users Only]
SOM board uses eMMC Flash SOM board uses SD Card socket
SW1-1 = ON/OFF(JTAG) SW1-1 = ON/OFF(JTAG)
SW1-2 = OFF SW1-2 = ON
+-----+ +-----+
| ON | | ON |
| = | | = = |
| = | | |
| 1 2 | | 1 2 |
+-----+ +-----+
SW11-1 = OFF
SW11-2 = OFF
SW11-3 = OFF
SW11-4 = ON
+---------+
| ON |
| = |
| = = = |
| 1 2 3 4 |
+---------+
┌─────┬─────┬─────┐
│ │ SOM │ │
│ └─────┘ │
│ Carrier Board │
│ ┌─┐ │
└─────┴─┴─────────┘
↑
SD Card Socket
# Create command macros and save them:
=> setenv sd_boot1 'mmc dev 1 ; fatload mmc 1:1 0x48080000 Image-smarc-rzg2l.bin ; fatload mmc 1:1 0x48000000 /Image-r9a07g044l2-smarc.dtb'
=> setenv sd_boot2 'setenv bootargs 'root=/dev/mmcblk1p2 rootwait' ; booti 0x48080000 - 0x48000000'
=> setenv bootcmd 'run sd_boot1 sd_boot2'
=> saveenv
# Create command macros and save them:
=> setenv sd_boot1 'mmc dev 1 ; fatload mmc 1:1 0x48080000 Image-smarc-rzg2lc.bin ; fatload mmc 1:1 0x48000000 /Image-r9a07g044c2-smarc.dtb'
=> setenv sd_boot2 'setenv bootargs 'root=/dev/mmcblk1p2 rootwait' ; booti 0x48080000 - 0x48000000'
=> setenv bootcmd 'run sd_boot1 sd_boot2'
=> saveenv
# Create command macros and save them:
=> setenv sd_boot1 'mmc dev 1 ; fatload mmc 1:1 0x48080000 Image-smarc-rzg2ul.bin ; fatload mmc 1:1 0x48000000 /Image-r9a07g043u11-smarc.dtb'
=> setenv sd_boot2 'setenv bootargs 'root=/dev/mmcblk1p2 rootwait' ; booti 0x48080000 - 0x48000000'
=> setenv bootcmd 'run sd_boot1 sd_boot2'
=> saveenv
Reset the board and it will automatically boot
Info |
---|
This section is only for RZ/G2L boards. (not RZ/G2LC or RZ/G2UL) |
There are currently multiple versions of RZ/G2L boards with different components. (There is only 1 version of RZ/G2LC board). Please make note of what board you have.
Some boards require different software patches to be applied before building.
Image Added
RZ/G2L Silicon version WS1 vs WS2:
Discrete Power Design vs New Renesas PMIC Solution:
Board Combinations:
Here are the only release of these boards:
Power Button on PMIC Boards:
🔧 General Sample Code
📷 Camera Image Overlay Demos
📷 Camera Data Receive Unit (CRU) Sample Application
🎥 🔉 GStreamer Application Note
💾 RZ/G HMI SDK
Image Added
RZ/G2L Evaluation Board Kit Configuration
Section | ||||||
---|---|---|---|---|---|---|
|
Section | ||||
---|---|---|---|---|
|
Image Added
How to set Boot Modes
Section | ||||
---|---|---|---|---|
|
Image Added
Power ON
● Connect USB-PD Power Charger to USB Type-C Connector. Then LED1(VBUS PWR On) and LED3(Module PWR On) lights up.
● Press SW9 to turn on the power. Then LED4(Carrier PWR On) lights up.
Section |
---|
Image Added Power ON |
Section |
---|
Image AddedDebug Serial (Console Output) ● Debug serial uses CN14. The baud rate is 115200bps. ● Since the serial-USB conversion IC is not always powered, the Windows PC will recognize it after the power switch is turned on. ● If it is not recognized by your Windows PC, please install the driver�https://www.ftdichip.com/Drivers/VCP.htm |
The following HDMI LCD screens were tested with this board.
Resolution | Touchscreen | Description | Link | Comments | |
---|---|---|---|---|---|
🙂 | 1920x1080 | Yes | Wimaxit 14 Inch | 🛒 buy | This is a very nice screen. Good color and easy to press the icons. The LCD input is mini-HDMI and comes with a mini-HDMI to HDMI cable. The RZ board is micro-HDMI. You will also need to buy a HDMI to micro-HDMI adapter. Or, buy a mini-HDMI to HDMI-micro cable. Note the the micro-USB connection on the LCD for touchscreen does not work, but the USB-C connector does work for touchscreen. You will simply need a USB-C to USB-A cable or adapter. |
🙂 | 1920x1080 | Yes | ELECROW 10.1 Inch | 🛒 buy | This is a very nice screen. You will also need to buy a HDMI to micro-HDMI cable. |
😐 | 1920x1080 | Yes/No(issues) | EVICIV 10.1 Inch | ⚠️ The display works, USB touch is detected and shows up as /dev/input/event0, but does not work 100%. You can 'scroll' in a web page by dragging your finger on the screen, but actually touches (mouse clicks) do not work for some reason. There is also a noisy fan inside for an R-pi that you'll need to unplug. You will also need to buy a HDMI to micro-HDMI cable. I would not recommend his one. | |
🙂 | 1280x800 | Yes | SunFounder 10.1 inch | 🛒 buy | All the cables that you will need are included. |
🙂 | 1024x600 | Yes | Ingcool 7 inch 7IP-CAPLCD | 🛒 buy | If you attach the 'Touch' USB connection on the LCD to the RZ/G2L board, it will both power the LCD board as well as enable touch support. This kit comes with HDMI cables. |
🙂 | 800x480 | Yes | GeeekPi 5 Inch EP-0081 | 🛒 buy | HDMI cable not included. |
😐 | 800x480 | Yes/No(Header) | Kuman 5 Inch SC5A-US-KFBA | 🛒 buy | ⚠️ The Touchscreen comes out on a header and no easy way to hook it up. HDMI cable not included. |
☹️ | 800x480 | Yes | ELECROW 5 inch | 🛒 buy | ⚠️ This screen flickers with the RZ/G2L board. The reason is not known. |
As of the RZ/G2L BSP v1.3 release, the Coral Camera module (OV5645) is supported and enabled.
MIPI CSI Configuration and Resolution Selection
Before you can use the camera, you must first configure the MIPI CSI module to capture image.
MIPI CSI configuration is done by using media-ctl utility from v4l-utils package.
The first 2 commands below enable the camera.
Below that are commands you use to select the camera resolution you want to capture.
[ Camera Setup ]
media-ctl -d /dev/media0 -r
media-ctl -d /dev/media0 -l "'rzg2l_csi2 10830400.csi2':1 -> 'CRU output':0 [1]"
[Select resolution 1280x960 ]
media-ctl -d /dev/media0 -V "'rzg2l_csi2 10830400.csi2':1 [fmt:UYVY8_2X8/1280x960 field:none]"
media-ctl -d /dev/media0 -V "'ov5645 0-003c':0 [fmt:UYVY8_2X8/1280x960 field:none]"
[Select resolution 1920x1080 ]
media-ctl -d /dev/media0 -V "'rzg2l_csi2 10830400.csi2':1 [fmt:UYVY8_2X8/1920x1080 field:none]"
media-ctl -d /dev/media0 -V "'ov5645 0-003c':0 [fmt:UYVY8_2X8/1920x1080 field:none]"
[Select resolution 2592x1944 ]
media-ctl -d /dev/media0 -V "'rzg2l_csi2 10830400.csi2':1 [fmt:UYVY8_2X8/2592x1944 field:none]"
media-ctl -d /dev/media0 -V "'ov5645 0-003c':0 [fmt:UYVY8_2X8/2592x1944 field:none]"
Capture Images using GStreamer
This command can be used capture images and display them on the screen in weston.
gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! waylandsink
To capture 300 images (resolution 1280x960) in .jpg format use
gst-launch-1.0 v4l2src num-buffers=300 device=/dev/video0 ! video/x-raw,format=UYVY,width=1280,height=960 ! videoconvert ! jpegenc ! multifilesink location=image_HD_%05d.jpg
To capture approximately 2min videos (resolution 1280x960) in .mp4 format use
gst-launch-1.0 v4l2src num-buffers=3600 device=/dev/video0 ! video/x-raw,format=UYVY,width=1280,height=960,framerate=60/1 ! vspmfilter outbuf-alloc=true ! video/x-raw,format=NV12 ! omxh264enc control-rate=2 target-bitrate=10485760 interval_intraframes=14 periodicty-idr=2 no-copy=true ! video/x-h264,profile=\(string\)high,level=\(string\)4.2 ! h264parse ! video/x-h264,stream-format=avc,alignment=au ! qtmux ! queue ! filesink location=video_HD.mp4
Support for building Qt v5.6.3 is included in BSP v3.0.0+ by build core-image-qt
bitbake core-image-qt
However, if you would like to build and install the Qt demos in the BSP, you must enable them in our local.conf file.
# Adding qt demonstration to core-image-qt or not
QT_DEMO = "1"
$ bitbake core-image-qt
$ cd build/tmp/deploy/images/smarc-rzg2l
$ sudo tar -xvf core-image-qt-smarc-rzg2l.tar.gz -C /media/$USER/RZ_ext
$ cd -
$ sync
After the board boots, on the Weston desktop you will see icons that will start the demos.
Info |
---|
eMMC Boot refers to the SoC booting directly from eMMC flash after RESET. This means SPI Flash is not used. |
Note that eMMC Flash is always used to store the u-boot environment variables, even when boot from SPI Flash is enabled. SPI Flash is never used to store the u-boot environment variables as there is not code to support that. This means that when you switch between SPI Flash booting and eMMC Flash booting, your u-boot environment variables will remain the same.
But default, the boot loader (TrustedFirmware-A) contains both support to boot from both SPI or eMMC Flash. During boot, the code will read a boot register to determine if it should load from SPI Flash or eMMC Flash. This means you can use the same default Yocto output for either SPI Flash boot or eMMC boot.
However, you will need to program the eMMC Flash boot partitions and configure the eMMC device with the proper boot configuration to match the RZ/G2L.
The follow commands (copy/paste) and instructions will allow you to program the eMMC device on your board using the Flash Writer that was built in Yocto, and a helpful script (flash_writer_tool) that will automate the programming.
Expand | ||
---|---|---|
| ||
#---------------------------------------------------
# Download and run 'Flash Writer Tool'
# - Configure for our output directory
# - Configure for board "smarc-rzg2l" or for RZV2L "smarc-rzv2l"
# - Configure for eMMC Flash boot
#---------------------------------------------------
git clone https://github.com/renesas-rz/rzg2_bsp_scripts
cd rzg2_bsp_scripts/flash_writer_tool
./flash_writer_tool.sh
### For 'Board', select the board you are using.
### For 'Target Flash', select "eMMC Flash"
### For 'FILES_DIR', manually set to the location of your Yocto output files (full path)
### Do the follow operations:
Step 1. Select "Show Switches" to show how to put board into SCIF Download mode, then press the RESET button on the board.
Step 2. Select "Download F.W."
Step 3. Select "eMMC boot setup"
Step 4. Select "Program BL2"
Step 5. Select "Program FIP"
Step 6. Select "Show Switches" to show how to put board into eMMC Boot mode
Step 7. Select "<SAVE-and-EXIT>" |
1. Copy listed files to “/home/root” of the SD Card that you use to boot the system.
2. Boot the board with the SD card and log into Linux.
3. Partition the eMMC Flash using fdisk.
root@smarc-rzg2l:~# fdisk /dev/mmcblk0
Command (m for help): n
Partition number (1-128, default 1): 1 <<<< just press ENTER for default value
First sector (34-124321758, default 2048): 2048 <<<< just press ENTER for default value
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-124321758, default 124321758): 124321758 <<<< just press ENTER for default value
Created a new partition 1 of type 'Linux filesystem' and of size 59.3 GiB.
Command (m for help): w
The partition table has been altered.
4. Format the partition as ext4
root@smarc-rzg2l:~# mkfs.ext4 -L rootfs /dev/mmcblk0p1
5. Mount the ext4 partition to "/mnt".
root@smarc-rzg2l:~# mount /dev/mmcblk0p1 /mnt
6. Extract the file system to the ext4 partition
RZG2L
root@smarc-rzg2l:~# cd /home/root
root@smarc-rzg2l:~# tar -zxvf core-image-weston-smarc-rzg2l.tar.gz -C /mnt
root@smarc-rzg2l:~# cp Image /mnt/boot
root@smarc-rzg2l:~# cp r9a07g044l2-smarc.dtb /mnt/boot
root@smarc-rzg2l:~# sync
RZV2L
root@smarc-rzg2l:~# cd /home/root
root@smarc-rzg2l:~# tar -zxvf core-image-weston-smarc-rzv2l.tar.gz -C /mnt
root@smarc-rzg2l:~# cp Image /mnt/boot
root@smarc-rzg2l:~# cp r9a07g054l2-smarc.dtb /mnt/boot
root@smarc-rzg2l:~# sync
7. Unmount “/mnt”
root@smarc-rzg2l:~# umount /mnt
8. Reboot and change the boot parameter in u-boot to boot from eMMC
=> setenv bootargs 'rw rootwait earlycon root=/dev/mmcblk0p1'
=> setenv bootcmd 'ext4load mmc 0:1 0x48080000 boot/Image; ext4load mmc 0:1 0x48000000 boot/r9a07g044l2-smarc.dtb; booti 0x48080000 - 0x48000000'
=> saveenv
=> boot
Note: SD card boot is supported out of the box since VLP3.0.2 (and corresponding Arm Trusted Firmware version), the files to be programmed are available in the Yocto image folder. You can jump to this section if you already have the files.
RZ/G2L-LC-UL and RZ/V2L can also boot from a (micro) SD card, this is boot mode 0 called "Booting from eSD" in the User Manual.
This procedure is similar to what reported above for eMMC boot, we are not using Yocto to build (not supported in VLP3.0.0).
Assuming that the host PC is already configured to cross-build:
mkdir sd_boot
cd sd_boot
Now let's clone and patch RZ/G Trusted Firmware:
git clone https://github.com/renesas-rz/rzg_trusted-firmware-a
cd rzg_trusted-firmware-a
git checkout v2.6/rz
wget https://raw.githubusercontent.com/seebe/rzg_stuff/master/tfa_patches/0001-SD-boot-support.patch
patch -p1 < 0001-SD-boot-support.patch
cd ..
Clone u-boot:
git clone https://github.com/renesas-rz/renesas-u-boot-cip
cd renesas-u-boot-cip/
git checkout v2021.10/rz
cd ..
Retrieve some useful scripts to ease the TF-A and u-boot builds, as well as the generation of the binary files we need:
wget https://raw.githubusercontent.com/renesas-rz/rzg2_bsp_scripts/master/build_scripts/build_common.sh
wget https://raw.githubusercontent.com/renesas-rz/rzg2_bsp_scripts/master/build_scripts/build_tfa.sh
wget https://raw.githubusercontent.com/renesas-rz/rzg2_bsp_scripts/master/build_scripts/build_uboot.sh
wget https://raw.githubusercontent.com/renesas-rz/rzg2_bsp_scripts/master/build_scripts/build.sh
wget https://raw.githubusercontent.com/renesas-rz/rzg2_bsp_scripts/master/usb_sd_partition/usb_sd_partition.sh
chmod +x *.sh
Select toolchain that you have:
./build.sh s
Let's build u-boot:
./build.sh u
Then TF-A, normally you can leave the default parameters (smarc rz/g2l is the default board) and boot device does not matter:
./build.sh t
Now we have to prepare the (micro) SD card. We can optionally zero it out (WARNING: THE SD CARD CONTENT WILL BE DESTROYED):
sudo dd if=/dev/zero of=/dev/sda bs=1M status=progress
Then, assuming you want to use the same SD card to store kernel and device tree, we can (optionally) partition it:
./usb_sd_partition.sh
We are ready to write the boot files to some specific sectors of the SD card (MBR and partitions won't be touched):
cd output_smarc-rzg2l/
sudo dd if=bootparams-smarc-rzg2l.bin of=/dev/sda seek=1 count=1
sudo dd if=bl2-smarc-rzg2l.bin of=/dev/sda seek=8
sudo dd if=fip-smarc-rzg2l.bin of=/dev/sda seek=128
sync
Image Added
(*) Note: the size of the files and SD card reported in this picture are just examples. Actual output files size may be different and there is no limitation on the SD card capacity.
If you are using the SMARC board you can insert the micro SD card in the SOM module slot:
Image Added
Change the switches to eSD boot on the carrier board acting on SW11 (SW11-1 ON, SW11-2 ON, SW11-3 OFF, SW11-4 ON):
Image Added
Change SW1 on the module to select micro sd card slot (SW1-1 ON, SW1-2 ON):
Image Added
and finally the board is ready to boot from the micro SD card:
NOTICE: BL2: v2.6(release):7e8696ff4-dirty
NOTICE: BL2: Built : 12:07:55, Sep 8 2022
NOTICE: BL2: SD boot from partition 0
NOTICE: BL2: Load dst=0x1f7c0 src=(p:0)0x10000(128) len=0x10(1)
NOTICE: BL2: SD boot from partition 0
NOTICE: BL2: Load dst=0x1f920 src=(p:0)0x10010(128) len=0x28(1)
NOTICE: BL2: SD boot from partition 0
NOTICE: BL2: Load dst=0x44000000 src=(p:0)0x10090(128) len=0x6069(49)
NOTICE: BL2: SD boot from partition 0
NOTICE: BL2: Load dst=0x1f7c0 src=(p:0)0x10000(128) len=0x10(1)
NOTICE: BL2: SD boot from partition 0
NOTICE: BL2: Load dst=0x1f920 src=(p:0)0x10010(128) len=0x28(1)
NOTICE: BL2: Load dst=0x1f920 src=(p:0)0x10038(128) len=0x28(1)
NOTICE: BL2: SD boot from partition 0
NOTICE: BL2: Load dst=0x50000000 src=(p:0)0x16100(176) len=0xa9878(1357)
NOTICE: BL2: Booting BL31
NOTICE: BL31: v2.6(release):7e8696ff4-dirty
NOTICE: BL31: Built : 12:07:55, Sep 8 2022
U-Boot 2021.10-g90edad6e00 (Sep 08 2022 - 11:55:48 +0200)
CPU: Renesas Electronics K rev 6.15
Model: smarc-rzg2l
DRAM: 1.9 GiB
MMC: sd@11c00000: 0, sd@11c10000: 1
Loading Environment from MMC... MMC partition switch failed
*** Warning - MMC partition switch failed, using default environment
In: serial@1004b800
Out: serial@1004b800
Err: serial@1004b800
Net:
Error: ethernet@11c20000 address not set.
No ethernet found.
Please note that u-boot by default is configured to store the environment variables on the eMMC boot partition 2. On the Smarc EVKs the SD card slot is shared with eMMC, so environment variables cannot be loaded / saved.
Please note that u-boot by default is configured to store the environment variables on the eMMC boot partition 2. It is possible to configure u-boot to use the SD card also as env variable storage device. We can take advantage of the spare space between the end of FIP and first partition:
Image Added
To do that it is sufficient to modify the u-boot configuration:
./build.sh u menuconfig
Navigate to "Environment --->" and change:
mmc partition number -> 0: there is only one physical partition on a sd card, so select it.
Environment size -> 0x10000: use 64K space for u-boot environment variables, i.e 128 sectors (512 bytes)
Environment offset -> 0xF0000: this is the offset starting from the base. We want to start from 2048 (first logical partition) - 128 (size) = 1920. 1920 * 512 = 983.040 = 0xF0000
Image Added
Exit and save.
You also need to configure bus width to 4, instead of 8. This can be done by modifying the device tree (arch/arm/dts/smarc-rzg2l.dts):
&sdhi0 {
/* pinctrl placeholder
* If this channel is used for interfacing with a SD card, a power enable
* pin (SD0_PWR_EN) must be defined.
* The SD0_PWR_EN pin is associated with P4_1.
* A HIGH signal on SD0_PWR_EN will enable supply voltage for SD card.
*/
bus-width = <4>;
status = "okay";
};
Exit and save, then rebuild both u-boot and TF-A and reprogram bl2 and fip binaries as documented in the previous section.
You can also program your own environment variables, creating a binary as described in this section and then program it:
sudo dd if=u-boot-env.bin of=/dev/sda seek=1920
Instructions for RZV Cortex-M33 Multi-OS Package is located below.
Cortex-M33 Multi-OS Package Support
Yocto Build Project
Below is the repository with instructions to build the image.
Operating Instructions
The following instructions explain how to run the 2D Barcode Scanner demo on the US108 2D Barcode scanner carrier board with a plugged in SMARC 2.0 RZ/G2L SOM. It is assumed that a bootable Linux image with the 2D Barcode scanner demo exist on a micro SD card and that the SD card is plugged into the SC card slot of the RZ/G2L SMARC SOM.
Items needed:
SMARC board schematics and layout are provided in Orcad format only, .dns and .brd respectively. These files can be imported into Altium designer using this guide and/or this guide.
Image AddedWhat is DirectFB?
What is DirectFB2?
Instructions for adding the original DirectFB to Yocto:
1. Edit your local.conf file and add these lines:
DISTRO_FEATURES_append = " directfb"
IMAGE_INSTALL_append = " directfb directfb-examples "
2. Build (bitbake) a core-image-minimal or core-image-bsp. Then program your board with that new image.
3. After booting your board, log in as root and create a file /home/root/.directfbrc . Add the below contents to the .directfbrc file. Of course, change the resolution of the mode to match your LCD.
system=fbdev
module-dir=/usr/lib64/directfb-1.7-7/
fbdev=/dev/fb0
mode=1280x720
depth=32
4. Log out, then log back in.
5. Now you can run the directfb examples you build. For example:
$ df_andi
Generally, most of the examples start with "df_" . Here are some that are interesting.
A 3D skull with rotate light. If you have a mouse, you can rotate the skull.
1. Enable the ETHER0 port in the device tree. For example, enable Eth0 on RZ/Five:
# <kernel dir>/arch/riscv/boot/dts/renesas/r9a07g043f01-smarc.dts
10
11 /*
12 * DIP-Switch SW1 setting
13 * 1 : High; 0: Low
14 * SW1-2 : SW_SD0_DEV_SEL (1: eMMC; 0: uSD)
15 * SW1-3 : SW_ET0_EN_N (0: ETHER0; 1: CAN0,CAN1,SSI1,RSPI1)
16 * Please change below MACROs corespondingly to SW1 setting
17 */
18
19 #define SW_SW0_DEV_SEL 1
20 #define SW_ET0_EN_N 0
21 //#define SW_ET0_EN_N 1
22
23 #include "rzfive-smarc.dtsi"
24
25 / {
2. For RZ/Five and RZ/G2UL, please turn switch SW1_3 OFF on the smarc module:
Image Added
$ amixer cset name='Left Input Mixer L2 Switch' on
$ amixer cset name='Right Input Mixer R2 Switch' on
$ amixer cset name='Headphone Playback Volume' 100
$ amixer cset name='PCM Volume' 100%
$ amixer cset name='Input PGA Volume' 25
$ arecord -M -twav -fS16_LE -r8000 /tmp/sample.wav
$ aplay /tmp/sample.wav
The RZ/G2L SMARC EVK is designed to handle both 48KHz and 44.1KHz audio files seamlessly. These two sampling frequencies require 12.288MHz and 11.2896MHz master clock respectively (256x the sample rate). On the SMARC EVK we have a versaclock3 that provides the different clocks. When it comes to audio this is the configuration:
Image Added
The versaclock3 clock generator generates audio_clk1 (SE1 output), audio_clk2 (Diff2 output), required by the RZ/G2L SSI (I2S peripheral), and audio_mclk (SE2) that is fed into the WM8978 codec as master clock. However the versaclock3 can be reconfigured to switch the audio_mclk dynamically between 11.2896MHz and 12.288MHz. This is done seamlessly because audio_mclk is not a fixed clock, the ALSA framework "sends" the reconfiguration request to both the SSI driver and the versaclock3 driver. The first driver switches reference clock input from audio_clk1 and audio_clk2 and viceversa, the latter driver sets the best clock parent for audio_mclk, that is in fact done by switching from DIV4 to DIV5 via I2C.
Image Added
This is the screenshot of the versaclock3 Timing Commander utility, that shows the default configuration stored in the OTP.
HTML |
---|
<! To make a ToC move with the page, add a HTML macro and put this in it>
<style> .toc-macro {position: static !important;} </style> |
Table of Contents |
---|