Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support of rcar spider ca55 board #68141

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions boards/renesas/rcar_spider_s4/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2024 EPAM Systems
# SPDX-License-Identifier: Apache-2.0

config BUILD_OUTPUT_BIN
default y if BOARD_RCAR_SPIDER_S4_R8A779F0_A55
3 changes: 2 additions & 1 deletion boards/renesas/rcar_spider_s4/Kconfig.rcar_spider_s4
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
# SPDX-License-Identifier: Apache-2.0

config BOARD_RCAR_SPIDER_S4
select SOC_R8A779F0
select SOC_R8A779F0_R52 if BOARD_RCAR_SPIDER_S4_R8A779F0_R52
select SOC_R8A779F0_A55 if BOARD_RCAR_SPIDER_S4_R8A779F0_A55
6 changes: 4 additions & 2 deletions boards/renesas/rcar_spider_s4/board.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
board_runner_args(openocd "--use-elf")
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
if(CONFIG_BOARD_RCAR_SPIDER_S4_R8A779F0_R52)
board_runner_args(openocd "--use-elf")
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
endif()
83 changes: 83 additions & 0 deletions boards/renesas/rcar_spider_s4/doc/rcar_spider_a55.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
.. _rcar_spider_a55:

R-CAR Spider S4 (ARM64)
#######################

Overview
********
R-Car S4 enables to launch Car Server/CoGW with high performance, high-speed networking,
high security and high functional safety levels that are required as E/E architectures
evolve into domains and zones. The R-Car S4 solution allows designers to re-use up to 88
percent of software code developed for 3rd generation R-Car SoCs and RH850 MCU applications.
The software package supports the real-time cores with various drivers and basic software
such as Linux BSP and hypervisors.

Hardware
********
The R-Car S4 includes:

* eight 1.2GHz Arm Cortex-A55 cores, 2 cores x 4 clusters;
* 1.0 GHz Arm Cortex-R52 core (hardware Lock step is supported);
* two 400MHz G4MH cores (hardware Lock step is supported);
* memory controller for LPDDR4X-3200 with 32bit bus (16bit x 1ch + 16bit x 1ch) with ECC;
* SD card host interface / eMMC;
* UFS 3.0 x 1 channel;
* PCI Express Gen4.0 interface (Dual lane x 2ch);
* ICUMX;
* ICUMH;
* SHIP-S x 3 channels;
* AES Accerator x 8 channels;
* CAN FD interface x 16 channels;
* R-Switch2 (Ether);
* 100base EtherAVB x 1 channel;
* Gbit-EtherTSN x 3 channels;
* 1 unit FlexRay (A,B 2ch) interface.

Supported Features
==================
The Renesas ``rcar_spider_s4/r8a779f0/a55`` board configuration supports the following
hardware features:

+-----------+------------------------------+--------------------------------+
| Interface | Driver/components | Support level |
+===========+==============================+================================+
| PINCTRL | pinctrl | |
+-----------+------------------------------+--------------------------------+
| CLOCK | clock_control | |
+-----------+------------------------------+--------------------------------+
| UART | serial | interrupt-driven/polling |
+-----------+------------------------------+--------------------------------+

Other hardware features have not been enabled yet for this board.

Programming and Debugging
*************************

The onboard flash is not supported by Zephyr at this time. However, it is possible to
load the Zephyr binary using U-Boot commands.

One of the ways to load Zephyr is shown below.

.. code-block:: console

tftp 0x48000000 <tftp_server_path/zephyr.bin>
booti 0x48000000

Here is an example for the :ref:`hello_world` application.

.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: rcar_spider_s4/r8a779f0/a55
:goals: build

References
**********

- `Renesas R-Car Development Support website`_
- `eLinux Spider page`_

.. _Renesas R-Car Development Support website:
https://www.renesas.com/us/en/support/partners/r-car-consortium/r-car-development-support

.. _eLinux Spider page:
https://elinux.org/R-Car/Boards/Spider
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ Flashing

First of all, open your serial terminal.

Applications for the ``rcar_spider_s4`` board configuration can be built in the
Applications for the ``rcar_spider_s4/r8a779f0/r52`` board configuration can be built in the
usual way (see :ref:`build_an_application` for more details).

.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: rcar_spider_s4
:board: rcar_spider_s4/r8a779f0/r52
:goals: flash

You should see the following message in the terminal:
Expand All @@ -165,7 +165,7 @@ Here is an example for the :ref:`hello_world` application.

.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: rcar_spider_s4
:board: rcar_spider_s4/r8a779f0/r52
:goals: debug

You will then get access to a GDB session for debugging.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright (c) 2023 EPAM Systems
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-r8a779f0.h>

&pfc {
hscif0_data_tx_default: hscif0_data_tx_default {
pin = <PIN_HTX0 FUNC_HTX0>;
};

hscif0_data_rx_default: hscif0_data_rx_default {
pin = <PIN_HRX0 FUNC_HRX0>;
};
};
32 changes: 32 additions & 0 deletions boards/renesas/rcar_spider_s4/rcar_spider_s4_r8a779f0_a55.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (c) 2023-2024 EPAM Systems
*
* SPDX-License-Identifier: Apache-2.0
*
*/

/dts-v1/;
#include <mem.h>
#include <arm64/renesas/r8a779f0.dtsi>
#include "rcar_spider_s4_r8a779f0_a55-pinctrl.dtsi"

/ {
model = "Renesas Spider CA55";
chosen {
zephyr,sram = &ram;
zephyr,console = &hscif0;
zephyr,shell-uart = &hscif0;
};

ram: memory@48000000 {
device_type = "mmio-sram";
reg = <0x0 0x48000000 0x0 DT_SIZE_M(512)>;
};
};

&hscif0 {
pinctrl-0 = <&hscif0_data_tx_default &hscif0_data_rx_default>;
pinctrl-names = "default";
current-speed = <1843200>;
status = "okay";
};
12 changes: 12 additions & 0 deletions boards/renesas/rcar_spider_s4/rcar_spider_s4_r8a779f0_a55.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
identifier: rcar_spider_s4/r8a779f0/a55
name: Cortex A55 for Renesas Spider
type: mcu
arch: arm64
toolchain:
- zephyr
- cross-compile
supported:
- pinctrl
- gpio
- clock_control
- uart
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Cache management
CONFIG_CACHE_MANAGEMENT=y

# Enable UART driver
CONFIG_SERIAL=y

# Enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y

# Enable clock control
CONFIG_CLOCK_CONTROL=y
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=16666666

CONFIG_AARCH64_IMAGE_HEADER=y
CONFIG_XIP=n
CONFIG_MAX_XLAT_TABLES=24
CONFIG_ARMV8_A_NS=y
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

/dts-v1/;
#include <arm/renesas/rcar/gen4/r8a779f0.dtsi>
#include "rcar_spider_s4-pinctrl.dtsi"
#include "rcar_spider_s4_r8a779f0_r52-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>

/ {
model = "Renesas Spider board";
compatible = "renesas,spider-s4";
compatible = "renesas,spider-s4-cr52";

chosen {
zephyr,sram = &sram0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
identifier: rcar_spider_s4
identifier: rcar_spider_s4/r8a779f0/r52
name: Cortex r52 for Renesas Spider
type: mcu
arch: arm
Expand Down
3 changes: 2 additions & 1 deletion drivers/pinctrl/renesas/rcar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ zephyr_library_sources(pfc_rcar.c)

if (CONFIG_SOC_R8A77951_R7 OR CONFIG_SOC_R8A77951_A57)
zephyr_library_sources(pfc_r8a77951.c)
elseif (CONFIG_SOC_R8A779F0_R52 OR CONFIG_SOC_R8A779F0_A55)
zephyr_library_sources(pfc_r8a779f0.c)
endif()

zephyr_library_sources_ifdef(CONFIG_SOC_R8A77961 pfc_r8a77961.c)
zephyr_library_sources_ifdef(CONFIG_SOC_R8A779F0 pfc_r8a779f0.c)
118 changes: 118 additions & 0 deletions dts/arm64/renesas/r8a779f0.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
/*
* Device Tree Source for the R-Car S4 (R8A779F0) SoC
*
* Copyright (C) 2023 EPAM Systems.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <arm64/armv8-a.dtsi>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <zephyr/dt-bindings/clock/renesas_cpg_mssr.h>
#include <zephyr/dt-bindings/clock/r8a779f0_cpg_mssr.h>

/ {
compatible = "renesas,r8a779f0";
#address-cells = <2>;
#size-cells = <2>;
interrupt-parent = <&gic>;

cpus {
#address-cells = <1>;
#size-cells = <0>;

a55: cpu@0 {
compatible = "arm,armv8";
reg = <0>;
device_type = "cpu";
enable-method = "psci";
};
};

psci {
compatible = "arm,psci-0.2";
method = "smc";
};

arch_timer: timer {
compatible = "arm,armv8-timer";
interrupt-parent = <&gic>;
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>,
<GIC_PPI 14 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>,
<GIC_PPI 11 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>,
<GIC_PPI 10 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
};

reg_3p3v: regulator_3p3v {
compatible = "regulator-fixed";
regulator-name = "reg_3p3v";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
regulator-boot-on;
status = "okay";
};

reg_1p8v: regulator_1p8v {
compatible = "regulator-fixed";
regulator-name = "reg_1p8v";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on;
status = "okay";
};

soc: soc {
compatible = "simple-bus";
interrupt-parent = <&gic>;

#address-cells = <2>;
#size-cells = <2>;
ranges;

gic: interrupt-controller@f1000000 {
compatible = "arm,gic-600", "arm,gic-v3", "arm,gic";
#interrupt-cells = <4>;
#address-cells = <0>;
interrupt-controller;
reg = <0 0xf1000000 0 0x20000>,
<0 0xf1060000 0 0x110000>;
status = "okay";
};

cpg: clock-controller@e6150000 {
compatible = "renesas,r8a779f0-cpg-mssr";
reg = <0 0xe6150000 0 0x4000>;
#clock-cells = <2>;
#power-domain-cells = <0>;
#reset-cells = <1>;
};

mmc0: mmc@ee140000 {
compatible = "renesas,rcar-mmc";
reg = <0 0xee140000 0 0x2000>;
vmmc-supply = <&reg_3p3v>;
vqmmc-supply = <&reg_1p8v>;
interrupts = <GIC_SPI 236 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
clocks = <&cpg CPG_MOD 706>, <&cpg CPG_CORE R8A779F0_CLK_SD0H>;
max-bus-freq = <200000000>;
status = "disabled";
};

pfc: pin-controller@e6050000 {
compatible = "renesas,rcar-pfc";
reg = <0 0xe6050000 0 0x16c>, <0 0xe6050800 0 0x16c>,
<0 0xe6051000 0 0x16c>, <0 0xe6051800 0 0x16c>,
<0 0xdfd90000 0 0x16c>, <0 0xdfd90800 0 0x16c>,
<0 0xdfd91000 0 0x16c>, <0 0xdfd91800 0 0x16c>;
};

hscif0: serial@e6540000 {
compatible = "renesas,rcar-hscif";
reg = <0 0xe6540000 0 0x60>;
interrupts = <GIC_SPI 245 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
clocks = <&cpg CPG_MOD 514>, <&cpg CPG_CORE R8A779F0_CLK_SASYNCPERD1>;
status = "disabled";
};
};
};