Commit graph

57884 commits

Author SHA1 Message Date
Kevin Witteveen (MartiniMarter)
20ed2e689c drivers/wireless/lpwan/sx126x:
[Experimental]
This adds a driver for the SX126x (SX1261 and SX1262) LoRa chips.
All functions and definitions are coming directly from the DS SX1261-2 V2.1 datasheet.

Signed-off-by: Kevin Witteveen (MartiniMarter) <kevinwit1999@gmail.com>
2025-02-27 16:03:18 -03:00
Michal Lenc
4e70cc1e69 samv7/pwm: add support for PWMIOC_FAULTS_FETCH_AND_CLEAR ioctl
This ioctl fetches and clears PWM faults.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-02-27 11:47:51 -03:00
Michal Lenc
86917b4777 drivers/pwm: add PWMIOC_FAULTS_FETCH_AND_CLEAR ioctl for fault clears
This ioctl clears the active fault inputs. Some faults can be latched
(still active even if the source is not active anymore), so they have
to be cleared from the software. The argument is a pointer to unsigned
long bitmask variable. This bitmask specifies which faults are to be
cleared.

The ioctl also can fetch the faults active prior to the clear. These
faults are saved to the argument specifying which faults are to be
cleared. Therefore passing zero bitmask means the driver will only return
active faults and clear none. Passing NULL pointer means the driver
will clear all active and return none.

The implementation of this ioctl is per driver.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-02-27 11:47:51 -03:00
Stepan Pressl
e53de96692 Documentation: add cyclictest benchmark utility documentation
The documentation concerns the cyclictest in apps/benchmarks/cyclictest.
The documentation describes the usage of the NuttX device timer
in this benchmark, the app usage and an example with an output.

Signed-off-by: Stepan Pressl <pressl.stepan@gmail.com>
2025-02-27 11:30:55 -03:00
Eren Terzioglu
8d86340b98 Docs/esp32: Add brickmatch config doc for esp32-devkitc
Add missing documentation for brickmatch defconfig for esp32-devkitc

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-02-27 12:12:20 +01:00
Eren Terzioglu
a66e58cf59 Docs/brickmatch: Update brickmatch game docs
Update brickmatch game docs after I/O option additions

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-02-27 12:12:20 +01:00
chao an
52a13a8351 sched/spin_lock: continue work to rename raw_spin* to spin_*_notrace
Some improvements are made to the following commits:

| commit f22b93b337
| Author: hujun5 <hujun5@xiaomi.com>
| Date:   Fri Jan 31 07:01:07 2025 +0800
|
|     sched/spin_lock: rename raw_spin_lock to spin_lock_notrace
|
|     Signed-off-by: hujun5 <hujun5@xiaomi.com>

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-02-27 06:11:58 +02:00
George Poulios
aa5d119bc3 arch/arm64: fix boot stage prints with CONFIG_ARCH_EARLY_PRINT=y
`boot_stage_puts` used by early asm calls arm64_lowputc() for each
character in a loop. During that loop it uses x1 as the pointer to
the next character to be printed. However, x1 is clobbered by
arm64_lowputc(), resulting in undefined behaviour (only the first
character of the string is guaranteed to be printed).

Fix this by using x19 instead.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-02-26 20:47:05 +02:00
Eren Terzioglu
c7702894fe documentation/esp32[s2|s3]: Add I2C slave support
Add I2C Slave support into docs for xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-02-26 16:32:40 +01:00
Eren Terzioglu
06ef4a8084 boards/xtensa/esp32[s2|s3]: Add I2C slave support
Add I2C slave board support for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-02-26 16:32:40 +01:00
Eren Terzioglu
4d89d7186e arch/xtensa/esp32[s2|s3]: Add I2C slave support
Add I2C slave support on arch level for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-02-26 16:32:40 +01:00
Eren Terzioglu
7658c39304 documentation/esp32[c3|c6|h2]: Add I2C slave support
Add I2C slave support into docs 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
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
59fe350708 arch/risc-v/espressif: Add I2C slave support
Add I2C slave support for arch layer to risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-02-26 16:32:40 +01:00
Ville Juven
8ab87c582b arch/mcx-nxxx: Add GPIO interrupt support
Add support for GPIO interrupts.
2025-02-26 10:18:22 -03:00
Ville Juven
d7811c4b6e arch/mcx-nxxx: Enable GPIO clocks.
For the I/O pins to work, the clock gate needs to be opened.
2025-02-26 10:18:22 -03:00
Ville Juven
1d57ed7807 arch/mcx-nxxx: Add GPIO port 0
The port numbers go from 0-7 (and up) for this architecture; port 0 was
missing.
2025-02-26 10:18:22 -03:00
Tiago Medicci Serrano
fcff16a0a8 arch/risc-v: Add ARCH_HAVE_RAMFUNCS to ESP32-C6 and ESP32-H2
Following the https://github.com/apache/nuttx/pull/14741, add the
`ARCH_HAVE_RAMFUNCS` config to ESP32-C6 and ESP32-H2 to suppress
the RWX memory region warning.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-02-26 09:16:18 +01:00
leocafonso
98b9cc25ef Documentation/ra4m1: Add documentation for Renesas RA4M1 MCU and arduino-r4-minima
Signed-off-by: leocafonso <leocafonso@gmail.com>
2025-02-25 13:14:48 -03:00
leocafonso
5697053540 boards/ra4: Add support for Arduino-R4-Minima
Add support for arduino-r4-minima.
Created defconfig and board source files for:
* nsh
* nsh-leds

Signed-off-by: leocafonso <leocafonso@gmail.com>
2025-02-25 13:14:48 -03:00
leocafonso
f4b6cf2b9f arch/ra4: Add support for Renesas RA4M1 MCU
Add basic support for RA4M1.
The following perpheral are added:
* GPIO
* SCI (UART)
* Clock (Just internal clock - HOCO)

Signed-off-by: leocafonso <leocafonso@gmail.com>
2025-02-25 13:14:48 -03:00
Marco Casaroli
16e2e77bdf esp32: use mcuboot for qemu_openeth config
Now, espressif qemu supports MCUboot, so we can switch the app
format.
2025-02-25 13:13:40 -03:00
Marco Casaroli
b4c827cee3 esp32s3: use mcuboot for qemu_openeth config
Now, espressif qemu supports MCUboot, so we can switch the app
format.

The build was failing with the legacy app format because
_ext_ram_bss_end and _ext_ram_bss_start are not defined in the
legacy linker file.
2025-02-25 13:13:40 -03:00
Filipe Cavalcanti
b89ad74660 xtensa/esp32: use common Espressif wireless source
Update the wireless symbols from ESP32_* to ESPRESSIF_* for using common layer.
Remove ESP32 specific WiFi files and edit build system to use common layer.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-02-25 12:35:46 +01:00
SPRESENSE
96de2e20c1 arch: cxd56xx: Improve i2c initialize function
During I2C communication between non-Spresense devices is performed,
the I2C bus may freeze after initialization of the Spresense I2C.
As a workaround, switch the pin mode to I2C at the end of the i2c
initialization function.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-02-25 10:55:20 +01:00
SPRESENSE
d521b926aa arch: cxd56xx: Improve i2c reset function
During I2C communication between non-Spresense devices is performed,
the I2C bus may freeze after initialization of the Spresense I2C.
As a workaround, add clock gating process and disable GPIO input
to the I2C reset function.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-02-25 10:55:20 +01:00
chao an
c782131c5f syslog/rpmsg_server: fix build break if enable SYSLOG_RPMSG/SYSLOG_RPMSG_SERVER
syslog/syslog_rpmsg_server.c:66:13: error: conflicting types for 'syslog_rpmsg_write';
      have 'void(const char *, size_t,  const char *, size_t)' {aka 'void(const char *, unsigned int,  const char *, unsigned int)'}
   66 | static void syslog_rpmsg_write(FAR const char *buf1, size_t len1,
      |             ^~~~~~~~~~~~~~~~~~
In file included from syslog/syslog_rpmsg_server.c:36:
nuttx/include/nuttx/syslog/syslog_rpmsg.h:51:9: note: previous declaration of
  'syslog_rpmsg_write' with type 'ssize_t(const syslog_channel_t *, const char *, size_t)' {aka 'int(const struct syslog_channel_s *, const char *, unsigned int)'}
   51 | ssize_t syslog_rpmsg_write(FAR syslog_channel_t *channel,
      |         ^~~~~~~~~~~~~~~~~~

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-02-25 10:51:37 +01:00
Alan Carvalho de Assis
8b5a45cee6 stm32l4r9ai-disco: Add support to bringup
Many STM32L4 boards are missing stm32_bringup.c. That confusion
was created when stm32_appinit.c was created. It introduced a new
way to do the board initialization without depending on NSH arch
specific initialization.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-02-25 09:32:25 +01:00
Alan Carvalho de Assis
5040272505 stm32l476vg-disco: Add support to bringup
Many STM32L4 boards are missing stm32_bringup.c. That confusion
was created when stm32_appinit.c was created. It introduced a new
way to do the board initialization without depending on NSH arch
specific initialization.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-02-25 09:32:25 +01:00
Alan Carvalho de Assis
e2a85dd2db nucleo-l496zg: Add support to bringup
Many STM32L4 boards are missing stm32_bringup.c. That confusion
was created when stm32_appinit.c was created. It introduced a new
way to do the board initialization without depending on NSH arch
specific initialization.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-02-25 09:32:25 +01:00
Alan Carvalho de Assis
cfd05250fa nucleo-l476rg: Add support to bringup
Many STM32L4 boards are missing stm32_bringup.c. That confusion
was created when stm32_appinit.c was created. It introduced a new
way to do the board initialization without depending on NSH arch
specific initialization.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-02-25 09:32:25 +01:00
Alan Carvalho de Assis
7e5d1ec7d7 nucleo-l432kc: Add support to bringup
Many STM32L4 boards are missing stm32_bringup.c. That confusion
was created when stm32_appinit.c was created. It introduced a new
way to do the board initialization without depending on NSH arch
specific initialization.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-02-25 09:32:25 +01:00
SPRESENSE
eef122260b arch: cxd56xx: Update delay value for subcore
Update delay value for subcore referred by up_mdelay function.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-02-25 14:46:10 +08:00
Felipe Moura
70f070fa1c riscv/esp32c6: Fix issue related esp32c6 usbserial driver.
This commit disables optimization that alters ESP32C6 interrupt registers.
Without this optimization, the USB serial driver does not work properly.
This is a temporary workaround until a proper fix is found.

Signed-off-by: Felipe Moura de Oliveira <moura.fmo@gmail.com>
2025-02-24 15:17:46 +01:00
Eren Terzioglu
713c10717c esp32[s2|s3|c3|c6|h2]: Update common layer
Update common layer to prevent build errors

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-02-24 10:35:11 -03:00
Eren Terzioglu
5865d2a8ff esp32[s2|s3]: Enhance SPIRAM/PSRAM support
Add esp_spiram_writeback_range function to flush some areas of spiram cache

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-02-24 10:35:11 -03:00
Michal Lenc
425ddc7f72 lcd/st7789: fix incorrect buffer count for 3 wire RAM write
If st7789_wrram is called with count = 1, then the entire buffer should
be sent. However, in 3 wire mode, the driver has to send the buffer
row by row because of additional data flag. The number of rows (count)
can't be ST7789_YRES in this case, but only the number of rows in
the buffer (this is write size / row size , where row size is
ST7789_XRES * ST7789_BYTESPP). This also applies only if we want to
write size larger than row size, because st7789_putrun allows to
write just a part of a row.

This fixes the incorrect behavior of the display in 3 wire mode if
the display is split into more buffer writes (as in LCD driver for
example, FB driver did not face this issue).

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
Co-authored-by: Martin Krasula <krasula@atlas.cz>
2025-02-24 09:51:13 +01:00
Michal Lenc
54954e55b5 samv7/pwm: fix incorrect write of CMRx register
DTE (dead time enable) is the 17th bit in CMRx (channel mode) register.
Function pwm_set_polarity did however read and write this register as
16 bit large, therefore dead time generation was always disabled.
This fixes the issue, pwm_set_polarity now reads the register as 32
large.

Also set the initial value of CMRx correctly in pwm_setup().

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-02-23 23:21:44 +01:00
Tiago Medicci Serrano
8956fc440f xtensa/esp32[|s3]: re-enable cache during exception handler
This commit implements re-enabling the cache before the exception
handler for ESP32-S3 and removes unnecessary checks (cache should
always be re-enabled during an exception handler and disabled again
after processed, except for ESP32-S3 that implements no recoverable
exceptions).

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-02-23 07:51:14 -03:00
Michal Lenc
7ccd6e9041 samv7/pwm: add support for latched fault inputs
This adds configuration option for every fault input, that can be
latched (kept even after the input value is below the threshold) or
volatile (PWM is automatically enabled once the output polarity goes
back to the normal state).

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-02-23 07:49:34 -03:00
Jukka Laitinen
824dd70617 arch/risc-v/src/mpfs: Move PLIC interrupt enable/disable to mpfs_plic.c and handle pending interrupts
- Move PLIC interrupt enable and disable functions into mpfs_plic.c
- When enabling interrupts, always clear pending interrupt
- Remove race conditions between irq enable/disable by adding spinlock
  - An interrupt may trigger on one hart in the middle of enabling the interrupts - then the interrupt
    handler might call up_disable_irq.

A pending interrupt would trigger immediately when enabling the interrupt source,
but this is not expected. The interrupt source is level sensitive, so it should
only trigger if the source is active at the time when it is enabled. Not if it
was active sometime in the past.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-02-23 09:51:37 +08:00
Jukka Laitinen
ee98106bc5 arch/risc-v/src/mpfs: Implement wrcomplete support for coremmc driver
If CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE is defined, the coremmc driver
uses SD card's dat0 line to detect whether the sd card is still busy.

This requires that the FPGA design using coremmc block wires dat0 line
to some fabric irq; and configures CONFIG_MPFS_COREMMC_WRCOMPLETE_IRQNUM
to point to that. Default for the irq number is 4. (MSS_INT_F2M_4)

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-02-23 09:49:24 +08:00
buxiasen
e072771516 binfmt/copyactions: fix comments, make the actions life cycle more clear
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-02-23 09:46:14 +08:00
buxiasen
0e5cb896c4 binfmt/copyaction: fix prev->flink did not use from kmalloc.
We should not modify the input actions, casing when kernel build,
userspace call posix_spawn touch kernel address.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-02-23 09:46:14 +08:00
Ville Juven
17a80e90bd arch/mcx-nxxx: Add support for NXP MCX-N236 CPU
This adds minimal support for NXP MCX-N236 CPU. Peripherals supported are:
- GPIO
- PINMUX
- CLOCK
- LPUART

An example board, FRDM-MCXN236 is also added, with a basic profile that
boots into nsh.

Signed-off-by: Ville Juven <ville.juven@unikie.com>
2025-02-22 16:12:06 -03:00
Laczen JMS
34aa17b7a0 sixlowpan: improve tcp support.
Update the handling of tcp packets over sixlowpan. `tcp_ipv6_input()`
can update the dev->d_iob. Assigning ipv6 to IPv6BUF makes sure that
the correct buffer is used.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-02-22 07:58:26 -03:00
wangjianyu3
9f85eaf3cb drivers/thermal: Fix work not queued after getting temperature fails
The work will be stopped after get_temp() fails.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-02-22 07:56:21 -03:00
fd6d804623 tools/nxstyle: handle case statement
fix nxstyle so it throw error if case statement is not on new line
2025-02-21 16:26:41 -05:00
lijing.ly
eadfb5a2f8 boards/Kconfig: Add ARCH_CHIP_ESP32S3WROOM1N16R8 configuration item for Espressif ESP32-S3 DevKit
Signed-off-by: lijing.ly <lijing.ly@bytedance.com>
2025-02-21 15:39:46 +01:00
simbit18
35a793ed17 [nxstyle] fix Relative files path
fix Relative file path does not match actual file.

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-02-21 15:36:05 +01:00