Skip to content

Commit e535f9e

Browse files
tiennguyenzgkartben
authored andcommitted
soc: renesas: Add support for Renesas RZ/G3S
This adds minimal support for a new SoC Renesas RZ/G3S Signed-off-by: Tien Nguyen <[email protected]> Signed-off-by: Nhut Nguyen <[email protected]> Signed-off-by: Binh Nguyen <[email protected]>
1 parent ae7e852 commit e535f9e

File tree

13 files changed

+189
-0
lines changed

13 files changed

+189
-0
lines changed

dts/arm/renesas/rz/rzg/r9a08g045.dtsi

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright (c) 2024 EPAM Systems
3+
* Copyright (c) 2024 Renesas Electronics Corporation
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <arm/armv8-m.dtsi>
8+
#include <mem.h>
9+
10+
/ {
11+
compatible = "renesas,r9a08g045";
12+
#address-cells = <1>;
13+
#size-cells = <1>;
14+
15+
cpus {
16+
#address-cells = <1>;
17+
#size-cells = <0>;
18+
19+
cpu0: cpu@0 {
20+
device_type = "cpu";
21+
compatible = "arm,cortex-m33";
22+
reg = <0>;
23+
clock-frequency = <250000000>;
24+
#address-cells = <1>;
25+
#size-cells = <1>;
26+
27+
mpu: mpu@e000ed90 {
28+
compatible = "arm,armv8m-mpu";
29+
reg = <0xe000ed90 0x40>;
30+
};
31+
};
32+
};
33+
};
34+
35+
&nvic {
36+
arm,num-irq-priority-bits = <7>;
37+
};

modules/Kconfig.renesas_fsp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ config HAS_RENESAS_RA_FSP
88
help
99
Enable Renesas RA FSP support
1010

11+
config HAS_RENESAS_RZ_FSP
12+
bool
13+
help
14+
Enable Renesas RZ FSP support
15+
1116
if HAS_RENESAS_RA_FSP
1217

1318
config USE_RA_FSP_SCI_B_UART

soc/renesas/rz/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
add_subdirectory(${SOC_SERIES})

soc/renesas/rz/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if SOC_FAMILY_RENESAS_RZ
5+
6+
rsource "*/Kconfig"
7+
8+
endif # SOC_FAMILY_RENESAS_RZ

soc/renesas/rz/Kconfig.defconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if SOC_FAMILY_RENESAS_RZ
5+
6+
rsource "*/Kconfig.defconfig"
7+
8+
endif # SOC_FAMILY_RENESAS_RZ

soc/renesas/rz/Kconfig.soc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SOC_FAMILY_RENESAS_RZ
5+
bool
6+
7+
config SOC_FAMILY
8+
default "renesas_rz" if SOC_FAMILY_RENESAS_RZ
9+
10+
rsource "*/Kconfig.soc"

soc/renesas/rz/rzg3s/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
zephyr_sources(soc.c)
5+
6+
zephyr_include_directories(.)
7+
8+
set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm/cortex_m/scripts/linker.ld CACHE INTERNAL "")

soc/renesas/rz/rzg3s/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright (c) 2024 EPAM Systems
2+
# Copyright (c) 2024 Renesas Electronics Corporation
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
config SOC_SERIES_RZG3S
6+
select ARM
7+
select CPU_CORTEX_M33
8+
select CPU_HAS_ARM_MPU
9+
select HAS_RENESAS_RZ_FSP
10+
select CPU_CORTEX_M_HAS_DWT
11+
select SOC_EARLY_INIT_HOOK
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright (c) 2024 EPAM Systems
2+
# Copyright (c) 2024 Renesas Electronics Corporation
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
if SOC_SERIES_RZG3S
6+
7+
config NUM_IRQS
8+
default 480
9+
10+
config SYS_CLOCK_HW_CYCLES_PER_SEC
11+
default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency)
12+
13+
config FLASH_SIZE
14+
default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_FLASH),0,K)
15+
16+
config FLASH_BASE_ADDRESS
17+
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH))
18+
19+
config SYS_CLOCK_EXISTS
20+
default y
21+
22+
# This is required to support debug with xSPI boot when Zephyr already booted by TF-A
23+
config INIT_ARCH_HW_AT_BOOT
24+
default y
25+
26+
config BUILD_OUTPUT_S19
27+
default y
28+
29+
endif # SOC_SERIES_RZG3S

soc/renesas/rz/rzg3s/Kconfig.soc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SOC_SERIES_RZG3S
5+
bool
6+
select SOC_FAMILY_RENESAS_RZ
7+
help
8+
Renesas RZ/G3S series
9+
10+
config SOC_SERIES
11+
default "rzg3s" if SOC_SERIES_RZG3S
12+
13+
config SOC_R9A08G045S33GBG
14+
bool
15+
select SOC_SERIES_RZG3S
16+
help
17+
R9A08G045S33GBG
18+
19+
config SOC_R9A08G045S33GBG_CM33
20+
bool
21+
select SOC_R9A08G045S33GBG
22+
23+
config SOC
24+
default "r9a08g045s33gbg" if SOC_R9A08G045S33GBG

0 commit comments

Comments
 (0)