boards: arduino: uno_r4: Add Arduino UNO R4 WiFi

Add configuration for Arduino UNO R4 WiFi

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
This commit is contained in:
TOKITA Hiroshi 2024-04-03 18:18:19 +09:00 committed by Carles Cufí
parent 63772ad2d8
commit 1b2560167f
8 changed files with 150 additions and 69 deletions

View file

@ -0,0 +1,5 @@
# Copyright (c) 2024 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
# SPDX-License-Identifier: Apache-2.0
config BOARD_ARDUINO_UNO_R4_WIFI
select SOC_R7FA4M1AB3CFM

View file

@ -6,8 +6,70 @@
/dts-v1/; /dts-v1/;
#include <renesas/ra/r7fa4m1ab3cfm.dtsi> #include <renesas/ra/r7fa4m1ab3cfm.dtsi>
#include <zephyr/dt-bindings/gpio/gpio.h>
/ { / {
model = "Arduino Uno R4 Board"; model = "Arduino Uno R4 Board";
compatible = "renesas,r7fa4m1aB3cfm"; compatible = "renesas,r7fa4m1aB3cfm";
chosen {
zephyr,console = &uart2;
zephyr,shell-uart = &uart2;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &code_partition;
};
};
&sci2 {
status = "okay";
pinctrl-0 = <&sci2_default>;
pinctrl-names = "default";
uart2: uart {
current-speed = <115200>;
status = "okay";
};
};
&ioport1 {
status = "okay";
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "bootloader";
reg = <0x00000000 0x4000>;
read-only;
};
code_partition: partition@4000 {
label = "code";
reg = <0x4000 0x3C000>;
read-only;
};
};
};
&fcu {
status = "okay";
};
&hoco {
status = "okay";
clock-frequency = <48000000>;
};
&cgc {
clock-source = <&hoco>;
iclk-div = <1>;
pclka-div = <1>;
pclkb-div = <2>;
pclkc-div = <1>;
pclkd-div = <1>;
fclk-div = <2>;
}; };

View file

@ -5,23 +5,12 @@
*/ */
/dts-v1/; /dts-v1/;
#include <zephyr/dt-bindings/gpio/gpio.h>
#include "arduino_uno_r4_common.dtsi" #include "arduino_uno_r4_common.dtsi"
#include "arduino_uno_r4_minima-pinctrl.dtsi" #include "arduino_uno_r4_minima-pinctrl.dtsi"
/ { / {
model = "Arduino Uno R4 Minima"; model = "Arduino Uno R4 Minima";
chosen {
zephyr,console = &uart2;
zephyr,shell-uart = &uart2;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &code_partition;
};
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
led: led { led: led {
@ -33,56 +22,3 @@
led0 = &led; led0 = &led;
}; };
}; };
&sci2 {
status = "okay";
pinctrl-0 = <&sci2_default>;
pinctrl-names = "default";
uart2: uart {
current-speed = <115200>;
status = "okay";
};
};
&ioport1 {
status = "okay";
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "bootloader";
reg = <0x00000000 0x4000>;
read-only;
};
code_partition: partition@4000 {
label = "code";
reg = <0x4000 0x3C000>;
read-only;
};
};
};
&fcu {
status = "okay";
};
&hoco {
status = "okay";
clock-frequency = <48000000>;
};
&cgc {
clock-source = <&hoco>;
iclk-div = <1>;
pclka-div = <1>;
pclkb-div = <2>;
pclkc-div = <1>;
pclkd-div = <1>;
fclk-div = <2>;
};

View file

@ -0,0 +1,15 @@
/*
* Copyright (c) 2024 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-r7fa4m1xxxxxx.h>
&pinctrl {
sci2_default: sci2_default {
group1 {
pinmux = <P301_RXD2>, <P302_TXD2>;
};
};
};

View file

@ -0,0 +1,24 @@
/*
* Copyright (c) 2024 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include "arduino_uno_r4_common.dtsi"
#include "arduino_uno_r4_wifi-pinctrl.dtsi"
/ {
model = "Arduino Uno R4 WiFi";
leds {
compatible = "gpio-leds";
led: led {
gpios = <&ioport1 2 GPIO_ACTIVE_HIGH>;
};
};
aliases {
led0 = &led;
};
};

View file

@ -0,0 +1,12 @@
identifier: arduino_uno_r4_wifi
name: Arduino Uno R4 WiFi
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
ram: 32
supported:
- gpio
- uart

View file

@ -0,0 +1,23 @@
# Copyright (c) 2024 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
# SPDX-License-Identifier: Apache-2.0
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=48000000
CONFIG_BUILD_OUTPUT_HEX=y
# Enable UART driver
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
# Enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
# Enable GPIO
CONFIG_GPIO=y
CONFIG_PINCTRL=y
CONFIG_CLOCK_CONTROL=y
CONFIG_USE_DT_CODE_PARTITION=y

View file

@ -1,5 +1,9 @@
board: boards:
name: arduino_uno_r4_minima - name: arduino_uno_r4_minima
vendor: arduino
socs:
- name: r7fa4m1ab3cfm
- name: arduino_uno_r4_wifi
vendor: arduino vendor: arduino
socs: socs:
- name: r7fa4m1ab3cfm - name: r7fa4m1ab3cfm