Commit graph

57805 commits

Author SHA1 Message Date
Filipe Cavalcanti
954081cdd8 xtensa/esp32s3: use common Espressif wireless source
Update the wireless symbols from ESP32S3_* to ESPRESSIF_* for using common layer.
Remove ESP32S3 specific WiFi files and edit build system to use common layer.
2025-02-17 12:03:57 +01:00
raiden00pl
38c348bf9a boards/b-g431b-esc1/cansock: enable SocketCAN utils
boards/b-g431b-esc1/cansock: enable SocketCAN utils, so user can easly use CAN tools

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-17 14:13:29 +08:00
raiden00pl
3a0870df1c boards/nucleo-f446re/cansock: enable SocketCAN utils
boards/nucleo-f446re/cansock: enable SocketCAN utils, so user can easly use CAN tools

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-17 14:13:29 +08:00
raiden00pl
425b2683cd boards/nucleo-f302r8/cansock: enable SocketCAN utils
boards/nucleo-f302r8/cansock: enable SocketCAN utils, so user can easly use CAN tools.

This board has only 64KB of FLASH which requires some additional optimization to fit CAN tools on it.

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-17 14:13:29 +08:00
raiden00pl
27dd63d147 boards/nucleo-g431rb/cansock: enable SocketCAN utils
boards/nucleo-g431rb/cansock: enable SocketCAN utils, so user can easly use CAN tools

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-17 14:13:29 +08:00
raiden00pl
0317df5b43 boards/nucleo-f722ze/cansock: enable SocketCAN utils
boards/nucleo-f722ze/cansock: enable SocketCAN utils, so user can easly use CAN tools

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-17 14:13:29 +08:00
Yanfeng Liu
3fca03f23b board/qemu-armv7r: add PROTECTED mode
This adds initial bootable PROTECTED mode config `qemu-armv7r:pnsh`,
more tests are still needed. Flat mode config qemu-armv7r:nsh still
works.

- The nuttx.ld is for building nuttx ELF
- The nuttx_user.ld is for building nuttx_user ELF

They both include the memory.ld with preprocessing.

To run, use the QEMU mentioned in PR:

```sh
$ qemu-system-arm -M virt -semihosting -nographic -cpu cortex-r5f \
           -device loader,file=nuttx_user -device loader,file=nuttx
```

Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
2025-02-17 14:12:22 +08:00
Yanfeng Liu
64bae41c6b board/qemu-armv7r: rename dramboot.ld
This aligns linker script file name with built program name so that
nuttx.ld helps to build nuttx ELF

Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
2025-02-17 14:12:22 +08:00
xuxingliang
1b94d0e2cf nxgdb/mm: show pool expand queue size
nqueue has been added to output.

E.g.
(gdb) mm pool
Total 16 pools
                      total blocksize     bsize  overhead     nused     nfree    nifree   nwaiter    nqueue
 Umem@0x10048dc        4068        16        16         0         3       251         0         0         1
 Umem@0x100493c        4068        32        32         0         3       124         0         0         1
 Umem@0x100499c        4036        48        48         0        10        74         0         0         1
 Umem@0x10049fc        4036        64        64         0         1        62         0         0         1
 Umem@0x1004a5c           0        80        80         0         0         0         0         0         0
 Umem@0x1004abc           0        96        96         0         0         0         0         0         0
 Umem@0x1004b1c           0       112       112         0         0         0         0         0         0
 Umem@0x1004b7c           0       128       128         0         0         0         0         0         0
 Umem@0x1004bdc           0       144       144         0         0         0         0         0         0
 Umem@0x1004c3c           0       160       160         0         0         0         0         0         0
 Umem@0x1004c9c           0       176       176         0         0         0         0         0         0
 Umem@0x1004cfc           0       192       192         0         0         0         0         0         0
 Umem@0x1004d5c        3956       208       208         0         1        18         0         0         1
 Umem@0x1004dbc           0       224       224         0         0         0         0         0         0
 Umem@0x1004e1c           0       240       240         0         0         0         0         0         0
 Umem@0x1004e7c           0       256       256         0         0         0         0         0         0
(gdb)

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2025-02-16 11:23:38 -03:00
JianyuWang
1e7532c381 drivers/thermal: Break loop if matching active trip point
Co-authored-by: Donny(董九柱) <70748590+Donny9@users.noreply.github.com>
2025-02-16 11:22:41 -03:00
wangjianyu3
fef1a0702d drivers/thermal/dummy: Add another passive cooling device
For case that CPUFreq was not enabled.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-02-16 11:22:41 -03:00
wangjianyu3
0b633946c0 drivers/thermal: Add support for passive trip point
Spliting `THERMAL_NORMAL` to `THERMAL_ACTIVE` and `THERMAL_PASSIVE`,
to support different update intervals for thermal zone.

Active/Passive from [kernel.org](https://www.kernel.org/doc/Documentation/devicetree/bindings/thermal/thermal.txt):

  * Cooling device nodes

  Cooling devices are nodes providing control on power dissipation. There
  are essentially two ways to provide control on power dissipation. First
  is by means of regulating device performance, which is known as passive
  cooling. A typical passive cooling is a CPU that has dynamic voltage and
  frequency scaling (DVFS), and uses lower frequencies as cooling states.
  Second is by means of activating devices in order to remove
  the dissipated heat, which is known as active cooling, e.g. regulating
  fan speeds. In both cases, cooling devices shall have a way to determine
  the state of cooling in which the device is.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-02-16 11:22:41 -03:00
Ville Juven
c57c95755d mpfs/mpfs_irq.c: Enable interrupts on all harts
Instead of enabling an interrupt on the calling hart, enable it on every
hart. This should balance the interrupt load some, especially in cases
where the interrupt source is enabled only once (which will almost
certainly happen on CPU 0 only).

Signed-off-by: Ville Juven <ville.juven@unikie.com>
2025-02-16 10:25:19 +01:00
buxiasen
af0aa78cbc arm-a/shm: fix issue when use shm in arm-a
When the l1entry first add to shm, mssing l1entry add.
shm mmu flags should use udata flags.
l1entry record in shm[] and should not use ~SECTION_MASK

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-02-15 18:44:26 -03:00
buxiasen
71888c5c5f arm-v7a: fix mmu record list occupation when more than 1M
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-02-15 18:44:26 -03:00
Andre Heinemans
e7fdaeb61d imx9: scmi: update to scmi 3.2 spec 2025-02-15 12:28:10 -03:00
Ramin Seyed-Moussavi
70d092061d arch/arm/max326xx: add max32690 gpio driver
definitions for the max32660 moved to max32660_gpio.h

the max32690 has much more options for the gpios
so this is a complete new driver
2025-02-15 10:23:01 -03:00
Michal Lenc
c70a322ec7 samv7/sam_1wire.c: fix compilation warnings
chip/sam_1wire.c:921:7: warning: implicit declaration of function 'sam_usart0_enableclk' [-Wimplicit-function-declaration]
  921 |       sam_usart0_enableclk();

The same warning applied for other uart/usart peripherals configured
as 1 wire.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-02-15 09:51:29 -03:00
Alan Carvalho de Assis
edba1b5701 DOC: Fix documentation to include checkpatch.sh
Unfortunately new contributors used to submit code with many coding
issues. And in fact it is our guilt: our codign style documentation
doesn't say to them how to use the checkpatch to find the issues.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-02-14 18:25:44 +01:00
Alan Carvalho de Assis
3594f9d879 stm32: Add support to TIOCGICOUNT ioctl
This commit adds support to TIOCGICOUNT for STM32, this way a
userspace application can collect information about UART errors.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-02-14 18:24:47 +01:00
Alan Carvalho de Assis
5a6e5a8fb4 serial: Add struct serial_icounter_s and CONFIG_SERIAL_TIOCGICOUNT
This commit add support to the serial_icounter_s struct used with
TIOCGICOUNT to report U[S]ART errors such as frame, parity, overrun,
etc.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-02-14 18:24:47 +01:00
Huang Qi
285a846af1 docs: Add editor integration guide for Rust development in NuttX
Summary:
- Added a section on editor integration for Rust development in NuttX, focusing on VS Code and rust-analyzer
- Provides steps to configure `.vscode/settings.json` to recognize Rust project structure and optional settings for custom target specifications

Impact:
- Enhances developer productivity by providing better IDE support for Rust in NuttX
- No impact on existing functionality; the guide is purely informational and configuration-based

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-02-14 13:23:13 -03:00
Peter van der Perk
4907607f3a imx95: make gpio irq configurable per bank
This avoids receiving interrupt from unused GPIO banks
2025-02-14 11:37:04 -03:00
Matteo Golin
576a9990c5 drivers/sensors/lsm6dso32: Fixed typo in device address registration.
The valid addresses should be 0x6a and 0x6b, not 0x6c. Now the device
can be registered with the correct addresses without failing the
assertion.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-02-14 10:37:21 +01:00
raiden00pl
107b37561b boards/nucleo-f303re: fix CAN bit timings
boards/nucleo-f303re: fix CAN bit timings, calculated with http://www.bittiming.can-wiki.info/

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-14 10:36:23 +01:00
raiden00pl
a62078bb43 boards/b-g431b-esc1: fix CAN bit timings
boards/b-g431b-esc1: fix CAN bit timings, calculated with https://phryniszak.github.io/stm32g-fdcan/

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-14 10:36:23 +01:00
raiden00pl
292906472e boards/nucleo-f446re: fix CAN bit timings
boards/nucleo-f446re: fix CAN bit timings, calculated with http://www.bittiming.can-wiki.info/

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-14 10:36:23 +01:00
raiden00pl
fa062daeec boards/nucleo-f302r8: fix CAN bit timings
boards/nucleo-f302r8: fix CAN bit timings, calculated with http://www.bittiming.can-wiki.info/

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-14 10:36:23 +01:00
raiden00pl
cbba667112 boards/nucleo-g431rb: fix CAN bit timings and unify bitrate
boards/nucleo-g431rb: fix CAN bit timings, calculated with https://phryniszak.github.io/stm32g-fdcan/

also update bit rate to 250000 so it's the same as for other stm32 boards

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-14 10:36:23 +01:00
raiden00pl
fb6e6b4b3a boards/nucleo-f722ze: fix CAN bit timings
boards/nucleo-f722ze: fix CAN bit timings, calculated with http://www.bittiming.can-wiki.info/

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-14 10:36:23 +01:00
Tiago Medicci Serrano
fc3babb113 arch/risc-v: move stack boundary check into backtrace
This modification moves the boundary check inside backtrace function.
Affects builds with CONFIG_ARCH_INTERRUPSTACK>15.
2025-02-14 09:40:38 +08:00
Jukka Laitinen
18c3e76c55 libs/libc/modlib/modlib_bind.c: Fix system crash if modlib_bind fails
Addrenv is changed to the newly created process' one in the beginning of
modlib_bind, and needs to be changed always when returning from the function;
also in error cases.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-02-14 09:39:56 +08:00
raiden00pl
5b9d535ce6 boards/b-g431b-esc1: configure CAN_TERM pin also for SocketCAN interface
boards/b-g431b-esc1: configure CAN_TERM pin also for SocketCAN interface

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-13 18:45:55 -03:00
chao an
2e21426683 qemu-armv8a/ivshmem: add ivshmem chapter
An example implementation for OpenAMP based on the Inter-VM share memory(ivshmem)::

rpproxy_ivshmem:  Remote slave(client) proxy process.
rpserver_ivshmem: Remote master(host) server process.

Please refer to the official Qemu ivshmem documentation for more information:

https://www.qemu.org/docs/master/system/devices/ivshmem.html

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-02-13 11:03:26 -03:00
hujun5
f22b93b337 sched/spin_lock: rename raw_spin_lock to spin_lock_notrace
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-02-13 20:48:15 +08:00
hujun5
42e6825cbc Revert "spinlock: add sched_lock to spin_lock_irqsave"
This reverts commit edc049117b.
2025-02-13 20:48:15 +08:00
hujun5
ac26f9c690 Revert "sched/wqueue: some minor improve to reduce sched_lock range"
This reverts commit 2779989add.
2025-02-13 20:48:15 +08:00
Xiang Xiao
05ec313bc4 Revert "use small lock in following files:"
This reverts commit bbaf1ff9fd.
2025-02-13 14:15:43 +08:00
Xiang Xiao
31e92f3bb5 Revert "use small lock in following files:"
This reverts commit d84ba608a1.
2025-02-13 14:15:43 +08:00
Xiang Xiao
6c7b440f47 Revert "Use small lock to protect usbdev and endpoint in AVR."
This reverts commit 007a3fffac.
2025-02-13 14:15:43 +08:00
Xiang Xiao
8fd8af9edc Revert "Use small lock to protect usbdev and endpoint in sim."
This reverts commit 4558db18e4.
2025-02-13 14:15:43 +08:00
Xiang Xiao
556a81d8e4 Revert "Use small lock to protect usbdev and endpoint in arch mips"
This reverts commit ac2b495945.
2025-02-13 14:15:43 +08:00
Xiang Xiao
a488b22b22 Revert "Use small lock to protect usbdev and endpoint in arch renesas."
This reverts commit e211904640.
2025-02-13 14:15:43 +08:00
Xiang Xiao
2301fd5d25 Revert "Use small lock to protect usbdev and endpoint in arch ARM."
This reverts commit e177ff9c0c.
2025-02-13 14:15:43 +08:00
Xiang Xiao
6d2f81f490 Revert " Use small lock to protect timer related resources in arch ARM."
This reverts commit 5f77da4c51.
2025-02-13 14:15:43 +08:00
Xiang Xiao
52d0b4ccf4 Revert "Use small lock to protect resources related to cpufifo."
This reverts commit 8b5ea40a2b.
2025-02-13 14:15:43 +08:00
Xiang Xiao
191e3ba1f7 Revert "Use small lock to protect resources related to timers in arch risc-v, xtensa and tricore."
This reverts commit ecaddbb0aa.
2025-02-13 14:15:43 +08:00
Xiang Xiao
9e687ca896 Revert "Use small lock to protect resources related to irq in arch avr, hc, mips and or1k."
This reverts commit bed3bd0852.
2025-02-13 14:15:43 +08:00
Xiang Xiao
96093574fc Revert "Use small lock to protect resources related to lpi2c."
This reverts commit 0b542ff824.
2025-02-13 14:15:43 +08:00
Xiang Xiao
f9076d53c4 Revert "Use small lock to protect resources related to irq in arch risc-V and xtensa."
This reverts commit 099801630d.
2025-02-13 14:15:43 +08:00