Commit Graph

61642 Commits

Author SHA1 Message Date
zhanghongyu 6cba2674fa net/icmpv6: fix wrong logical operator in recvmsg validation
Change && to || in the fromlen validation of icmpv6_recvmsg().
The original condition (fromlen == NULL && *fromlen < sizeof(...))
would never be true when fromlen is NULL due to short-circuit
evaluation. The correct logic is: reject if fromlen is NULL or
the buffer is too small.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-04-13 08:46:57 -03:00
zhanghongyu 0c7f8204fd net/icmp: use break instead of return in icmp_findconn
Replace return with break inside the loop in icmp_findconn() to
ensure any post-loop cleanup logic is properly executed before
returning.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-04-13 08:46:57 -03:00
zhanghongyu a0b8969636 net/bluetooth: fix null pointer dereference in bluetooth_sendmsg
Move the NULL check for radio pointer before the DEBUGASSERT that
dereferences it. Previously DEBUGASSERT(radio->r_dev.d_lltype == ...)
was executed before verifying radio != NULL, which would crash when
the device is not found.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-04-13 08:46:57 -03:00
dependabot[bot] 4257c55eeb build(deps): bump actions/upload-artifact from 7.0.0 to 7.0.1
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v7...v7.0.1)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-13 15:04:14 +08:00
dependabot[bot] 0e229e004a build(deps): bump actions/github-script from 8.0.0 to 9.0.0
Bumps [actions/github-script](https://github.com/actions/github-script) from 8.0.0 to 9.0.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v8...v9)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: 9.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-13 15:03:58 +08:00
raiden00pl e274655d1c boards/nrf5340-dk: add qencoder example
Build Documentation / build-html (push) Has been cancelled
add qencoder support and enable qe example for config

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-12 19:41:52 -04:00
raiden00pl 83264bac84 boards/nrf52840-dk: add qencoder example
add qencoder support and enable qe example for jumbo config

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-12 19:41:52 -04:00
raiden00pl 1513b3e20c arch/nrf52|nrf53: add qencoder support
add qencoder support for nrf52 and nrf53

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-12 19:41:52 -04:00
raiden00pl a448781348 boards/nucleo-c0XX: add qencoder support
add qencoder support for nucleo-c0 boards

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-12 19:41:29 -04:00
raiden00pl 5bacc302eb arch/stm32f0l0g0: add qencoder support
add QENCODER support for STM32F0/L0/G0/C0

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-12 19:41:29 -04:00
raiden00pl afda7316e5 arch/stm32f0l0g0/tim: TIM2 is 32-bit on F0/G0/C0
fix TIM2 width - it is 32-bit on F0/G0/C0 but 16-bit on C0

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-12 19:41:29 -04:00
raiden00pl 1753efa80d boards/nucleo-c0XX: fix invalid ADC buff size
Build Documentation / build-html (push) Has been cancelled
fix invalid ADC buff size that cause buffer overflow

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-13 00:21:03 +08:00
raiden00pl 6928384019 arch/stm32{f7|h7|l4|l5|u5}: remove references to CONFIG_STM32_TIMx_QECLKOUT
Remove useless references to CONFIG_STM32_TIMx_QECLKOUT

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-12 10:52:36 -04:00
raiden00pl 0af4519bd7 boards/nrf52840-dk|nrf5340-dk: remove nrf5x_timer.c
remove nrf5x_timer.c, it was moved to boards/common long time ago:

- boards/arm/nrf52/common/src/nrf52_timer.c
- boards/arm/nrf53/common/src/nrf53_timer.c

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-12 15:34:46 +02:00
Daniel Monteiro 9d5b26e769 boards/tiva: change default toolchain for tm4c123g to GNU EABI
fixes: #18668

Signed-off-by: Daniel Monteiro <monteiroquiet@gmail.com>
2026-04-11 12:26:23 -03:00
Filipe Cavalcanti 8fb8c2dca5 arch/xtensa: register Wi-Fi IRQs in non_iram mask for SPI flash
Wi-Fi used a locally allocated vector_desc, so those CPU interrupt lines
were never recorded in the HAL non_iram_int_mask.
During SPI flash, esp_intr_noniram_disable() therefore did not mask them,
and Wi-Fi ISRs could still run with the cache off.
Now, Wi-Fi IRQs are treated as non-IRAM and get masked while flash/cache is suspended.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-11 13:40:44 +08:00
Filipe Cavalcanti e8bcbbc5d3 arch/risc-v: register Wi-Fi IRQs in non_iram mask for SPI flash
Wi-Fi used a locally allocated vector_desc, so those CPU interrupt lines
were never recorded in the HAL non_iram_int_mask.
During SPI flash, esp_intr_noniram_disable() therefore did not mask them,
and Wi-Fi ISRs could still run with the cache off.
Now, Wi-Fi IRQs are treated as non-IRAM and get masked while flash/cache is suspended.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-11 13:40:44 +08:00
wangjianyu3 0885b45256 xtensa/esp32s3: refactor cam driver to use cam_ll HAL layer
Replace direct putreg32/getreg32 register accesses in esp32s3_cam.c
with cam_ll_* inline functions from Espressif's esp_hal_cam component.
This reduces maintenance burden by using the vendor-provided HAL
abstraction instead of raw register manipulation.

Changes:
- Add lcd_cam_dev_t *hw pointer to driver struct
- Use cam_ll_start/stop/reset/fifo_reset for CAM control
- Use cam_ll_get_interrupt_status/clear_interrupt_status for ISR
- Use cam_ll_set_recv_data_bytelen for DMA buffer length
- Use cam_ll_select_clk_src/set_group_clock_coeff for clock config
- Use cam_ll_enable_vsync_filter/set_vsync_filter_thres
- Use cam_ll_enable_vsync_generate_eof/enable_rgb_yuv_convert
- Use struct access for interrupt enable (cam_ll_enable_interrupt
  requires __DECLARE_RCC_ATOMIC_ENV not available in NuttX)
- Add esp_hal_cam include paths to hal.mk

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-04-11 13:36:53 +08:00
simbit18 f20084225e ci/platforms/linux.sh: bump Espressif esptool
Build Documentation / build-html (push) Has been cancelled
- Bump Espressif esptool 5.2.0

   #18696

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-10 14:34:28 -03:00
simbit18 c585e97a1b ci/platforms/ubuntu.sh: bump Espressif esptool
- Bump Espressif esptool 5.2.0

   #18696

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-10 14:34:28 -03:00
simbit18 f8621bc0a1 ci/platforms/darwin_arm64.sh: bump Espressif esptool
- Bump Espressif esptool 5.2.0

   #18696

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-10 14:34:28 -03:00
simbit18 8500421d97 ci/platforms/darwin.sh: bump Espressif esptool
- Bump Espressif esptool 5.2.0

   #18696

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-10 14:34:28 -03:00
Tiago Medicci Serrano 6ef0d35894 Documentation: Power Management for ESP32-P4-Function-EV-Board
This commit documents the power management defconfig for the
ESP32-P4-Function-EV-Board.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-04-10 14:33:52 -03:00
Tiago Medicci Serrano 745f7542d9 arch/risc-v: Enable low power mode for ESP32-P4
This commit introduces the necessary changes to enable low power
mode for ESP32-P4. Please check the corresponding documentation.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-04-10 14:33:52 -03:00
simbit18 e1c8f21f1a boards/risc-v/esp32p4: CMake added esp32p4-pico-wifi-wareshare board
- CMake added esp32p4-pico-wifi-wareshare board

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-10 13:43:41 -03:00
simbit18 327dc0a975 boards/risc-v/esp32c6: CMake added esp32c6-xiao board
- CMake added esp32c6-xiao board

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-10 13:43:41 -03:00
Filipe Cavalcanti 738f683b7d cmake: add -D__NuttX__ to preprocessor
This change allows for linker script files to be properly processed when
`#ifdef __NuttX__` is used.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-10 12:22:24 -03:00
Eren Terzioglu c97a7856e3 Docs/risc-v/esp32[-c3|-c6|-h2]: Add autopm docs
Build Documentation / build-html (push) Has been cancelled
Add autopm docs for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-10 20:34:46 +08:00
Eren Terzioglu 8cc3d49c34 boards/risc-v/esp32[-c3|-c6|-h2]: Add autopm defconfig
Add autopm defconfig for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-10 20:34:46 +08:00
Tiago Medicci Serrano 213a651509 arch/risc-v/esp32[-c3|-c6|-h2]: Add auto sleep
Add auto sleep for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-10 20:34:46 +08:00
Vlad Pruteanu ad168fdf2d arch/xtensa/esp32: Add support for hardware accelerated PBKDF2
This adds support for the PBKDF2 algorithm in the ESP32 crypto
driver. Here, it will take advantage of the hardware-accelerated
implementation of SHA.

Signed-off-by: Vlad Pruteanu <pruteanuvlad1611@yahoo.com>
2026-04-10 20:32:46 +08:00
simbit18 4f1a3356f9 arch/risc-v/src/common/espressif: Aligned Cmake with Make
Add:
- replace rmtchar with arch-specific lirc adapter apache#18654

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-10 08:34:41 -03:00
karaketir16 d09bfc021d rp23xx: add hardware SHA-256 cryptodev support
Add an RP23xx hardware crypto driver for /dev/crypto with SHA-256
support backed by the RP2350 SHA accelerator.

Wire the new driver into the RP23xx ARM build and register
CRYPTO_SHA2_256 through cryptodev.

Also fix the RP23xx SHA256 CSR BSWAP bit definition in both the ARM and
RISC-V RP23xx headers. The previous value used bit 18, but the RP2350
hardware uses bit 12. Without this fix, the accelerator hashed input
words with the wrong byte order and produced incorrect digests.

Signed-off-by: karaketir16 <osmankaraketir@gmail.com>
2026-04-10 17:02:57 +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
wangjianyu3 7c451141f5 xtensa/esp32s3: cam driver support MMAP buffer allocation
Implement imgdata_ops alloc/free callbacks so the V4L2 framework
can use MMAP mode to allocate frame buffers with proper GDMA
alignment.  This lets applications avoid hardcoding platform-
specific alignment values.

- Add esp32s3_cam_alloc() using kmm_memalign with the alignment
  derived from the GDMA external memory block size setting.
- Add esp32s3_cam_free() wrapper around kmm_free.
- Introduce ESP32S3_CAM_EXT_MEMBLK / ESP32S3_CAM_DMA_ALIGN macros
  so the block size enum and byte alignment are defined in one
  place and stay in sync automatically.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-04-10 10:47:07 +02:00
wangjianyu3 929acd26e0 xtensa/esp32s3: fix esp32s3_cam uninit/stop_capture bugs
Fix several issues in the ESP32-S3 CAM driver:

- stop_capture: reset DMA channel, CAM module and AFIFO under
  spinlock to fully quiesce hardware before returning. Clear
  pending VSYNC interrupt to prevent stale ISR firing.

- uninit: reset CAM/AFIFO before releasing DMA to prevent
  in-flight transfers after channel detach. Use esp_teardown_irq
  with correct peripheral ID (ESP32S3_PERIPH_LCD_CAM) instead of
  irq_detach which corrupts the shared IRQ mapping table. Mask
  interrupts and clear pending flags under spinlock before
  detaching handler.

- uninit: preserve XCLK output so the sensor remains accessible
  via I2C for subsequent re-initialization.

- set_buf/uninit: track driver-allocated vs user-provided frame
  buffers with fb_allocated flag to prevent double-free when
  using V4L2 USERPTR mode.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-04-10 10:47:07 +02:00
wangjianyu3 bebfaf8bb4 video/gc0308: implement V4L2 horizontal flip control
Implement get_supported_value, get_value and set_value callbacks
for IMGSENSOR_ID_HFLIP_VIDEO / IMGSENSOR_ID_HFLIP_STILL.  This
allows applications to mirror the camera preview horizontally at
runtime via VIDIOC_S_CTRL + V4L2_CID_HFLIP.

The hardware mirror is controlled by register 0x14 (CISCTL_MODE1)
bit[0], which reverses the pixel readout order with zero CPU cost.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-04-10 10:47:07 +02:00
wangjianyu3 e6ad9d25d7 video/gc0308: report V4L2_PIX_FMT_RGB565X for 8-bit DVP output
GC0308 register 0x24 bits[3:0] = 0x06 selects RGB565 output per
datasheet.  On an 8-bit DVP bus the high byte is clocked out first,
so the pixel data arrives in memory in big-endian order (RGB565X).

Report V4L2_PIX_FMT_RGB565X so that userspace can detect this and
byte-swap if needed for a little-endian display path.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-04-10 10:47:07 +02:00
Peter Barada 60ae1681a2 arm/imx6: Fix IMX_IRQ definitions
arch/arm/include/imx6/irq.h looks to originally be for i.MX6 Quad
and includes multiple (re)definitions of IRQ names, some of which are
different or don't exist on i.MX6 SoloLite/Solo/Dual/DualLite.
Update irq.h to specify/reserve IRQ names/numbers as defined by the
IM6SDLRM, IMX6DLRM, and IMX6DQRM reference manuals.

Signed-off-by Peter Barada <peter.barada@gmail.com>
2026-04-10 10:28:39 +08:00
raiden00pl 8dfe25b27d .github/build.yml: improve ntfc installation
increase retries and timeout for pip install and try again in case of failure

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-10 09:17:03 +08:00
Filipe Cavalcanti 46d2b59666 tools/ci: upgrade esptool on CI Dockerfile
Docker-Linux / push (push) Has been cancelled
Upgrades esptool from v4.8.dev4 to v5.2.0, enabling support for newer chips.
Also adds 'upgrade pip' to allow this upgrade.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-09 22:56:42 +08:00
Eren Terzioglu da74bb3088 boards/xtensa/esp32: Fix nvblk defconfig
Refresh nvblk defconfig

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-09 20:14:44 +08:00
Eren Terzioglu 44ffb7521b arch/xtensa/esp32: Fix IRAM heap boot issue
Fix IRAM heap boot issue for esp32

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-09 20:14:44 +08:00
Pavel Pisa b6cb94a06d arch/arm/stm32h7: fix stm32_mdio private structure use
The struct stm32_mdio_bus_s aka g_stm32_mdio_bus
has not been referenced at all, because  mdio_register()
allocates its own structure. Then lower half drivers
receive only their respective part in mdio_read()
and mdio_write() because MDIO_WRITE/MDIO_READ provides
only d->lower to the specific lower level drivers.

Signed-off-by: Pavel Pisa <pisa@fel.cvut.cz>
2026-04-09 13:21:50 +02:00
Andre Heinemans 67f1cd288a fs: rpmsgfs_client: add init message to unlock semaphore
Add INIT message which can be used in case ns_announcement isn't
supported on the system.
It unlocks the client flow by calling rpmsg_post() on the semaphore.
Without this or an NS announcement, the client's semaphore will wait
forever.

This is practical when the server side is running from linux userspace
using ioctl where controlling NS announcements is problematic.

Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
2026-04-09 14:07:06 +08:00
zhanghongyu faa4d7ff8d net/udp: fix conn_unlock not called outside conditional block
Move conn_unlock() call outside the if block in psock_udp_sendto()
to ensure the connection lock is always released before returning,
preventing a potential deadlock when the condition is not met.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-04-09 03:04:15 +08:00
aviralgarg05 54ee939f82 arch/espressif: serialize Wi-Fi RX queue access.
Protect the common Espressif Wi-Fi netdev RX queue with a spinlock. The Wi-Fi RX callback enqueues packets while the netdev upper-half RX thread dequeues them, and the IOB queue helpers are not internally serialized.

Under sustained receive traffic that race can corrupt the queue state, strand IOBs, and degrade throughput over time as reported in issue #16915.

Initialize the lock during device setup and use it when clearing the queue on ifup, enqueueing received packets, and dequeuing them for the upper half.

Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
2026-04-08 15:04:31 -03:00
Jiri Vlasak 92b8bc14b8 kinetis/dac: Implement basics DAC
Minimum working implementation for Kinetis' DAC.

Signed-off-by: Jiri Vlasak <jvlasak@elektroline.cz>
2026-04-08 14:06:52 +02:00
zhangyuan29 895a9423ee tools/mksyscall: fix union illegal type for cast
Some compilers (e.g., Tasking) do not allow forced type casting of
unions. When CONFIG_ARCH_TOOLCHAIN_TASKING is enabled, replace the
direct cast with memcpy to copy the union parameter into a local
variable, avoiding the illegal cast while preserving the correct
behavior. Other compilers still use the original cast approach.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-04-08 18:38:39 +08:00
Carlos Sanchez 81d57ad5d5 drivers/mtd/mx25rxx.c: use 4 byte address for large flash memories.
On power-up, MX25L25673G uses 3-byte addresses, so only the lower
128Mb (half the memory) can be accessed. This change ensures 4-byte
addresses are used so the whole memory can be used.

Co-Authored-By: Randy Rossi <randyrossi@geotab.com>
Signed-off-by: Carlos Sanchez <carlossanchez@geotab.com>
2026-04-08 09:52:57 +08:00