Commit Graph

736 Commits

Author SHA1 Message Date
YAMAMOTO Takashi d9c90eef13 esp32s3-devkit/toywasm: enable ESP32S3_SPI_FLASH_SUPPORT_PSRAM_STACK 2024-08-07 15:59:41 +08:00
Tiago Medicci 93322a50fe boards/esp32s3: Add initial support to the ESP32-S3-Korvo-2 board
The ESP32-S3-Korvo-2 is a multimedia development board based on the
ESP32-S3 chip. It is equipped with a two-microphone array which is
suitable for voice recognition and near/far-field voice wake-up
applications. The board integrates multiple peripherals such as
LCD, camera, and microSD card. It also supports JPEG video stream
processing. With all of its outstanding features, the board is an
ideal choice for the development of low-cost and low-power
network-connected audio and video products.
2024-08-01 16:04:53 +08:00
Tiago Medicci Serrano 016bc47a63 esp32s3/elf: Enable ELF loader for ESP32-S3
Provide `up_copy_section` function that enables copying data using
the data bus. If the memory destination address is accessible
through the instruction bus, the data is copied using the
correspondent address accessible through the data bus.
2024-07-31 02:33:12 +08:00
Tiago Medicci Serrano c91599d34c esp32s3/i2s: Fix faulty initialization when SMP is enabled
The buffer initialization function (`i2s_buf_initialize`) calls
`i2s_buf_free`, which performs buffer initialization within a
critical section (`spin_lock_irqsave`). If this function is called
under the same critical section (same spinlock), initialization
will hang.
2024-07-30 01:44:57 +08:00
Eren Terzioglu 98f5d6adc5 esp32[s2|s3]: Add temperature sensor support 2024-07-27 14:12:44 -03:00
Filipe Cavalcanti 91dfd20eaf arch/xtensa: add support for brushed DC motor control
arch/xtensa: add support for capture driver on ESP32 and ESP32|S3|

Squashed:
Initial settings for MCPWM Capture on board level
Created lower half files - compilation ok
Using capture debug features. Simple example on fops works
Successful duty and freq calculation
Documentation update
Fixed and added interupt capabilities for all 3 capture channels
Cleaned defconfig
Renamed macros, added S3 options and moved arch source to common dir
Added support for ESP32S3
Added capture example to defconfig and renamed

Basic bring up ready. New Kconfig options for motor.

Good motor registration

Working on enabling pwm generators

Working on enabling pwm generators

Added fops functions

Success on PWM 50%

stable pwm operation for bdc

Added loopback option for testing

Improved rules on fsm

Working motor direction control

Testing new ISR for fault handling

Issues on fault ISR

Removed fault implementation (not working)

Added support for esp32s3

Documentation improvements

Added default motor spin direction

Added parameter change while running

Review fixes

arch/xtensa: add support for fault signal on motor control

Squashed:
Initial settings for MCPWM Capture on board level
Created lower half files - compilation ok
Using capture debug features. Simple example on fops works
Successful duty and freq calculation
Documentation update
Fixed and added interupt capabilities for all 3 capture channels
Cleaned defconfig
Renamed macros, added S3 options and moved arch source to common dir
Added support for ESP32S3
Added capture example to defconfig and renamed

Basic bring up ready. New Kconfig options for motor.

Good motor registration

Working on enabling pwm generators

Working on enabling pwm generators

Added fops functions

Success on PWM 50%

stable pwm operation for bdc

Added loopback option for testing

Improved rules on fsm

Working motor direction control

Testing new ISR for fault handling

Issues on fault ISR

Removed fault implementation (not working)

Added support for esp32s3

Documentation improvements

Added default motor spin direction

Added parameter change while running

Got responsive fault indicator

Working brakes - still need to work on starting isr

Fixed single-time ISR initializiation

Working soft brake on fault

Improved KConfig for BDC and BLDC

Kconfig fixed at board level
2024-07-27 12:08:51 +08:00
Huang Qi f555b3de91 boards/esp32s3: Increse the default stack size for usbnsh
Fix https://github.com/apache/nuttx/issues/12712

If run nsh over usb based serial port, the default stack size is too small,
for example simple `ps` command will use more than 2208 bytes stack.

Then the stack overflow will happen and the system will hang here.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-07-17 15:08:17 +08:00
Huang Qi d2347aea2f boards/esp32[c3|c6|h2|s2|s3]: Ignore etctmp in common board
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-07-12 01:01:15 +08:00
YAMAMOTO Takashi 881f749777 refresh esp32s3-devkit:qemu_debug
after https://github.com/apache/nuttx/pull/12639
2024-07-10 23:38:17 +08:00
YAMAMOTO Takashi e6f35007f0 esp32s3-devkit: add a config for qemu
based on esp32s3-devkit:toywasm, tailored for the espressif fork
of qemu. [1]

* disabled a few things for which emulation doesn't seem available:

  * wifi
  * spiram
  * ESP32S3_SYSTEM_BBPLL_RECALIB

* enabled DEBUG_SYMBOLS for my convenience (thus _debug suffix)

* enabled hostfs for my convenience

tested with:
qemu-xtensa-softmmu-esp_develop_9.0.0_20240606-x86_64-apple-darwin.tar.xz

[1] https://github.com/espressif/qemu
2024-07-10 00:06:18 +08:00
Alan Carvalho de Assis 82946d0d5f net: Enable ICMP by default if IPv4 is enabled
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-07-09 17:08:27 +08:00
Almir Okato 593dc946d1 esp32: add simple boot support
The Simple Boot feature for Espressif chips is a method of booting
that doesn't depend on a 2nd stage bootloader. Its not the
intention to replace a 2nd stage bootloader such as MCUboot and
ESP-IDF bootloader, but to have a minimal and straight-forward way
of booting, and also simplify the building.

This commit also removes deprecated code and makes this bootloader
configuration as default for esp32 targets and removes the need
for running 'make bootloader' command for it.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-07-04 18:22:24 -03:00
Almir Okato 6ec690cbfc esp32[s2|s3]: move rom segments mapping to espressif common folder
Move and unify map_rom_segments function called when starting
Simple Boot and MCUboot compatible images.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-07-04 18:22:24 -03:00
Filipe Cavalcanti 365e9e967c arch/xtensa: add support for capture driver on ESP32 and ESP32|S3|
Squashed:
Initial settings for MCPWM Capture on board level
Created lower half files - compilation ok
Using capture debug features. Simple example on fops works
Successful duty and freq calculation
Documentation update
Fixed and added interupt capabilities for all 3 capture channels
Cleaned defconfig
Renamed macros, added S3 options and moved arch source to common dir
Added support for ESP32S3
Added capture example to defconfig and renamed
2024-06-27 18:14:59 +08:00
Tiago Medicci Serrano e913828955 espressif: Enable SMP (when applicable) and iPerf for sta_softap
- Enable SMP by default (when the device supports it);
- Increase IOB buffers;
- Enable iPerf;

These changes enable testing the device throughput easily.
2024-06-27 18:09:46 +08:00
Devansh Purohit 0ffbff84d1 Changed ESP32S3 Chip names based on their configuration and added ESP32S3_CUSTOM chip module
As suggested in PR:12530, changed the default names of ESP32S3WROOM chips to ESP32S3WROOM1N4,
ESP32S3WROOM2N16R8, ESP32S3WROOM2N32R8, ESP32S3MINI1N8.
Also regenerated all the defconfigs for board configurations.
Added a custom ESP32S3 module for custom flash configurations.
Declared ESP32S3_PSRAM_8M variable with prompt
2024-06-21 17:55:42 +08:00
Tiago Medicci Serrano 96f83bb03a net: Enable `CONFIG_NET_ARP_SEND` by default
Enable logic to send ARP requests if the target IP address mapping
does not appear in the ARP table.

Please check the comment in https://github.com/apache/nuttx/issues/12446#issuecomment-2145856778
2024-06-06 02:40:16 +08:00
Almir Okato 4178f3ede4 esp32s2: remove legacy bootloader support
Deprecate Legacy Boot for ESP32-S2.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-06-04 18:53:14 -03:00
Almir Okato 16f8966fa9 esp32s2: add simple boot support
The Simple Boot feature for Espressif chips is a method of booting
that doesn't depend on a 2nd stage bootloader. Its not the
intention to replace a 2nd stage bootloader such as MCUboot and
ESP-IDF bootloader, but to have a minimal and straight-forward way
of booting, and also simplify the building.

This commit also removes deprecated code and makes this bootloader
configuration as default for esp32s2 targets and removes the need
for running 'make bootloader' command for it.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-06-04 18:53:14 -03:00
simbit18 97836bf3ab board: esp32c3, esp32 and esp32s3 corrected PM block
removed depends on PM from if PM block
2024-05-27 23:24:31 +08:00
halyssonJr e67df47b64 add support for zero-cross driver 2024-05-12 20:40:07 -03:00
Tiago Medicci Serrano 0ed714bba4 esp32s3/adc: Update the bootloader configuration for ESP32-S3
Avoid using the legacy bootloader in case it isn't required. Use
the simple boot instead.
2024-05-10 01:44:02 +08:00
YAMAMOTO Takashi 1b5b9845f4 esp32s3-devkit/toywasm: use ARCH_CHIP_ESP32S3WROOM2_32M
As documented in [1], this config is for a board with 32MB flash.

[1] Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst
2024-05-10 01:44:02 +08:00
Tiago Medicci Serrano 8dca62f8f9 esp32s3: Limit MTD partition size according to the flash size
Whenever a MTD partition is set, this change limits its size
according to the flash size, avoiding the MTD partition to be
greater than the actual flash size.
2024-05-10 01:44:02 +08:00
YAMAMOTO Takashi adcabeb6bf esp32-devkitc/wamr_wasi_debug: Remove a few things to reduce the size
* Remove a few things to fit the default partition size

* Tweak CONFIG_ESP32_STORAGE_MTD_SIZE to match flash 4MB
2024-05-08 23:45:05 +08:00
chenwen@espressif.com 3a9d163aae esp32_c3/pm: Fix assert issue in PM mode
1. Adjust code to avoid PM wakelock->count less than or equal to 0.
    2. Fix some document format issues.

Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2024-05-07 15:45:32 +08:00
nuttxs 8d3d93e001 Add ESP32-S3 ADC driver 2024-05-07 01:12:05 +08:00
Xu Xingliang 0db7417dc0 esp32/lvgl: fix lvgl v9 configuration error
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-04-30 01:45:03 +08:00
Xu Xingliang 62c2b3e1ec lvgl: update existing config to use lvgl v9
These configs are changed based on below rules.
1. always enable +CONFIG_LV_USE_NUTTX=y
2. If touchpad is used, enable +CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y
3. enable log by +CONFIG_LV_USE_LOG=y
4. If -CONFIG_LV_MEM_CUSTOM=y previously defined, replace it with +CONFIG_LV_USE_CLIB_MALLOC=y +CONFIG_LV_USE_CLIB_SPRINTF=y +CONFIG_LV_USE_CLIB_STRING=y
5. If -CONFIG_LV_PORT_USE_FBDEV=y, default config is for fbdev. If -CONFIG_LV_PORT_USE_LCDDEV=y, +CONFIG_LV_USE_NUTTX_LCD=y
6. Remove all -CONFIG_LV_TICK_CUSTOM=y -CONFIG_LV_TICK_CUSTOM_INCLUDE="port/lv_port_tick.h"
7. If -CONFIG_LV_PORT_LCDDEV_DOUBLE_BUFFER=y, replace it with CONFIG_LV_NUTTX_LCD_DOUBLE_BUFFER=y. For fbdev, double buffer is automatically detected.
8. If -CONFIG_LV_COLOR_16_SWAP=y, need to upgrade the LCD driver to support hardware byte order swap.

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-04-29 10:06:43 +08:00
chenwen@espressif.com ea5583b112 xtensa/esp32s3: Support ESP32-S3 PM standby and sleep.
1. pm configuration demonstrates the use of power management present on the ESP32-S3.
   2. You can use the pmconfig command to test the power management, for details look at
      ``Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst``

Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2024-04-25 13:43:15 +08:00
Almir Okato a5de4dbd22 xtensa/esp32s3: Add missing entries to iram.text from legacy_sections.ld
Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-04-24 09:46:04 +08:00
Almir Okato d098c1dc87 esp32s3: add simple boot support
The Simple Boot feature for Espressif chips is a method of booting
that doesn't depend on a 2nd stage bootloader. Its not the
intention to replace a 2nd stage bootloader such as MCUboot and
ESP-IDF bootloader, but to have a minimal and straight-forward way
of booting, and also simplify the building.

This commit also removes deprecated code and makes this bootloader
configuration as default for esp32s3 targets and removes the need
for running 'make bootloader' command for it.

Other related fix, but not directly to Simple Boot:
- Instrumentation is required to run from IRAM to support it during
initialization. `is_eco0` function also needs to run from IRAM.
- `rtc.data` section placement was fixed.
- Provide arch-defined interfaces for efuses, in order to decouple
board config level from arch-defined values.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-04-17 19:43:05 +08:00
simbit18 7677f10d3f fix nxstyle
fix Relative file path does not match actual file.
2024-04-16 19:09:12 +08:00
simbit18 b0504f1e5e fix nxstyle
fix Relative file path does not match actual file.
2024-04-15 15:33:17 -03:00
Tiago Medicci Serrano 9520edeb16 espressif/rmt: Fix minor issues regarding formatting and comments
This commit only fix minor issues regarding formatting and comments
2024-04-02 14:50:59 -03:00
Tiago Medicci Serrano 5ba40d083a esp32/rmt: Use the Espressif`s common RMT driver.
This commit implements the common RMT driver (already available for
the other Espressif's xtensa-based devices) for ESP32.
This allows us to have a proper separation between the lower and
upper-half drivers and use the 'ws2812' example to drive WS2812 RGB
LEDs.
2024-04-02 14:50:59 -03:00
Tiago Medicci Serrano 4b3b22cbeb esp32/rmt: Remove outdated RMT driver
The new common RMT driver - already available for ESP32-S2 and
ESP32-S3 - will be implemented in another commit for ESP32.
2024-03-29 16:14:27 +08:00
Tiago Medicci Serrano 09464ff9bc esp32/[ble/wifi]: Update the wireless drivers
This commit updates the Wi-Fi and the BLE driver of ESP32. Most of
the changes rely on using the common sources and header files for
xtensa-based Espressif's SoCs.

The new Wi-Fi driver supports WPA3-SAE for both Station and SoftAP
mode. BLE's coexistence mode was enhanced according to the latest
libraries.

Please note that other sources required minor changes in order to
be compatible with the common sources.
2024-03-29 16:14:27 +08:00
Tiago Medicci Serrano d16bb11b93 esp32/esp32-audio-kit: Update audio defconfig to enable optimization
Update `audio` defconfig to enable optimization during compilation.
2024-03-29 16:14:27 +08:00
Tiago Medicci Serrano b25211a35e esp32/esp32-lyrat: Update audio defconfig to enable optimization
Update `audio` defconfig to enable optimization during compilation.
2024-03-29 16:14:27 +08:00
Tiago Medicci Serrano 45a2bd6d79 esp32/esp32-devkitc: Update audio defconfig to enable optimization
Update `audio` defconfig to enable optimization during compilation.
2024-03-29 16:14:27 +08:00
chenwen@espressif.com ffc7442af2 xtensa/esp32s3: Add ESP32-S3 AES driver
1. Support AES-128/AES-256 encryption and decryption

Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2024-03-28 09:34:04 +08:00
Marco Casaroli 1be1149fdd arch/esp32 bringup openeth 2024-03-12 08:31:06 -03:00
Marco Casaroli 9af8299af5 arch/esp32 add config for qemu-openeth 2024-03-12 08:31:06 -03:00
Marco Casaroli d048caf1d2 arch/esp32 add openeth mac driver
This driver is used with QEMU, to make it possible
to use networking.

This is not the MAC in ESP32, however, it can be used with QEMU.

The code was shamelessly copied from 31dac92e5f
2024-03-12 08:31:06 -03:00
Tiago Medicci Serrano 522c5c0eac boards/esp32: Increase init task stack size to 3072
This is done to avoid casual stack overflows. Especially after
PR #11777, that increased stack usage.
2024-03-07 20:47:40 +08:00
simonatoaca bb6f32d610 esp32-sparrow-kit: Add I2S support for the board's microphone
The board's microphone uses 24-bit i2s and this commit also fixes
the segmentation fault caused by the audio buffer overflow.

arch/xtensa/src/esp32/esp32_i2s.c: Fix bug regarding 24-bit audio and add AUDIOIOC_STOP to ioctl
drivers/audio/audio_i2s.c: Report number of channels on AUDIOIOC_GETCAPS
in boards/xtensa/esp32/esp32-sparrow-kit:
	/configs/nsh/defconfig: Add I2S configs
	/src/esp32-sparrow-kit.h: Add the signature of esp32_i2sdev_initialize()
	/src/esp32_bringup.c: Add call to esp32_i2sdev_initialize()

Signed-off-by: simonatoaca <simona.alexandra2000@gmail.com>
2024-02-20 06:46:06 -08:00
Tiago Medicci Serrano 1d645318cc esp32s3/rmt: Define default receiver device for the RMT peripheral
This enables using the example without needing to pass a different
argument for the receiver.
2024-02-19 19:02:34 -08:00
Tiago Medicci Serrano c5358d6365 boards/esp32s2-saola-1: Change the RMT output pin to on-board LED
This enables the on-board WS2812 addressable LED to be driven by
the RMT peripheral with the `rmt` defconfig.
2024-02-19 19:02:34 -08:00
Tomáš Pilný 3e85c1886e esp32/dac-one-shot: lower-half driver for ESP32 internal DAC
Enable with ./tools/configure.sh -l esp32-devkitc:dac
DAC channel 0 = GPIO 25
DAC channel 1 = GPIO 26
default path: /dev/dac0

Resolution 8 bits = values 0~255
Voltage: 0~Vref

The reference voltage 'Vref' here is input from the pin VDD3P3_RTC
which ideally equals to the power supply VDD (3.3V).
2024-02-02 09:23:28 -08:00