Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions boards/adafruit/feather_esp32/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright (c) 2025 Lena Voytek <[email protected]>
# SPDX-License-Identifier: Apache-2.0

config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
default 4096 if BOARD_ADAFRUIT_FEATHER_ESP32_ESP32_PROCPU
default 256 if BOARD_ADAFRUIT_FEATHER_ESP32_ESP32_APPCPU
9 changes: 9 additions & 0 deletions boards/adafruit/feather_esp32/Kconfig.adafruit_feather_esp32
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Adafruit Feather ESP32 board configuration

# Copyright (c) 2025 Lena Voytek <[email protected]>
# SPDX-License-Identifier: Apache-2.0

config BOARD_ADAFRUIT_FEATHER_ESP32
select SOC_ESP32_PICO_V3_02
select SOC_ESP32_PROCPU if BOARD_ADAFRUIT_FEATHER_ESP32_ESP32_PROCPU
select SOC_ESP32_APPCPU if BOARD_ADAFRUIT_FEATHER_ESP32_ESP32_APPCPU
62 changes: 62 additions & 0 deletions boards/adafruit/feather_esp32/adafruit_feather_esp32-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* Copyright (c) 2025 Lena Voytek <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h>
#include <dt-bindings/pinctrl/esp32-pinctrl.h>
#include <zephyr/dt-bindings/pinctrl/esp32-gpio-sigmap.h>

&pinctrl {
uart0_default: uart0_default {
group1 {
pinmux = <UART0_TX_GPIO1>;
output-high;
};

group2 {
pinmux = <UART0_RX_GPIO3>;
bias-pull-up;
};
};

uart1_default: uart1_default {
group1 {
pinmux = <UART1_TX_GPIO8>;
output-high;
};

group2 {
pinmux = <UART1_RX_GPIO7>;
bias-pull-up;
};
};

spim2_default: spim2_default {
group1 {
pinmux = <SPIM2_MISO_GPIO21>,
<SPIM2_SCLK_GPIO5>;
};

group2 {
pinmux = <SPIM2_MOSI_GPIO19>;
output-low;
};
};

spim3_ws2812_led: spi3_ws2812_led {
group1 {
pinmux = <SPIM3_MOSI_GPIO0>;
};
};

i2c0_default: i2c0_default {
group1 {
pinmux = <I2C0_SDA_GPIO22>,
<I2C0_SCL_GPIO20>;
drive-open-drain;
output-high;
};
};
};
30 changes: 30 additions & 0 deletions boards/adafruit/feather_esp32/adafruit_feather_esp32_appcpu.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;

#include <espressif/esp32/esp32_appcpu.dtsi>
#include <espressif/partitions_0x1000_amp.dtsi>

/ {
model = "Adafruit Feather ESP32 APPCPU";
compatible = "espressif,esp32";

chosen {
zephyr,sram = &sram1;
zephyr,ipc_shm = &shm0;
zephyr,ipc = &ipm0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_appcpu_partition;
};
};

&ipm0 {
status = "okay";
};

&trng0 {
status = "okay";
};
27 changes: 27 additions & 0 deletions boards/adafruit/feather_esp32/adafruit_feather_esp32_appcpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
identifier: adafruit_feather_esp32/esp32/appcpu
name: Adafruit Feather ESP32 APPCPU
type: mcu
arch: xtensa
toolchain:
- zephyr
supported:
- uart
testing:
ignore_tags:
- net
- bluetooth
- flash
- cpp
- posix
- watchdog
- logging
- kernel
- pm
- gpio
- crypto
- eeprom
- heap
- cmsis_rtos
- jwt
- zdsp
vendor: adafruit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: Apache-2.0

CONFIG_CLOCK_CONTROL=y
154 changes: 154 additions & 0 deletions boards/adafruit/feather_esp32/adafruit_feather_esp32_procpu.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
/*
* Copyright (c) 2025 Lena Voytek <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;

#include <espressif/esp32/esp32_pico_v3_02.dtsi>
#include "adafruit_feather_esp32-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <zephyr/dt-bindings/led/led.h>
#include <zephyr/dt-bindings/led/worldsemi_ws2812c.h>
#include <espressif/partitions_0x1000_amp.dtsi>

/ {
model = "Adafruit Feather ESP32 PROCPU";
compatible = "adafruit,adafruit_feather_esp32";

chosen {
zephyr,sram = &sram1;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,bt-hci = &esp32_bt_hci;
};

aliases {
sw0 = &user_button_0;
watchdog0 = &wdt0;
i2c-0 = &i2c0;
led-strip = &led_strip;
};

leds {
compatible = "gpio-leds";
status = "okay";

led0: led_0 {
label = "Red-LED";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
};
};

gpio_keys {
compatible = "gpio-keys";

user_button_0: button_0 {
label = "User button 0";
gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; // GPIO 38
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 = <2 GPIO_ACTIVE_HIGH>;
output-high;
};
};

&gpio1 {
status = "okay";
};

&i2c0 {
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
sda-gpios = <&gpio0 22 GPIO_OPEN_DRAIN>;
scl-gpios = <&gpio0 20 GPIO_OPEN_DRAIN>;

};

&timer0 {
status = "okay";
};

&timer1 {
status = "okay";
};

&timer2 {
status = "okay";
};

&timer3 {
status = "okay";
};

&trng0 {
status = "okay";
};

&spi2 {
#address-cells = <1>;
#size-cells = <0>;
pinctrl-0 = <&spim2_default>;
pinctrl-names = "default";
};

/* used for SK6812 */
&spi3 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
line-idle-low;
pinctrl-0 = <&spim3_ws2812_led>;
pinctrl-names = "default";

led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
reg = <0>;
spi-max-frequency = <WS2812C_SPI_FREQ>;

chain-length = <1>;
color-mapping = <LED_COLOR_ID_GREEN>,
<LED_COLOR_ID_RED>,
<LED_COLOR_ID_BLUE>;
spi-one-frame = <WS2812C_ONE_FRAME>;
spi-zero-frame = <WS2812C_ZERO_FRAME>;
};
};

&wdt0 {
status = "okay";
};

&esp32_bt_hci {
status = "okay";
};

&wifi {
status = "okay";
};
23 changes: 23 additions & 0 deletions boards/adafruit/feather_esp32/adafruit_feather_esp32_procpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
identifier: adafruit_feather_esp32/esp32/procpu
name: Adafruit Feather ESP32 PROCPU
type: mcu
arch: xtensa
toolchain:
- zephyr
supported:
- gpio
- i2c
- spi
- watchdog
- uart
- pinmux
- nvs
- counter
- entropy
- pwm
- dma
- input
- feather_serial
- feather_i2c
- feather_spi
vendor: adafruit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SPDX-License-Identifier: Apache-2.0

CONFIG_GPIO=y
CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
12 changes: 12 additions & 0 deletions boards/adafruit/feather_esp32/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# 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)

# the default ESP32 baud rate is not supported
board_runner_args(esp32 "--esp-baud-rate=1500000")
11 changes: 11 additions & 0 deletions boards/adafruit/feather_esp32/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
board:
name: adafruit_feather_esp32
full_name: Adafruit Feather ESP32
vendor: adafruit
socs:
- name: esp32
revision:
format: number
default: "2"
revisions:
- name: "2"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading