Skip to content

Commit 5ef4e8a

Browse files
DBS06kartben
authored andcommitted
boards: adafruit: esp32s2_feather: add support
add board support for adafruit_esp32s2_feather board series Signed-off-by: Philipp Steiner <[email protected]>
1 parent 2260111 commit 5ef4e8a

File tree

48 files changed

+1856
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1856
-0
lines changed
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+
zephyr_library()
4+
zephyr_library_sources(board.c)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright (c) 2023 Google, LLC
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config HEAP_MEM_POOL_ADD_SIZE_BOARD
5+
int
6+
default 4096
7+
8+
config BOARD_NEEDS_LATE_HOOK
9+
bool
10+
default y if BOARD_ADAFRUIT_FEATHER_ESP32S2_TFT || BOARD_ADAFRUIT_FEATHER_ESP32S2_TFT_REVERSE
11+
select BOARD_LATE_INIT_HOOK
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Philipp Steiner <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_ADAFRUIT_FEATHER_ESP32S2
5+
select SOC_ESP32S2_R2
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Philipp Steiner <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_ADAFRUIT_FEATHER_ESP32S2_TFT
5+
select SOC_ESP32S2_R2
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Philipp Steiner <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_ADAFRUIT_FEATHER_ESP32S2_TFT_REVERSE
5+
select SOC_ESP32S2_R2
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright (c) 2025 Philipp Steiner <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if BOARD_ADAFRUIT_FEATHER_ESP32S2_TFT || BOARD_ADAFRUIT_FEATHER_ESP32S2_TFT_REVERSE
5+
6+
if DISPLAY
7+
8+
choice ST7789V_PIXEL_FORMAT
9+
default ST7789V_RGB565
10+
endchoice
11+
12+
if LVGL
13+
14+
config LV_Z_BITS_PER_PIXEL
15+
default 16
16+
17+
choice LV_COLOR_DEPTH
18+
default LV_COLOR_DEPTH_16
19+
endchoice
20+
21+
config LV_COLOR_16_SWAP
22+
default y
23+
24+
endif # LVGL
25+
26+
endif # DISPLAY
27+
28+
endif # BOARD_ADAFRUIT_FEATHER_ESP32S2_TFT || BOARD_ADAFRUIT_FEATHER_ESP32S2_TFT_REVERSE
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) 2023 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: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/*
2+
* Copyright (c) 2025 Philipp Steiner <[email protected]>.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h>
8+
#include <dt-bindings/pinctrl/esp32s2-pinctrl.h>
9+
#include <zephyr/dt-bindings/pinctrl/esp32s2-gpio-sigmap.h>
10+
11+
&pinctrl {
12+
/* Debug TX (DBG) - This is the hardware UART debug pin */
13+
uart0_default: uart0_default {
14+
group1 {
15+
pinmux = <UART0_TX_GPIO43>;
16+
output-high;
17+
};
18+
};
19+
20+
uart1_default: uart1_default {
21+
group1 {
22+
pinmux = <UART1_TX_GPIO39>;
23+
output-high;
24+
};
25+
26+
group2 {
27+
pinmux = <UART1_RX_GPIO38>;
28+
bias-pull-up;
29+
};
30+
};
31+
32+
spim2_default: spim2_default {
33+
group1 {
34+
pinmux = <SPIM2_MISO_GPIO37>,
35+
<SPIM2_SCLK_GPIO36>,
36+
<SPIM2_CSEL_GPIO7>;
37+
};
38+
39+
group2 {
40+
pinmux = <SPIM2_MOSI_GPIO35>;
41+
output-low;
42+
};
43+
};
44+
45+
spim3_ws2812_led: spim3_ws2812_led {
46+
group1 {
47+
pinmux = <SPIM3_MOSI_GPIO33>;
48+
};
49+
};
50+
51+
i2c0_default: i2c0_default {
52+
group1 {
53+
pinmux = <I2C0_SDA_GPIO3>,
54+
<I2C0_SCL_GPIO4>;
55+
drive-open-drain;
56+
output-high;
57+
};
58+
};
59+
60+
twai_default: twai_default {
61+
group1 {
62+
pinmux = <TWAI_TX_GPIO5>,
63+
<TWAI_RX_GPIO6>;
64+
};
65+
};
66+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright (c) 2025 Philipp Steiner <[email protected]>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "adafruit_feather_esp32s2_common.dtsi"
10+
#include "feather_connector.dtsi"
11+
12+
/ {
13+
model = "Adafruit Feather ESP32-S2";
14+
compatible = "espressif,esp32s2";
15+
};
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (c) 2025 Philipp Steiner <[email protected]>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
/*
9+
* On-board transistor powers I2C pull-ups and external devices connected
10+
* via the STEMMA QT connector.
11+
*/
12+
i2c_reg: i2c_reg {
13+
label = "I2C Power";
14+
compatible = "power-domain-gpio";
15+
#power-domain-cells = <0>;
16+
enable-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
17+
startup-delay-us = <10>;
18+
};
19+
};

0 commit comments

Comments
 (0)