Commit graph

24451 commits

Author SHA1 Message Date
buxiasen
9e048af2c3 imx9: usdhc fix dmapreflight rejecting small unaligned buffers
imx9_dmapreflight() rejected unaligned buffers unconditionally, but
dmarecvsetup() has a bounce path via priv->rxbuffer for small
transfers. Add a buflen > sizeof(priv->rxbuffer) check so that
small reads (e.g. ext_csd 512-byte stack buffer) can use the
bounce buffer instead of failing with -EFAULT.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2026-03-24 15:39:07 +08:00
buxiasen
0b75df277d imx95-a55-evk: add USDHC eMMC driver support
Port USDHC1 (eMMC) driver to the i.MX95 FRDM EVK board:
- Create imx95_pinmux.h with SD1/USDHC1 pin definitions
- Add USDHC1 pin macros to board.h
- Create board-level imx9_usdhc.c glue code
- Update imx9_bringup.c with DMA allocator and USDHC init
- Add SCMI clock guards in imx9_usdhc.c (imx95 clock roots
  are owned by System Manager, direct CCM writes are no-ops)
- Fix CCM_CR_USDHC2 copy-paste bug to CCM_CR_USDHC1

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2026-03-24 15:39:07 +08:00
buxiasen
695774a940 imx9: add GPIO support for imx95
Add imx95 GPIO register definitions (same IP block as imx93), fill
g_gpio_base[] array for imx95, include imx95_gpio.h from the common
header, and compile imx9_gpio.c/imx9_gpiobase.c for imx95 in cmake.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2026-03-24 15:39:07 +08:00
buxiasen
25feecbc02 imx9: imx95 fix uSDHC IRQ naming to match NuttX USDHC convention
Rename IMX9_IRQ_uSDHC{1,2,3} to IMX9_IRQ_USDHC{1,2,3} in both arm
and arm64 imx95_irq.h to follow the all-caps naming convention used
by imx93_irq.h and the rest of the NuttX codebase. Remove the now
unnecessary USDHC IRQ alias block from arm64 imx95_irq.h.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2026-03-24 15:39:07 +08:00
buxiasen
7a3b7922ee cmake: arm64/common sync modifyreg sources with Make.defs
arm64_modifyreg8.c, arm64_modifyreg16.c, arm64_modifyreg32.c were
present in Make.defs but missing from CMakeLists.txt, causing link
errors when building with cmake.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2026-03-24 15:39:07 +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
simbit18
1bbe9276df arch\x86_64: Fix Make style
- Remove spaces from make file

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-23 18:16:46 -04:00
simbit18
fbd63b5d2b arch\mips: Fix Make style
- Remove spaces from make file

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-23 18:16:46 -04:00
simbit18
f6ac99d586 arch\ceva: Fix Make style
- Remove spaces from make file

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-23 18:16:46 -04:00
simbit18
572913d422 arch\risc-v: Fix Make style
- Remove spaces from make file

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-23 18:16:46 -04:00
simbit18
cf0b8d04ad arch\xtensa: Fix Make style
- Remove spaces from make file

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-23 18:16:46 -04:00
simbit18
3925879891 arch\arm64: Fix Make style
- Remove spaces from make file

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-23 18:16:46 -04:00
simbit18
464263933d arch\arm: Fix Make style
- Remove spaces from make file

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-23 18:16:46 -04: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
Huang Qi
864fdb090c arch/risc-v/k210: Remove QEMU support
Remove the CONFIG_K210_WITH_QEMU option and associated conditional
code paths. The reasons for removal are:

* Simplifies code path for real hardware by removing QEMU workarounds
* The current QEMU target uses sifive_u machine, which is not designed
  for K210 emulation
* For RISC-V QEMU simulation, the qemu-rv (rv-virt) target is a better
  choice
* Renode can be used as an alternative for K210 simulation if needed

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-03-23 14:25:29 +08:00
simbit18
0a72e2cbf8 arch/arm/src/gd32f4: CMake build implemented for GigaDevice GD32F4xx Series
- added GigaDevice GD32F4xx Series

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-20 08:53:42 +01:00
Carlos Sanchez
ff29b04e66 arch/arm/src/stm32h5: add support for HW RNG.
Driver copied from stm32f7, which includes CEIS/SEIS clearing per reference manual.

Signed-off-by: Carlos Sanchez <carlossanchez@geotab.com>
2026-03-19 19:42:01 +08:00
Huang Qi
8ed1e63292 arch/risc-v/hpm6000: Use WDOGx naming for watchdog peripherals
Fix duplicate watchdog prompts in Kconfig by using unique WDOG0, WDOG1,
WDOG2 names instead of generic 'watchdog' label. This matches the UART
peripheral naming convention in the same file and makes it clear which
watchdog is being configured in menuconfig.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-03-18 15:24:03 -04:00
Huang Qi
078e7099b7 arch/risc-v/k210: Add Watchdog Timer (WDT) driver support.
Add WDT driver for K210 with support for both WDT0 and WDT1 peripherals.
This includes:
- Add k210_wdt.c and k210_wdt.h driver files with interrupt-based
  watchdog timer functionality
- Add hardware register definitions in k210_wdt.h
- Add K210_WDT, K210_WDT0, K210_WDT1 Kconfig options
- Add memory map definitions for WDT0 (0x50400000) and WDT1 (0x50410000)
- Reorder WDT IRQ definitions (IRQ 21, 22) before UART0 (IRQ 33) in irq.h
- Add WDT initialization in board bringup for maix-bit

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-03-18 10:15:36 +08:00
Eren Terzioglu
77f2f7989d arch/xtensa/espressif: Add AES accelerator support
Add AES accelerator support for esp32[-s2|-s3]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-17 18:45:53 -03:00
Eren Terzioglu
76f69c7a8c arch/risc-v/espressif: Add AES accelerator support
Add AES accelerator support for esp32[-c3|-c6|-h2|-p4]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-17 18:45:53 -03:00
wangjianyu3
370921aeba arch/xtensa/esp32s3: add CAM DVP imgdata driver
Add ESP32-S3 CAM controller driver implementing the NuttX imgdata
interface. Supports 8-bit DVP camera input with DMA-based frame
capture, VSYNC interrupt handling, and PSRAM frame buffer allocation.

The driver is sensor-agnostic: resolution and pixel format are
negotiated at runtime through the V4L2 pipeline. XCLK output
(24 MHz) is started during initialization for sensor communication.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-16 17:26:27 -03:00
simbit18
d070e3a9da arch/arm/src/nuc1xx: CMake build implemented for NuMicro NUC100 Series
- added NuMicro NUC100 Series

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-16 16:11:07 -04:00
simbit18
09b0a83423 arch/arm/src/lpc43xx: CMake build implemented for NXP LPC43xx
- added NXP LPC43xx

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-16 16:06:14 -04:00
Huang Qi
a48936788a arch/risc-v/k210: Add sysctl driver for clock and reset control
Add sysctl driver for K210 SoC providing clock and reset control:
- Clock enable/disable with two-stage APB/peripheral enable pattern
- Peripheral reset control with proper timing
- Clock frequency query for PLL, CPU, APB buses, and peripherals
- PLL frequency calculation and CPU frequency configuration

The sysctl driver is built unconditionally for K210 boards as it
provides essential clock and reset control functionality.

Add Kconfig option:
- K210_CPU_FREQ: Target CPU frequency in Hz (default 400MHz)

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-03-16 17:03:41 +01:00
simbit18
1a2fb11955 arch/arm/src/mx8mp: CMake build implemented for NXP i.MX 8M Plus family
- added NXP i.MX 8M Plus family

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-16 11:10:13 +08:00
Eren Terzioglu
515e87391a arch/xtensa/espressif: Add SHA accelerator features
Add SHA accelerator features for esp32[-s2|-s3]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-16 11:09:49 +08:00
Eren Terzioglu
c1f542687b arch/risc-v/espressif: Add SHA accelerator features
Add SHA accelerator features for esp32[-c3|-c6|-h2]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-16 11:09:49 +08:00
simbit18
e12b7d8a82 arch/arm/src/mx8mp: CMake build implemented for NXP LPC17xx/40xx family
- added NXP LPC17xx/40xx family

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-14 09:01:54 +08:00
simbit18
9685cc50e2 arch/risc-v: Fix Kconfig style
- Remove spaces from Kconfig

- Add TABs

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-12 09:08:18 +08:00
Neil Berkman
107b7a9aa1 boards/nucleo-h743zi: Add nxboot bootloader support
Add nxboot bootloader board integration for nucleo-h743zi.

nxboot uses a three-slot layout (primary, secondary, tertiary) with
no scratch partition.

- add STM32_APP_FORMAT_NXBOOT board support and nxboot-specific OTA
  slot defaults
- gate scratch partition configuration on MCUboot, where it applies
- select nxboot linker scripts in the board build logic
- add tertiary OTA partition support in stm32_progmem.c
- add nxboot-loader and nxboot-app defconfigs and linker scripts
- validate the fixed nxboot flash layout used by this board so
  mismatched config values fail at build time instead of producing
  a silently broken image

Signed-off-by: Neil Berkman <neil@xuku.com>
2026-03-11 16:33:26 -03:00
simbit18
3bea64dbb0 arch/arm/src/lpc54xx: CMake added NXP LPC54000 Series
- added NXP LPC54000 Series

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-11 22:43:15 +08:00
anjiahao
718ae3d2c6 stm32l5/nucleo-l552ze: enable LPUART1 console on ST-Link VCP
Three fixes to make LPUART1 work as NSH console on Nucleo-L552ZE-Q:

1. stm32l5_lowputc: add LPUART-specific BRR formula (256 * fCK / baud)
   instead of reusing the standard USART divisor calculation.

2. stm32_boot: enable VDDIO2 and reconfigure LPUART1 GPIOs (PG7/PG8)
   in board_initialize. The low-level setup runs before VDDIO2 is
   enabled, so GPIOG writes silently fail.

3. stm32l5_serial: fix LPUART1 apbclock (PCLK1 not PCLK2), add
   LPUART BRR branch in setformat, cast to uint64_t to prevent
   32-bit overflow in (fCK << 8).

Also switch nsh defconfig from USART3 to LPUART1, add GPIO_LPUART1
pin definitions in board.h, and update board documentation.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2026-03-11 19:24:01 +08:00
Lup Yuen Lee
ebc75b0ed5 arch/tricore: Fix --help-- in Kconfig
This PR fixes a typo at `--help--` that causes NuttX Builds to fail, it should have been `---help---`. This is a recurring problem, NuttX CI uses a different way of handling NuttX Configs (it doesn't use `tools/configure.sh`)

https://github.com/lupyuen/nuttx-riscv64/actions/runs/22929878852/job/66548808341#step:5:161
```
$ tools/configure.sh rv-virt:nsh
arch/tricore/Kconfig:124: syntax error
arch/tricore/Kconfig:123: unknown option "--help--"
arch/tricore/Kconfig:124:warning: ignoring unsupported character ','
arch/tricore/Kconfig:124: unknown option "In"
```

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2026-03-11 13:06:13 +08:00
simbit18
a64047ec1c arch/arm/src/max326xx: CMake build implemented for MAX326xx Series
- added MAX326xx Series

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-10 17:26:42 -04:00
zhangyu117
72be575b1a arch/tricore: support tc4evb board.
add new chip named tc4xx and board tc4evb

Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
2026-03-10 10:38:19 +01:00
zhangyuan29
4be3075a5c arch/tricore: change heap symbol to support multi config
Let the linker script decide the location of the heap.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-03-10 10:38:19 +01:00
zhangyuan29
5349a0ebc0 tricore/cmake: change tc3xx.cmake to chip.cmake
rename tc3xx.cmake to chip.cmake

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-03-10 10:38:19 +01:00
zhangyu117
5b18435f96 arch/tricore: Adjust the related structures of arch and chip.
support tc4evb board, so need adjust some Kconfig

Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
2026-03-10 10:38:19 +01:00
zhangyu117
c98eccf08d arch/tricore: adjust arch-related irq.h
tc3 and tc4 use common irq.h

Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
2026-03-10 10:38:19 +01:00
zhangyuan29
cb161c2ae3 arch/tricore: include arch.h in irq.h
add arch.h in irq.h

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-03-10 10:38:19 +01:00
zhangyuan29
22db8fbc71 arch/tricore: fixed cxx build issue
perform type conversion to eliminate warnings

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-03-10 10:38:19 +01:00
Tiago Medicci Serrano
cda4af9f00 arch/risc-v/espressif/esp32p4: Support ESP32-P4 on NuttX
This commit adds support for the Espressif's RISC-V-based ESP32-P4
chip along with its ESP32-P4-Function-EV-Board board.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-03-09 21:40:25 +01:00
Saurav Pal
8ddcf81484 boards/arm64/bcm2711/raspberrypi-4b: Fix GPIO
* Fix GPIO unspecified behavior on some GPIO ports.
* Fix GPIO undefined behavior caused by uncleared set or reset bits.

Signed-off-by: Saurav Pal <resyfer.dev@gmail.com>
2026-03-08 14:30:40 -04:00
Pavel Pisa
fad037e4ca stm32h7: add configuration for STM32H723 chips (STM32H723ZG and STM32H723VG)
Add definition to setup appropriate reduced SRAM sizes
CONFIG_STM32H7_STM32H72XXX_OR_STM32H73XXX.
The define should make addition of other STM32H72X
and TM32H73X chips easier.

Signed-off-by: Pavel Pisa <pisa@fel.cvut.cz>
2026-03-05 16:51:49 -03:00
Pavel Pisa
f2ecb8b6e9 stm32h7: increase IRQ count to support stm32h723zg
Increase IRQ count and add irqinfo handling in order to support
the stm32h723zg chip.

Signed-off-by: Pavel Pisa <pisa@fel.cvut.cz>
2026-03-05 16:51:49 -03:00
Aditya Yadav
574fc64ab9 sim: Fix linker support and macOS host build issues
Update SIM configuration and CMake toolchain to resolve
linker errors when building on macOS. Adjust POSIX host
implementation to ensure successful compilation and
proper behavior of the sim target.

Modified:
- arch/sim/Kconfig
- arch/sim/src/cmake/Toolchain.cmake
- arch/sim/src/sim/posix/sim_hostmisc.c

Signed-off-by: Aditya Yadav <166515021+aditya0yadav@users.noreply.github.com>
2026-03-05 21:52:58 +08:00
Jari Nippula
5cd57fa27e arch/arm64: handle fatal user exception
Print user exception reason class and description
Print register dump

Signed-off-by: Jari Nippula <jari.nippula@tii.ae>
2026-03-05 20:30:09 +08:00
Michal Lenc
b3656d34b6 arch/arm/src/samX/sam_gpioirq.c: fix pin base address calculation
GPIO PIN base address calculation had double right shift, thus call
to SAM_PION_BASE was always with port = 0 instead of correct port
number. As a result, function sam_gpioirq didn't correctly configure
additional interrupt modes (only rising or falling edge and level
interrupts).

The issue occured on SAMv7 and SAM34 platforms (likely copy-pasted
from one to another).

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-03-05 12:41:43 +08:00
Tiago Medicci Serrano
d2c85a9fa0 arch/risc-v/espressif: Update common-source integration for RISC-V devices
This commit updates the common-source integration for RISC-V-based
Espressif devices (ESP32-C3, ESP32-C6, and ESP32-H2). This is part of a
larger common-source update split by architecture for better maintainability
of the already-supported devices and upcoming devices.

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
- Peripheral drivers (ADC, PWM, LEDC, MCPWM, PCNT, Temperature Sensor, etc.)
- Wireless adapters (Wi-Fi and BLE)
- Board defconfigs for all RISC-V Espressif boards
- 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.

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 built and tested, inclusing `ostest`.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>

To be merged with RISC-V implementation
2026-03-05 12:41:14 +08:00