Skip to content

Commit a523929

Browse files
committed
boards: adafruit: add initial support for esp32s3 feather
The Adafruit Feather ESP32S3 is a development board in the Feather standard layout, sharing peripheral placement with other devices labeled as Feathers or FeatherWings. The board is equipped with an ESP32-S3 mini module, a lithium ion battery charger and a USB-C connector. Signed-off-by: Leon Rinkel <[email protected]>
1 parent 1207ccf commit a523929

18 files changed

+745
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Adafruit Feather ESP32-S3 board configuration
2+
3+
# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
4+
# Copyright (c) 2024 Leon Rinkel <[email protected]>
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
config HEAP_MEM_POOL_ADD_SIZE_BOARD
8+
int
9+
default 4096 if BOARD_ADAFRUIT_FEATHER_ESP32S3_ESP32S3_PROCPU
10+
default 256 if BOARD_ADAFRUIT_FEATHER_ESP32S3_ESP32S3_APPCPU
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
2+
# Copyright (c) 2024 Leon Rinkel <[email protected]>
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
config BOARD_ADAFRUIT_FEATHER_ESP32S3
6+
select SOC_ESP32S3_WROOM_N8
7+
select SOC_ESP32S3_PROCPU if BOARD_ADAFRUIT_FEATHER_ESP32S3_ESP32S3_PROCPU
8+
select SOC_ESP32S3_APPCPU if BOARD_ADAFRUIT_FEATHER_ESP32S3_ESP32S3_APPCPU
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
choice BOOTLOADER
5+
default BOOTLOADER_MCUBOOT
6+
endchoice
7+
8+
choice BOOT_SIGNATURE_TYPE
9+
default BOOT_SIGNATURE_TYPE_NONE
10+
endchoice
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
3+
* Copyright (c) 2024 Leon Rinkel <[email protected]>
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h>
9+
#include <dt-bindings/pinctrl/esp32s3-pinctrl.h>
10+
#include <zephyr/dt-bindings/pinctrl/esp32s3-gpio-sigmap.h>
11+
12+
&pinctrl {
13+
uart0_default: uart0_default {
14+
group1 {
15+
pinmux = <UART0_TX_GPIO43>;
16+
output-high;
17+
};
18+
group2 {
19+
pinmux = <UART0_RX_GPIO44>;
20+
bias-pull-up;
21+
};
22+
};
23+
24+
uart1_default: uart1_default {
25+
group1 {
26+
pinmux = <UART1_TX_GPIO39>;
27+
output-high;
28+
};
29+
group2 {
30+
pinmux = <UART1_RX_GPIO38>;
31+
bias-pull-up;
32+
};
33+
};
34+
35+
i2c0_default: i2c0_default {
36+
group1 {
37+
pinmux = <I2C0_SDA_GPIO3>,
38+
<I2C0_SCL_GPIO4>;
39+
drive-open-drain;
40+
output-high;
41+
};
42+
};
43+
44+
spim2_default: spim2_default {
45+
group1 {
46+
pinmux = <SPIM2_MISO_GPIO37>,
47+
<SPIM2_SCLK_GPIO36>,
48+
<SPIM2_CSEL_GPIO10>;
49+
};
50+
group2 {
51+
pinmux = <SPIM2_MOSI_GPIO35>;
52+
output-low;
53+
};
54+
};
55+
56+
spim3_default: spim3_default {
57+
group1 {
58+
pinmux = <SPIM3_MOSI_GPIO33>;
59+
};
60+
};
61+
62+
twai_default: twai_default {
63+
group1 {
64+
pinmux = <TWAI_TX_GPIO5>,
65+
<TWAI_RX_GPIO6>;
66+
};
67+
};
68+
};
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
3+
* Copyright (c) 2024 Leon Rinkel <[email protected]>
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
/dts-v1/;
8+
9+
#include <espressif/esp32s3/esp32s3_wroom_n8.dtsi>
10+
#include <espressif/partitions_0x0_amp.dtsi>
11+
#include "adafruit_feather_esp32s3-pinctrl.dtsi"
12+
13+
/ {
14+
model = "Adafruit Feather ESP32S3 APPCPU";
15+
compatible = "adafruit,feather_esp32s3", "espressif,esp32s3";
16+
17+
chosen {
18+
zephyr,sram = &sram1;
19+
zephyr,ipc_shm = &shm0;
20+
zephyr,ipc = &ipm0;
21+
zephyr,flash = &flash0;
22+
zephyr,code-partition = &slot0_appcpu_partition;
23+
};
24+
};
25+
26+
&trng0 {
27+
status = "okay";
28+
};
29+
30+
&ipm0 {
31+
status = "okay";
32+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
identifier: adafruit_feather_esp32s3/esp32s3/appcpu
2+
name: Adafruit Feather ESP32-S3 APPCPU
3+
type: mcu
4+
arch: xtensa
5+
toolchain:
6+
- zephyr
7+
supported:
8+
- uart
9+
testing:
10+
ignore_tags:
11+
- net
12+
- bluetooth
13+
- flash
14+
- cpp
15+
- posix
16+
- watchdog
17+
- logging
18+
- kernel
19+
- pm
20+
- gpio
21+
- crypto
22+
- eeprom
23+
- heap
24+
- cmsis_rtos
25+
- jwt
26+
- zdsp
27+
vendor: adafruit
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
CONFIG_MAIN_STACK_SIZE=2048
4+
CONFIG_CLOCK_CONTROL=y
Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
/*
2+
* Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
3+
* Copyright (c) 2024 Leon Rinkel <[email protected]>
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
/dts-v1/;
8+
9+
#include <espressif/esp32s3/esp32s3_wroom_n8.dtsi>
10+
#include <espressif/partitions_0x0_amp.dtsi>
11+
#include <zephyr/dt-bindings/input/input-event-codes.h>
12+
#include <zephyr/dt-bindings/input/esp32-touch-sensor-input.h>
13+
#include <zephyr/dt-bindings/led/led.h>
14+
#include "feather_connector.dtsi"
15+
#include "adafruit_feather_esp32s3-pinctrl.dtsi"
16+
17+
/ {
18+
model = "Adafruit Feather ESP32S3 PROCPU";
19+
compatible = "adafruit,feather_esp32s3", "espressif,esp32s3";
20+
21+
aliases {
22+
i2c-0 = &i2c0;
23+
watchdog0 = &wdt0;
24+
};
25+
26+
chosen {
27+
zephyr,sram = &sram1;
28+
zephyr,console = &uart0;
29+
zephyr,shell-uart = &uart0;
30+
zephyr,flash = &flash0;
31+
zephyr,code-partition = &slot0_partition;
32+
zephyr,bt-hci = &esp32_bt_hci;
33+
};
34+
35+
/* These aliases are provided for compatibility with samples */
36+
aliases {
37+
uart-0 = &uart0;
38+
sw0 = &button0;
39+
led0 = &led0;
40+
led-strip = &led_strip;
41+
};
42+
43+
buttons {
44+
compatible = "gpio-keys";
45+
button0: button_0 {
46+
gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
47+
label = "BOOT Button";
48+
zephyr,code = <INPUT_KEY_0>;
49+
};
50+
};
51+
52+
leds {
53+
compatible = "gpio-leds";
54+
led0: led_0 {
55+
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
56+
};
57+
};
58+
59+
/*
60+
* The neopixel on this board has its positive side hooked up to a GPIO
61+
* pin rather than a positive voltage rail to save on power.
62+
*/
63+
neopixel_pwr: neopixel_pwr {
64+
compatible = "power-domain-gpio";
65+
#power-domain-cells = <0>;
66+
enable-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
67+
};
68+
69+
/*
70+
* On-board regulator powers I2C pull-ups and external devices connected
71+
* via the STEMMA QT connector.
72+
*/
73+
i2c_reg: i2c_reg {
74+
compatible = "power-domain-gpio";
75+
#power-domain-cells = <0>;
76+
enable-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
77+
};
78+
};
79+
80+
&usb_serial {
81+
status = "disabled";
82+
};
83+
84+
&uart0 {
85+
status = "okay";
86+
current-speed = <115200>;
87+
pinctrl-0 = <&uart0_default>;
88+
pinctrl-names = "default";
89+
};
90+
91+
&uart1 {
92+
status = "okay";
93+
current-speed = <115200>;
94+
pinctrl-0 = <&uart1_default>;
95+
pinctrl-names = "default";
96+
};
97+
98+
&gpio0 {
99+
status = "okay";
100+
};
101+
102+
&gpio1 {
103+
status = "okay";
104+
};
105+
106+
&touch {
107+
debounce-interval-ms = <30>;
108+
href-microvolt = <2700000>;
109+
lref-microvolt = <500000>;
110+
href-atten-microvolt = <1000000>;
111+
filter-mode = <ESP32_TOUCH_FILTER_MODE_IIR_16>;
112+
filter-debounce-cnt = <1>;
113+
filter-noise-thr = <ESP32_TOUCH_FILTER_NOISE_THR_4_8TH>;
114+
filter-jitter-step = <4>;
115+
filter-smooth-level = <ESP32_TOUCH_FILTER_SMOOTH_MODE_IIR_2>;
116+
};
117+
118+
&i2c0 {
119+
status = "okay";
120+
clock-frequency = <I2C_BITRATE_STANDARD>;
121+
pinctrl-0 = <&i2c0_default>;
122+
pinctrl-names = "default";
123+
124+
max17048: max17048@36 {
125+
compatible = "maxim,max17048";
126+
status = "okay";
127+
reg = <0x36>;
128+
129+
/*
130+
* The MAX17048 itself is directly powered by the battery, not
131+
* through the on-board regulator. However using this device
132+
* requires I2C pull-ups powered by the regulator.
133+
*/
134+
power-domains = <&i2c_reg>;
135+
};
136+
};
137+
138+
&spi2 {
139+
#address-cells = <1>;
140+
#size-cells = <0>;
141+
status = "okay";
142+
pinctrl-0 = <&spim2_default>;
143+
pinctrl-names = "default";
144+
};
145+
146+
&spi3 {
147+
#address-cells = <1>;
148+
#size-cells = <0>;
149+
status = "okay";
150+
pinctrl-0 = <&spim3_default>;
151+
pinctrl-names = "default";
152+
153+
/* Workaround to support WS2812 driver */
154+
line-idle-low;
155+
156+
led_strip: ws2812@0 {
157+
compatible = "worldsemi,ws2812-spi";
158+
power-domains = <&neopixel_pwr>;
159+
160+
/* SPI */
161+
reg = <0>; /* ignored, but necessary for SPI bindings */
162+
spi-max-frequency = <6400000>;
163+
164+
/* WS2812 */
165+
chain-length = <1>;
166+
spi-cpha;
167+
spi-one-frame = <0xf0>; /* 625 ns high and 625 ns low */
168+
spi-zero-frame = <0xc0>; /* 312.5 ns high and 937.5 ns low */
169+
color-mapping = <LED_COLOR_ID_GREEN
170+
LED_COLOR_ID_RED
171+
LED_COLOR_ID_BLUE>;
172+
};
173+
};
174+
175+
&twai {
176+
pinctrl-0 = <&twai_default>;
177+
pinctrl-names = "default";
178+
};
179+
180+
&timer0 {
181+
status = "disabled";
182+
};
183+
184+
&timer1 {
185+
status = "disabled";
186+
};
187+
188+
&timer2 {
189+
status = "disabled";
190+
};
191+
192+
&timer3 {
193+
status = "disabled";
194+
};
195+
196+
&wdt0 {
197+
status = "okay";
198+
};
199+
200+
&trng0 {
201+
status = "okay";
202+
};
203+
204+
&esp32_bt_hci {
205+
status = "okay";
206+
};
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
identifier: adafruit_feather_esp32s3/esp32s3/procpu
2+
name: Adafruit Feather ESP32-S3 PROCPU
3+
type: mcu
4+
arch: xtensa
5+
toolchain:
6+
- zephyr
7+
supported:
8+
- gpio
9+
- uart
10+
- i2c
11+
- spi
12+
- can
13+
- counter
14+
- watchdog
15+
- entropy
16+
- pwm
17+
- dma
18+
- input
19+
- feather_serial
20+
- feather_i2c
21+
- feather_spi
22+
vendor: adafruit

0 commit comments

Comments
 (0)