Commit Graph

1924 Commits

Author SHA1 Message Date
Rbb666 46fdeefb32 refactor(pic): dispatch NVIC IRQs through traps 2026-08-12 12:54:50 +08:00
Rbb666 1f23e3f270 fix(dm): route Cortex-M resets through power core 2026-08-12 12:54:50 +08:00
Rbb666 6b4f34204e feat(dm): support OFW on Cortex-M targets
Add the ARM NVIC PIC driver, no-MMU I/O mapping, built-in FDT support, and Cortex-M CPU hooks required by the native RT-Thread device model.
2026-08-12 12:54:50 +08:00
GUI 9d04b6baab
[dm][clk] fixup the work flow of CLK (#11673)
* [dm][clk] fixup the work flow of CLK

Add RT_CLK_F_SET_RATE_NO_REPARENT so clock providers can preserv
the currently selected parent during rate changes.
Round and re-read the effective clock rate after parent handling,
skip redundant gate toggles and hardware programming when
the target is already active, and fix error handling for parent-clock allocation failures.

Signed-off-by: GuEe-GUI <2991707448@qq.com>

* style: format code with clang-format

* style: format complete changed files with clang-format

---------

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-08-08 18:25:02 +08:00
GUI a2c196d643
[dm][phye] Add Mode/State and MIPI D-PHY timing helper (#11675)
* [dm][phye] Add Mode/State and MIPI D-PHY timing helper

Extend the generic PHY framework with cached mode and submode state,
avoiding redundant hardware mode changes.
Add MIPI D-PHY default timing calculation helpers based on
pixel clock or lane high-speed clock, and expose the new API through rtdevice.h.

Signed-off-by: GuEe-GUI <2991707448@qq.com>

* style: format code with clang-format

* style: format complete changed files with clang-format

---------

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-08-07 21:31:43 +08:00
GUI c19fe2c823
[dm][regulator] Update Regulator (#11674)
* [dm][regulator] update regulator

Replace the regulator framework spinlock with a mutex
because regulator operations may sleep.
Move always-on policy into the regulator core,
keep an initial enable reference for always-on supplies,
prevent the last disable from turning them off,
and let fixed/GPIO providers report and control their actual hardware state.

Signed-off-by: GuEe-GUI <2991707448@qq.com>

* [dm][regulator] add PWM regulator support

Signed-off-by: GuEe-GUI <2991707448@qq.com>

* style: format code with clang-format

* style: format complete changed files with clang-format

---------

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-08-07 21:29:33 +08:00
GUI 19e9be8779
[dm][ufs] fixup the ufs supported (#11646)
* [dm][block] add 4K support for EFI partion

Signed-off-by: GuEe-GUI <2991707448@qq.com>

* [dm][ufs] fixup the linkup flow

Signed-off-by: GuEe-GUI <2991707448@qq.com>

* style: format code with clang-format

* style: format complete changed files with clang-format

* drivers: address UFS review feedback

---------

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-08-07 16:54:29 +08:00
GuEe-GUI abc2c59e57 style: format code with clang-format 2026-08-07 09:26:42 +08:00
GuEe-GUI 871d9f5922 [dm][graphic] update graphic
1. Add FB_ACTIVATE_* cmd
2. Fixup the vsync
3. Update the graphic test

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-08-07 09:26:42 +08:00
GuEe-GUI 621a074a41 style: format code with clang-format 2026-08-07 09:25:45 +08:00
GuEe-GUI 83b703c6b6 [dm][ata] support DW AHCI
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-08-07 09:25:45 +08:00
GuEe-GUI 955fb76bb0 [dm][ivshmem] Add Inter-VM shared memory for virtualization
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-08-06 18:19:52 +08:00
GuEe-GUI 395dff4e2e [dm][misc] make RT_BITS_PER_LONG custom mode
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-08-06 11:14:28 +08:00
GuEe-GUI 96cf830d89 [dm][thermal] update the thermal cooling
1. Fixup the cooling control flow.
2. Replace the spinlock to mutex.
3. Fixup the PWM args for PWM-FAN.
4. Add GPIO-FAN

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-08-06 11:09:50 +08:00
GuEe-GUI 73614c8684 [dm][nvmem] fixup the DT parse for bits
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-08-06 11:09:43 +08:00
GuEe-GUI 69dfbf86fd [dm][nvme] replace the CPU physical address to DMA address
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-08-06 10:51:46 +08:00
GuEe-GUI c3e1dd7946 [dm][ethernet] add MACB and DWMAC ethernet support
They support PTP, too.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-08-06 09:43:10 +08:00
GuEe-GUI 84da9b9393 [dm][phy] improve PHY v2 support and add RTL8211F driver
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-08-06 09:43:10 +08:00
GuEe-GUI fae3992d14 [dm][ethernet] Add ethernet for DM
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-08-06 09:43:10 +08:00
GuEe-GUI 9915dc66c1 ipc: fix recursive data queue locking on SMP
rt_data_queue_pop() holds the data queue spinlock while updating the ring
state, then calls rt_data_queue_len(). The length function tries to acquire
the same non-recursive spinlock again, causing an SMP deadlock when a pop
leaves the queue non-empty.

Add a private _data_queue_len_nolock() helper for callers which already hold
the queue lock. Keep the public rt_data_queue_len() protected by one spinlock
acquisition.

This does not change the public API, ABI, queue state transitions, low-water
mark wakeups, or event callback behavior.

Tested on a four-core Spacemit K1 with cyclic HDMI playback and by building the
SMP QEMU Virt64 RISC-V BSP with generic audio, Intel HDA and VirtIO Sound.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-08-03 09:43:57 +08:00
GuEe-GUI fe751c1521 [dm][core] Add rt_bus_probe_device API
Add rt_bus_probe_device() to retry driver matching for a registered
but unbound device. Use it when an OFW-created platform device
is requested again, while preserving native-bus ownership
for I2C, SPI, and other non-platform devices.
Also instantiate eligible child platform devices after a parent node is registered.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-08-03 09:36:21 +08:00
GuEe-GUI 36f52133ec [dm][i2c] port to the pinctrl for EP
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-07-29 11:11:10 +08:00
GuEe-GUI a7b0182817 [dm][tee] support Trusted Execution Environment (TEE)
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-07-27 17:53:20 +08:00
GuEe-GUI f975c7c4ca [dm][rpmsg] port the default RX handler for NS
Application traffic should be bound via a higher layer later.
And debug.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-07-23 09:27:29 +08:00
mnikapl954 8e68826dc3 [drivers][adc] Fix misleading doxygen for rt_adc_voltage 2026-07-22 20:57:55 +08:00
mnikapl954 108a958a9d [drivers][dac] Fix wrong rt_dac_write arguments in doxygen example 2026-07-22 19:59:36 +08:00
CYFS 25212f3745 fix: name anonymous Kconfig choices 2026-07-20 13:05:46 +08:00
GuEe-GUI c22b3931b6 [pic][gicv3-its] fixup cleanup path removes list node after freeing it
Link: https://github.com/RT-Thread/rt-thread/issues/11604

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-07-20 11:36:37 +08:00
CYFS 5363e4ed4c [bsp][drivers][soft_spi] unify the software SPI driver 2026-07-17 09:41:51 +08:00
CYFS 414ff7f371 [bsp][drivers][soft_i2c] unify the software I2C driver 2026-07-16 13:19:57 +08:00
Onlyou_tzZ f8a65e4092
sb_glue_nation.c中添加N32H49X和N32H7XX系列MCU的USBHS支持 2026-07-14 18:08:59 +08:00
Old-Ding c7f21bddeb drivers: pci: Fix endpoint MSI setup
rt_pci_ep_set_msi() checked the set_msix callback before calling set_msi. That rejects endpoint controllers that implement MSI without MSI-X, and can call through a NULL set_msi pointer when only MSI-X is provided.

The same helper converts a requested MSI vector count into the log2 field passed to the controller. Stop after the first value large enough for the request so smaller requests are not widened by later loop iterations.

Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
2026-07-08 14:03:38 +08:00
Old-Ding 3eac0a8a17 drivers: pic: Fix PIRQ lookup upper bound
rt_pic_linear_irq() stores irq_nr as a count and assigns pic->pirqs to the first entry in that range. rt_pic_find_pirq() therefore must treat the upper bound as exclusive.

The inclusive check could return pic->pirqs[irq_nr] when irq equals irq_start + irq_nr, which is one entry past the allocated range.

Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
2026-07-08 14:03:16 +08:00
Old-Ding d2d89271ea drivers: fix fan53555 slew rate bounds check
Valid slew_rates indices are 0 through RT_ARRAY_SIZE(slew_rates) - 1.
The current check rejects only values greater than the table size,
allowing slew_idx == RT_ARRAY_SIZE(slew_rates) to index one element
past the table.

Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
2026-07-08 14:02:15 +08:00
Old-Ding b9550aad85 drivers: dac: Fix disable callback check
_dac_control() checked the enabled callback before invoking disabled for RT_DAC_CMD_DISABLE. That can reject DAC drivers that provide a disable callback without enable, and can call through a NULL disabled callback when only enable is implemented.

Check the disabled callback in the disable command path so the guard matches the operation being dispatched.

Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
2026-07-08 13:24:42 +08:00
wdfk-prog 937be2c97d
feat[ADC]: 新增 ADC V2 驱动支持 (#11440)
* feat[ADC V2]: add ADC V2 driver support

add ADC V2 core APIs, session state management, and sequence read support
add STM32 ADC V2 HAL backend with internal-channel and VREF handling
add per-series STM32 ADC V2 default configuration headers
wire ADC V2 Kconfig and SConscript integration for components and STM32 BSP drivers
keep ADC V2 mutually exclusive with the legacy ADC driver path

* feat[ADC V2]: add ADC V2 MSH special channel read support

add generic ADC V2 MSH commands for probing, configuring, raw reads, voltage reads, and sequence reads
add STM32 ADC V2 backend special commands for VREFINT, temperature sensor, and VBAT reads
add STM32 helper APIs for special logical channels, sampling time, resolution, and temperature calculation
wire ADC V2 MSH sources through Kconfig and SConscript

* feat[ADC V2]: add ADC V2 stream DMA support

add ADC V2 stream APIs with latest-frame and FIFO buffering policies
wire STM32 ADC V2 to circular DMA stream mode with per-instance Kconfig options
extend STM32 ADC config headers and DMA helpers for stream DMA configuration
add FinSH stream commands for start, read, cancel, and stop operations
handle Cortex-M7 cache-safe DMA buffers for STM32 stream sampling

* feat[ADC V2]: add timer trigger support for ADC V2 streams

add ADC V2 trigger configuration, validation, and lifecycle coordination
add timer update trigger support through clock timer TRGO controls
map STM32 ADC V2 timer update triggers to HAL external trigger selector fields
add Kconfig, SConscript, and MSH entries for ADC trigger setup and inspection

* feat[ADCV2]: add timer and comparator trigger selectors

add ADC V2 timer compare and analog comparator trigger configuration support
extend clock timer trigger config with compare event and channel fields
wire STM32 ADC external trigger selector mappings for TIM update, TIM compare, and COMP output
add FinSH trigger_set commands and Kconfig switches for timer and comparator trigger backends

* fix[ADC V2]: resolve ADC V1 compatibility Kconfig loop

* ci[ADC V2][stm32]: add ADC v2 peripheral config for stm32f407-rt-spark BSP
2026-07-07 08:59:22 +08:00
CYFS e97530fea8 [components][spi] add utest cases 2026-07-04 16:45:24 +08:00
Old-Ding ece7b4fe9f components: fix serial v2 rx indicate setup 2026-07-03 09:32:48 +08:00
GuEe-GUI a89e6c7b4c [dm][graphic] support ili9486 SPI LCD driver
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-06-30 15:53:44 +08:00
GuEe-GUI 196488fd7f [dm][graphic] fixup the simple framebuffer regulator check
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-06-30 15:53:44 +08:00
GuEe-GUI 11ca166006 [dm][ptp] support Precision Time Protocol (PTP) IEEE 1588 clock
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-06-29 16:55:18 +08:00
wdfk-prog 1f9146897b feat[serial][v2]: add RX DMA event mode control
add serial v2 RX DMA event mode configuration for DMA-enabled builds
support STM32 UART RX DMA half/full transfer interrupt policy selection
validate RX DMA event mode before applying serial configuration
restore serial configuration when backend configure fails
2026-06-27 11:39:10 +08:00
GuEe-GUI b2e1f13a05 [bsp][rockchip] support DVFS for Rockchip
The I2C will timeout in fan53555, fixed it.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-06-23 08:02:09 +08:00
GuEe-GUI e280f213bf [dm][dvfs] support Dynamic Voltage and Frequency Scaling (DVFS)
1. Support DVFS and finsh cmd, there are 6 governors:
   - conservative
   - freedom
   - performance
   - powersave
   - schedutil
2. Support DVFS for SCMI.
3. Port the Cooling device for DVFS.
4. Port the PM with DVFS.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-06-23 08:02:09 +08:00
CYFS f922adeb07
[utest][pin] add pin loopback utest (#11445)
* [utest][pin] add pin loopback utest

* [utest][pin] add BSP CI coverage

* [utest][pin] fix BSP CI config

* [utest][pin] fix ra8p1 utest link section
2026-06-22 16:03:58 +08:00
Rbb666 7071ba35cb
[bsp/rockchip]Add CI compilation checks for RK3500 BSP. 2026-06-21 17:08:53 +08:00
Guorui Li 09334ce771
doc: add Doxygen comments to DMA driver subsystem #11477 2026-06-16 10:21:41 +08:00
maosql faefdc7962 fix: with mismatched bound [-Warray-parameter=]. 2026-06-15 12:54:47 +08:00
GuEe-GUI b2b3331fd5 [dm][audio] support Intel HDA
make DM import in audio easier

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-06-15 10:00:57 +08:00
GuEe-GUI bf0b9feabb [dm][virtio] update virtio dm
1. support RPMsg
2. support Sound
3. fixup virtio-blk free

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-06-15 10:00:57 +08:00