boards: adafruit: esp32s2_feather: add support

add board support for adafruit_esp32s2_feather board series

Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
This commit is contained in:
Philipp Steiner 2025-03-17 08:53:20 +01:00 committed by Benjamin Cabé
commit 5ef4e8a128
48 changed files with 1856 additions and 0 deletions

View file

@ -0,0 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
zephyr_library()
zephyr_library_sources(board.c)

View file

@ -0,0 +1,11 @@
# Copyright (c) 2023 Google, LLC
# SPDX-License-Identifier: Apache-2.0
config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
default 4096
config BOARD_NEEDS_LATE_HOOK
bool
default y if BOARD_ADAFRUIT_FEATHER_ESP32S2_TFT || BOARD_ADAFRUIT_FEATHER_ESP32S2_TFT_REVERSE
select BOARD_LATE_INIT_HOOK

View file

@ -0,0 +1,5 @@
# Copyright (c) 2025 Philipp Steiner <philipp.steiner@gmail.com>
# SPDX-License-Identifier: Apache-2.0
config BOARD_ADAFRUIT_FEATHER_ESP32S2
select SOC_ESP32S2_R2

View file

@ -0,0 +1,5 @@
# Copyright (c) 2025 Philipp Steiner <philipp.steiner@gmail.com>
# SPDX-License-Identifier: Apache-2.0
config BOARD_ADAFRUIT_FEATHER_ESP32S2_TFT
select SOC_ESP32S2_R2

View file

@ -0,0 +1,5 @@
# Copyright (c) 2025 Philipp Steiner <philipp.steiner@gmail.com>
# SPDX-License-Identifier: Apache-2.0
config BOARD_ADAFRUIT_FEATHER_ESP32S2_TFT_REVERSE
select SOC_ESP32S2_R2

View file

@ -0,0 +1,28 @@
# Copyright (c) 2025 Philipp Steiner <philipp.steiner@gmail.com>
# SPDX-License-Identifier: Apache-2.0
if BOARD_ADAFRUIT_FEATHER_ESP32S2_TFT || BOARD_ADAFRUIT_FEATHER_ESP32S2_TFT_REVERSE
if DISPLAY
choice ST7789V_PIXEL_FORMAT
default ST7789V_RGB565
endchoice
if LVGL
config LV_Z_BITS_PER_PIXEL
default 16
choice LV_COLOR_DEPTH
default LV_COLOR_DEPTH_16
endchoice
config LV_COLOR_16_SWAP
default y
endif # LVGL
endif # DISPLAY
endif # BOARD_ADAFRUIT_FEATHER_ESP32S2_TFT || BOARD_ADAFRUIT_FEATHER_ESP32S2_TFT_REVERSE

View file

@ -0,0 +1,10 @@
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
# SPDX-License-Identifier: Apache-2.0
choice BOOTLOADER
default BOOTLOADER_MCUBOOT
endchoice
choice BOOT_SIGNATURE_TYPE
default BOOT_SIGNATURE_TYPE_NONE
endchoice

View file

@ -0,0 +1,66 @@
/*
* Copyright (c) 2025 Philipp Steiner <philipp.steiner@gmail.com>.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h>
#include <dt-bindings/pinctrl/esp32s2-pinctrl.h>
#include <zephyr/dt-bindings/pinctrl/esp32s2-gpio-sigmap.h>
&pinctrl {
/* Debug TX (DBG) - This is the hardware UART debug pin */
uart0_default: uart0_default {
group1 {
pinmux = <UART0_TX_GPIO43>;
output-high;
};
};
uart1_default: uart1_default {
group1 {
pinmux = <UART1_TX_GPIO39>;
output-high;
};
group2 {
pinmux = <UART1_RX_GPIO38>;
bias-pull-up;
};
};
spim2_default: spim2_default {
group1 {
pinmux = <SPIM2_MISO_GPIO37>,
<SPIM2_SCLK_GPIO36>,
<SPIM2_CSEL_GPIO7>;
};
group2 {
pinmux = <SPIM2_MOSI_GPIO35>;
output-low;
};
};
spim3_ws2812_led: spim3_ws2812_led {
group1 {
pinmux = <SPIM3_MOSI_GPIO33>;
};
};
i2c0_default: i2c0_default {
group1 {
pinmux = <I2C0_SDA_GPIO3>,
<I2C0_SCL_GPIO4>;
drive-open-drain;
output-high;
};
};
twai_default: twai_default {
group1 {
pinmux = <TWAI_TX_GPIO5>,
<TWAI_RX_GPIO6>;
};
};
};

View file

@ -0,0 +1,15 @@
/*
* Copyright (c) 2025 Philipp Steiner <philipp.steiner@gmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include "adafruit_feather_esp32s2_common.dtsi"
#include "feather_connector.dtsi"
/ {
model = "Adafruit Feather ESP32-S2";
compatible = "espressif,esp32s2";
};

View file

@ -0,0 +1,19 @@
/*
* Copyright (c) 2025 Philipp Steiner <philipp.steiner@gmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
/*
* On-board transistor powers I2C pull-ups and external devices connected
* via the STEMMA QT connector.
*/
i2c_reg: i2c_reg {
label = "I2C Power";
compatible = "power-domain-gpio";
#power-domain-cells = <0>;
enable-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
startup-delay-us = <10>;
};
};

View file

@ -0,0 +1,20 @@
identifier: adafruit_feather_esp32s2@B
name: Adafruit Feather ESP32-S2 Rev B
type: mcu
arch: xtensa
toolchain:
- zephyr
supported:
- gpio
- uart
- i2c
- spi
- counter
- watchdog
- entropy
- pwm
- dma
vendor: adafruit
testing:
ignore_tags:
- bluetooth

View file

@ -0,0 +1,19 @@
/*
* Copyright (c) 2025 Philipp Steiner <philipp.steiner@gmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
/*
* On-board regulator powers I2C pull-ups and external devices connected
* via the STEMMA QT connector.
*/
i2c_reg: i2c_reg {
label = "I2C Power";
compatible = "power-domain-gpio";
#power-domain-cells = <0>;
enable-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
startup-delay-us = <10>;
};
};

View file

@ -0,0 +1,20 @@
identifier: adafruit_feather_esp32s2@C
name: Adafruit Feather ESP32-S2 Rev C
type: mcu
arch: xtensa
toolchain:
- zephyr
supported:
- gpio
- uart
- i2c
- spi
- counter
- watchdog
- entropy
- pwm
- dma
vendor: adafruit
testing:
ignore_tags:
- bluetooth

View file

@ -0,0 +1,162 @@
/*
* Copyright (c) 2025 Philipp Steiner <philipp.steiner@gmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <espressif/esp32s2/esp32s2.dtsi>
#include <espressif/esp32s2/esp32s2_wroom.dtsi>
#include "adafruit_feather_esp32s2-pinctrl.dtsi"
#include <espressif/partitions_0x1000_default.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <dt-bindings/led/led.h>
#include <dt-bindings/led/worldsemi_ws2812c.h>
#include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h>
/ {
compatible = "espressif,esp32s2";
chosen {
zephyr,sram = &sram1;
/*
* uart1 is used as the default uart for zephyr,console and zephyr,shell,
* because USB-OTG is until now not supported and USB-CDC is not available
* for ESP32-S2.
* See issue #29394 - ESP32 development overview
* To use uart1 a FTDI-USB-RS232 or similar needs to be connected to the RX/TX pins.
* See feather_connector.dtsi
*/
zephyr,console = &uart1;
zephyr,shell-uart = &uart1;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
};
aliases {
led0 = &led0;
i2c-0 = &i2c0;
sw0 = &user_button;
led-strip = &led_strip;
watchdog0 = &wdt0;
};
leds {
compatible = "gpio-leds";
status = "okay";
led0: led_0 {
label = "Red-LED";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
};
};
gpio_keys {
compatible = "gpio-keys";
status = "okay";
user_button: user_button {
label = "BOOT Button";
gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
zephyr,code = <INPUT_KEY_0>;
};
};
};
&uart0 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-names = "default";
};
&uart1 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart1_default>;
pinctrl-names = "default";
};
&gpio0 {
status = "okay";
neopixel_power_enable {
gpio-hog;
gpios = <21 GPIO_ACTIVE_HIGH>;
output-high;
};
};
&gpio1 {
status = "okay";
};
&timer0 {
status = "okay";
};
&timer1 {
status = "okay";
};
&timer2 {
status = "okay";
};
&timer3 {
status = "okay";
};
&i2c0 {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
};
&trng0 {
status = "okay";
};
&spi2 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-0 = <&spim2_default>;
pinctrl-names = "default";
};
&spi3 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-0 = <&spim3_ws2812_led>;
pinctrl-names = "default";
line-idle-low;
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
/* WS2812 */
reg = <0>;
spi-max-frequency = <6400000>;
chain-length = <1>;
spi-cpha;
spi-one-frame = <WS2812C_ONE_FRAME>; /* 11110000: 625ns high and 625ns low */
spi-zero-frame = <WS2812C_ZERO_FRAME>; /* 11000000: 312.5ns high and 937.5ns low */
color-mapping = <LED_COLOR_ID_GREEN>,
<LED_COLOR_ID_RED>,
<LED_COLOR_ID_BLUE>;
};
};
&twai {
pinctrl-0 = <&twai_default>;
pinctrl-names = "default";
};
&wdt0 {
status = "okay";
};

View file

@ -0,0 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_GPIO=y
CONFIG_CLOCK_CONTROL=y

View file

@ -0,0 +1,119 @@
/*
* Copyright (c) 2025 Philipp Steiner <philipp.steiner@gmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include "adafruit_feather_esp32s2_common.dtsi"
#include "feather_connector_tft.dtsi"
/ {
model = "Adafruit Feather ESP32-S2 TFT";
compatible = "espressif,esp32s2";
chosen {
zephyr,display = &st7789v_tft;
};
aliases {
backlight = &led1;
};
leds {
compatible = "gpio-leds";
status = "okay";
led1: led_1 {
label = "TFT Backlight";
gpios = <&gpio1 45 GPIO_ACTIVE_HIGH>;
};
};
/*
* On-board regulator powers I2C pull-ups and external devices connected
* via the STEMMA QT connector.
*/
i2c_reg: i2c_reg {
label = "I2C Power";
compatible = "power-domain-gpio";
#power-domain-cells = <0>;
enable-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
startup-delay-us = <10>;
};
mipi_dbi {
compatible = "zephyr,mipi-dbi-spi";
spi-dev = <&spi2>;
dc-gpios = <&gpio1 39 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio1 40 GPIO_ACTIVE_LOW>;
write-only;
#address-cells = <1>;
#size-cells = <0>;
st7789v_tft: st7789v_tft@0 {
compatible = "sitronix,st7789v";
status = "disabled";
/* Also powered by i2c_reg */
power-domains = <&i2c_reg>;
mipi-max-frequency = <DT_FREQ_M(20)>;
reg = <0>;
width = <135>;
height = <240>;
x-offset = <52>;
y-offset = <40>;
vcom = <0x20>;
gctrl = <0x35>;
vrhs = <0x0b>;
vdvs = <0x20>;
mdac = <0x08>;
gamma = <0x01>;
colmod = <0x55>;
lcm = <0x2c>;
porch-param = [0c 0c 00 33 33];
cmd2en-param = [5a 69 02 01];
pwctrl1-param = [a4 a1];
pvgam-param = [70 2C 2E 15 10 09 48 33 53 0B 19 18 20 25];
nvgam-param = [70 2C 2E 15 10 09 48 33 53 0B 19 18 20 25];
ram-param = [00 F0];
rgb-param = [40 02 14];
mipi-mode = "MIPI_DBI_MODE_SPI_4WIRE";
};
};
};
&gpio0 {
status = "okay";
neopixel_power_enable {
gpio-hog;
gpios = <34 GPIO_ACTIVE_HIGH>;
output-high;
};
};
&pinctrl {
uart1_default: uart1_default {
group1 {
pinmux = <UART1_TX_GPIO1>;
output-high;
};
group2 {
pinmux = <UART1_RX_GPIO2>;
bias-pull-up;
};
};
i2c0_default: i2c0_default {
group1 {
pinmux = <I2C0_SDA_GPIO42>,
<I2C0_SCL_GPIO41>;
drive-open-drain;
output-high;
};
};
};

View file

@ -0,0 +1,21 @@
identifier: adafruit_feather_esp32s2_tft
name: Adafruit ESP32-S2 TFT Feather
type: mcu
arch: xtensa
toolchain:
- zephyr
supported:
- gpio
- uart
- i2c
- spi
- counter
- watchdog
- entropy
- pwm
- dma
- display
vendor: adafruit
testing:
ignore_tags:
- bluetooth

View file

@ -0,0 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_GPIO=y
CONFIG_CLOCK_CONTROL=y

View file

@ -0,0 +1,123 @@
/*
* Copyright (c) 2025 Philipp Steiner <philipp.steiner@gmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include "adafruit_feather_esp32s2_common.dtsi"
#include "feather_connector.dtsi"
/ {
model = "Adafruit Feather ESP32-S2 TFT Reverse";
compatible = "espressif,esp32s2";
chosen {
zephyr,display = &st7789v_tft;
};
aliases {
backlight = &led1;
};
leds {
compatible = "gpio-leds";
status = "okay";
led1: led_1 {
label = "TFT Backlight";
gpios = <&gpio1 45 GPIO_ACTIVE_HIGH>;
};
};
gpio_keys {
compatible = "gpio-keys";
status = "okay";
d1_button: d1_button {
label = "D1 Button";
gpios = <&gpio0 1 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
zephyr,code = <INPUT_KEY_1>;
};
d2_button: d2_button {
label = "D3 Button";
gpios = <&gpio0 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
zephyr,code = <INPUT_KEY_3>;
};
};
i2c_reg: i2c_reg {
label = "TFT I2C Power";
compatible = "power-domain-gpio";
#power-domain-cells = <0>;
enable-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
startup-delay-us = <10>;
};
mipi_dbi {
compatible = "zephyr,mipi-dbi-spi";
spi-dev = <&spi2>;
dc-gpios = <&gpio1 40 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio1 41 GPIO_ACTIVE_LOW>;
write-only;
#address-cells = <1>;
#size-cells = <0>;
st7789v_tft: st7789v_tft@0 {
compatible = "sitronix,st7789v";
status = "disabled";
/* Also powered by i2c_reg */
power-domains = <&i2c_reg>;
mipi-max-frequency = <DT_FREQ_M(20)>;
reg = <0>;
width = <135>;
height = <240>;
x-offset = <52>;
y-offset = <40>;
vcom = <0x20>;
gctrl = <0x35>;
vrhs = <0x0b>;
vdvs = <0x20>;
mdac = <0x08>;
gamma = <0x01>;
colmod = <0x55>;
lcm = <0x2c>;
porch-param = [0c 0c 00 33 33];
cmd2en-param = [5a 69 02 01];
pwctrl1-param = [a4 a1];
pvgam-param = [70 2C 2E 15 10 09 48 33 53 0B 19 18 20 25];
nvgam-param = [70 2C 2E 15 10 09 48 33 53 0B 19 18 20 25];
ram-param = [00 F0];
rgb-param = [40 02 14];
mipi-mode = "MIPI_DBI_MODE_SPI_4WIRE";
};
};
};
&pinctrl {
spim2_default: spim2_default {
group1 {
pinmux = <SPIM2_MISO_GPIO37>,
<SPIM2_SCLK_GPIO36>,
<SPIM2_CSEL_GPIO42>;
};
group2 {
pinmux = <SPIM2_MOSI_GPIO35>;
output-low;
};
};
};
&i2c0 {
max17048: max17048@36 {
compatible = "maxim,max17048";
status = "disabled";
reg = <0x36 >;
power-domains = <&i2c_reg>;
};
};

View file

@ -0,0 +1,22 @@
identifier: adafruit_feather_esp32s2_tft_reverse/esp32s2
name: Adafruit ESP32-S2 TFT Feather Reverse
type: mcu
arch: xtensa
toolchain:
- zephyr
supported:
- gpio
- uart
- i2c
- spi
- counter
- watchdog
- entropy
- pwm
- dma
- display
- fuel_gauge
vendor: adafruit
testing:
ignore_tags:
- bluetooth

View file

@ -0,0 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_GPIO=y
CONFIG_CLOCK_CONTROL=y

View file

@ -0,0 +1,28 @@
/*
* Copyright (c) 2024 Leon Rinkel <leon@rinkel.me>
* Copyright (c) 2025 Philipp Steiner <philipp.steiner@gmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*
* Automatically turns on backlight if display is configured, i.e. display DT
* node has status okay.
*/
#include <zephyr/devicetree.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/init.h>
#define DISPLAY_NODE DT_CHOSEN(zephyr_display)
#if DT_NODE_HAS_STATUS(DISPLAY_NODE, okay)
static const struct gpio_dt_spec backlight = GPIO_DT_SPEC_GET(DT_ALIAS(backlight), gpios);
#endif
void board_late_init_hook(void)
{
#if DT_NODE_HAS_STATUS(DISPLAY_NODE, okay)
if (gpio_is_ready_dt(&backlight)) {
gpio_pin_configure_dt(&backlight, GPIO_OUTPUT_ACTIVE);
}
#endif
}

View file

@ -0,0 +1,9 @@
# SPDX-License-Identifier: Apache-2.0
if(NOT "${OPENOCD}" MATCHES "^${ESPRESSIF_TOOLCHAIN_PATH}/.*")
set(OPENOCD OPENOCD-NOTFOUND)
endif()
find_program(OPENOCD openocd PATHS ${ESPRESSIF_TOOLCHAIN_PATH}/openocd-esp32/bin NO_DEFAULT_PATH)
include(${ZEPHYR_BASE}/boards/common/esp32.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)

View file

@ -0,0 +1,22 @@
boards:
- name: adafruit_feather_esp32s2
full_name: Adafruit Feather ESP32S2
vendor: adafruit
socs:
- name: esp32s2
revision:
format: "letter"
default: "C"
revisions:
- name: "B"
- name: "C"
- name: adafruit_feather_esp32s2_tft
full_name: Adafruit Feather ESP32S2 TFT
vendor: adafruit
socs:
- name: esp32s2
- name: adafruit_feather_esp32s2_tft_reverse
full_name: Adafruit Feather ESP32S2 TFT Reverse
vendor: adafruit
socs:
- name: esp32s2

View file

@ -0,0 +1,356 @@
.. zephyr:board:: adafruit_feather_esp32s2
Overview
********
The Adafruit Feather ESP32-S2 boards are ESP32-S2 development boards in the
Feather standard layout, sharing peripheral placement with other devices labeled
as Feathers or FeatherWings. The board is equipped with an ESP32-S2 mini module,
a LiPo battery charger, a fuel gauge, a USB-C and `SparkFun Qwiic`_-compatible
`STEMMA QT`_ connector for the I2C bus.
Hardware
********
- ESP32-S2 mini module, featuring the 240MHz Tensilica processor
- 320KB SRAM, 4MB flash + 2MB PSRAM
- USB-C directly connected to the ESP32-S2 for USB
- LiPo connector and built-in battery charging when powered via USB-C
- LC709203 or MAX17048 fuel gauge for battery voltage and state-of-charge reporting
- Built-in NeoPixel indicator RGB LED
- STEMMA QT connector for I2C devices, with switchable power for low-power mode
.. note::
- The `Adafruit ESP32-S2 Feather with BME280 Sensor`_ is the same board as the
`Adafruit ESP32-S2 Feather`_ but with an already equipped BME280 Sensor, but is not
stated as a separate board, instead the BME280 needs to be added via a devicetree
overlay. All boards, except the `Adafruit ESP32-S2 Feather with BME280 Sensor`_ have a
space for it, but will not be shipped with.
- As of May 31, 2023 - Adafruit has changed the battery monitor chip from the
now-discontinued LC709203 to the MAX17048. Check the back silkscreen of your Feather to
see which chip you have.
- For the MAX17048 a driver in zephyr exists and is supported, but needs to be added via
a devicetree overlay.
- For the LC709203 a driver does'nt exists yet and the fuel gauge for boards with this IC
is not available.
- For the `Adafruit ESP32-S2 Feather`_ there are two different Revisions ``rev B`` and
``rev C``. The ``rev C`` board has revised the power circuitry for the NeoPixel and I2C
QT port. Instead of a transistor the ``rev C`` has a LDO regulator. To enable the
NeoPixel and I2C QT port on ``rev B`` boards ``GPIO7`` (``i2c_reg``) needs to be set to
LOW and on ``rev C`` boards it needs to be set HIGH.
Supported Features
==================
.. zephyr:board-supported-hw::
.. note::
USB-OTG is until now not supported see `ESP32 development overview`_. To see a serial output
a FTDI-USB-RS232 or similar needs to be connected to the RX/TX pins on the feather connector.
Connections and IOs
===================
The `Adafruit ESP32-S2 Feather`_ User Guide has detailed information about the board including
pinouts and the schematic.
- `Adafruit ESP32-S2 Feather Pinouts`_
- `Adafruit ESP32-S2 Feather Schematic`_
Programming and Debugging
*************************
Prerequisites
=============
Espressif HAL requires WiFi binary blobs in order work. Run the command below
to retrieve those files.
.. code-block:: console
west update
west blobs fetch hal_espressif
Building & Flashing
*******************
Simple boot
===========
The board could be loaded using the single binary image, without 2nd stage
bootloader. It is the default option when building the application without
additional configuration.
.. note::
Simple boot does not provide any security features nor OTA updates.
MCUboot bootloader
==================
User may choose to use MCUboot bootloader instead. In that case the bootloader
must be built (and flashed) at least once.
There are two options to be used when building an application:
1. Sysbuild
2. Manual build
.. note::
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========
The sysbuild makes possible to build and flash all necessary images needed to
bootstrap the board with the ESP32 SoC.
To build the sample application using sysbuild use the command:
**Rev B**
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_esp32s2@B
:goals: build
:west-args: --sysbuild
:compact:
**Rev C**
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_esp32s2@C
:goals: build
:west-args: --sysbuild
:compact:
By default, the ESP32 sysbuild creates bootloader (MCUboot) and application
images. But it can be configured to create other kind of images.
Build directory structure created by sysbuild is different from traditional
Zephyr build. Output is structured by the domain subdirectories:
.. code-block::
build/
├── hello_world
│ └── zephyr
│ ├── zephyr.elf
│ └── zephyr.bin
├── mcuboot
│ └── zephyr
│ ├── zephyr.elf
│ └── zephyr.bin
└── domains.yaml
.. note::
With ``--sysbuild`` option the bootloader will be re-build and re-flash
every time the pristine build is used.
For more information about the system build please read the :ref:`sysbuild` documentation.
Manual build
============
During the development cycle, it is intended to build & flash as quickly possible.
For that reason, images can be built one at a time using traditional build.
The instructions following are relevant for both manual build and sysbuild.
The only difference is the structure of the build directory.
.. note::
Remember that bootloader (MCUboot) needs to be flash at least once.
Build and flash applications as usual:
**Rev B**
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_esp32s2@B
:goals: build
**Rev C**
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_esp32s2@C
:goals: build
The usual ``flash`` target will work. Here is an example for the :zephyr:code-sample:`hello_world`
application.
To enter ROM bootloader mode, hold down ``boot-button`` while clicking reset button.
When in the ROM bootloader, you can upload code and query the chip using ``west flash``.
**Rev B**
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_esp32s2@B
:goals: flash
**Rev C**
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_esp32s2@C
:goals: flash
After the flashing you will receive most likely this Error:
.. code-block:: console
WARNING: ESP32-S2FNR2 (revision v0.0) chip was placed into download mode using GPIO0.
esptool.py can not exit the download mode over USB. To run the app, reset the chip manually.
To suppress this note, set --after option to 'no_reset'.
FATAL ERROR: command exited with status 1: ...
As stated in the Warning-Message ``esptool`` can't reset the board by itself and this message
can be ignored and the board needs to be reseted via the Reset-Button manually.
Open the serial monitor using the following command:
.. code-block:: shell
west espressif monitor
After the board has been manually reseted and booted, you should see the following
message in the monitor:
.. code-block:: console
***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx *****
Hello World! adafruit_feather_esp32s2
Debugging
*********
ESP32-S2 support on OpenOCD is available at `OpenOCD`_.
ESP32-S2 has a built-in JTAG circuitry and can be debugged without any
additional chip. Only an USB cable connected to the D+/D- pins is necessary.
Further documentation can be obtained from the SoC vendor
in `JTAG debugging for ESP32-S2`_.
You can debug an application in the usual way. Here is an example for
the :zephyr:code-sample:`hello_world` application.
**Rev B**
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_esp32s2@B
:goals: debug
**Rev C**
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_esp32s2@C
:goals: debug
Testing the On-Board-LED
************************
There is a sample available to verify that the LEDs on the board are
functioning correctly with Zephyr:
**Rev B**
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: adafruit_feather_esp32s2@B
:goals: build flash
**Rev C**
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: adafruit_feather_esp32s2@C
:goals: build flash
Testing the NeoPixel
********************
There is a sample available to verify that the NeoPixel on the board are
functioning correctly with Zephyr:
**Rev B**
.. zephyr-app-commands::
:zephyr-app: samples/drivers/led/led_strip
:board: adafruit_feather_esp32s2@B
:goals: build flash
**Rev C**
.. zephyr-app-commands::
:zephyr-app: samples/drivers/led/led_strip
:board: adafruit_feather_esp32s2@C
:goals: build flash
Testing the Fuel Gauge (MAX17048)
*********************************
There is a sample available to verify that the MAX17048 fuel gauge on the board are
functioning correctly with Zephyr:
.. note::
As of May 31, 2023 Adafruit changed the battery monitor chip from the now-discontinued LC709203
to the MAX17048.
.. zephyr-app-commands::
:zephyr-app: samples/fuel_gauge/max17048/
:board: adafruit_feather_esp32s2@C
:goals: build flash
Testing Wi-Fi
*************
There is a sample available to verify that the Wi-Fi on the board are
functioning correctly with Zephyr:
.. note::
The Prerequisites must be met before testing Wi-Fi.
**Rev B**
.. zephyr-app-commands::
:zephyr-app: samples/net/wifi/shell
:board: adafruit_feather_esp32s2@B
:goals: build flash
**Rev C**
.. zephyr-app-commands::
:zephyr-app: samples/net/wifi/shell
:board: adafruit_feather_esp32s2@C
:goals: build flash
References
**********
.. target-notes::
.. _`Adafruit ESP32-S2 Feather`: https://www.adafruit.com/product/5000
.. _`Adafruit ESP32-S2 Feather with BME280 Sensor`: https://www.adafruit.com/product/5303
.. _`OpenOCD`: https://github.com/openocd-org/openocd
.. _`ESP32 development overview`: https://github.com/zephyrproject-rtos/zephyr/issues/29394#issuecomment-2635037831
.. _`Adafruit ESP32-S2 Feather Pinouts`: https://learn.adafruit.com/adafruit-esp32-s2-feather/pinouts
.. _`Adafruit ESP32-S2 Feather Schematic`: https://learn.adafruit.com/adafruit-esp32-s2-feather/downloads
.. _`SparkFun Qwiic`: https://www.sparkfun.com/qwiic
.. _`STEMMA QT`: https://learn.adafruit.com/introducing-adafruit-stemma-qt
.. _`JTAG debugging for ESP32-S2`: https://docs.espressif.com/projects/esp-idf/en/stable/esp32s2/api-guides/jtag-debugging/index.html

View file

@ -0,0 +1,294 @@
.. zephyr:board:: adafruit_feather_esp32s2_tft
Overview
********
The Adafruit Feather ESP32-S2 boards are ESP32-S2 development boards in the
Feather standard layout, sharing peripheral placement with other devices labeled
as Feathers or FeatherWings. The board is equipped with an ESP32-S2 mini module,
a LiPo battery charger, a fuel gauge, a USB-C and `SparkFun Qwiic`_-compatible
`STEMMA QT`_ connector for the I2C bus.
Hardware
********
- ESP32-S2 mini module, featuring the 240MHz Tensilica processor
- 320KB SRAM, 4MB flash + 2MB PSRAM
- USB-C directly connected to the ESP32-S2 for USB
- LiPo connector and built-in battery charging when powered via USB-C
- LC709203 or MAX17048 fuel gauge for battery voltage and state-of-charge reporting
- Charging indicator LED, user LED, reset and boot buttons.
- Built-in NeoPixel indicator RGB LED
- STEMMA QT connector for I2C devices, with switchable power for low-power mode
- 240x135 pixel IPS TFT color display with 1.14" diagonal and ST7789 chipset
.. note::
- The board has a space for a BME280, but will not be shipped with.
- As of May 31, 2023 - Adafruit has changed the battery monitor chip from the
now-discontinued LC709203 to the MAX17048. Check the back silkscreen of your Feather to
see which chip you have.
- For the MAX17048 a driver in zephyr exists and is supported, but needs to be added via
a devicetree overlay.
- For the LC709203 a driver does'nt exists yet and the fuel gauge for boards with this IC
is not available.
Supported Features
==================
.. zephyr:board-supported-hw::
.. note::
USB-OTG is until now not supported see `ESP32 development overview`_. To see a serial output
a FTDI-USB-RS232 or similar needs to be connected to the RX/TX pins on the feather connector.
Connections and IOs
===================
The `Adafruit ESP32-S2 TFT Feather`_ User Guide has detailed information about the board including
pinouts and the schematic.
- `Adafruit ESP32-S2 TFT Feather Pinouts`_
- `Adafruit ESP32-S2 TFT Feather Schematic`_
Programming and Debugging
*************************
Prerequisites
=============
Espressif HAL requires WiFi binary blobs in order work. Run the command below
to retrieve those files.
.. code-block:: console
west update
west blobs fetch hal_espressif
Building & Flashing
*******************
Simple boot
===========
The board could be loaded using the single binary image, without 2nd stage
bootloader. It is the default option when building the application without
additional configuration.
.. note::
Simple boot does not provide any security features nor OTA updates.
MCUboot bootloader
==================
User may choose to use MCUboot bootloader instead. In that case the bootloader
must be built (and flashed) at least once.
There are two options to be used when building an application:
1. Sysbuild
2. Manual build
.. note::
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========
The sysbuild makes possible to build and flash all necessary images needed to
bootstrap the board with the ESP32 SoC.
To build the sample application using sysbuild use the command:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_esp32s2_tft
:goals: build
:west-args: --sysbuild
:compact:
By default, the ESP32 sysbuild creates bootloader (MCUboot) and application
images. But it can be configured to create other kind of images.
Build directory structure created by sysbuild is different from traditional
Zephyr build. Output is structured by the domain subdirectories:
.. code-block::
build/
├── hello_world
│ └── zephyr
│ ├── zephyr.elf
│ └── zephyr.bin
├── mcuboot
│ └── zephyr
│ ├── zephyr.elf
│ └── zephyr.bin
└── domains.yaml
.. note::
With ``--sysbuild`` option the bootloader will be re-build and re-flash
every time the pristine build is used.
For more information about the system build please read the :ref:`sysbuild` documentation.
Manual build
============
During the development cycle, it is intended to build & flash as quickly possible.
For that reason, images can be built one at a time using traditional build.
The instructions following are relevant for both manual build and sysbuild.
The only difference is the structure of the build directory.
.. note::
Remember that bootloader (MCUboot) needs to be flash at least once.
Build and flash applications as usual:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_esp32s2_tft
:goals: build
The usual ``flash`` target will work. Here is an example for the :zephyr:code-sample:`hello_world`
application.
To enter ROM bootloader mode, hold down ``boot-button`` while clicking reset button.
When in the ROM bootloader, you can upload code and query the chip using ``west flash``.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_esp32s2_tft
:goals: flash
After the flashing you will receive most likely this Error:
.. code-block:: console
WARNING: ESP32-S2FNR2 (revision v0.0) chip was placed into download mode using GPIO0.
esptool.py can not exit the download mode over USB. To run the app, reset the chip manually.
To suppress this note, set --after option to 'no_reset'.
FATAL ERROR: command exited with status 1: ...
As stated in the Warning-Message ``esptool`` can't reset the board by itself and this message
can be ignored and the board needs to be reseted via the Reset-Button manually.
Open the serial monitor using the following command:
.. code-block:: shell
west espressif monitor
After the board has been manually reseted and booted, you should see the following
message in the monitor:
.. code-block:: console
***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx *****
Hello World! adafruit_feather_esp32s2_tft
Debugging
*********
ESP32-S2 support on OpenOCD is available at `OpenOCD`_.
ESP32-S2 has a built-in JTAG circuitry and can be debugged without any
additional chip. Only an USB cable connected to the D+/D- pins is necessary.
Further documentation can be obtained from the SoC vendor
in `JTAG debugging for ESP32-S2`_.
You can debug an application in the usual way. Here is an example for
the :zephyr:code-sample:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_esp32s2_tft
:goals: debug
Testing the On-Board-LED
************************
There is a sample available to verify that the LEDs on the board are
functioning correctly with Zephyr:
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: adafruit_feather_esp32s2_tft
:goals: build flash
Testing the NeoPixel
********************
There is a sample available to verify that the NeoPixel on the board are
functioning correctly with Zephyr:
.. zephyr-app-commands::
:zephyr-app: samples/drivers/led/led_strip
:board: adafruit_feather_esp32s2_tft
:goals: build flash
Testing the TFT
***************
.. note::
To activate the backlight of the display ``GPIO45`` (``backlight``) needs to be set to HIGH.
This will be done automatically via ``board_late_init_hook()``.
.. zephyr-app-commands::
:zephyr-app: samples/subsys/display/lvgl
:board: adafruit_feather_esp32s2_tft
:goals: build flash
Testing the Fuel Gauge (MAX17048)
*********************************
There is a sample available to verify that the MAX17048 fuel gauge on the board are
functioning correctly with Zephyr:
.. note::
As of May 31, 2023 Adafruit changed the battery monitor chip from the now-discontinued LC709203
to the MAX17048.
.. zephyr-app-commands::
:zephyr-app: samples/fuel_gauge/max17048/
:board: adafruit_feather_esp32s2_tft
:goals: build flash
Testing Wi-Fi
*************
There is a sample available to verify that the Wi-Fi on the board are
functioning correctly with Zephyr:
.. note::
The Prerequisites must be met before testing Wi-Fi.
.. zephyr-app-commands::
:zephyr-app: samples/net/wifi/shell
:board: adafruit_feather_esp32s2_tft
:goals: build flash
References
**********
.. target-notes::
.. _`Adafruit ESP32-S2 TFT Feather`: https://www.adafruit.com/product/5300
.. _`OpenOCD`: https://github.com/openocd-org/openocd
.. _`ESP32 development overview`: https://github.com/zephyrproject-rtos/zephyr/issues/29394#issuecomment-2635037831
.. _`Adafruit ESP32-S2 TFT Feather Pinouts`: https://learn.adafruit.com/adafruit-esp32-s2-tft-feather/pinouts
.. _`Adafruit ESP32-S2 TFT Feather Schematic`: https://learn.adafruit.com/adafruit-esp32-s2-tft-feather/downloads
.. _`SparkFun Qwiic`: https://www.sparkfun.com/qwiic
.. _`STEMMA QT`: https://learn.adafruit.com/introducing-adafruit-stemma-qt
.. _`JTAG debugging for ESP32-S2`: https://docs.espressif.com/projects/esp-idf/en/stable/esp32s2/api-guides/jtag-debugging/index.html

View file

@ -0,0 +1,291 @@
.. zephyr:board:: adafruit_feather_esp32s2_tft_reverse
Overview
********
The Adafruit Feather ESP32-S2 boards are ESP32-S2 development boards in the
Feather standard layout, sharing peripheral placement with other devices labeled
as Feathers or FeatherWings. The board is equipped with an ESP32-S2 mini module,
a LiPo battery charger, a fuel gauge, a USB-C and `SparkFun Qwiic`_-compatible
`STEMMA QT`_ connector for the I2C bus.
Hardware
********
- ESP32-S2 mini module, featuring the 240MHz Tensilica processor
- 320KB SRAM, 4MB flash + 2MB PSRAM
- USB-C directly connected to the ESP32-S2 for USB
- LiPo connector and built-in battery charging when powered via USB-C
- LC709203 or MAX17048 fuel gauge for battery voltage and state-of-charge reporting
- Charging indicator LED, user LED, reset and boot buttons and has 2 additional buttons.
- Built-in NeoPixel indicator RGB LED
- 240x135 pixel IPS TFT color display with 1.14" diagonal and ST7789 chipset.
.. note::
- The board has a space for a BME280, but will not be shipped with.
- For the MAX17048 a driver in zephyr exists and is supported, but needs to be added via
a devicetree overlay.
Supported Features
==================
.. zephyr:board-supported-hw::
.. note::
USB-OTG is until now not supported see `ESP32 development overview`_. To see a serial output
a FTDI-USB-RS232 or similar needs to be connected to the RX/TX pins on the feather connector.
Connections and IOs
===================
The `Adafruit ESP32-S2 Reverse TFT Feather`_ User Guide has detailed information about the board
including pinouts and the schematic.
- `Adafruit ESP32-S2 Reverse TFT Feather Pinouts`_
- `Adafruit ESP32-S2 Reverse TFT Feather Schematic`_
Programming and Debugging
*************************
Prerequisites
=============
Espressif HAL requires WiFi binary blobs in order work. Run the command below
to retrieve those files.
.. code-block:: console
west update
west blobs fetch hal_espressif
Building & Flashing
*******************
Simple boot
===========
The board could be loaded using the single binary image, without 2nd stage
bootloader. It is the default option when building the application without
additional configuration.
.. note::
Simple boot does not provide any security features nor OTA updates.
MCUboot bootloader
==================
User may choose to use MCUboot bootloader instead. In that case the bootloader
must be built (and flashed) at least once.
There are two options to be used when building an application:
1. Sysbuild
2. Manual build
.. note::
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========
The sysbuild makes possible to build and flash all necessary images needed to
bootstrap the board with the ESP32 SoC.
To build the sample application using sysbuild use the command:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_esp32s2_tft_reverse
:goals: build
:west-args: --sysbuild
:compact:
By default, the ESP32 sysbuild creates bootloader (MCUboot) and application
images. But it can be configured to create other kind of images.
Build directory structure created by sysbuild is different from traditional
Zephyr build. Output is structured by the domain subdirectories:
.. code-block::
build/
├── hello_world
│ └── zephyr
│ ├── zephyr.elf
│ └── zephyr.bin
├── mcuboot
│ └── zephyr
│ ├── zephyr.elf
│ └── zephyr.bin
└── domains.yaml
.. note::
With ``--sysbuild`` option the bootloader will be re-build and re-flash
every time the pristine build is used.
For more information about the system build please read the :ref:`sysbuild` documentation.
Manual build
============
During the development cycle, it is intended to build & flash as quickly possible.
For that reason, images can be built one at a time using traditional build.
The instructions following are relevant for both manual build and sysbuild.
The only difference is the structure of the build directory.
.. note::
Remember that bootloader (MCUboot) needs to be flash at least once.
Build and flash applications as usual:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_esp32s2_tft_reverse
:goals: build
The usual ``flash`` target will work. Here is an example for the :zephyr:code-sample:`hello_world`
application.
To enter ROM bootloader mode, hold down ``boot-button`` while clicking reset button.
When in the ROM bootloader, you can upload code and query the chip using ``west flash``.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_esp32s2_tft_reverse
:goals: flash
After the flashing you will receive most likely this Error:
.. code-block:: console
WARNING: ESP32-S2FNR2 (revision v0.0) chip was placed into download mode using GPIO0.
esptool.py can not exit the download mode over USB. To run the app, reset the chip manually.
To suppress this note, set --after option to 'no_reset'.
FATAL ERROR: command exited with status 1: ...
As stated in the Warning-Message ``esptool`` can't reset the board by itself and this message
can be ignored and the board needs to be reseted via the Reset-Button manually.
Open the serial monitor using the following command:
.. code-block:: shell
west espressif monitor
After the board has been manually reseted and booted, you should see the following
message in the monitor:
.. code-block:: console
***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx *****
Hello World! adafruit_feather_esp32s2_tft_reverse
Debugging
*********
ESP32-S2 support on OpenOCD is available at `OpenOCD`_.
ESP32-S2 has a built-in JTAG circuitry and can be debugged without any
additional chip. Only an USB cable connected to the D+/D- pins is necessary.
Further documentation can be obtained from the SoC vendor
in `JTAG debugging for ESP32-S2`_.
You can debug an application in the usual way. Here is an example for
the :zephyr:code-sample:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_esp32s2_tft_reverse
:goals: debug
Testing the On-Board-LED
************************
There is a sample available to verify that the LEDs on the board are
functioning correctly with Zephyr:
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: adafruit_feather_esp32s2_tft_reverse
:goals: build flash
Testing the NeoPixel
********************
There is a sample available to verify that the NeoPixel on the board are
functioning correctly with Zephyr:
.. zephyr-app-commands::
:zephyr-app: samples/drivers/led/led_strip
:board: adafruit_feather_esp32s2_tft_reverse
:goals: build flash
Testing the TFT
***************
There is a sample available to verify that the TFT on the board are
functioning correctly with Zephyr:
.. note::
To activated the backlight of the display ``GPIO45`` (``backlight``) needs to be set to HIGH.
This will be done automatically via ``board_late_init_hook()``.
.. zephyr-app-commands::
:zephyr-app: samples/subsys/display/lvgl
:board: adafruit_feather_esp32s2_tft_reverse
:goals: build flash
Testing the Fuel Gauge (MAX17048)
*********************************
There is a sample available to verify that the MAX17048 fuel gauge on the board are
functioning correctly with Zephyr:
.. note::
As of May 31, 2023 Adafruit changed the battery monitor chip from the now-discontinued LC709203
to the MAX17048.
.. zephyr-app-commands::
:zephyr-app: samples/fuel_gauge/max17048/
:board: adafruit_feather_esp32s2_tft_reverse
:goals: build flash
Testing Wi-Fi
*************
There is a sample available to verify that the Wi-Fi on the board are
functioning correctly with Zephyr:
.. note::
The Prerequisites must be met before testing Wi-Fi.
.. zephyr-app-commands::
:zephyr-app: samples/net/wifi/shell
:board: adafruit_feather_esp32s2_tft_reverse
:goals: build flash
References
**********
.. target-notes::
.. _`Adafruit ESP32-S2 Reverse TFT Feather`: https://www.adafruit.com/product/5345
.. _`OpenOCD`: https://github.com/openocd-org/openocd
.. _`ESP32 development overview`: https://github.com/zephyrproject-rtos/zephyr/issues/29394#issuecomment-2635037831
.. _`Adafruit ESP32-S2 Reverse TFT Feather Pinouts`: https://learn.adafruit.com/esp32-s2-reverse-tft-feather/pinouts
.. _`Adafruit ESP32-S2 Reverse TFT Feather Schematic`: https://learn.adafruit.com/esp32-s2-reverse-tft-feather/downloads
.. _`SparkFun Qwiic`: https://www.sparkfun.com/qwiic
.. _`STEMMA QT`: https://learn.adafruit.com/introducing-adafruit-stemma-qt
.. _`JTAG debugging for ESP32-S2`: https://docs.espressif.com/projects/esp-idf/en/stable/esp32s2/api-guides/jtag-debugging/index.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View file

@ -0,0 +1,42 @@
/*
* Copyright (c) 2020 Richard Osterloh <richard.osterloh@gmail.com>
* Copyright (c) 2024 Leon Rinkel <leon@rinkel.me>
* Copyright (c) 2025 Philipp Steiner <philipp.steiner@gmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
feather_header: connector {
compatible = "adafruit-feather-header";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map =
<0 0 &gpio0 18 0>, /* A0 */
<1 0 &gpio0 17 0>, /* A1 */
<2 0 &gpio0 16 0>, /* A2 */
<3 0 &gpio0 15 0>, /* A3 */
<4 0 &gpio0 14 0>, /* A4 */
<5 0 &gpio0 8 0>, /* A5 */
<6 0 &gpio1 36 0>, /* SCK */
<7 0 &gpio1 35 0>, /* MOSI */
<8 0 &gpio1 37 0>, /* MISO */
<9 0 &gpio1 38 0>, /* RX */
<10 0 &gpio1 39 0>, /* TX */
<11 0 &gpio1 43 0>, /* DB */
<12 0 &gpio1 3 0>, /* SDA */
<13 0 &gpio1 4 0>, /* SCL */
<14 0 &gpio0 5 0>, /* D5 */
<15 0 &gpio0 6 0>, /* D6 */
<16 0 &gpio0 9 0>, /* D9 */
<17 0 &gpio0 10 0>, /* D10 */
<18 0 &gpio0 11 0>, /* D11 */
<19 0 &gpio0 12 0>, /* D12 */
<20 0 &gpio0 13 0>; /* D13 */
};
};
feather_serial: &uart1 {};
feather_i2c: &i2c0 {};
feather_spi: &spi2 {};

View file

@ -0,0 +1,42 @@
/*
* Copyright (c) 2020 Richard Osterloh <richard.osterloh@gmail.com>
* Copyright (c) 2024 Leon Rinkel <leon@rinkel.me>
* Copyright (c) 2025 Philipp Steiner <philipp.steiner@gmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
feather_header: connector {
compatible = "adafruit-feather-header";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map =
<0 0 &gpio0 18 0>, /* A0 */
<1 0 &gpio0 17 0>, /* A1 */
<2 0 &gpio0 16 0>, /* A2 */
<3 0 &gpio0 15 0>, /* A3 */
<4 0 &gpio0 14 0>, /* A4 */
<5 0 &gpio0 8 0>, /* A5 */
<6 0 &gpio1 36 0>, /* SCK */
<7 0 &gpio1 35 0>, /* MOSI */
<8 0 &gpio1 37 0>, /* MISO */
<9 0 &gpio0 2 0>, /* RX */
<10 0 &gpio0 1 0>, /* TX */
<11 0 &gpio1 43 0>, /* DB */
<12 0 &gpio1 42 0>, /* SDA */
<13 0 &gpio1 41 0>, /* SCL */
<14 0 &gpio0 5 0>, /* D5 */
<15 0 &gpio0 6 0>, /* D6 */
<16 0 &gpio0 9 0>, /* D9 */
<17 0 &gpio0 10 0>, /* D10 */
<18 0 &gpio0 11 0>, /* D11 */
<19 0 &gpio0 12 0>, /* D12 */
<20 0 &gpio0 13 0>; /* D13 */
};
};
feather_serial: &uart1 {};
feather_i2c: &i2c0 {};
feather_spi: &spi2 {};

View file

@ -0,0 +1,7 @@
set ESP_RTOS none
set ESP32_ONLYCPU 1
# Source the JTAG interface configuration file
source [find interface/esp_usb_jtag.cfg]
# Source the ESP32-S3 configuration file
source [find target/esp32s3.cfg]

View file

@ -0,0 +1,2 @@
CONFIG_GPIO=y
CONFIG_GPIO_HOGS=y

View file

@ -0,0 +1,2 @@
CONFIG_GPIO=y
CONFIG_GPIO_HOGS=y

View file

@ -0,0 +1,2 @@
CONFIG_GPIO=y
CONFIG_GPIO_HOGS=y

View file

@ -0,0 +1,4 @@
CONFIG_POWER_DOMAIN=y
CONFIG_GPIO=y
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_POWER_DOMAIN=y

View file

@ -0,0 +1,8 @@
&i2c0 {
max17048: max17048@36 {
compatible = "maxim,max17048";
status = "okay";
reg = <0x36 >;
power-domains = <&i2c_reg>;
};
};

View file

@ -0,0 +1,4 @@
CONFIG_POWER_DOMAIN=y
CONFIG_GPIO=y
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_POWER_DOMAIN=y

View file

@ -0,0 +1,8 @@
&i2c0 {
max17048: max17048@36 {
compatible = "maxim,max17048";
status = "okay";
reg = <0x36 >;
power-domains = <&i2c_reg>;
};
};

View file

@ -0,0 +1,4 @@
CONFIG_POWER_DOMAIN=y
CONFIG_GPIO=y
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_POWER_DOMAIN=y

View file

@ -0,0 +1,6 @@
&i2c0 {
bme280: bme280@77 {
compatible = "bosch,bme280";
reg = <0x77>;
};
};

View file

@ -0,0 +1,6 @@
&i2c0 {
bme280: bme280@77 {
compatible = "bosch,bme280";
reg = <0x77>;
};
};

View file

@ -0,0 +1,6 @@
&i2c0 {
bme280: bme280@77 {
compatible = "bosch,bme280";
reg = <0x77>;
};
};

View file

@ -0,0 +1,6 @@
CONFIG_POWER_DOMAIN=y
CONFIG_GPIO=y
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_POWER_DOMAIN=y
CONFIG_MAIN_STACK_SIZE=4096

View file

@ -0,0 +1,3 @@
&st7789v_tft {
status = "okay";
};

View file

@ -0,0 +1,6 @@
CONFIG_POWER_DOMAIN=y
CONFIG_GPIO=y
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_POWER_DOMAIN=y
CONFIG_MAIN_STACK_SIZE=4096

View file

@ -0,0 +1,3 @@
&st7789v_tft {
status = "okay";
};