Skip to content

Commit e3d0836

Browse files
committed
boards: adafruit: add initial support for feather m4 express
The Adafruit Feather M4 Express is a compact, lightweight ARM development board with an onboard mini NeoPixel, 2 MiB of SPI flash, charging status indicator and user LEDs, USB connector, 21 GPIO pins and a small prototyping area. Signed-off-by: Teresa Zepeda Ventura <[email protected]>
1 parent c3466b1 commit e3d0836

11 files changed

+444
-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 Daikin Comfort Technologies North America, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_ADAFRUIT_FEATHER_M4_EXPRESS
5+
select SOC_SAMD51J19A
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
* Copyright (c) 2022, Gerson Fernando Budke <[email protected]>
3+
* Copyright (c) 2024 Daikin Comfort Technologies North America, Inc.
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
#include <dt-bindings/pinctrl/samd51j-pinctrl.h>
9+
10+
&pinctrl {
11+
sercom1_spi_default: sercom1_spi_default {
12+
group1 {
13+
pinmux = <PB23C_SERCOM1_PAD3>,
14+
<PA17C_SERCOM1_PAD1>,
15+
<PB22C_SERCOM1_PAD2>;
16+
};
17+
};
18+
19+
sercom2_i2c_default: sercom3_i2c_default {
20+
group1 {
21+
pinmux = <PA12C_SERCOM2_PAD0>,
22+
<PA13C_SERCOM2_PAD1>;
23+
};
24+
};
25+
26+
sercom5_uart_default: sercom5_uart_default {
27+
group1 {
28+
pinmux = <PB17C_SERCOM5_PAD1>,
29+
<PB16C_SERCOM5_PAD0>;
30+
};
31+
};
32+
33+
pwm0_default: pwm0_default {
34+
group1 {
35+
pinmux = <PA22G_TCC0_WO2>;
36+
};
37+
};
38+
pwm1_default: pwm1_default {
39+
group1 {
40+
pinmux = <PA18F_TCC1_WO2>,
41+
<PA19F_TCC1_WO3>;
42+
};
43+
};
44+
45+
usb_dc_default: usb_dc_default {
46+
group1 {
47+
pinmux = <PA25H_USB_DP>,
48+
<PA24H_USB_DM>;
49+
};
50+
};
51+
};
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
/*
2+
* Copyright (c) 2020 Google LLC.
3+
* Copyright (c) 2024 Daikin Comfort Technologies North America, Inc.
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
/dts-v1/;
9+
#include <atmel/samd5xx19.dtsi>
10+
#include "adafruit_feather_m4_express-pinctrl.dtsi"
11+
12+
/ {
13+
model = "Adafruit Feather M4 Express";
14+
compatible = "adafruit,feather-m4-express";
15+
16+
chosen {
17+
zephyr,console = &sercom5;
18+
zephyr,shell-uart = &sercom5;
19+
zephyr,sram = &sram0;
20+
zephyr,flash = &flash0;
21+
zephyr,code-partition = &code_partition;
22+
};
23+
24+
/* These aliases are provided for compatibility with samples */
25+
aliases {
26+
led0 = &led0;
27+
pwm-0 = &tcc0;
28+
};
29+
30+
leds {
31+
compatible = "gpio-leds";
32+
led0: led_0 {
33+
gpios = <&porta 23 0>;
34+
label = "LED";
35+
};
36+
};
37+
};
38+
39+
&cpu0 {
40+
clock-frequency = <120000000>;
41+
};
42+
43+
&sercom5 {
44+
status = "okay";
45+
compatible = "atmel,sam0-uart";
46+
current-speed = <115200>;
47+
rxpo = <1>;
48+
txpo = <0>;
49+
pinctrl-0 = <&sercom5_uart_default>;
50+
pinctrl-names = "default";
51+
};
52+
53+
&sercom1 {
54+
status = "okay";
55+
compatible = "atmel,sam0-spi";
56+
dipo = <3>;
57+
dopo = <0>;
58+
#address-cells = <1>;
59+
#size-cells = <0>;
60+
pinctrl-0 = <&sercom1_spi_default>;
61+
pinctrl-names = "default";
62+
};
63+
64+
&tcc0 {
65+
status = "okay";
66+
compatible = "atmel,sam0-tcc-pwm";
67+
prescaler = <8>;
68+
#pwm-cells = <2>;
69+
pinctrl-0 = <&pwm0_default>;
70+
pinctrl-names = "default";
71+
};
72+
73+
zephyr_udc0: &usb0 {
74+
status = "okay";
75+
pinctrl-0 = <&usb_dc_default>;
76+
pinctrl-names = "default";
77+
};
78+
79+
&dmac {
80+
status = "okay";
81+
};
82+
83+
&flash0 {
84+
partitions {
85+
compatible = "fixed-partitions";
86+
#address-cells = <1>;
87+
#size-cells = <1>;
88+
89+
boot_partition: partition@0 {
90+
label = "uf2";
91+
reg = <0x00000000 DT_SIZE_K(16)>;
92+
read-only;
93+
};
94+
95+
code_partition: partition@4000 {
96+
label = "code";
97+
reg = <0x4000 DT_SIZE_K(512-16-16)>;
98+
read-only;
99+
};
100+
101+
/*
102+
* The final 16 KiB is reserved for the application.
103+
* Storage partition will be used by FCB/LittleFS/NVS
104+
* if enabled.
105+
*/
106+
storage_partition: partition@7c000 {
107+
label = "storage";
108+
reg = <0x7c000 DT_SIZE_K(16)>;
109+
};
110+
};
111+
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
identifier: adafruit_feather_m4_express
2+
name: Adafruit Feather M4 Express
3+
type: mcu
4+
arch: arm
5+
ram: 192
6+
flash: 512
7+
toolchain:
8+
- zephyr
9+
- gnuarmemb
10+
- xtools
11+
supported:
12+
- dma
13+
- gpio
14+
- hwinfo
15+
- pwm
16+
- spi
17+
- uart
18+
- usb_device
19+
- watchdog
20+
vendor: adafruit
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2024 Daikin Comfort Technologies North America, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_SOC_ATMEL_SAMD5X_OSCULP32K_AS_MAIN=y
5+
6+
CONFIG_BOOTLOADER_BOSSA=y
7+
CONFIG_BOOTLOADER_BOSSA_ADAFRUIT_UF2=y
8+
CONFIG_BUILD_OUTPUT_HEX=y
9+
CONFIG_BUILD_OUTPUT_UF2=y
10+
11+
CONFIG_ARM_MPU=y
12+
CONFIG_HW_STACK_PROTECTION=y
13+
14+
CONFIG_CONSOLE=y
15+
CONFIG_SERIAL=y
16+
CONFIG_UART_CONSOLE=y
17+
CONFIG_UART_INTERRUPT_DRIVEN=y
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2020 Google LLC.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
include(${ZEPHYR_BASE}/boards/common/bossac.board.cmake)
5+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
board:
2+
name: adafruit_feather_m4_express
3+
full_name: Feather M4 Express
4+
vendor: adafruit
5+
socs:
6+
- name: samd51j19a
53.6 KB
Loading

0 commit comments

Comments
 (0)