Skip to content

Commit f961578

Browse files
Hieu Nguyenkartben
authored andcommitted
soc: renesas: Maintain the minimal support of Renesas RZ/T2M
Renesas takes over the maintainer of SoC Renesas RZ/T2M to unify with other RZ devices - Move soc/renesas/rzt2m to soc/renesas/rz - Support xSPI boot mode to boot code from flash - Change to use HAL Renesas Signed-off-by: Hieu Nguyen <[email protected]> Signed-off-by: Nhut Nguyen <[email protected]> Signed-off-by: Binh Nguyen <[email protected]>
1 parent 0f852c8 commit f961578

File tree

18 files changed

+376
-493
lines changed

18 files changed

+376
-493
lines changed

dts/arm/renesas/rz/rzt/r9a07g075.dtsi

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/*
2+
* Copyright (c) 2023 Antmicro <www.antmicro.com>
3+
* Copyright (c) 2025 Renesas Electronics Corporation
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
#include <mem.h>
9+
#include <arm/armv8-r.dtsi>
10+
#include <zephyr/dt-bindings/interrupt-controller/arm-gic.h>
11+
12+
/ {
13+
compatible = "renesas,r9a07g075";
14+
#address-cells = <1>;
15+
#size-cells = <1>;
16+
17+
cpus {
18+
#address-cells = <1>;
19+
#size-cells = <0>;
20+
21+
cpu@0 {
22+
device_type = "cpu";
23+
compatible = "arm,cortex-r52";
24+
reg = <0>;
25+
};
26+
27+
cpu@1 {
28+
device_type = "cpu";
29+
compatible = "arm,cortex-r52";
30+
reg = <1>;
31+
};
32+
};
33+
34+
arch_timer: timer {
35+
compatible = "arm,armv8-timer";
36+
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>,
37+
<GIC_PPI 14 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>,
38+
<GIC_PPI 11 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>,
39+
<GIC_PPI 10 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
40+
interrupt-parent = <&gic>;
41+
};
42+
43+
soc {
44+
interrupt-parent = <&gic>;
45+
46+
gic: interrupt-controller@94000000 {
47+
compatible = "arm,gic-v3", "arm,gic";
48+
reg = <0x94000000 0x10000>,
49+
<0x94100000 0x80000>;
50+
interrupt-controller;
51+
#interrupt-cells = <4>;
52+
status = "okay";
53+
};
54+
55+
cpu0_atcm: memory@0 {
56+
compatible = "mmio-sram";
57+
reg = <0x00000000 DT_SIZE_K(512)>;
58+
};
59+
60+
cpu0_btcm: memory@100000 {
61+
compatible = "mmio-sram";
62+
reg = <0x00100000 DT_SIZE_K(64)>;
63+
};
64+
65+
sram: memory@10000000 {
66+
compatible = "mmio-sram";
67+
reg = <0x10000000 DT_SIZE_M(2)>;
68+
};
69+
70+
xspi0_cs0: memory@60000000 {
71+
compatible = "mmio-sram";
72+
reg = <0x60000000 DT_SIZE_M(64)>;
73+
74+
partitions {
75+
compatible = "fixed-partitions";
76+
#address-cells = <1>;
77+
#size-cells = <1>;
78+
loader_param: partition@0 {
79+
label = "loader-param";
80+
reg = <0x00000000 0x4C>;
81+
read-only;
82+
};
83+
84+
loader_program: partition@4C {
85+
label = "loader-program";
86+
reg = <0x0000004C (DT_SIZE_K(56) - 0x4C)>;
87+
read-only;
88+
};
89+
90+
slot0_partition: partition@E000 {
91+
label = "image-0";
92+
reg = <0x0000E000 (DT_SIZE_M(64) - DT_SIZE_K(56))>;
93+
read-only;
94+
};
95+
};
96+
};
97+
};
98+
};

dts/arm/renesas/rz/rzt2m.dtsi

Lines changed: 0 additions & 208 deletions
This file was deleted.
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
# Copyright (c) 2023 Antmicro <www.antmicro.com>
2+
# Copyright (c) 2025 Renesas Electronics Corporation
23
# SPDX-License-Identifier: Apache-2.0
34

4-
zephyr_sources(soc.c)
5+
zephyr_sources(
6+
soc.c
7+
loader_param.c
8+
../common/loader_program.S
9+
)
510

611
zephyr_include_directories(.)
712

13+
zephyr_linker_sources(SECTIONS sections.ld)
14+
815
set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm/cortex_r/scripts/linker.ld CACHE INTERNAL "")
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# Copyright (c) 2023 Antmicro <www.antmicro.com>
2+
# Copyright (c) 2025 Renesas Electronics Corporation
23
# SPDX-License-Identifier: Apache-2.0
34

4-
config SOC_RENESAS_RZT2M
5+
config SOC_SERIES_RZT2M
56
select ARM
67
select CPU_CORTEX_R52
78
select CPU_HAS_ARM_MPU
89
select GIC_SINGLE_SECURITY_STATE
910
select ARM_ARCH_TIMER
10-
select SYSCON
11+
select HAS_RENESAS_RZ_FSP
12+
select SOC_RESET_HOOK
1113
select SOC_EARLY_INIT_HOOK
14+
select ARM_CUSTOM_INTERRUPT_CONTROLLER
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright (c) 2023 Antmicro <www.antmicro.com>
2+
# Copyright (c) 2025 Renesas Electronics Corporation
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
if SOC_SERIES_RZT2M
6+
7+
config NUM_IRQS
8+
default 480
9+
10+
config SYS_CLOCK_HW_CYCLES_PER_SEC
11+
default 25000000
12+
13+
config FPU
14+
default y
15+
16+
config FLASH_SIZE
17+
default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_FLASH),0,K)
18+
19+
config FLASH_BASE_ADDRESS
20+
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH))
21+
22+
DT_CHOSEN_IMAGE_ZEPHYR = zephyr,code-partition
23+
24+
config BUILD_OUTPUT_ADJUST_LMA
25+
default "($(dt_chosen_reg_addr_hex,$(DT_CHOSEN_IMAGE_ZEPHYR)) + \
26+
$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH)))"
27+
28+
config BUILD_OUTPUT_ADJUST_LMA_SECTIONS
29+
default "*;!.loader"
30+
31+
endif # SOC_SERIES_RZT2M

soc/renesas/rz/rzt2m/Kconfig.soc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright (c) 2023 Antmicro <www.antmicro.com>
2+
# Copyright (c) 2025 Renesas Electronics Corporation
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
config SOC_SERIES_RZT2M
6+
bool
7+
select SOC_FAMILY_RENESAS_RZ
8+
help
9+
Renesas RZ/T2M series
10+
11+
config SOC_SERIES
12+
default "rzt2m" if SOC_SERIES_RZT2M
13+
14+
config SOC_R9A07G075M24GBG
15+
bool
16+
select SOC_SERIES_RZT2M
17+
help
18+
R9A07G075M24GBG
19+
20+
config SOC_R9A07G075M24GBG_CR520
21+
bool
22+
select SOC_R9A07G075M24GBG
23+
24+
config SOC
25+
default "r9a07g075m24gbg" if SOC_R9A07G075M24GBG
File renamed without changes.

0 commit comments

Comments
 (0)