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
10 changes: 10 additions & 0 deletions boards/adafruit/feather_esp32s3/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Adafruit Feather ESP32-S3 board configuration

# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
# Copyright (c) 2024 Leon Rinkel <[email protected]>
# SPDX-License-Identifier: Apache-2.0

config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
default 4096 if BOARD_ADAFRUIT_FEATHER_ESP32S3_ESP32S3_PROCPU
default 256 if BOARD_ADAFRUIT_FEATHER_ESP32S3_ESP32S3_APPCPU
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
# Copyright (c) 2024 Leon Rinkel <[email protected]>
# SPDX-License-Identifier: Apache-2.0

config BOARD_ADAFRUIT_FEATHER_ESP32S3
select SOC_ESP32S3_WROOM_N8
select SOC_ESP32S3_PROCPU if BOARD_ADAFRUIT_FEATHER_ESP32S3_ESP32S3_PROCPU
select SOC_ESP32S3_APPCPU if BOARD_ADAFRUIT_FEATHER_ESP32S3_ESP32S3_APPCPU
10 changes: 10 additions & 0 deletions boards/adafruit/feather_esp32s3/Kconfig.sysbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) 2024 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
* Copyright (c) 2024 Leon Rinkel <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/

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

&pinctrl {
uart0_default: uart0_default {
group1 {
pinmux = <UART0_TX_GPIO43>;
output-high;
};
group2 {
pinmux = <UART0_RX_GPIO44>;
bias-pull-up;
};
};

uart1_default: uart1_default {
group1 {
pinmux = <UART1_TX_GPIO39>;
output-high;
};
group2 {
pinmux = <UART1_RX_GPIO38>;
bias-pull-up;
};
};

i2c0_default: i2c0_default {
group1 {
pinmux = <I2C0_SDA_GPIO3>,
<I2C0_SCL_GPIO4>;
drive-open-drain;
output-high;
};
};

spim2_default: spim2_default {
group1 {
pinmux = <SPIM2_MISO_GPIO37>,
<SPIM2_SCLK_GPIO36>,
<SPIM2_CSEL_GPIO10>;
};
group2 {
pinmux = <SPIM2_MOSI_GPIO35>;
output-low;
};
};

spim3_default: spim3_default {
group1 {
pinmux = <SPIM3_MOSI_GPIO33>;
};
};

twai_default: twai_default {
group1 {
pinmux = <TWAI_TX_GPIO5>,
<TWAI_RX_GPIO6>;
};
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
* Copyright (c) 2024 Leon Rinkel <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;

#include <espressif/esp32s3/esp32s3_wroom_n8.dtsi>
#include <espressif/partitions_0x0_amp.dtsi>
#include "adafruit_feather_esp32s3-pinctrl.dtsi"

/ {
model = "Adafruit Feather ESP32S3 APPCPU";
compatible = "adafruit,feather_esp32s3", "espressif,esp32s3";

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

&trng0 {
status = "okay";
};

&ipm0 {
status = "okay";
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
identifier: adafruit_feather_esp32s3/esp32s3/appcpu
name: Adafruit Feather ESP32-S3 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,4 @@
# SPDX-License-Identifier: Apache-2.0

CONFIG_MAIN_STACK_SIZE=2048
CONFIG_CLOCK_CONTROL=y
206 changes: 206 additions & 0 deletions boards/adafruit/feather_esp32s3/adafruit_feather_esp32s3_procpu.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
/*
* Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
* Copyright (c) 2024 Leon Rinkel <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;

#include <espressif/esp32s3/esp32s3_wroom_n8.dtsi>
#include <espressif/partitions_0x0_amp.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <zephyr/dt-bindings/input/esp32-touch-sensor-input.h>
#include <zephyr/dt-bindings/led/led.h>
#include "feather_connector.dtsi"
#include "adafruit_feather_esp32s3-pinctrl.dtsi"

/ {
model = "Adafruit Feather ESP32S3 PROCPU";
compatible = "adafruit,feather_esp32s3", "espressif,esp32s3";

aliases {
i2c-0 = &i2c0;
watchdog0 = &wdt0;
};

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;
};

/* These aliases are provided for compatibility with samples */
aliases {
uart-0 = &uart0;
sw0 = &button0;
led0 = &led0;
led-strip = &led_strip;
};

buttons {
compatible = "gpio-keys";
button0: button_0 {
gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "BOOT Button";
zephyr,code = <INPUT_KEY_0>;
};
};

leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
};
};

/*
* The neopixel on this board has its positive side hooked up to a GPIO
* pin rather than a positive voltage rail to save on power.
*/
neopixel_pwr: neopixel_pwr {
compatible = "power-domain-gpio";
#power-domain-cells = <0>;
enable-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
};

/*
* On-board regulator powers I2C pull-ups and external devices connected
* via the STEMMA QT connector.
*/
i2c_reg: i2c_reg {
compatible = "power-domain-gpio";
#power-domain-cells = <0>;
enable-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
};
};

&usb_serial {
status = "disabled";
};

&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";
};

&gpio1 {
status = "okay";
};

&touch {
debounce-interval-ms = <30>;
href-microvolt = <2700000>;
lref-microvolt = <500000>;
href-atten-microvolt = <1000000>;
filter-mode = <ESP32_TOUCH_FILTER_MODE_IIR_16>;
filter-debounce-cnt = <1>;
filter-noise-thr = <ESP32_TOUCH_FILTER_NOISE_THR_4_8TH>;
filter-jitter-step = <4>;
filter-smooth-level = <ESP32_TOUCH_FILTER_SMOOTH_MODE_IIR_2>;
};

&i2c0 {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";

max17048: max17048@36 {
compatible = "maxim,max17048";
status = "okay";
reg = <0x36>;

/*
* The MAX17048 itself is directly powered by the battery, not
* through the on-board regulator. However using this device
* requires I2C pull-ups powered by the regulator.
*/
power-domains = <&i2c_reg>;
};
};

&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_default>;
pinctrl-names = "default";

/* Workaround to support WS2812 driver */
line-idle-low;

led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
power-domains = <&neopixel_pwr>;

/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <6400000>;

/* WS2812 */
chain-length = <1>;
spi-cpha;
spi-one-frame = <0xf0>; /* 625 ns high and 625 ns low */
spi-zero-frame = <0xc0>; /* 312.5 ns high and 937.5 ns low */
color-mapping = <LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE>;
};
};

&twai {
pinctrl-0 = <&twai_default>;
pinctrl-names = "default";
};

&timer0 {
status = "disabled";
};

&timer1 {
status = "disabled";
};

&timer2 {
status = "disabled";
};

&timer3 {
status = "disabled";
};

&wdt0 {
status = "okay";
};

&trng0 {
status = "okay";
};

&esp32_bt_hci {
status = "okay";
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
identifier: adafruit_feather_esp32s3/esp32s3/procpu
name: Adafruit Feather ESP32-S3 PROCPU
type: mcu
arch: xtensa
toolchain:
- zephyr
supported:
- gpio
- uart
- i2c
- spi
- can
- counter
- watchdog
- entropy
- pwm
- dma
- input
- feather_serial
- feather_i2c
- feather_spi
vendor: adafruit
Loading
Loading