boards: renesas: Support Renesas EK-RA8D1 board

Initial support for EK-RA8D1 board this commit
only support basic GPIO and Serial driver for
RA8D1 board

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
This commit is contained in:
Duy Phuong Hoang. Nguyen 2024-06-18 11:38:05 +07:00 committed by Fabio Baltieri
commit f75c7ae24c
10 changed files with 333 additions and 0 deletions

View file

@ -0,0 +1,5 @@
# Copyright (c) 2024 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0
config BOARD_EK_RA8D1
select SOC_R7FA8D1BHECBD

View file

@ -0,0 +1,6 @@
# Copyright (c) 2024 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0
board_runner_args(jlink "--device=R7FA8D1BH")
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

View file

@ -0,0 +1,5 @@
board:
name: ek_ra8d1
vendor: renesas
socs:
- name: r7fa8d1bhecbd

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

View file

@ -0,0 +1,168 @@
.. _ek_ra8d1:
RA8D1 Evaluation Kit
####################
Overview
********
The EK-RA8D1 is an Evaluation Kit for Renesas RA8D1 MCU Group which are the industrys first 32-bit
graphics-enabled MCUs based on the Arm Cortex-M85 (CM85) core, delivering breakthrough performance
of over 3000 Coremark points at 480 MHz and superior graphics capabilities that enable high-resolution
displays and Vision AI applications.
The key features of the EK-RA8D1 board are categorized in three groups as follow:
**MCU Native Pin Access**
- 480MHz Arm Cortex-M85 based RA8D1 MCU in 224 pins, BGA package
- Native pin acces througgh 2 x 50-pin, and 2 x 40-pin male headers
- MCU current measurement points for precision current consumption measurement
- Multiple clock sources - RA8D1 MCU oscillator and sub-clock oscillator crystals,
providing precision 20.000MHz and 32,768 Hz refeence clocks.
Additional low precision clocks are avaialbe internal to the RA8D1 MCU
**System Control and Ecosystem Access**
- USB Full Speed Host and Device (micro-AB connector)
- Four 5V input sources
- USB (Debug, Full Speed, High Speed)
- External power supply (using surface mount clamp test points and power input vias)
- Three Debug modes
- Debug on-board (SWD)
- Debug in (ETM, SWD and JTAG)
- Debug out (SWD)
- User LEDs and buttons
- Three User LEDs (red, blue, green)
- Power LED (white) indicating availability of regulated power
- Debug LED (yellow) indicating the debug connection
- Two User buttons
- One Reset button
- Five most popular ecosystems expansions
- Two Seeed Grove system (I2C/I3C) connectors
- One SparkFun Qwiic connector
- Two Digilent Pmod (SPI, UART and I2C/I3C) connectors
- Arduino (Uno R3) connector
- MikroElektronika mikroBUS connector
- MCU boot configuration jumper
**Special Feature Access**
- Ethernet (RJ45 RMII interface)
- USB High Speed Host and Device (micro-AB connector)
- 512 Mb (64 MB) External Octo-SPI Flash (present in the MCU Native Pin Access area of the EK-RA8D1 board)
- CAN FD (3-pin header)
.. figure:: ek-ra8d1-board.jpg
:align: center
:alt: RA8D1 Evaluation Kit
EK-RA8D1 Board Functional Area Definitions (Credit: Renesas Electronics Corporation)
Hardware
********
Detail Hardware feature for the RA8D1 MCU group can be found at `RA8D1 Group User's Manual Hardware`_
.. figure:: ra8d1-block-diagram.png
:width: 442px
:align: center
:alt: RA8D1 MCU group feature
RA8D1 Block diagram (Credit: Renesas Electronics Corporation)
Detail Hardware feature for the EK-RA8D1 MCU can be found at `EK-RA8D1 - User's Manual`_
Supported Features
==================
The below features are currently supported on Zephyr OS for EK-RA8D1 board:
+--------------+------------+------------------+
| Interface | Controller | Driver/Component |
+==============+============+==================+
| GPIO | on-chip | gpio |
+--------------+------------+------------------+
| MPU | on-chip | arch/arm |
+--------------+------------+------------------+
| NVIC | on-chip | arch/arm |
+--------------+------------+------------------+
| UART | on-chip | serial |
+--------------+------------+------------------+
| CLOCK | on-chip | clock control |
+--------------+------------+------------------+
Other hardware features are currently not supported by the port.
Programming and Debugging
*************************
Applications for the ``ek_ra8d1`` board configuration can be
built, flashed, and debugged in the usual way. See
:ref:`build_an_application` and :ref:`application_run` for more details on
building and running.
**Note:** Only support from SDK v0.16.6 in which GCC for Cortex Arm-M85 was available.
To build for EK-RA8M1 user need to get and install GNU Arm Embedded toolchain from https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v0.16.6
Flashing
========
Program can be flashed to EK-RA8D1 via the on-board SEGGER J-Link debugger.
SEGGER J-link's drivers are avaialbe at https://www.segger.com/downloads/jlink/
To flash the program to board
1. Connect to J-Link OB via USB port to host PC
2. Make sure J-Link OB jumper is in default configuration as describe in `EK-RA8D1 - User's Manual`_
3. Execute west command
.. code-block:: console
west flash -r jlink
Debugging
=========
You can use Segger Ozone (`Segger Ozone Download`_) for a visual debug interface
Once downloaded and installed, open Segger Ozone and configure the debug project
like so:
* Target Device: R7FA8D1BH
* Target Interface: SWD
* Target Interface Speed: 4 MHz
* Host Interface: USB
* Program File: <path/to/your/build/zephyr.elf>
**Note:** It's verified that debug is OK on Segger Ozone v3.30d so please use this or later
version of Segger Ozone
References
**********
- `EK-RA8D1 Website`_
- `RA8D1 MCU group Website`_
.. _EK-RA8D1 Website:
https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra8d1-evaluation-kit-ra8d1-mcu-group
.. _RA8D1 MCU group Website:
https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ra8d1-480-mhz-arm-cortex-m85-based-graphics-microcontroller-helium-and-trustzone
.. _EK-RA8D1 - User's Manual:
https://www.renesas.com/us/en/document/mat/ek-ra8d1-v1-user-manual
.. _RA8D1 Group User's Manual Hardware:
https://www.renesas.com/us/en/document/mah/ra8d1-group-users-manual-hardware
.. _Segger Ozone Download:
https://www.segger.com/downloads/jlink#Ozone

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View file

@ -0,0 +1,18 @@
/*
* Copyright (c) 2024 Renesas Electronics Corporation
* SPDX-License-Identifier: Apache-2.0
*/
&pinctrl {
sci9_default: sci9_default {
group1 {
/* tx */
psels = <RA_PSEL(RA_PSEL_SCI_9, 10, 14)>;
drive-strength = "medium";
};
group2 {
/* rx */
psels = <RA_PSEL(RA_PSEL_SCI_9, 10, 15)>;
};
};
};

View file

@ -0,0 +1,101 @@
/*
* Copyright (c) 2024 Renesas Electronics Corporation
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <renesas/ra/ra8/r7fa8d1bhecbd.dtsi>
#include <dt-bindings/gpio/gpio.h>
#include "ek_ra8d1-pinctrl.dtsi"
/ {
model = "Renesas EK-RA8D1";
compatible = "renesas,ra8d1", "renesas,ra8";
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &uart9;
zephyr,shell-uart = &uart9;
};
leds {
compatible = "gpio-leds";
led1: led1 {
gpios = <&ioport6 0 GPIO_ACTIVE_HIGH>;
label = "LED1";
};
led2: led2 {
gpios = <&ioport4 14 GPIO_ACTIVE_HIGH>;
label = "LED2";
};
led3: led3 {
gpios = <&ioport1 7 GPIO_ACTIVE_HIGH>;
label = "LED3";
};
};
aliases {
led0 = &led1;
};
};
&xtal {
clock-frequency = <DT_FREQ_M(20)>;
mosel = <0>;
#clock-cells = <0>;
status = "okay";
};
&subclk {
status = "okay";
};
&pll {
source = <RA_PLL_SOURCE_MAIN_OSC>;
div = <RA_PLL_DIV_2>;
mul = <96 0>;
divp = <RA_PLL_DIV_2>;
freqp = <DT_FREQ_M(480)>;
divq = <RA_PLL_DIV_2>;
freqq = <DT_FREQ_M(480)>;
divr = <RA_PLL_DIV_2>;
freqr = <DT_FREQ_M(480)>;
status = "okay";
};
&sciclk {
clk_src = <RA_CLOCK_SOURCE_PLL1P>;
clk_div = <RA_SCI_CLOCK_DIV_4>;
status = "okay";
};
&ioport1 {
status = "okay";
};
&ioport4 {
status = "okay";
};
&ioport6 {
status = "okay";
};
&sci0 {
/* sci0 and spi0 cannot be enabled together */
pinctrl-0 = <&sci9_default>;
pinctrl-names = "default";
};
&sci9 {
pinctrl-0 = <&sci9_default>;
pinctrl-names = "default";
status = "okay";
uart9: uart {
current-speed = <115200>;
status = "okay";
};
};

View file

@ -0,0 +1,12 @@
identifier: ek_ra8d1
name: Renesas EK-RA8D1
type: mcu
arch: arm
ram: 1024
flash: 2048
toolchain:
- zephyr
- gnuarmemb
supported:
- gpio
- uart

View file

@ -0,0 +1,18 @@
# Copyright (c) 2024 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=480000000
# Enable GPIO
CONFIG_GPIO=y
CONFIG_PINCTRL=y
# Enable Console
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_CONSOLE=y
CONFIG_CLOCK_CONTROL=y
CONFIG_BUILD_OUTPUT_HEX=y
CONFIG_BUILD_NO_GAP_FILL=y