Skip to content

Commit adeaad5

Browse files
Phuc Phamfabiobaltieri
authored andcommitted
soc: renesas: Add initial support for Renesas RZ/G2UL
Add initial support for Renesas RZ/G2UL Signed-off-by: Phuc Pham <phuc.pham.xr@bp.renesas.com> Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
1 parent 330848c commit adeaad5

File tree

9 files changed

+120
-1
lines changed

9 files changed

+120
-1
lines changed

soc/renesas/rz/Kconfig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
# Copyright (c) 2024 Renesas Electronics Corporation
1+
# Copyright (c) 2024-2025 Renesas Electronics Corporation
22
# SPDX-License-Identifier: Apache-2.0
33

4+
config SOC_FAMILY_RENESAS_RZ
5+
select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE
6+
47
if SOC_FAMILY_RENESAS_RZ
58

69
rsource "*/Kconfig"

soc/renesas/rz/rzg2ul/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2025 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/rzg2ul/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) 2025 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SOC_SERIES_RZG2UL
5+
select ARM
6+
select CPU_CORTEX_M33
7+
select CPU_HAS_ARM_MPU
8+
select HAS_RENESAS_RZ_FSP
9+
select CPU_CORTEX_M_HAS_DWT
10+
select SOC_EARLY_INIT_HOOK
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright (c) 2025 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if SOC_SERIES_RZG2UL
5+
6+
config NUM_IRQS
7+
default 480
8+
9+
config SYS_CLOCK_HW_CYCLES_PER_SEC
10+
default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency)
11+
12+
config FLASH_SIZE
13+
default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_FLASH),0,K)
14+
15+
config FLASH_BASE_ADDRESS
16+
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH))
17+
18+
config SYS_CLOCK_EXISTS
19+
default y
20+
21+
config INIT_ARCH_HW_AT_BOOT
22+
default y
23+
24+
endif # SOC_SERIES_RZG2UL

soc/renesas/rz/rzg2ul/Kconfig.soc

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

soc/renesas/rz/rzg2ul/pinctrl_soc.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright (c) 2025 Renesas Electronics Corporation
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#ifndef ZEPHYR_SOC_RENESAS_RZ_RZG2UL_PINCTRL_SOC_H_
7+
#define ZEPHYR_SOC_RENESAS_RZ_RZG2UL_PINCTRL_SOC_H_
8+
9+
#include <pinctrl_rzg.h>
10+
11+
#endif /* ZEPHYR_SOC_RENESAS_RZ_RZG2UL_PINCTRL_SOC_H_ */

soc/renesas/rz/rzg2ul/soc.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2025 Renesas Electronics Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/**
8+
* @file
9+
* @brief System/hardware module for Renesas RZ/G2UL Group
10+
*/
11+
12+
#include <zephyr/init.h>
13+
#include <bsp_api.h>
14+
15+
/* System core clock is set to 200 MHz after reset */
16+
uint32_t SystemCoreClock = 200000000;
17+
18+
void soc_early_init_hook(void)
19+
{
20+
/* Configure system clocks. */
21+
bsp_clock_init();
22+
}

soc/renesas/rz/rzg2ul/soc.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* Copyright (c) 2025 Renesas Electronics Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#ifndef ZEPHYR_SOC_RENESAS_RZG2UL_SOC_H_
8+
#define ZEPHYR_SOC_RENESAS_RZG2UL_SOC_H_
9+
10+
#include <bsp_api.h>
11+
12+
#endif /* ZEPHYR_SOC_RENESAS_RZG2UL_SOC_H_ */

soc/renesas/rz/soc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ family:
1515
- name: r9a07g044c22gbg
1616
cpuclusters:
1717
- name: cm33
18+
- name: rzg2ul
19+
socs:
20+
- name: r9a07g043u11gbg
21+
cpuclusters:
22+
- name: cm33
1823
- name: rzg3s
1924
socs:
2025
- name: r9a08g045s33gbg

0 commit comments

Comments
 (0)