Commit graph

868 commits

Author SHA1 Message Date
Tiago Medicci Serrano
6db437e2de boards/esp32[c3|c6|h2]: Fix GPIO function used by the button
This commit fixes the function to select the GPIO behavior for the
pins associated to the board's button.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-09-27 21:40:02 +08:00
Filipe Cavalcanti
c15521af91 boards/risc-v: update board and defconfigs for Wi-Fi on ESP32-C3|C6
Updates the defconfigs and board source to support driver refactor.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-08-28 21:52:03 +08:00
michal matias
76c2038d97 boards/risc-v/esp32c6: Remove board support for the NCV7410
The NCV7410 driver will be replaced. This commit removes current support for
the NCV7410 driver from the board level.

Signed-off-by: michal matias <mich4l.matias@gmail.com>
2025-08-25 20:32:35 +08:00
Serg Podtynnyi
2437771de5 boards/risc-v/rp23xx-rv/common: update board reset via BOOTROM functions
Update board reset with BOOTROM functions calls
 - normal reboot
 - reboot to bootloader

normal reboot and reboot bootloader now possible from nsh

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-08-16 08:56:21 -03:00
Eren Terzioglu
680abacd1f boards/risc-v: Revert mdtblock initialization for esp32[-c3|-c6|-h2]
boards/risc-v: Revert mdtblock initialization for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-08-15 16:42:46 -03:00
Jukka Laitinen
d62e500940 boards/risc-v/mpfs/icicle: Add USRIO area for userspace IO mappings
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2025-08-15 09:18:34 -03:00
Serg Podtynnyi
2e7f75f6e0 arch/risc-v/rp23xx-riscv: Add rp23xx RISC-V cores support (Hazard3)
Chip name   : rp23xx-rv
Board name  : raspberrypi-pico-2-rv
Arch        : risc-v

Changes from ARM rp23xx impl

- Linker script update
- ASM head start
- Update chip start
- New Hazard3 registers
- Remove rp23xx chip hw spinlocks/testset
- New irq handling (external IRQ interrupt Hazard3)
- New timerisr based on RISC-V std MTIME and alarm arch
- No SMP yet
- Tickless option
- Double size for idle, irq and main stacks
- Board reset via watchdog trigger

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-08-11 08:56:27 +08:00
Eren Terzioglu
1c0e1698cd bugix/risc-v/esp32c6: Fix build error of LP_I2C
Fix build error of LP_I2C for esp32c6

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-08-05 08:00:12 -03:00
Martin Vajnar
150854c6f2 ESP_PCNT: add high and low limit Kconfig options
Signed-off-by: Martin Vajnar <martin.vajnar@gmail.com>
2025-07-22 13:09:02 -03:00
Filipe Cavalcanti
8c932b50fb boards/risc-v: fixes SPI Flash for MCUBoot usage
Adds partitions required for MCUBoot usage and a sample defconfig.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-22 10:55:08 -03:00
jingfei
db54331479 drivers/fs:Always use register_mtddriver() to register the MTD device (patch2)
This is a supplement to the patch:1936126210a56b6d1b033d6d940669413dd6e1b0

Due to the automatic wrapping of MTD devices during the
open() process, the legacy registration methods
ftl_initialize() and bchdev_register() are no longer
required for MTD device registration for user code.

So we have adjusted the registration method for MTD devices
in nuttx/boards, replacing the previous approach using
ftl_initialize()  with register_mtddriver().
2025-07-21 15:15:30 -03:00
Filipe Cavalcanti
bd18bda0d7 boards/risc-v: add SDMMC defconfigs for ESP32C3|C6|H2
Adds defconfig to support SDMMC over SPI for esp32c3-generic, esp32c6-devkitc,
esp32c6-devkitm and esp32h2-devkit.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-16 10:24:21 -03:00
Filipe Cavalcanti
6f19c59d26 boards/risc-v: add support for SD Card over SPI on ESP32-C3|C6|H2
Add board support for SD Card over SPI for ESP32C3, ESP32C6 and ESP32H2.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-16 10:24:21 -03:00
jingfei
d12cf1cb75 drivers/fs:Always use register_mtddriver() to register the MTD device.
We have adjusted the registration method for MTD devices
in nuttx/boards, replacing the previous approach using
ftl_initialize() and bchdev_register() with
register_mtddriver().

When registering MTD devices via register_mtddriver(),
FTL and BCH wrappers will be added during the open() process:

1. Character Device Mode:
   When accessing the MTD device node via the open() interface,
   the device will be automatically converted to a character
   device. Both FTL and BCH wrappers will be implicitly added,
   provided that BCH support is enabled in the configuration.

2. Block Device Mode:
   When accessing the MTD device node via open_blockdriver(),
   the device will be treated as a block device, with only
   the FTL wrapper automatically applied.

Due to the automatic wrapping of MTD devices during the
open() process, the legacy registration methods
ftl_initialize() and bchdev_register() are no longer
required for MTD device registration for user code and should
be used only internally within fs and driver code.

Signed-off-by: jingfei <jingfei@xiaomi.com>
2025-07-16 14:11:41 +08:00
Eren Terzioglu
8995226e0a arch/risc-v: Add LP I2C for esp32[-c6]
Add LP I2C peripheral support for esp32c6

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-09 12:18:06 +08:00
Eren Terzioglu
b7f98a939e boards/risc-v: Add board layer SHA accelerator support for esp32[-c3|-c6|-h2]
Add board layer SHA accelerator support for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-09 12:13:06 +08:00
Filipe Cavalcanti
26eb2833cc boards/risc-v: fix config for SPI and I2C drivers
Replaces CONFIG_I2C_DRIVER with CONFIG_I2C for proper build requirements.
Same for SPI. Also changes some logging to syslog.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-08 11:04:05 +08:00
Filipe Cavalcanti
e57d2a5247 arch/risc-v: update lower-half drivers for ESP32-C3|C6|H2 2025-06-30 22:40:26 +08:00
michal matias
e0ba2efdca boards/risc-v/esp32c6: Add the NCV7410 10BASE-T1S MAC-PHY support for the ESP32-C6 boards
This commit adds NCV7410 10BASE-T1S SPI MAC-PHY support for
* esp32c6-devkitc
* esp32c6-devkitm

Signed-off-by: michal matias <mich4l.matias@gmail.com>
2025-06-29 09:11:46 -03:00
wangjianyu3
5079105e17 boards: net tcp backlog is enabled by default
The configuration NET_TCPBACKLOG is enabled by default.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-26 09:32:54 -03:00
Tiago Medicci Serrano
14af1c6ef7 boards/risc-v/qemu-rv: Add missing section on ld-nuttsbi.script
Fix an issue regarding the `rv-virt:nsbi` defconfig, which wasn't
booting properly because `sbi_set_mtimecmp` failed to get the
mtimecmp's register address when evaluating `g_mtimecmp`. This
variable, which should be located at the `.noinit` section, wasn't
being set accordingly by the linker script, ending up on `bss
section which is zero-initialized, overwriting its value previously
set by `sbi_init_mtimer`.
2025-06-22 14:57:11 +08:00
Anthony Tran
e82d69533c riscv qemu-rv: fix kernel mapping by enabling CONFIG_MM_KMAP in knsh defconfig 2025-06-12 10:11:57 -03:00
Lars Kruse
3ce85ca54e style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
Martin Vajnar
68b22fee3c Update defconfigs
Remove SENSORS and SENSORS_QENCODER as it is selected by ESP_PCNT_AS_QE.
2025-05-16 11:10:29 -03:00
Martin Vajnar
3e100e3c86 esp32[c6|h2|s2|s3]: Assign Edge/Level GPIO pin numbers when in Quadrature Encoder mode
Only 2 pins are needed in this mode for both channels. The wiring
is such that Edge and Level pins are cross-connected for both
channels.
2025-05-16 11:10:29 -03:00
Martin Vajnar
51a75e622f esp32[c6|h2|s3|s2]: Fix assignment of Edge/Level GPIO pins in PCNT 2025-05-16 11:10:29 -03:00
Eren Terzioglu
21e580b9c4 boards/risc-v: Add dedicated GPIO board level support for esp32[-c3|-c6|-h2]
Add board level dedicated GPIO support for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-05-14 19:38:21 +02:00
Eren Terzioglu
521e1b15b6 boards/risc-v: Add board layer support of SDM for esp32[-c3|-c6|-h2]
Add SDM board layer support for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-05-09 19:20:47 +08:00
Rodrigo Sim
7a64c86c1b boards/risc-v/esp32c6 Add initial support to Seeed Studio XIAO ESP32c6
This commit introduces initial support for the Seeed Studio XIAO ESP32C6
board. Five configurations are available:
- nsh: Basic NuttShell support over UART0
- usbnsh: Basic NuttShell support over USB
- gpio: NuttShell over USB + GPIO
- wifi: NuttShell over USB + Wifi support

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-05-09 12:54:50 +08:00
Filipe Cavalcanti
9e8197ad49 boards/risc-v: add MPU60x0 bringup support to ESP32C6
Adds a defconfig for using MPU60x0 and implement the bringup sequence for the I2C IMU.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-05-02 09:31:52 -03:00
Leo Chung
61f205f1d4 risc-v/esp32h2:Add missing bootloader flash_qio_mode file in link
script

Add missing flash_qio_mode file in bootloader link script, it will be
used when CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2025-04-29 09:20:15 -03:00
Leo Chung
2269fcaaf9 risc-v/esp32c6:Add missing bootloader flash_qio_mode file in link
script

Add missing flash_qio_mode file in bootloader link script, it will be
used when CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2025-04-29 09:20:15 -03:00
Leo Chung
80c0854d7e risc-v/esp32c3:Add missing bootloader flash_qio_mode file in link
script

Add missing flash_qio_mode file in bootloader link script, it will be
used when CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2025-04-29 09:20:15 -03:00
Filipe Cavalcanti
4c48708fbc boards/esp32c3: modify nimble defconfig to use UART0 as serial console
Nimble defconfig had USB Serial as default console. This changes makes it compatible
to ESP32C3-Devkit and makes it similar to other defconfigs.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-28 22:16:44 +08:00
Rodrigo Sim
bab3d8892b boards/risc-v/esp32c3 Add initial support to Seeed Studio XIAO ESP32C3
This commit introduces initial support for the Seeed Studio XIAO ESP32C3
board. Five configurations are available:
- nsh: Basic NuttShell support over UART0
- usbnsh: Basic NuttShell support over USB
- gpio: NuttShell over USB + GPIO
- wifi: NuttShell over USB + Wifi support
- ble: NuttShell over SUB + Bluetooth support

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-04-28 08:46:10 +02:00
Tiago Medicci Serrano
216c4b00e2 boards/[risc-v|xtensa]/esp32[|c3|c6|h2|s3]: set coexiram sections
This commit sets the coexiram (from libcoexist.a) sections on IRAM.

Before this commit, no other rules matched such sections and the
sections could be placed outside markers that denote the end of the
text sections, causing unexpected errors.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-23 16:17:17 +08:00
Tiago Medicci Serrano
956915ff97 risc-v/esp32h2: Fix getting the flash mappings by openocd-esp32
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-18 02:25:14 +08:00
Tiago Medicci Serrano
cb25b45d92 risc-v/esp32c6: Fix getting the flash mappings by openocd-esp32
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-18 02:25:14 +08:00
Tiago Medicci Serrano
c566cf51a2 risc-v/esp32c3: Fix getting the flash mappings by openocd-esp32
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-18 02:25:14 +08:00
Filipe Cavalcanti
238a5250f6 boards/risc-v: ADC support on Espressif devices
Adds adc defconfig and board support for: esp32c3-generic, esp32c6-devkitc and esp32h2-devkit.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-17 13:56:40 +08:00
chao an
52482219c8 libc/elf: rename modlib to libelf
Renaming "modlib" to "libelf" is more in line with the implementation content,
which makes it easier for individual developers to understand the capabilities of this module.

CONFIG_LIBC_MODLIB -> CONFIG_LIBC_ELF

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-04-11 09:43:22 +08:00
anjiahao
422c43949a binfmt:use crt0 inside of starthook
test:
1.use mps3-an547 build helloxx as module and run it
2.use qemu-armv7a:knsh test kernel build helloxx and run it

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2025-04-09 23:07:29 +08:00
Tiago Medicci Serrano
7482170f3f boards/risc-v/esp32c6: Enable SPI Flash's MTD block
This commit enables the SPI Flash's MTD block driver. This block
driver enables testing the SPI Flash device without any associated
filesystems.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-01 09:38:03 +08:00
Tiago Medicci Serrano
c616d2563e boards/risc-v/esp32h2: Enable SPI Flash's MTD block
This commit enables the SPI Flash's MTD block driver. This block
driver enables testing the SPI Flash device without any associated
filesystems.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-01 09:38:03 +08:00
Tiago Medicci Serrano
6e57b93821 boards/risc-v/esp32c3: Enable SPI Flash's MTD block driver
This commit enables the SPI Flash's MTD block driver. This block
driver enables testing the SPI Flash device without any associated
filesystems.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-01 09:38:03 +08:00
yangsong8
c4001b2433 Revert "boards/defconfig: remove fixed CDCACM BUFFER SIZE"
Use configuration CDCACM_DISABLE_TXBUF or CDCACM_DISABLE_RXBUF to choose
whether to use usb req buffer as the serial buffer. Since the default
value is n (not using req buf), the original configuration of buf is valid.

This reverts commit 21c8ed80bd.
2025-03-28 08:52:42 +08:00
Lup Yuen Lee
d52e5b2eb0 boards/risc-v/eic7700x/starpro64: Add support for PINE64 StarPro64 SBC (ESWIN EIC7700X SoC)
This PR adds support for the PINE64 StarPro64 64-bit RISC-V SBC,
based on ESWIN EIC7700X SoC. Most of the code was derived from NuttX
for Milk-V Duo S (SOPHGO SG2000). The modified code is explained here:
https://lupyuen.github.io/articles/starpro64#appendix-port-nuttx-to-starpro64

Modified Files:

boards/Kconfig: Added StarPro64 board

New Files in boards/risc-v/eic7700x/starpro64:

src/eic7700x_appinit.c: Startup Code
include/board.h: StarPro64 Definitions
include/board_memorymap.h: Memory Map
src/etc/init.d/rc.sysinit, rcS: Startup Script
src/.gitignore: Ignore the tmp filesystem
scripts/ld.script: Linker Script
scripts/Make.defs: StarPro64 Makefile
src/Makefile: StarPro64 Makefile
Kconfig: StarPro64 Config
configs/nsh/defconfig: Build Config for starpro64:nsh

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2025-03-05 12:52:44 -03:00
yangsong8
21c8ed80bd boards/defconfig: remove fixed CDCACM BUFFER SIZE
Use usb req buf to replaced cdcacm rxbuffer and txbuffer,
so this macro is no longer needed.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-03-05 12:52:00 -03:00
Eren Terzioglu
939b31b97e boards/risc-v/esp32[c3|c6|h2]: Add I2C slave support
Add I2C slave support into board layer for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-02-26 16:32:40 +01:00
Eren Terzioglu
3661cdeed9 esp32[c3|c6|h2]: Add I2S support
Add I2S support for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-02-21 20:48:15 +08:00