Skip to content

Commit 1ef5dfc

Browse files
soburikartben
authored andcommitted
boards: Migrate Renesas RA4M1 to the new configuration
Migrate to the new GPIO and Interrupt drivers based on FSP. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
1 parent b313342 commit 1ef5dfc

File tree

8 files changed

+22
-34
lines changed

8 files changed

+22
-34
lines changed

boards/arduino/uno_r4/arduino_uno_r4_common.dtsi

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
*/
66

77
/dts-v1/;
8-
#include <renesas/ra/r7fa4m1ab3cfm.dtsi>
8+
9+
#include <renesas/ra/ra4/r7fa4m1ab3cfm.dtsi>
910
#include <zephyr/dt-bindings/gpio/gpio.h>
11+
#include <zephyr/dt-bindings/adc/adc.h>
1012

1113
/ {
1214
model = "Arduino Uno R4 Board";
13-
compatible = "renesas,r7fa4m1ab3cfm";
15+
compatible = "renesas,ra4m1", "renesas,ra";
1416

1517
chosen {
1618
zephyr,console = &uart2;
@@ -25,6 +27,9 @@
2527
status = "okay";
2628
pinctrl-0 = <&sci2_default>;
2729
pinctrl-names = "default";
30+
interrupts = <4 1>, <5 1>, <6 1>, <7 1>;
31+
interrupt-names = "rxi", "txi", "tei", "eri";
32+
2833
uart2: uart {
2934
current-speed = <115200>;
3035
status = "okay";
@@ -35,6 +40,16 @@
3540
status = "okay";
3641
};
3742

43+
&port_irq0 {
44+
interrupts = <27 12>;
45+
status = "okay";
46+
};
47+
48+
&port_irq1 {
49+
interrupts = <28 12>;
50+
status = "okay";
51+
};
52+
3853
&flash0 {
3954
partitions {
4055
compatible = "fixed-partitions";
@@ -55,10 +70,6 @@
5570
};
5671
};
5772

58-
&fcu {
59-
status = "okay";
60-
};
61-
6273
&hoco {
6374
status = "okay";
6475
clock-frequency = <48000000>;

boards/arduino/uno_r4/arduino_uno_r4_minima-pinctrl.dtsi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-ra.h>
8-
97
&pinctrl {
108
sci2_default: sci2_default {
119
group1 {
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Copyright (c) 2023 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
22
# SPDX-License-Identifier: Apache-2.0
33

4-
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=48000000
5-
6-
CONFIG_BUILD_OUTPUT_HEX=y
7-
84
# Enable UART driver
95
CONFIG_SERIAL=y
106
CONFIG_UART_INTERRUPT_DRIVEN=y
@@ -16,6 +12,4 @@ CONFIG_UART_CONSOLE=y
1612
# Enable GPIO
1713
CONFIG_GPIO=y
1814

19-
CONFIG_CLOCK_CONTROL=y
20-
2115
CONFIG_USE_DT_CODE_PARTITION=y

boards/arduino/uno_r4/arduino_uno_r4_wifi-pinctrl.dtsi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-ra.h>
8-
97
&pinctrl {
108
sci2_default: sci2_default {
119
group1 {
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Copyright (c) 2024 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
22
# SPDX-License-Identifier: Apache-2.0
33

4-
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=48000000
5-
6-
CONFIG_BUILD_OUTPUT_HEX=y
7-
84
# Enable UART driver
95
CONFIG_SERIAL=y
106
CONFIG_UART_INTERRUPT_DRIVEN=y
@@ -16,6 +12,4 @@ CONFIG_UART_CONSOLE=y
1612
# Enable GPIO
1713
CONFIG_GPIO=y
1814

19-
CONFIG_CLOCK_CONTROL=y
20-
2115
CONFIG_USE_DT_CODE_PARTITION=y

boards/mikroe/clicker_ra4m1/mikroe_clicker_ra4m1.dts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
*/
66

77
/dts-v1/;
8-
#include <renesas/ra/r7fa4m1ab3cfm.dtsi>
8+
#include <renesas/ra/ra4/r7fa4m1ab3cfm.dtsi>
99
#include <zephyr/dt-bindings/gpio/gpio.h>
1010
#include <zephyr/dt-bindings/input/input-event-codes.h>
11-
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-ra.h>
1211

1312
/ {
1413
model = "Mikroe Clicker RA4M1";
15-
compatible = "renesas,r7fa4m1ab3cfm";
14+
compatible = "renesas,ra4m1", "renesas,ra";
1615

1716
chosen {
1817
zephyr,console = &uart0;
@@ -115,7 +114,8 @@
115114
status = "okay";
116115
};
117116

118-
&fcu {
117+
&port_irq9 {
118+
interrupts = <27 12>;
119119
status = "okay";
120120
};
121121

@@ -129,6 +129,7 @@
129129
};
130130

131131
&iclk {
132+
clock-frequency = <12000000>;
132133
div = <1>;
133134
};
134135

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Copyright (c) 2024 Ian Morris
22
# SPDX-License-Identifier: Apache-2.0
33

4-
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=12000000
5-
6-
CONFIG_BUILD_OUTPUT_HEX=y
7-
84
# Enable uart driver
95
CONFIG_SERIAL=y
106

@@ -14,6 +10,3 @@ CONFIG_UART_CONSOLE=y
1410

1511
# Enable GPIO
1612
CONFIG_GPIO=y
17-
18-
# Enable Clocks
19-
CONFIG_CLOCK_CONTROL=y

soc/renesas/ra/ra4m1/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ config SOC_SERIES_RA4M1
1313
select HAS_SWO
1414
select XIP
1515
select SOC_EARLY_INIT_HOOK
16-
select DYNAMIC_INTERRUPTS if SOC_R7FA4M1AB3CFM
1716
select GPIO_RA_HAS_VBTICTLR
1817

1918
if SOC_SERIES_RA4M1

0 commit comments

Comments
 (0)