Skip to content

Commit 5f4b9bb

Browse files
duynguyenxanashif
authored andcommitted
soc: renesas: Add initial support for RA6M4 SoC
- Initial support for RA6M4 SoC Signed-off-by: Duy Phuong Hoang. Nguyen <[email protected]>
1 parent 7c67fa1 commit 5f4b9bb

File tree

10 files changed

+518
-0
lines changed

10 files changed

+518
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2024 Renesas Electronics Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <arm/renesas/ra/ra6/r7fa6m4ax.dtsi>
8+
9+
/ {
10+
soc {
11+
flash-controller@407e0000 {
12+
reg = <0x407e0000 0x10000>;
13+
#address-cells = <1>;
14+
#size-cells = <1>;
15+
16+
flash0: flash@0 {
17+
compatible = "soc-nv-flash";
18+
reg = <0x0 DT_SIZE_M(1)>;
19+
};
20+
};
21+
};
22+
};
Lines changed: 265 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,265 @@
1+
/*
2+
* Copyright (c) 2024 Renesas Electronics Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <arm/renesas/ra/ra6/ra6-cm33-common.dtsi>
8+
#include <zephyr/dt-bindings/clock/ra_clock.h>
9+
10+
/ {
11+
soc {
12+
sram0: memory@20000000 {
13+
compatible = "mmio-sram";
14+
reg = <0x20000000 DT_SIZE_K(256)>;
15+
};
16+
17+
sci1: sci1@40118100 {
18+
compatible = "renesas,ra-sci";
19+
interrupts = <4 1>, <5 1>, <6 1>, <7 1>;
20+
interrupt-names = "rxi", "txi", "tei", "eri";
21+
reg = <0x40118100 0x100>;
22+
clocks = <&pclka MSTPB 30>;
23+
status = "disabled";
24+
uart {
25+
compatible = "renesas,ra-sci-uart";
26+
channel = <1>;
27+
status = "disabled";
28+
};
29+
};
30+
31+
sci2: sci2@40118200 {
32+
compatible = "renesas,ra-sci";
33+
interrupts = <8 1>, <9 1>, <10 1>, <11 1>;
34+
interrupt-names = "rxi", "txi", "tei", "eri";
35+
reg = <0x40118200 0x100>;
36+
clocks = <&pclka MSTPB 29>;
37+
status = "disabled";
38+
uart {
39+
compatible = "renesas,ra-sci-uart";
40+
channel = <2>;
41+
status = "disabled";
42+
};
43+
};
44+
45+
sci3: sci3@40118300 {
46+
compatible = "renesas,ra-sci";
47+
interrupts = <12 1>, <13 1>, <14 1>, <15 1>;
48+
interrupt-names = "rxi", "txi", "tei", "eri";
49+
reg = <0x40118300 0x100>;
50+
clocks = <&pclka MSTPB 28>;
51+
status = "disabled";
52+
uart {
53+
compatible = "renesas,ra-sci-uart";
54+
channel = <3>;
55+
status = "disabled";
56+
};
57+
};
58+
59+
sci4: sci4@40118400 {
60+
compatible = "renesas,ra-sci";
61+
interrupts = <16 1>, <17 1>, <18 1>, <19 1>;
62+
interrupt-names = "rxi", "txi", "tei", "eri";
63+
reg = <0x40118400 0x100>;
64+
clocks = <&pclka MSTPB 27>;
65+
status = "disabled";
66+
uart {
67+
compatible = "renesas,ra-sci-uart";
68+
channel = <4>;
69+
status = "disabled";
70+
};
71+
};
72+
73+
sci5: sci5@40118500 {
74+
compatible = "renesas,ra-sci";
75+
interrupts = <20 1>, <21 1>, <22 1>, <23 1>;
76+
interrupt-names = "rxi", "txi", "tei", "eri";
77+
reg = <0x40118500 0x100>;
78+
clocks = <&pclka MSTPB 26>;
79+
status = "disabled";
80+
uart {
81+
compatible = "renesas,ra-sci-uart";
82+
channel = <5>;
83+
status = "disabled";
84+
};
85+
};
86+
87+
sci6: sci6@40118600 {
88+
compatible = "renesas,ra-sci";
89+
interrupts = <24 1>, <25 1>, <26 1>, <27 1>;
90+
interrupt-names = "rxi", "txi", "tei", "eri";
91+
reg = <0x40118600 0x100>;
92+
clocks = <&pclka MSTPB 25>;
93+
status = "disabled";
94+
uart {
95+
compatible = "renesas,ra-sci-uart";
96+
channel = <6>;
97+
status = "disabled";
98+
};
99+
};
100+
101+
sci7: sci7@40118700 {
102+
compatible = "renesas,ra-sci";
103+
interrupts = <28 1>, <29 1>, <30 1>, <31 1>;
104+
interrupt-names = "rxi", "txi", "tei", "eri";
105+
reg = <0x40118700 0x100>;
106+
clocks = <&pclka MSTPB 24>;
107+
status = "disabled";
108+
uart {
109+
compatible = "renesas,ra-sci-uart";
110+
channel = <7>;
111+
status = "disabled";
112+
};
113+
};
114+
115+
sci8: sci8@40118800 {
116+
compatible = "renesas,ra-sci";
117+
interrupts = <32 1>, <33 1>, <34 1>, <35 1>;
118+
interrupt-names = "rxi", "txi", "tei", "eri";
119+
reg = <0x40118800 0x100>;
120+
clocks = <&pclka MSTPB 23>;
121+
status = "disabled";
122+
uart {
123+
compatible = "renesas,ra-sci-uart";
124+
channel = <8>;
125+
status = "disabled";
126+
};
127+
};
128+
};
129+
130+
clocks: clocks {
131+
xtal: clock-xtal {
132+
compatible = "renesas,ra-cgc-external-clock";
133+
clock-frequency = <DT_FREQ_M(24)>;
134+
#clock-cells = <0>;
135+
status = "disabled";
136+
};
137+
138+
hoco: clock-hoco {
139+
compatible = "fixed-clock";
140+
clock-frequency = <DT_FREQ_M(20)>;
141+
#clock-cells = <0>;
142+
};
143+
144+
moco: clock-moco {
145+
compatible = "fixed-clock";
146+
clock-frequency = <DT_FREQ_M(8)>;
147+
#clock-cells = <0>;
148+
};
149+
150+
loco: clock-loco {
151+
compatible = "fixed-clock";
152+
clock-frequency = <32768>;
153+
#clock-cells = <0>;
154+
};
155+
156+
subclk: clock-subclk {
157+
compatible = "renesas,ra-cgc-subclk";
158+
clock-frequency = <32768>;
159+
#clock-cells = <0>;
160+
status = "disabled";
161+
};
162+
163+
pll: pll {
164+
compatible = "renesas,ra-cgc-pll";
165+
#clock-cells = <0>;
166+
167+
/* PLL */
168+
source = <RA_PLL_SOURCE_MAIN_OSC>;
169+
div = <RA_PLL_DIV_3>;
170+
mul = <25 0>;
171+
status = "disabled";
172+
};
173+
174+
pll2: pll2 {
175+
compatible = "renesas,ra-cgc-pll";
176+
#clock-cells = <0>;
177+
178+
/* PLL2 */
179+
source = <RA_PLL_SOURCE_DISABLE>;
180+
div = <RA_PLL_DIV_2>;
181+
mul = <20 0>;
182+
status = "disabled";
183+
};
184+
185+
pclkblock: pclkblock {
186+
compatible = "renesas,ra-cgc-pclk-block";
187+
#clock-cells = <0>;
188+
sysclock-src = <RA_CLOCK_SOURCE_PLL>;
189+
status = "okay";
190+
191+
iclk: iclk {
192+
compatible = "renesas,ra-cgc-pclk";
193+
clk_div = <RA_SYS_CLOCK_DIV_1>;
194+
#clock-cells = <2>;
195+
status = "okay";
196+
};
197+
198+
pclka: pclka {
199+
compatible = "renesas,ra-cgc-pclk";
200+
clk_div = <RA_SYS_CLOCK_DIV_2>;
201+
#clock-cells = <2>;
202+
status = "okay";
203+
};
204+
205+
pclkb: pclkb {
206+
compatible = "renesas,ra-cgc-pclk";
207+
clk_div = <RA_SYS_CLOCK_DIV_4>;
208+
#clock-cells = <2>;
209+
status = "okay";
210+
};
211+
212+
pclkc: pclkc {
213+
compatible = "renesas,ra-cgc-pclk";
214+
clk_div = <RA_SYS_CLOCK_DIV_4>;
215+
#clock-cells = <2>;
216+
status = "okay";
217+
};
218+
219+
pclkd: pclkd {
220+
compatible = "renesas,ra-cgc-pclk";
221+
clk_div = <RA_SYS_CLOCK_DIV_2>;
222+
#clock-cells = <2>;
223+
status = "okay";
224+
};
225+
226+
bclk: bclk {
227+
compatible = "renesas,ra-cgc-pclk";
228+
clk_div = <RA_SYS_CLOCK_DIV_2>;
229+
bclkout: bclkout {
230+
compatible = "renesas,ra-cgc-busclk";
231+
clk_out_div = <2>;
232+
sdclk = <0>;
233+
#clock-cells = <0>;
234+
};
235+
#clock-cells = <2>;
236+
status = "okay";
237+
};
238+
239+
fclk: fclk {
240+
compatible = "renesas,ra-cgc-pclk";
241+
clk_div = <RA_SYS_CLOCK_DIV_4>;
242+
#clock-cells = <2>;
243+
status = "okay";
244+
};
245+
246+
clkout: clkout {
247+
compatible = "renesas,ra-cgc-pclk";
248+
#clock-cells = <2>;
249+
status = "disabled";
250+
};
251+
252+
uclk: uclk {
253+
compatible = "renesas,ra-cgc-pclk";
254+
#clock-cells = <2>;
255+
status = "disabled";
256+
};
257+
258+
octaspiclk: octaspiclk {
259+
compatible = "renesas,ra-cgc-pclk";
260+
#clock-cells = <2>;
261+
status = "disabled";
262+
};
263+
};
264+
};
265+
};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
zephyr_include_directories(.)
5+
6+
zephyr_sources(
7+
soc.c
8+
)
9+
10+
zephyr_linker_sources(SECTIONS sections.ld)
11+
12+
set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm/cortex_m/scripts/linker.ld CACHE INTERNAL "")

soc/renesas/ra/ra6m4/Kconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SOC_SERIES_RA6M4
5+
select ARM
6+
select CPU_CORTEX_M33
7+
select CPU_HAS_ARM_MPU
8+
select HAS_RENESAS_RA_FSP
9+
select CLOCK_CONTROL_RENESAS_RA_CGC if CLOCK_CONTROL
10+
select CPU_CORTEX_M_HAS_DWT
11+
select CPU_HAS_FPU
12+
select ARMV8_M_DSP
13+
select FPU
14+
select HAS_SWO
15+
select XIP
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if SOC_SERIES_RA6M4
5+
6+
config NUM_IRQS
7+
default 96
8+
9+
config PINCTRL
10+
default y
11+
12+
endif # SOC_SERIES_RA6M4

soc/renesas/ra/ra6m4/Kconfig.soc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SOC_SERIES_RA6M4
5+
bool
6+
select SOC_FAMILY_RENESAS_RA
7+
help
8+
Renesas RA6M4 series
9+
10+
config SOC_R7FA6M4AF3CFB
11+
bool
12+
select SOC_SERIES_RA6M4
13+
help
14+
R7FA6M4AF3CFB
15+
16+
config SOC_SERIES
17+
default "ra6m4" if SOC_SERIES_RA6M4
18+
19+
config SOC
20+
default "r7fa6m4af3cfb" if SOC_R7FA6M4AF3CFB

0 commit comments

Comments
 (0)