Commit graph

58120 commits

Author SHA1 Message Date
Jinliang Li
d5db7d1cee libc/arm: optimize crc32/crc32c for arm
Optimize crc32 standard(poly:0x04C11DB7) and crc32
castagnoli(poly:0x1EDC6F41) with arm crc32 extension instructions.

For example, crc32 standard caculates(lookup crc32 table) 1812 bytes data,
reduced the time from 118 us to 14 us through optimization.

Performance improved ~700%

Signed-off-by: Jinliang Li <lijinliang1@lixiang.com>
2025-04-04 09:51:50 -03:00
wangjianyu3
586d216a40 boards/szpi-esp32s3: Add support for FT5X06
Add support for FT5X06 touchscreen driver.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-04 09:50:19 -03:00
wangjianyu3
7ffa06a78d drivers/ft5x06: Remove wakeup and nreset check
Remove unused wakeup and nreset check of FT5X06.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-04 09:50:19 -03:00
Laczen JMS
dfc0053c2d boards/xtensa/esp32/esp32-devkitc: update espnow
Update the esp32-devkitc board for espnow changes.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-04-04 06:49:50 +08:00
Laczen JMS
34bb3c88a2 arch/xtensa/src/esp32: remove espnow
remove espnow pktradio from arch/xtensa/src/esp32

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-04-04 06:49:50 +08:00
Laczen JMS
58463d9484 arch/xtensa/src/common/espressif: Introduce espnow
Move espnow:
 arch/xtensa/src/esp32 -> arch/xtensa/src/common/espressif

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-04-04 06:49:50 +08:00
chao an
58ed9934c2 syscall/csv: add nxsem_tickwait() to userspace
mutex_tickwait() depends on this API

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-04-03 20:13:55 +08:00
chao an
0d6de4c0a7 sched/mutex: add ticked lock version for mutex/rmutex
Added ticked lock version for mutex to reduce time calculation overhead

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-04-03 20:13:55 +08:00
Ville Juven
cc64c026d9 mpfs/mpfs_entrypoints.c: Change atomic_load > atomic_read
Otherwise we get an undefined symbol error when LIBC_ARCH_ATOMIC is
defined.

Signed-off-by: Ville Juven <ville.juven@unikie.com>
2025-04-03 18:34:11 +08:00
YAMAMOTO Takashi
90e9b2426d add a comment on littlefs_attr_s to explain what it is
i couldn't find any documenation about this attribute.
this comment is purely based on my reading of the code.

Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
2025-04-03 16:23:42 +08:00
Jani Paalijarvi
02c9030e88 drivers/bch: Add CONFIG_BCH_FORCE_INDIRECT
This implements similar functionality than CONFIG_FAT_FORCE_INDIRECT
because in some use cases (e.g. when CONFIG_BUILD_KERNEL) it is not possible to
write directly from user buffer.

Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2025-04-03 16:21:51 +08:00
Jinliang Li
95ba78e1bd arch/armv8-r: Enable fpu before arm_el_init
In the arm_el_init function, the FPU might be used, for example, the
assembly optimization of memcpy in arm_tcm_load uses FPU and NEON
instructions and registers.
Therefore, it's important to initialize the
FPU as early as possible to prevent system hangs that could occur if the
FPU is used without being initialized.

Signed-off-by: Jinliang Li <lijinliang1@lixiang.com>
2025-04-02 21:07:54 +08:00
buxiasen
41cbbb0c12 arch/arm/imx6: fix missed comma
Will Compile error if enable IMX6_UART2..5

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-04-02 21:05:52 +08:00
chao an
0bfb850b52 drivers/serial/uart_rpmsg: simplify initialization process of uart_rpmsg
Merge multiple heap allocate into one

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-04-02 20:56:01 +08:00
raiden00pl
5d2e0f8c80 arch/esp32s3/esp32s3_wdt_lowerhalf.c: fix printf warning
fix printf warning:

chip/esp32s3_wdt_lowerhalf.c:497:17: error: format '%u' expects argument of
type 'unsigned int', but argument 4 has type 'long unsigned int'

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-04-02 08:29:00 -03:00
raiden00pl
649e979f58 arch/esp32s2/esp32s2_wdt_lowerhalf.c: fix printf warning
fix printf warning:

chip/esp32s2_wdt_lowerhalf.c:493:17: error: format '%u' expects argument of
type 'unsigned int', but argument 4 has type 'long unsigned int'

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-04-02 08:29:00 -03:00
raiden00pl
1a6cb4c784 arch/esp32s3/esp32s3_ble_adapter.c: fix printf warning
fix printf warning:

chip/esp32s3_ble_adapter.c:1065:13: error: format '%u' expects argument of
type 'unsigned int', but argument 3 has type 'long unsigned int'

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-04-02 08:29:00 -03:00
raiden00pl
ea28e08be4 arch/esp32/esp32_ble_adapter.c: fix printf warning
fix printf warning:

  chip/esp32_ble_adapter.c:1137:13: error: format '%u' expects argument of
  type 'unsigned int', but argument 3 has type 'long unsigned int'

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-04-02 08:29:00 -03:00
Kerogit
ac42add946 nuttx/clock: make NSEC_PER_USEC and others long
On AVR architecture, the compiler apparently sometimes truncates NSEC_PER_TICK
to 16bit value, leading to clock_time2ticks returning incorrect results. This
was encountered while attempting to add tickless OS support for AVR
architecture but seemed to affect non-tickless mode of operation as well.

This patch marks NSEC_PER_USEC (and to be safe, USEC_PER_MSEC and MSEC_PER_SEC
too) as long.
2025-04-02 08:29:00 -03:00
ouyangxiangzhen
87c217ad93 arch/x86_64: Fix strict-prototype warning.
This commit fixed a strict-prototype warning.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-04-02 12:01:46 +08:00
ouyangxiangzhen
9f01e5c972 libc/stream: Support lowsyslog.
This commit added support for lowsyslog.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-04-02 12:01:46 +08:00
ouyangxiangzhen
0c9a239b9e arch/x86_64: Initialize framebuffer early-print.
This commit initialized framebuffer early-print if `CONFIG_MULTBOOT2_FB_TERM` is defined. This enabled `early_kprintf` to output debug information using framebuffer.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-04-02 12:01:46 +08:00
ouyangxiangzhen
d7cea12af3 arch/x86_64: Fix fb_putc for early-print.
This commit fixed `fb_putc` for early-print.
- Modified fb_putc to return an int instead of void.
- Handled error cases where the character is not found by replacing it with a '.'.
- Ensured cursor position is updated correctly after each character is processed.
- Fixed above 4G framebuffer memory mapping.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-04-02 12:01:46 +08:00
Tiago Medicci Serrano
b388b84af6 arch/risc-v/esp32h2: Set the default SPI flash frequency to 64MHz
The default frequency for the SPI flash chip on ESP32-H2 is 64MHz.
Although it was being set to 48MHz, this isn't a valid value. The
device, however, must be flashed using 48MHz when 64MHz is set.
2025-04-02 09:53:27 +08:00
wangjianyu3
38652e19aa drivers/lcd/st7789: Support mirror V
Mirror X and V can rotate the screen 90 degrees.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-02 09:51:32 +08:00
liujp
c4b81bb922 feat(nuttx): implement stm32h7 ltdc double buffer on layer 1
Signed-off-by: liujp <liujp@xiaomi.com>
2025-04-01 17:00:02 -03:00
liujp
c9fd44a0ec fix(bug): fix ft5x06_sample error
Signed-off-by: liujp <liujp@xiaomi.com>
2025-04-02 01:42:59 +08:00
wangjianyu3
c5afcd78f1 drivers/lcd/st7789: Send RAMCTRL if little endian
Send RAMCTRL command only when RGB data in little endian.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-02 01:03:48 +08:00
Ville Juven
04df2ccead arch/mpfs/mpfs_usb.c: Replace big kernel lock with spin lock
Remove call to enter_critical_section (big kernel lock) and replace it
with a smaller lock to protect the USB clock and its reference counter.

Signed-off-by: Ville Juven <ville.juven@unikie.com>
2025-04-01 20:49:43 +08:00
Ville Juven
4c7fedebd1 arch/mpfs/mpfs_ethernet.c: Replace big kernel lock with spin lock
Remove call to enter_critical_section (big kernel lock) and replace it
with a smaller lock.

Signed-off-by: Ville Juven <ville.juven@unikie.com>
2025-04-01 20:49:43 +08:00
Ville Juven
f165407ac8 arch/mpfs/mpfs_mmc.c: Replace big kernel lock with spin lock
Remove call to enter_critical_section (big kernel lock) and replace it
with a smaller lock.

Signed-off-by: Ville Juven <ville.juven@unikie.com>
2025-04-01 20:49:43 +08:00
Ville Juven
01b5a70666 arch/mpfs/mpfs_dsn.c: Replace big kernel lock with spin lock
Remove call to enter_critical_section (big kernel lock) and replace it
with a smaller lock.

Signed-off-by: Ville Juven <ville.juven@unikie.com>
2025-04-01 20:49:43 +08:00
Eero Nurkkala
95163f504c risc-v/mpfs: usb: fix fierce cpu polling if remote closes
If the remote end just closes an endpoint and no longer handles it,
the system is prone to intensive cpu polling via mpfs_write_tx_fifo()
especially if the device side doesn't know a thing about what the
remote did.

Fix this by marking the EP as dead, which will skip all writes causing
unnecessary polling. The EP is back in business if the remote end
sends some data (rx) or the connection is re-established.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
Signed-off-by: Ville Juven <ville.juven@unikie.com>
2025-04-01 20:49:43 +08:00
Jukka Laitinen
19a8e2403f libc/semaphore: Move fast mutex wait/post paths to libc
This avoids unnecessary syscalls in memory protected builds, when mutex
lock/unlock can be done with only atomic counter access

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-04-01 20:37:23 +08:00
Jukka Laitinen
73ee052b3f sched/semaphore: Optimize fast mutex acquire with CONFIG_PRIORITY_PROTECT or CONFIG_PRIORITY_INHERITANCE
When the semaphore priority flags is set to NONE, and the semaphore
is a mutex, the fast locking path can be used, even when
priority inheritance or priority protect are enabled globally.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-04-01 20:37:23 +08:00
Daniel Byshkin
504f838577 sensors/nau7802: Add support for the NAU7802
This patch adds support for the NAU7802 24 bit ADC from Nuvoton.
Please read the documentation for more details.

Signed-off-by: Daniel Byshkin <online@bskdany.com>
2025-04-01 09:38:37 +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
e499efd119 boards/xtensa/esp32: 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
09bcec95a8 boards/xtensa/esp32s2: 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
Tiago Medicci Serrano
440d4a688a boards/xtensa/esp32s3: 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
wangjianyu3
fb807dbbe1 Documentation/szpi-esp32s3: Add doc for LVGL
Basic NuttShell configuration console and LVGL enabled.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-01 09:35:07 +08:00
wangjianyu3
bbcb40c979 boards/szpi-esp32s3: Init configuration for LVGL
And PSRAM enabled.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-01 09:35:07 +08:00
wangjianyu3
bd87bec6fb boards/szpi-esp32s3: Register LCD device
Register LCD device "/dev/lcd0" for graphics.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-01 09:35:07 +08:00
Laczen JMS
fb24cae852 boards/extensa/esp32: use wlan config to start wlan
Use wlan configuration option to enable wlan support for:
- esp32-2432S028
- esp32-audio-kit
- esp32-devkitc
- esp32-ethernet-kit
- esp32-lyrat
- esp32-pico-kit
- esp32-sparrow-kit
- esp32-wrover-kit
- lilygo_tbeam_lora_gps
- ttgo_eink5_v2
- ttgo_lora_esp32
- ttgo_t_display_esp32
- esp32s2-saola-1
- esp32s3-box
- esp32s3-devkit
- esp32s3-eye
- esp32s3-korvo-2
- esp32s3-lcd-ev
- lckfb-szpi-esp32s3

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-03-31 11:35:39 -03:00
Laczen JMS
b8964f5c46 arch/xtensa/src/common/espressif: Add wlan config option
Add an option to configure wlan support

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-03-31 11:35:39 -03:00
wangjianyu3
a834540f42 Documentation/szpi-esp32s3: Add doc for LCD
Basic NuttShell configuration console and LCD enabled.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-31 10:06:45 -03:00
wangjianyu3
31da7737b9 boards/szpi-esp32s3: Init configuration for LCD
Init configuration for ST7789 LCD.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-31 10:06:45 -03:00
wangjianyu3
f42b784349 drivers/lcd/st7789: Add option for RGB data endian
Big endian by default.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-31 10:06:45 -03:00