Commit graph

58955 commits

Author SHA1 Message Date
wangjianyu3
e5b138dee0 boards/szpi-esp32s3: Enable touchscreen for LVGL
1. Rotate the video screen 90 degrees right.
2. Enable touchscreen for the LVGL configuration "lckfb-szpi-esp32s3:lvgl" and add lvgldemo autostart.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-07 08:46:58 -03:00
wangjianyu3
5671765acd boards: Update configs and params about FT5X06
Add touchscreen swap configuration for boards and enable it for defconfig that enables `FT5X06_SWAPXY`.
Refresh configurations to delete the deprecated `FT5X06_NPOLLWAITERS` and `FT5X06_SWAPXY`.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-07 08:46:58 -03:00
wangjianyu3
770d4a6c86 drivers/input/ft5x06: Adapt to touchscreen frame
Calling touch_register() to register touchscreen driver instead of
registering generic driver.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-07 08:46:58 -03:00
wangjianyu3
ed1384fc81 driver/touchscreen: Add support for mirror/swap
Add support for mirror/swap coordinates.
There are some touchscreen drivers not support mirror or swap coordinates.
For example, drivers/input/ft5x06 does not support mirror.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-07 08:46:58 -03:00
wangjianyu3
7cd5d3db72 include: fix typo of touch lowerhalf comment
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-07 08:46:58 -03:00
wangjianyu3
9f6666b75b driver/touchscreen: add custom open/close
Add custom open/close for lower to init/deinit device.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-07 08:46:58 -03:00
Alan Carvalho de Assis
27e2f51d2e Doc/components: Updare refresh.sh to show usage examples
This commit makes it clear how to use the refresh.sh script to
update board configs showing differents usages cenarios.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-07-07 09:53:55 +08:00
raiden00pl
f0270eb349 arch/arm/stm32{h5|h7|l4}/adc: move ADC_MAX_SAMPLES to Kconfig
move ADC_MAX_SAMPLES to Kconfig so user can fine tune memory usage

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-07-06 21:27:52 -03:00
Eren Terzioglu
5991a8c4cc xtensa/espressif: Change LEDC implementation to common for Xtensa based Espressif chips
Change LEDC implementation to common one for esp32[-s2|-s3]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-05 11:12:06 +08:00
chenxiaoyi
886718ade1 xtensa: support more than 32 cpu interrupts
The architecture defines maximum of 128 interrupts, whereas previous
code only supported 32 interrupts.  For every 32 interrupts added,
there are three additional registers: INTERRUPT, INTCLEAR, and INTENABLE.
This patch adds support for handling these registers.

Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2025-07-04 11:26:07 -03:00
raiden00pl
b2158c8e3c arch/arm/stm32f0l0g0/adc: move ADC_MAX_SAMPLES to Kconfig
move ADC_MAX_SAMPLES to Kconfig so user can fine tune memory usage

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-07-04 18:14:31 +08:00
Shen Cao
8e68c7a810 arch/arm: Add gic lock for GICD_ICFGR RMW operations.
GICD_ICFGR requires full 32-bit RMW operations.
Each interrupt uses 2 bits; thus updates must be synchronized
to avoid losing configuration in concurrent environments.

RMW conflict on GICD_ICFGRn (without lock)

CPU0 (set IRQ32 edge)      CPU1 (set IRQ33 level)
---------------------      -----------------------
val0 = read(ICFGRn)     │  val1 = read(ICFGRn)
                        │
val0 |= (edge << 4)     │
                        │  val1 &= ~(3 << 6)
                        │
write(ICFGRn, val0)     │
                        │  write(ICFGRn, val1)

=> IRQ32 config lost OR IRQ33 config lost
   (depends on which write finishes last)

Concurrent RMW on ICFGRn causes lost config.
Protect with spinlock to avoid data race.

Since interrupt type configuration is infrequent,
a single global GIC lock is sufficient (no need for
fine-grained locking per ICFGR register).

Signed-off-by: Shen Cao <caoshen3@lixiang.com>
2025-07-03 19:02:50 -03:00
Carlos Sanchez
a9da6fde59 arch/arm/src/*/stm32_fdcan_sock.c: prevent interrupt flood on errors.
Previous code was failing to disable error interrupts which
due to standard CAN retransmissions might trigger continusouly
(for example, with a disconnected CAN interface) flooding the
system and preventing other operations to continue.

Fixes: https://github.com/apache/nuttx/issues/16668
Signed-off-by: Carlos Sanchez <carlossanchez@geotab.com>
2025-07-04 02:00:52 +08:00
p-szafonimateusz
bba1741421 drivers/net/{e1000|igc}: align descriptors to 8
A descriptor ring length must be aligned to 128, one descriptor is 16B length,
so we can provide this condition with the appropriate number of descriptors

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-07-03 21:57:02 +08:00
p-szafonimateusz
5a9530855c drivers/net/{e1000|igc}: drop TX packets if TX ring is full
drop TX packets if TX ring is full, so we don't overwrite
not handled TX descriptors

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-07-03 21:57:02 +08:00
p-szafonimateusz
0f537dcb97 drivers/net/{e1000|igc}: fix reinit for RX/TX rings
Descriptor head is managed by HW and should not be modified by SW unless:
1. device is after a reset
2. device is before enabling TX or RX

Also set correct tail for RX which should point at the end of ring
(descriptor ring is zero-indexed).

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-07-03 21:57:02 +08:00
p-szafonimateusz
bdde180d7a drivers/net/{e1000|igc}: disable TX by modify only TX enable bit
disable TX by modify only TX enable bit, otherwise we lose TX configuration

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-07-03 21:57:02 +08:00
p-szafonimateusz
0a8ef045ab drivers/net/{e1000|igc}: update link status when card is enabled
Update link status in case link status interrupt is missing.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-07-03 21:57:02 +08:00
p-szafonimateusz
7a8ac49836 drivers/net/{e1000|igc}: do not touch RX/TX rings when link status change
Do not reset RX/TX rings when link status change.
This can break internal card state which is impossible to recovery.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-07-03 21:57:02 +08:00
p-szafonimateusz
bccee707d6 drivers/net/{e1000|igc}: reset RX/TX rings after RX/TX disabled
reset RX/TX rings **after** RX/TX are disabled to make sure the rings are
not used by hardware when software modify rings state.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-07-03 21:57:02 +08:00
Antoine Juckler
eea2975b36 tools/process_config.sh: Fix sed errors
Ignore commented-out lines when deleting repeated defines in defconfig

Signed-off-by: Antoine Juckler <6445757+ajuckler@users.noreply.github.com>
2025-07-03 09:41:56 -03:00
Tim Hardisty
f45216ecb3 boards/arm/lpc17xx_40xx_lincoln60: correct typo in thttpd-binfs defconfig 2025-07-03 10:42:16 +08:00
wangmingrong1
1df6aa92f9 arm64: Support hardware debug
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-03 00:20:54 +08:00
wangmingrong1
3c2b203286 arm64->fetal: Support return to thread site
The breakpoint of arm64 is fetal_handler, which needs to return to the scene

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-03 00:20:54 +08:00
wangmingrong1
10a13b98ee compiler-rt: distclean delete error
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-03 00:17:58 +08:00
chenxiaoyi
46504837ca clang/gcov: fix the open flags and mode
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2025-07-03 00:17:58 +08:00
wangmingrong1
a87170681d libbuitin: Fixed the issue of not creating bin directory when the file exists
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-03 00:17:58 +08:00
buxiasen
8c93783fee gcov: fix link undefined error
undefined reference to `__gcov_execle'

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-07-03 00:17:58 +08:00
wangmingrong1
82a4b21863 gcov: Output mode judgment is implemented in the kernel layer
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-03 00:17:58 +08:00
wangmingrong1
062ac70470 CMake: Fix compile error
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-03 00:17:58 +08:00
wangmingrong1
3648e5db3f gcov: Refactoring the implementation framework of gcov
All implementations of gcov are sunk to the kernel implementation
1. Support three dump modes: serial port output, single file output, standard output

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-03 00:17:58 +08:00
wangmingrong1
1cb5077bc1 gcov: default strip 0 path
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-03 00:17:58 +08:00
wangmingrong1
f2bc226d26 gcov: use lib_get_tempbuffer instead of using stack
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-03 00:17:58 +08:00
wangmingrong1
7bbb96205b CMake: Fix link error
Bringing the code coverage option when linking may cause gcc or g++ to automatically link the libgcov.a that comes with the toolchain.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-03 00:17:58 +08:00
wangmingrong1
a5cb084c1f CMake: fix add compile options
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-03 00:17:58 +08:00
f4e8def270 drivers/net/Kconfig: Move NET_IGC_TXDESC and NET_IGC_RXDESC to NET_IGC menu 2025-07-03 00:16:24 +08:00
Jukka Laitinen
5594c2e887 imx9/lpuart: Fix race condition / regression in imx9_txint
Commit 83a119160 fixed SMP by removing call to uart_xmitchars from inside spinlock.

This only works for SMP, since uart_xmitchars has a lock only in SMP. In a single
core configuration the function can be called in parallel from the interrupt
handler and from the imx9_txint.

Fix this by filling the uart buffers already before enabling the
interrupt, this way it is not possible to get the function called in parallel
for the same device.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-07-01 15:02:54 -03:00
Pressl, Stepan
55bef681e1 arch/arm/src/stm32/stm32_i2cslave_v2.c: add STM32 I2C Slave support for the v2 ip core
This commit adds the lowerhalf driver support for the I2C Slave.
While not currently ideal, it is compatible with the upperhalf i2c slave driver.
A workqueue can be used to delegate the isr work to the upperhalf driver.
But keep in mind wq introduces a lot of delay and in certain scenarios,
it is better to write your own better upperhalf driver.

Signed-off-by: Stepan Pressl <pressl.stepan@gmail.com>
2025-07-02 01:59:46 +08:00
zhongzhijie1
3d37e85b13 Remove minread para in btuart_read.
In file_read(), asynchronous reading is supported, so partial reads and the minread parameter are no longer needed.

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
2025-07-01 09:06:43 -03:00
zhongzhijie1
4a4ad26474 Support bt H4_ISO packet parsel in bt_uart_shim driver.
In btuart_rxwork, There is no case for parsel HCI data of ISO type, but there are corresponding processes in the SIM and vendor driver code.

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
2025-07-01 09:06:43 -03:00
zhongzhijie1
d81a28097a btuart_read and returned the correct value.
When the nread return value < 0, if the total length ntotal that has been read is > 0, the function returns ntotal; otherwise, it returns the nread error code.

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
2025-07-01 09:06:43 -03:00
zhongzhijie1
386dbfa449 Refactored the btuart_rxwork function to improve data reception stability.
Read as much data as possible initially, then process each packet individually. Defined the read buffer within the structure and added a rx_len variable to indicate the current read offset. After processing each complete packet, leftover data is moved to rxbuf[0] and rx_len is reduced by the length of the processed packet. The next packet process will start from rxbuf[0] after the read ends at new rxbuf[rx_len].

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
2025-07-01 09:06:43 -03:00
wangmingrong1
750ae961a8 kasan watchpoint: Fix judgment problem
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-01 09:04:03 -03:00
cuiziwei
4de718f98f kasan: Fix assert judgment condition to correctly detect out-of-bounds causing trampling.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2025-07-01 09:04:03 -03:00
wangmingrong1
aead1981a7 kasan: Potential recursive registration shadow area error
When initializing a memory block, the shadow area record of the first
memory block is used first.When uninitializing, unpoison is required, otherwise the memory will be marked incorrectly.
The following case will cause problems:
    void *mem = malloc(1024);
    struct mm_heap_s *a = mm_initialize("hello", mem, 1024);
    int *b = mm_malloc(a, sizeof(int *));
    *b = 100;
    printf("Hello, World!! %d\n", *b);
    mm_free(a, b);
    mm_uninitialize(a);
    free(mem);

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-01 09:04:03 -03:00
Filipe Cavalcanti
e57d2a5247 arch/risc-v: update lower-half drivers for ESP32-C3|C6|H2 2025-06-30 22:40:26 +08:00
Filipe Cavalcanti
187a386cc7 arch/xtensa: update lower-half drivers for ESP32|S2|S3 2025-06-30 22:40:26 +08:00
wangmingrong1
0a71cbe542 fix kasan_bypss compile unused error
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-30 18:19:38 +08:00
buxiasen
c5bfc4d233 mm/kasan: fix wanring expression result unused
nuttx/mm/mm_heap/mm_malloc_size.c:77:16: error: expression result unused [-Werror,-Wunused-value]
  kasan_bypass(flag);
               ^~~~
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-06-30 18:19:38 +08:00
wangmingrong1
3fdfc702f3 a527: Remove MTE enablement
This product does not have MTE. MTE is only available for Arch or higher extensions of armv8-5+memory tags

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-30 18:19:38 +08:00