Skip to content

Commit 7195f0d

Browse files
duynguyenxanashif
authored andcommitted
soc: renesas: ra: Add initial support for RA8M1 SOC series
Add minimal support for RA8M1 SOC series. Signed-off-by: Duy Nguyen <[email protected]> Signed-off-by: Quy Tran <[email protected]>
1 parent 259b3d0 commit 7195f0d

22 files changed

+773
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
* Copyright (c) 2024 Renesas Electronics Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <arm/renesas/ra/ra8/r7fa8m1xh.dtsi>

dts/arm/renesas/ra/ra8/r7fa8m1xh.dtsi

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
/*
2+
* Copyright (c) 2024 Renesas Electronics Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <arm/renesas/ra/ra8/ra8x1.dtsi>
8+
#include <zephyr/dt-bindings/clock/ra_clock.h>
9+
10+
/ {
11+
clocks: clocks {
12+
xtal: clock-xtal {
13+
compatible = "renesas,ra8-cgc-external-clock";
14+
clock-frequency = <DT_FREQ_M(20)>;
15+
#clock-cells = <0>;
16+
status = "disabled";
17+
};
18+
19+
hoco: clock-hoco {
20+
compatible = "fixed-clock";
21+
clock-frequency = <DT_FREQ_M(48)>;
22+
#clock-cells = <0>;
23+
};
24+
25+
moco: clock-moco {
26+
compatible = "fixed-clock";
27+
clock-frequency = <DT_FREQ_M(8)>;
28+
#clock-cells = <0>;
29+
};
30+
31+
loco: clock-loco {
32+
compatible = "fixed-clock";
33+
clock-frequency = <32768>;
34+
#clock-cells = <0>;
35+
};
36+
37+
subclk: clock-subclk {
38+
compatible = "renesas,ra8-cgc-subclk";
39+
clock-frequency = <32768>;
40+
#clock-cells = <0>;
41+
status = "disabled";
42+
};
43+
44+
pll: pll {
45+
compatible = "renesas,ra8-cgc-pll";
46+
#clock-cells = <0>;
47+
48+
/* PLL */
49+
source = <RA_PLL_SOURCE_MAIN_OSC>;
50+
div = <RA_PLL_DIV_2>;
51+
mul = <96 0>;
52+
divp = <RA_PLL_DIV_2>;
53+
freqp = <DT_FREQ_M(480)>;
54+
divq = <RA_PLL_DIV_2>;
55+
freqq = <DT_FREQ_M(480)>;
56+
divr = <RA_PLL_DIV_2>;
57+
freqr = <DT_FREQ_M(480)>;
58+
status = "disabled";
59+
};
60+
61+
pll2: pll2 {
62+
compatible = "renesas,ra8-cgc-pll";
63+
#clock-cells = <0>;
64+
65+
/* PLL2 */
66+
source = <RA_PLL_SOURCE_DISABLE>;
67+
div = <RA_PLL_DIV_2>;
68+
mul = <96 0>;
69+
divp = <RA_PLL_DIV_2>;
70+
freqp = <DT_FREQ_M(0)>;
71+
divq = <RA_PLL_DIV_2>;
72+
freqq = <DT_FREQ_M(0)>;
73+
divr = <RA_PLL_DIV_2>;
74+
freqr = <DT_FREQ_M(0)>;
75+
status = "disabled";
76+
};
77+
78+
pclkblock: pclkblock {
79+
compatible = "renesas,ra8-cgc-pclk-block";
80+
#clock-cells = <0>;
81+
sysclock-src = <RA_CLOCK_SOURCE_PLL1P>;
82+
status = "okay";
83+
84+
cpuclk: cpuclk {
85+
compatible = "renesas,ra8-cgc-pclk";
86+
clk_div = <RA_SYS_CLOCK_DIV_1>;
87+
#clock-cells = <0>;
88+
status = "okay";
89+
};
90+
91+
iclk: iclk {
92+
compatible = "renesas,ra8-cgc-pclk";
93+
clk_div = <RA_SYS_CLOCK_DIV_2>;
94+
#clock-cells = <0>;
95+
status = "okay";
96+
};
97+
98+
pclka: pclka {
99+
compatible = "renesas,ra8-cgc-pclk";
100+
clk_div = <RA_SYS_CLOCK_DIV_4>;
101+
#clock-cells = <0>;
102+
status = "okay";
103+
};
104+
105+
pclkb: pclkb {
106+
compatible = "renesas,ra8-cgc-pclk";
107+
clk_div = <RA_SYS_CLOCK_DIV_8>;
108+
#clock-cells = <0>;
109+
status = "okay";
110+
};
111+
112+
pclkc: pclkc {
113+
compatible = "renesas,ra8-cgc-pclk";
114+
clk_div = <RA_SYS_CLOCK_DIV_8>;
115+
#clock-cells = <0>;
116+
status = "okay";
117+
};
118+
119+
pclkd: pclkd {
120+
compatible = "renesas,ra8-cgc-pclk";
121+
clk_div = <RA_SYS_CLOCK_DIV_4>;
122+
#clock-cells = <0>;
123+
status = "okay";
124+
};
125+
126+
pclke: pclke {
127+
compatible = "renesas,ra8-cgc-pclk";
128+
clk_div = <RA_SYS_CLOCK_DIV_2>;
129+
#clock-cells = <0>;
130+
status = "okay";
131+
};
132+
133+
bclk: bclk {
134+
compatible = "renesas,ra8-cgc-pclk";
135+
clk_div = <RA_SYS_CLOCK_DIV_4>;
136+
bclkout: bclkout {
137+
compatible = "renesas,ra8-cgc-busclk";
138+
clk_out_div = <2>;
139+
sdclk = <1>;
140+
#clock-cells = <0>;
141+
};
142+
#clock-cells = <0>;
143+
status = "okay";
144+
};
145+
146+
fclk: fclk {
147+
compatible = "renesas,ra8-cgc-pclk";
148+
clk_div = <RA_SYS_CLOCK_DIV_8>;
149+
#clock-cells = <0>;
150+
status = "okay";
151+
};
152+
153+
clkout: clkout {
154+
compatible = "renesas,ra8-cgc-pclk";
155+
#clock-cells = <0>;
156+
status = "disabled";
157+
};
158+
159+
sciclk: sciclk {
160+
compatible = "renesas,ra8-cgc-pclk";
161+
#clock-cells = <0>;
162+
status = "disabled";
163+
};
164+
165+
spiclk: spiclk {
166+
compatible = "renesas,ra8-cgc-pclk";
167+
#clock-cells = <0>;
168+
status = "disabled";
169+
};
170+
171+
canfdclk: canfdclk {
172+
compatible = "renesas,ra8-cgc-pclk";
173+
#clock-cells = <0>;
174+
status = "disabled";
175+
};
176+
177+
i3cclk: i3cclk {
178+
compatible = "renesas,ra8-cgc-pclk";
179+
#clock-cells = <0>;
180+
status = "disabled";
181+
};
182+
183+
uclk: uclk {
184+
compatible = "renesas,ra8-cgc-pclk";
185+
#clock-cells = <0>;
186+
status = "disabled";
187+
};
188+
189+
u60clk: u60clk {
190+
compatible = "renesas,ra8-cgc-pclk";
191+
#clock-cells = <0>;
192+
status = "disabled";
193+
};
194+
195+
octaspiclk: octaspiclk {
196+
compatible = "renesas,ra8-cgc-pclk";
197+
#clock-cells = <0>;
198+
status = "disabled";
199+
};
200+
};
201+
};
202+
};

dts/arm/renesas/ra/ra8/ra8x1.dtsi

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Copyright (c) 2024 Renesas Electronics Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <mem.h>
8+
#include <arm/armv8.1-m.dtsi>
9+
#include <freq.h>
10+
11+
12+
/ {
13+
cpus {
14+
#address-cells = <1>;
15+
#size-cells = <0>;
16+
17+
cpu@0 {
18+
device_type = "cpu";
19+
compatible = "arm,cortex-m85";
20+
reg = <0>;
21+
#address-cells = <1>;
22+
#size-cells = <1>;
23+
24+
mpu: mpu@e000ed90 {
25+
compatible = "arm,armv8.1m-mpu";
26+
reg = <0xe000ed90 0x40>;
27+
};
28+
};
29+
};
30+
31+
soc {
32+
sram0: memory@22000000 {
33+
compatible = "mmio-sram";
34+
reg = <0x22000000 DT_SIZE_K(896)>;
35+
};
36+
37+
system: system@4001e000 {
38+
compatible = "renesas,ra-system";
39+
reg = <0x4001e000 0x1000>;
40+
status = "okay";
41+
};
42+
43+
option_setting_ofs: option_setting_ofs@300a100 {
44+
compatible = "zephyr,memory-region";
45+
reg = <0x0300a100 0x18>;
46+
zephyr,memory-region = "OPTION_SETTING_OFS";
47+
status = "okay";
48+
};
49+
50+
option_setting_sas: option_setting_sas@300a134 {
51+
compatible = "zephyr,memory-region";
52+
reg = <0x0300a134 0xcc>;
53+
zephyr,memory-region = "OPTION_SETTING_SAS";
54+
status = "okay";
55+
};
56+
57+
option_setting_s: option_setting_s@300a200 {
58+
compatible = "zephyr,memory-region";
59+
reg = <0x0300a200 0x100>;
60+
zephyr,memory-region = "OPTION_SETTING_S";
61+
status = "okay";
62+
};
63+
};
64+
};
65+
66+
&nvic {
67+
arm,num-irq-priority-bits = <4>;
68+
};
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: Renesas RA8 External Bus Clock
5+
6+
compatible: "renesas,ra8-cgc-busclk"
7+
8+
include: [clock-controller.yaml, base.yaml]
9+
10+
properties:
11+
clk_out_div:
12+
type: int
13+
enum:
14+
- 0
15+
- 1
16+
- 2
17+
description: |
18+
Select EBCLK division ratio from BCLK
19+
- 0: disable
20+
- 1: EBCLK div/1
21+
- 2: EBCLK div/2
22+
23+
sdclk:
24+
type: int
25+
enum:
26+
- 0
27+
- 1
28+
description: |
29+
SDCLK enable or disable
30+
- 0: disable
31+
- 1: enable
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+
description: Renesas RA8 Clock Generation Circuit external clock configuration
5+
6+
compatible: "renesas,ra8-cgc-external-clock"
7+
8+
include: [fixed-clock.yaml, base.yaml]
9+
10+
properties:
11+
mosel:
12+
type: int
13+
default: 0
14+
enum:
15+
- 0
16+
- 1
17+
description: |
18+
Choose the way for external Clock Oscillator supply
19+
0: Resonator
20+
1: External clock input
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: Renesas RA8 clock control node pclk block
5+
6+
compatible: "renesas,ra8-cgc-pclk-block"
7+
8+
include: [clock-controller.yaml, base.yaml]
9+
10+
properties:
11+
sysclock-src:
12+
required: true
13+
type: int
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: Renesas RA8 Clock Control Peripheral Clock
5+
6+
compatible: "renesas,ra8-cgc-pclk"
7+
8+
include: [clock-controller.yaml, base.yaml]
9+
10+
properties:
11+
clk_src:
12+
type: int
13+
14+
clk_div:
15+
type: int
16+
required: true
17+
description: Prescale divider to calculate the subclock frequency from the
18+
system clock frequency.
19+
20+
"#clock-cells":
21+
const: 0

0 commit comments

Comments
 (0)