Skip to content

Commit 784695a

Browse files
committed
board: renesas: EK-RA4M3 preliminary support.
Supports samples/basic/minimal blinky has same caveats as EK-RA6M5 Signed-off-by: Piotr Rak <[email protected]>
1 parent a3810b8 commit 784695a

File tree

8 files changed

+148
-0
lines changed

8 files changed

+148
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2024 Piotr Rak <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_EK_RA4M3
5+
select SOC_R7FA4M3AF3CFB
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright (c) 2024 Piotr Rak <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
board_set_debugger_ifnset(jlink)
5+
board_set_flasher_ifnset(jlink)
6+
7+
board_runner_args(jlink
8+
"--device=R7FA4M3AF"
9+
"--speed=4000"
10+
"--iface=SWD"
11+
"--reset-after-load")
12+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/renesas/ek_ra4m3/board.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
board:
2+
name: ek_ra4m3
3+
vendor: Renesas
4+
socs:
5+
- name: r7fa4m3af3cfb
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/*
2+
* Copyright (c) 2024 Piotr Rak <[email protected]>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include <zephyr/dt-bindings/gpio/gpio.h>
10+
#include "ek_ra4m3_common.dtsi"
11+
12+
/ {
13+
model = "Renesas ek-ra4m3 board";
14+
15+
chosen {
16+
zephyr,sram = &sram0;
17+
zephyr,flash = &flash0;
18+
zephyr,code-partition = &code_partition;
19+
};
20+
21+
leds {
22+
compatible = "gpio-leds";
23+
led_0: led_0 {
24+
gpios = <&ioport4 15 GPIO_ACTIVE_HIGH>;
25+
label = "LED1 (Blue)";
26+
};
27+
led_1: led_1 {
28+
gpios = <&ioport4 4 GPIO_ACTIVE_HIGH>;
29+
label = "LED2 (Green)";
30+
};
31+
led_2: led_2 {
32+
gpios = <&ioport4 0 GPIO_ACTIVE_HIGH>;
33+
label = "LED3 (Red)";
34+
};
35+
};
36+
37+
aliases {
38+
led0 = &led_0;
39+
led-blue = &led_0;
40+
led-green = &led_1;
41+
led-red = &led_2;
42+
};
43+
};
44+
45+
&flash0 {
46+
partitions {
47+
compatible = "fixed-partitions";
48+
#address-cells = <1>;
49+
#size-cells = <1>;
50+
51+
code_partition: partition@0 {
52+
label = "code";
53+
reg = <0x00000000 0x4C000>;
54+
read-only;
55+
};
56+
};
57+
};
58+
59+
&fcu {
60+
status = "okay";
61+
};
62+
63+
&ioport4 {
64+
status = "okay";
65+
};
66+
67+
&pinctrl {
68+
status = "okay";
69+
};
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
identifier: renesas_ek_ra4m3
2+
name: Renesas EK-RA4M3
3+
type: mcu
4+
arch: arm
5+
toolchain:
6+
- zypher
7+
ram: 128
8+
flash: 1024
9+
supported:
10+
- gpio
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Copyright (c) 2024 Piotr Rak <[email protected]>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
#include <renesas/ra/r7fa4m3af3cfb.dtsi>
9+
10+
/ {
11+
model = "Renesas EK-RA4M3 Board";
12+
compatible = "renesas,r7fa4m3af3cfb";
13+
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (c) 2024 Piotr Rak <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=100000000
5+
6+
CONFIG_BUILD_OUTPUT_HEX=y
7+
8+
# enable uart driver
9+
#CONFIG_SERIAL=y
10+
#CONFIG_UART_INTERRUPT_DRIVEN=y
11+
12+
# TODO: enable console
13+
CONFIG_CONSOLE=n
14+
#CONFIG_UART_CONSOLE=y
15+
16+
# enable GPIO
17+
CONFIG_GPIO=y
18+
19+
CONFIG_PINCTRL=y
20+
21+
#CONFIG_CLOCK_CONTROL=y
22+
23+
CONFIG_USE_DT_CODE_PARTITION=y
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/ {
2+
chosen {
3+
zephyr,console = &rtt0;
4+
};
5+
6+
rtt0: rtt_chan0 {
7+
compatible = "segger,rtt-uart";
8+
status = "okay";
9+
};
10+
11+
};

0 commit comments

Comments
 (0)