367 Commits

Author SHA1 Message Date
Xiang Xiao c6654b1106 !sched/clock: remove CONFIG_SYSTEM_TIME64 and always use 64-bit time
The 32-bit system clock has a limited range (~497 days) and the
configuration knob is no longer worth the complexity given that
practically every modern target already enables it.  Make 64-bit
time_t/clock_t/sclock_t/nuttx_time_t the only supported flavor.

Specifically:
  - Drop the SYSTEM_TIME64 Kconfig option and its dependent
    PERF_OVERFLOW_CORRECTION/HRTIMER guards in sched/Kconfig.
  - Remove every #ifdef CONFIG_SYSTEM_TIME64 branch in headers
    (include/{sys/types.h,limits.h,inttypes.h,nuttx/clock.h,
    nuttx/fs/hostfs.h}) and core code paths
    (sched/clock/clock.h, drivers/power/pm/pm_procfs.c,
    drivers/rpmsg/rpmsg_ping.c, fs/procfs/fs_procfsuptime.c,
    libs/libc/wqueue/work_usrthread.c,
    arch/avr/src/avrdx/avrdx_timerisr_tickless_alarm.c).
  - Strip CONFIG_SYSTEM_TIME64=y from every board defconfig.
  - Update Documentation/guides/rust.rst accordingly.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-05-19 16:21:28 +08:00
raiden00pl 4df80e1928 !drivers/pwm: remove PWM_MULTICHAN option
BREAKING CHANGE: remove PWM_MULTICHAN option

PWM_MULTICHAN option is redundant, we can just set CONFIG_PWM_NCHANNELS > 1.
At default CONFIG_PWM_NCHANNELS is set to 1, so the default behavior is preserved.
Access to single channel API is now `info->channels[0].XXX` instead of `info->XXX`

This is the first step to simplify PWM implementation and make it more portable.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-18 11:35:25 -04:00
Matteo Golin 89b4815382 boards/xtensa: Normalize configurations
Normalizes configurations after removal of some app-related init config
options due to simplification of NuttX init.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-06 13:27:26 +08:00
Matteo Golin 96041a7c58 boards/comments: Remove legacy comments
Removing legacy comments referring to calling setup functions from the
NSH library.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-04 12:16:11 -03:00
Matteo Golin 51f77ee111 boards/config: Remove final mentions of NSH_ARCHINIT
Since `NSH_ARCHINIT` is now removed, this commit cleans the last few
references to this option in the defconfig files that were recently
modified and escaped removal in initialization simplification commit.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-02 15:25:45 -03:00
Matteo Golin d54f3a31cb boards/xtensa: Replace board_app_initialize
Replaced board_app_initialize logic with board_late_initialize.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-02 18:36:46 +08:00
Matteo Golin 48db502daf !boards: Remove NSH_ARCHINIT and board_app_initialize
BREAKING: In an effort to simplify NuttX initialization, NSH_ARCHINIT is
removed. board_app_initialize is also removed. BOARD_LATE_INITIALIZE now
performs all board initialization logic, and is by default enabled. All
references to these symbols are removed. BOARDIOC_INIT remains, but will
result in -ENOTTY when called. It is to be removed in a later commit.

Quick fix: Boards relying on NSH_ARCHINIT should now enable
CONFIG_BOARD_LATE_INITIALIZE instead. If the application needs
fine-grained control over board initialization from userspace, the logic
performed by BOARDIOC_INIT may be copied to the board_finalinitialize
function and used instead via BOARDIOC_FINALINIT. All
board_app_initialize logic provided by NuttX is now moved to
board_late_initialize, and the same should be done for out-of-tree
boards.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-02 18:36:46 +08:00
wangjianyu3 f97b29c4c4 boards/lckfb-szpi-esp32s3: add vncviewer defconfig and documentation
Build Documentation / build-html (push) Has been cancelled
Add vncviewer board configuration and documentation:
- boards: add lckfb-szpi-esp32s3:vncviewer defconfig
- Documentation: add system/vncviewer application doc with host
  VNC server setup examples (Xvfb, clip, scale modes) and images

Assisted-by: GitHubCopilot:claude-4.6-opus
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-04-27 22:19:31 +02:00
Tomasz 'CeDeROM' CEDRO 3efaf80d3d boards/xtensa/esp32s3: New board WaveShare ESP32-S3-Touch-LCD-1.28 (WIP).
* Initial experimental / work in progress implementation.
* New board name is esp32s3-ws-lcd128.
* Supports Kconfig delectable w/wo touch variants (lcd gpios difference).
* IMU QMI8658 bringups is put into esp32s3/common/src to share with other
  boards. Pin defines are located at <board>include/board.h and referenced
  with `#include <arch/board/board.h>`.
* Supported configurations: nsh, ostest, coremark, touch-lvgl, notouch-lvgl,
  imu-qmi8658, watchdog.
* Does not have touch panel driver yet.
* Created board documentation. Added sphinx inline cross-references.
* TODO: Fix SPI GC9A01A LCD pixel format colors.
* TODO: Create I2C CST816S touch panel driver.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2026-04-24 16:27:08 +08:00
Tiago Medicci Serrano f6837da271 boards/[risc-v|xtensa]: Update `rmt defconfig for Espressif's SoCs
Adds the `CONFIG_SYSTEM_IRTEST` macro to enable building the
`irtest` application.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-04-24 11:09:41 +08:00
wangjianyu3 c771da1b81 boards/lckfb-szpi-esp32s3: camera config use landscape LCD
Remove CONFIG_LCD_PORTRAIT so the ST7789 defaults to landscape
orientation (320x240), matching the GC0308 QVGA output and the
physical screen mounting direction.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-04-10 10:47:07 +02:00
Piyush Patle 0dccc8ba21 include/debug.h: Move to include/nuttx/debug.h
debug.h is a NuttX-specific, non-POSIX header. Placing it in the
top-level include/ directory creates naming conflicts with external
projects that define their own debug.h.
This commit moves the canonical header to include/nuttx/debug.h,
following the NuttX convention for non-POSIX/non-standard headers,
and updates all in-tree references.

A backward-compatibility shim is left at include/debug.h that
emits a deprecation #warning and re-includes <nuttx/debug.h>,
allowing out-of-tree code to continue building while migrating.

Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
2026-04-07 07:50:06 -03:00
Piyush Patle 703726849f espressif/rmt: guard lirc board registration with DRIVERS_RC
The common ESP board RMT bring-up files are built whenever ESP_RMT is
enabled, but the esp_lirc declarations are only visible when DRIVERS_RC
is enabled.

Guard the esp_lirc header include and esp_lirc_rx_initialize() /
esp_lirc_tx_initialize() calls with CONFIG_DRIVERS_RC so non-RC ESP
configs continue to build while keeping the LIRC registration path for
the rmt configs.

Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
2026-04-04 11:18:32 -03:00
Piyush Patle 140f2c1c78 docs/rc: document RC/LIRC drivers and remove empty drivers/rmt files
Add documentation for the RC/LIRC character driver subsystem covering
device registration, the LIRC interface, and usage from user space.

Remove placeholder empty files under drivers/rmt that were left over
from the rmtchar era and are no longer referenced.

Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
2026-04-04 11:18:32 -03:00
Piyush Patle 7b590f9c43 espressif/rmt: replace rmtchar with arch-specific lirc adapter
Replace the ESP-specific rmtchar upper-half with arch-local esp_lirc
adapters for Xtensa and RISC-V.

 This moves the RMT upper-half out of drivers/rmt, registers LIRC
 devices from the ESP board bring-up paths, and removes the old common
 rmtchar driver and headers.

 Also update the ESP Kconfig and build wiring to build esp_lirc when
 ESP_RMT and DRIVERS_RC are enabled.

 Fixes discovered during hardware validation:
  - register TX as /dev/lirc1 so RX and TX do not collide
  - parse the RX worker thread argument from the correct argv slot
  - keep RX devices from advertising TX capability

Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
2026-04-04 11:18:32 -03:00
wangjianyu3 439ec6c09b boards/lckfb-szpi-esp32s3: add ES7210 board support
Add board-level support for ES7210 4-ch ADC on lckfb-szpi-esp32s3:

- configs/es7210/defconfig: Board configuration with I2C0, I2S0,
  ES7210 driver enabled. I2S pins: BCLK=14, DIN=12, MCLK=38, WS=13,
  sample rate 48kHz.
- src/esp32s3_board_es7210.c: Board init registering ES7210 on I2C0
  bus with I2S0 as audio transport
- src/esp32s3_bringup.c: Call ES7210 board init on startup; skip
  generic I2S audio device registration on I2S0 when ES7210 is
  enabled to avoid conflicting audio device on the same port
- src/esp32s3-szpi.h: ES7210 I2C address and device path defines
- src/Make.defs: Build integration for CONFIG_AUDIO_ES7210

Tested: 48kHz/2ch/16bit recording on ESP32-S3 (lckfb-szpi N16R8),
verified with nxrecorder and es7210_test.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-04-03 13:34:36 +08:00
wangjianyu3 456f929e13 boards/esp32s3: fix uninitialized variable in board_i2sdev_initialize
Initialize 'ret' to OK to silence -Werror=maybe-uninitialized.
When neither enable_tx nor enable_rx is set, 'ret' was returned
without being assigned.

Signed-off-by: dramalife <yangyongkang@espressif.com>
2026-04-03 13:34:36 +08:00
wangjianyu3 7e29152cd7 boards/lckfb-szpi-esp32s3: enable required IRQ vector table configs for uvc
Enable CONFIG_ARCH_IRQ_TO_NDX, CONFIG_ARCH_MINIMAL_VECTORTABLE_DYNAMIC
and CONFIG_ARCH_NUSER_INTERRUPTS=2 which are now required by the Xtensa
ESP32-S3 interrupt handling after upstream changes.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-31 17:16:42 +08:00
wangjianyu3 bab7e3e51b boards/lckfb-szpi-esp32s3: add UVC camera standalone defconfig
Add UVC configuration for lckfb-szpi-esp32s3 board based on gc0308
camera config, with USB OTG and UVC gadget driver enabled in
standalone (non-composite) mode.

- defconfig: enable ESP32S3_OTG, USBUVC, UVC example app
- board doc: add uvc section with usage and host verification

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-29 12:35:22 -03:00
Tiago Medicci Serrano c17e16eaed xtensa/espressif: Update common-source integration for Xtensa devices
This commit updates the common-source integration for Xtensa-based
Espressif devices (ESP32, ESP32-S2, and ESP32-S3). This is part of a larger
common-source update split by architecture for better maintainability.

Major components updated:
- IRQ allocator refactoring with intr_alloc integration
- Common-source drivers (GPIO, RMT, I2C, SPI, UART, etc.)
- Espressif components upgrade to release/master.b-test
- Peripheral drivers (ADC, PWM, LEDC, MCPWM, PCNT, Temperature Sensor, etc.)
- Wireless adapters (Wi-Fi and BLE)
- esp_timer migration to the common-source path for Xtensa devices
- Common-source power management implementation (auto-sleep and wakeup paths)
- Board defconfigs for all Xtensa Espressif boards
- SMP support improvements for ESP32-S3
- Critical section handling improvements

Key architectural changes:
- IRQ Allocator: The new interrupt allocator enables multiple mapping
  options from interrupt sources to CPU interrupts, providing flexibility
  required by modern peripherals. Although this introduces breaking changes
  to the interrupt handling API, the required ARCH_MINIMAL_VECTORTABLE
  Kconfig option is explicitly checked during startup to ensure proper
  configuration. This validation prevents runtime issues from configuration
  mismatches.
- Xtensa-specific interrupt handling via esp_xtensa_intr.c providing
  NuttX-native implementations of xt_ints_on/off and interrupt handlers,
  avoiding conflicts with NuttX's core Xtensa macros.
- Timer/RTC unification: ESP32/ESP32-S2/ESP32-S3 move from chip-specific
  RTC/RT-timer code to common-source Espressif integration, including
  esp_timer_adapter/esp_rtc paths and the required bringup/defconfig updates.
- Power management consolidation: Xtensa PM follows the common-source
  implementation, including common-source auto-sleep behavior, UART/Wi-Fi
  wakeup coordination, and tickless-safe sleep flow compatibility.

Note: This is a large commit to maintain bisectability. Breaking the
changes into smaller commits would result in non-building intermediate
states across the common-source infrastructure update.

Tested configurations:
- All defconfigs were tested, including `ostest`.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-03-29 00:33:11 +08:00
Huang Qi e09048cc88 style: Fix "is is" typo across the codebase.
Correct duplicate "is is" word found in 181 files throughout the
codebase.
In most cases "is is" was changed to "is", but in contexts like
"MCU is is sleep mode" it was corrected to "MCU in sleep mode".

Also fixes a "the the" typo in net/inet/inet_sockif.c.

This is a pure style/documentation fix that improves code readability.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-03-24 09:39:26 +08:00
Huang Qi e3eeaefd6d style: Fix "the the" typo across the codebase.
Fix 269 occurrences of duplicate "the" word typo found in 209 files
across source code, header files, and configuration.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-03-23 11:07:49 +01:00
wangjianyu3 5718c81750 boards/xtensa/esp32s3: fix WiFi init by using CONFIG_ESPRESSIF_WIFI
The WiFi driver refactor (662c1e0bbb) renamed the Kconfig symbol
from CONFIG_ESPRESSIF_WLAN to CONFIG_ESPRESSIF_WIFI, but several
ESP32-S3 board bringup files were not updated. This caused
board_wlan_init() to be compiled out, so the wlan0 interface
never appeared.

Update the preprocessor guards in all affected boards:
  - esp32s3-box
  - esp32s3-eye
  - esp32s3-korvo-2
  - esp32s3-lcd-ev
  - lckfb-szpi-esp32s3

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-20 08:55:18 +01:00
Filipe Cavalcanti 2554d210a5 boards/xtensa: fix optional item on spiflash config
Removes optional keyword causing selection to fail on the
automatic bringup of SPI flash device.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-03-19 17:46:28 +08:00
Filipe Cavalcanti 1630b483d2 boards/xtensa: add option to disable SPI Flash MTD automatic bringup
Build Documentation / build-html (push) Has been cancelled
The ESP32*_SPIFLASH_AUTO_BRINGUP option allows disabling automatic bringup.
This causes /dev/mtdblock0 to show up instead of always mounting a file system.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-03-18 10:16:38 +08:00
Eren Terzioglu f7614f640f boards/xtensa/espressif: Add AES accelerator board support
Build Documentation / build-html (push) Has been cancelled
Add AES accelerator board support for esp32[-s2|-s3]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-17 18:45:53 -03:00
wangjianyu3 9e55df4eb3 boards/lckfb-szpi-esp32s3: add gc0308 minimal defconfig
Build Documentation / build-html (push) Has been cancelled
Add a minimal GC0308 camera configuration based on nsh. Unlike the
full camera config, this only enables the GC0308 DVP camera driver
(I2C, PCA9557, LEDC, CAM, VIDEO) and camcap example, without ADB,
SDMMC, LCD, PSRAM or other peripherals.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-16 17:26:27 -03:00
wangjianyu3 ebfacd3bb8 boards/lckfb-szpi-esp32s3: add camera defconfig
Add camera configuration for lckfb-szpi-esp32s3 board with GC0308
sensor on DVP interface. Includes board-level camera initialization,
DVP GPIO pin mapping, and V4L2 video pipeline setup.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-16 17:26:27 -03:00
Eren Terzioglu 6a4418b7ba boards/xtensa/esp32[-s2|-s3]: Add SHA accelerator features
Add SHA accelerator board features for esp32[-s2|-s3]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-16 11:09:49 +08:00
wangjianyu3 e8cef27b77 boards/lckfb-szpi-esp32s3: add sdmmc defconfig
Build Documentation / build-html (push) Has been cancelled
Add SD card configuration for lckfb-szpi-esp32s3 board using
SDMMC peripheral in 1-bit mode with the following pin mapping:
  - CLK: GPIO47
  - CMD: GPIO48
  - D0:  GPIO21

Features enabled:
  - ESP32S3 SDMMC driver
  - FAT filesystem with long filename (LFN) support
  - mkfatfs utility for on-device formatting

Usage:
  mkfatfs -F 32 /dev/mmcsd1
  mkdir -p /mnt/sd
  mount -t vfat /dev/mmcsd1 /mnt/sd

Update documentation with sdmmc configuration details.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-13 12:38:43 +01:00
nuttxs 097cc8c8a6 boards/esp32s3: Fix MAC address byte order in LAN9250 driver
Fix MAC address byte order by reversing 6 bytes after reading
from eFuse. Adjust offset logic to apply after byte reversal,
ensuring Ethernet MAC is base_mac +3. Comply with Espressif's
MAC address generation specification for ESP32S3

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2026-03-10 10:34:27 +01:00
Matteo Golin f34a6e43db boards/esp32s3-devkit: Align naming of configuration options
Aligns `CONFIG_INTERPRETER_*` options to `CONFIG_INTERPRETERS_*` to be
consistent with other interpreters.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-02-18 11:01:34 +01:00
hujun5 5db4278173 protect: move us_heap to userspace_data_s
Refactor heap pointer storage by moving us_heap field from userspace_s
to the nested userspace_data_s structure, enabling future extensibility
of user-space data without modifying the core userspace_s interface across
all board-specific implementations.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-02-02 11:06:53 +08:00
chao an f3e2a7029d sched: Remove legacy sched_resumescheduler.c
The sched_resumescheduler support was already removed in prior commits.
This change cleans up the now unused legacy source file.

Signed-off-by: chao an <anchao.archer@bytedance.com>
2026-01-27 18:21:12 +08:00
nuttxs fa2d2b8898 boards/xtensa: fixes for compilation and start-up issues when legacy
boot mode is configured

1. Explicitly define the .rtc_reserved section to ensure RTC data
that requires fixed address is correctly placed and does not
conflict with other sections
2. When legacy boot is configured, vecbase must also be set and
clear the BSS section
3. Cache must be disabled during Flash operations, so all
Flash-operation-related functions must be placed in IRAM
(internal RAM). Update the linker script for legacy boot mode

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2026-01-26 19:22:14 -03:00
Xoris 090860a348 esp32s3: Remove redundant I2S include directive
remove redundant I2S include directive

Signed-off-by: Xoris <xmingwp@gmail.com>
2026-01-03 20:02:10 -03:00
Eren Terzioglu 318e0b09b5 boards/xtensa/esp32s3: Add ostest defconfig
Add ostest defconfig for esp32s3

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-01-01 17:03:20 +08:00
Huang Qi beb0a47568 boards/esp32s3/lckfb-szpi: Add QMI8658 6-axis IMU sensor support
Build Documentation / build-html (push) Has been cancelled
Add support for the QMI8658 6-axis IMU sensor (accelerometer + gyroscope)
on the lckfb-szpi-esp32s3 board.

Changes:
- New esp32s3_qmi8658.c driver initializes sensor on I2C0 at address 0x6A
- Registers uORB devices: /dev/uorb/sensor_accel0 and /dev/uorb/sensor_gyro0
- Adds esp32s3_qmi8658_initialize() function declaration to header
- Integrates with board bringup when CONFIG_SENSORS_QMI8658=y

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-12-21 00:58:58 +08:00
zhanghongyu aa8ffea3cf netdev_upperhalf: convert Kconfig to variable
Build Documentation / build-html (push) Has been cancelled
Upperhalf supports multiple working modes at the same time,
which is specified by NIC when register

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-14 10:01:22 +08:00
Eren Terzioglu 1dcbb7c519 boards/xtensa/esp32[-s2|-s3]: Refactor PM board layer
Refactor PM board layer for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-12-02 02:37:06 +08:00
Tiago Medicci Serrano 44867b80ae boards/xtensa/esp32s3: Fix esp32s3-devkitc:knsh
This defconfig uses the legacy bootloader (based on ESP-IDF's
bootloader) and, due a recent update on SPI flash support, its
initialization was missing data to be moved to the IRAM during the
boot process.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-11-28 18:45:06 +01:00
nuttxs 22a9228479 boards/xtensa: fix some unused variable build warning
src/esp32s3_lan9250.c:190:7: warning: unused variable 'i' [-Wunused-variable]

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2025-11-06 12:13:04 +01:00
Huang Qi 2ecd2722cd boards/esp32s3: Increase LCD PWM frequency to reduce LCD flicker
Increase LCD PWM frequency from 100Hz to 10kHz to eliminate visible flicker
on the lckfb-szpi ESP32S3 board. The higher frequency provides smoother
backlight control and improves display visual quality.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-10-29 14:10:28 -04:00
Filipe Cavalcanti 680766d304 arch/xtensa: update SPI Flash driver for ESP32-S2|S3
Updates the SPI Flash driver used for user storage MTD.
Moves ESP32 and ESP32S3 to use common driver.
Updates KConfig options to keep backwards compatibility.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-10-29 09:44:55 -04:00
Eren Terzioglu de9cb4be9f arch/xtensa/esp32[-s3]: Add ULP RISCV coprocessor wakeup board support
Add ULP RISC-V coprocessor wakeup board support for esp32s3

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-10-24 11:16:11 +08:00
Filipe Cavalcanti 58cdb9cfea boards/xtensa: optimize linker script IRAM section
Improve IRAM usage.
- Remove unnecessary E-Fuse sources;
- Optimizing (ESP32) and add (S2|S3) libpp(Wi-Fi related).

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-10-23 20:34:59 +08:00
Eren Terzioglu 6702b4fdb4 boards/xtensa/esp32[-s2|-s3]: Add multiple ULP RISC-V bin board support
Add multiple ULP RISC-V bin board support for esp32s2 and esp32s3

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-10-21 06:32:32 -03:00
chao an 87f134cfaa sched/sleep: replace all Signal-based sleep implement to Scheduled sleep
Nuttx currently has 2 types of sleep interfaces:

1. Signal-scheduled sleep: nxsig_sleep() / nxsig_usleep() / nxsig_nanosleep()
Weaknesses:
a. Signal-dependent: The signal-scheduled sleep method is bound to the signal framework, while some driver sleep operations do not depend on signals.
b. Timespec conversion: Signal-scheduled sleep involves timespec conversion, which has a significant impact on performance.

2. Busy sleep: up_mdelay() / up_udelay()
Weaknesses:
a. Does not actively trigger scheduling, occupy the CPU loading.

3. New interfaces: Scheduled sleep: nxsched_sleep() / nxsched_usleep() / nxsched_msleep() / nxsched_ticksleep()
Strengths:
a. Does not depend on the signal framework.
b. Tick-based, without additional computational overhead.

Currently, the Nuttx driver framework extensively uses nxsig_* interfaces. However, the driver does not need to rely on signals or timespec conversion.
Therefore, a new set of APIs is added to reduce dependencies on other modules.

(This PR also aims to make signals optional, further reducing the code size of Nuttx.)

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-10-17 14:05:02 +08:00
Huang Qi 98415626e3 boards/xtensa/esp32s3: Refactor ES8311 initialization to use I2C handle
Refactor esp32s3_es8311_initialize function to accept I2C handle instead
of port number, moving I2C bus initialization responsibility to the board
bringup code. This change improves flexibility by allowing boards to
manage I2C initialization while the ES8311 driver focuses on audio
codec configuration.

* Updated function signature to accept struct i2c_master_s *i2c parameter
* Removed I2C bus initialization from ES8311 driver
* Updated function documentation to reflect new parameter
* Modified esp32s3-lcd-ev and esp32s3-korvo-2 boards to initialize I2C
  before calling ES8311 initialization
* Added proper error handling for I2C initialization failures
* Moved variable declarations to function start for C89 compliance
* Fixed code style issues including line length and indentation

This change maintains backward compatibility for existing functionality
while providing better separation of concerns between I2C bus management
and audio codec configuration.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-10-02 12:53:35 +02:00
Eren Terzioglu f066808921 boards/xtensa/esp32[-s2|-s3]: Add RTC I2C board support for HP Core
Add RTC I2C board support for HP Core for esp32[-s2|-s3]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-10-01 14:16:55 -04:00