Commit Graph

532 Commits

Author SHA1 Message Date
GUI
c6498b5f65 [sdio][dm] update for DM (#11078)
* [sdio][dm] import Kconfig for DM

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

* [sdio] fixup IRQ and mmcsd threads' stack size default

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

* [sdio][dm] Support DM mode

1. Support features read by DM.
2. Support regulator API in drivers.
3. Support send tuning option CMD.
4. Replace `switch_uhs_voltage` by `signal_voltage_switch`.

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

* [dm][sdhci] Cleanup the SDHCI

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

* [sdio][dm] add new SDIO/SDHCI drivers

1. SDHCI support on PCI bus
2. Synopsys DesignWare MMC Family(MMIO/PCI)

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

---------

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-26 21:04:42 +08:00
GuEe-GUI
9370f81ad7 [dm][include] fixup loss' header
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-22 13:24:41 +08:00
GUI
43733268c1 [dm][firmware][scmi] support ARM-SCMI interface #11069 2025-12-19 21:20:17 +08:00
GuEe-GUI
b4d332706e [dm][power] add power reset and supply framework
1. Board level reset or poweroff
2. Power supply class

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-17 10:29:05 +08:00
GuEe-GUI
e83a6e9baa [dm][scsi] Add parallel_io option for SCSI host
Some SCSI supported parallel_io = RT_TRUE, like UFS.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-16 11:39:41 +08:00
GuEe-GUI
4913211409 [dm][core] add common machine power interface
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-16 11:35:35 +08:00
GuEe-GUI
5abecc1fd0 [dm][graphic] support dm mode
1. Add backlight framework for graphic.
2. Add framebuffer and plane, power, EDID for graphic framework
3. Add boot logo render for graphic
4. Update lcd.h

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-15 16:54:23 +08:00
GUI
d8709ba9fb [dm][hwcache] support hwcache (#11049)
Some ARCH not has std cache ops, such as RISC-V

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-13 16:32:25 +08:00
GuEe-GUI
335a1242b0 [dm][clk] refactoring the CLK framework
The old CLK is can't link all hardware clock cell in system that the
API of layout such as 'set_parent' can't work as expected.

Some hareware clock cell need some flags to prevent some dangerous behaviors, eg:
When a clock cell is link to the PMU, the SoC will power-down if the cell is
disable.

The new CLK can do it, and make the CLK drivers implemented easier from
TRM/DataSheet.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-12 13:33:28 +08:00
GuEe-GUI
dd20176cba [dm][hwspinlock] support hwspinlock
Hardware spinlock modules provide hardware assistance for
synchronization and mutual exclusion between heterogeneous processors
and those not operating under a single, shared operating system.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-11 11:08:33 +08:00
GuEe-GUI
22a77f2694 [dm][nvmem] support nvmem
Support for NVMEM(Non Volatile Memory) devices like EEPROM, EFUSES...

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-10 17:04:23 +08:00
GUI
3ff3fc3948 [dm][input] support input #11031 2025-12-10 16:58:10 +08:00
GuEe-GUI
6c0753cb8f [dm][pinctrl] new interface for 'pin_gpio_request'
Some GPIO should apply GPIO mode by pinctrl, add `pin_ctrl_gpio_request`
for GPIO driver to apply it auto.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-10 16:53:09 +08:00
GuEe-GUI
056ae364cb [dm][core] add new API for DM
1. rt_dm_dev_is_big_endian
2. rt_dm_dev_get_prop_fuzzy_name

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-09 21:04:16 +08:00
GuEe-GUI
7357abdc37 [dm][core] cleanup format
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-09 21:04:16 +08:00
GuEe-GUI
c74148a8b3 [dm][core] add common stack size for DM
DM driver is public, they don't know the size of the thread stack default.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-09 21:04:16 +08:00
GUI
6618fa1cf6 [Driver][MISC] Update ADC/PWM (#11003)
* [DM][MISC] Make Kconfig(ADC/PWM) import for DM

* [Driver][MISC][ADC] Fixup ADC

1. Fixup error no.
2. Fixup type of control for args.
3. Fixup value no init.

* [Driver][MISC][PWM] Enable `rt_pwm_get` API

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-09 09:49:02 +08:00
GuEe-GUI
62e1fe3699 [Drivers/phy] Fixup header include for v2
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-04 16:05:37 +08:00
GuEe-GUI
798c84647c [DM/I2C] Update I2C for DM
1. Add get id match data API.
2. Set I2C device name default before adding to bus.
3. Add Kconfig import for DM.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-04 16:00:13 +08:00
GuEe-GUI
e5db582cfa [DM/MISC] Update MISC API
1. Fixup RT_DIV_ROUND_DOWN_ULL and RT_DIV_ROUND_UP_ULL, rt_do_div.
2. Support RT_DIV_ROUND_CLOSEST_ULL.
3. Make new DIV API.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-04 15:59:52 +08:00
GUI
e5e0ad29bf [DM/DMA] Update DMA #10987
* Append WT attribute.
* Change the API with pool size only.
* Add address mask for DMA
* Change DMA lock to mutex
* Add pause callback for DMA engine driver
* Add DMA Engine test
* Add ARM PL330 DMA Engine driver
2025-12-03 21:47:49 +08:00
GuEe-GUI
33d9c50efb [DM][REGULATOR] Support operator delay
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-02 21:36:58 +08:00
wdfk-prog
ddfe2cd61c feat[spi]: enable interrupt-safe operations using spinlocks 2025-11-13 15:41:41 +08:00
wdfk-prog
44cf90a4ef fix(can): Resolve potential race condition in message transmission
Setting the send status flag `sndchange` after calling the can->ops->sendmsg function
could lead to a race condition if a transmission timeout occurs, resulting in incorrect state handling.
This patch moves the operation of setting the `sndchange` flag to before the call to can->ops->sendmsg.
This ensures that the mailbox's status is correctly marked as "sending" before the hardware begins transmission,
making the driver's state management more robust and reliable, especially in handling exceptions like timeouts.

Additionally, new macros for CAN filter modes have been added in dev_can.h.
2025-11-08 11:52:25 +08:00
Chen Wang
273185b45a doxygen: fix two issues when building with doxygen 1.9.8 (#10768)
* doxygen: remove @return command if function return void

When doxygen is upgraded to v1.9.8 (on ubuntu 24.04), doxygen
reports: "doxygen error: found documented return type for xxx
that does not return anything" for those functions which return
void but declare "@return" in doxygen comment.

Solution: remove "@return" for those cases, and update
guide document for how to write doxgen comment for functions.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>

* doxygen: fixed a minor typo for uart doc

This error is found when building with doxygen 1.9.8, but not
detecetd on 1.9.1.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-10-10 10:05:06 +08:00
Chen Wang
ace7fdbff3 doxygen: fixed build warning for RT_CAN_FILTER_ITEM_INIT (#10758)
The names and number of macro parameters in doxygen comments
must match the actual macro definition; otherwise, a warning
will be generated.

Our goal is to eliminate all warnings.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-09-28 19:47:45 +08:00
wdfk-prog
11156de0de feat[can]: Implement non-blocking send mechanism and enhance CAN driver functionality
- Added support for non-blocking mode CAN message sending, including software ring buffer management and dynamic memory allocation options.
- Improved related comments and error handling.
- Updated example code to demonstrate the usage of both blocking and non-blocking sending modes, and corrected some structure field naming and macro definitions.
2025-09-28 11:17:21 +08:00
wdfk-prog
7e5cd48360 feat[SPI]: Add SPI device detach function 2025-09-25 11:41:58 +08:00
GuEe-GUI
8731289055 [DM/PCI] Fixup the MSI info shuold free
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-08-25 11:12:02 +08:00
RyanCW
e0243e87c0 [component][drivers][serial_v2] 优化serial_v2 (#10603)
* [bsp][stm32][drv_usart_v2] uart_isr不再使用链式调用,RXNE内循环读空,一些细节优化

* [componnents][drivers][serial_v2] 增加获取config接口,使用rt_tick_get_delta替代内部的时间绕回判断,写满丢弃策略rx接收数据错乱修复,clang-tidy和cppcheck审查优化

* [utest][drivers][serial_v2] 测试例程进行优化

* [bsp][stm32][drv_usart_v2] 撤回DMAMUX1修改

* [componnents][drivers][serial_v2] read和write不再返回-RT_ETIMEOUT改为已发送或读取的字节数,细节优化

* [utest][drivers][serial_v2] 增加单独的timeout测试,减少测试中的硬延时

* [utest][drivers][serial_v2] 漏提交的posix下标志位

* [utest][drivers][serial_v2] 优化测试例程

* [bsp][stm32][drv_usart_v2] transmit返回错误值,RXNE增加超时逻辑

* [componnents][drivers][serial_v2] 增加transmit错误处理,增加超时退出机制显式的避免死循环

* [componnents][drivers][serial_v2] 适配serial_v2和posix非libc标准库下的console和shell
2025-08-16 11:51:57 +08:00
cmbjxxiao
37d902537c [arm_compiler_v4/v5] define rt_packed as __packed #10553 2025-08-06 15:16:18 +08:00
rcitach
ae50e406da 【SMART】【BSP】【allwinner】Fix smart serial_v2 bypass compile error issue (#10524)
* Modify the reference path of the header file in the middle section

* format

* Fix smart serial_v2 bypass compile error issue

* add allwinner/d1s ci
2025-08-01 20:59:08 +08:00
liuyucai
a1c642aa3a [Fix] <components>:drivers/can/dev_can.c 修复CAN底层无法工作时导致调用 _can_int_tx 的线程一直挂起的问题
Solution: 使用 can->status.sndchange 的bit位来表示某个发送邮箱超时
如果超时 底层驱动再通知tx_done或者tx_fail事件时不予处理

Signed-off-by: Yucai Liu <1486344514@qq.com>
2025-07-29 20:18:14 +08:00
Chen Wang
895b272b69 doxygen: fix duplicated defgroup for clock
Problen:
Duplicated definition of group_clk in clk.c and clk.h.

Solution:
Delete the definition in clk.c and keep only the definition
in clk.h.

Also change the name of group_clk to group_driver_clock to
conform to the naming convention of other driver groups.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-07-22 16:00:33 +08:00
Chen Wang
2aebe694d9 doxygen: group name all in lowcase (part 2) (#10530)
* doxygen: fs: unify groupname to lowercase

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>

* doxygen: drivers: unify groupname to lowercase

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>

* doxygen: signal: unify groupname to lowercase

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>

---------

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-07-22 13:59:25 +08:00
wdfk-prog
95b1d69e8c [serial_v2]modify the default configuration of the RT_SERIAL_CONFIG_DEFAULT structure to support parameters in the absence of DMA configuration. 2025-07-12 07:23:25 +08:00
GuEe-GUI
30ab08c7c9 [DM/PIC] Config IPI by RT_MAX_IPI
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-07-12 07:16:25 +08:00
GUI
8a7ef41c3c [SPI]Update and fixup the SPI
* Make a priv data read API for probed SPI device
* Fixup the SPI device pre-alloc
2025-07-10 13:28:16 +08:00
Chen Wang
a3339ca734 doxygen: change group_Drivers to group_device_driver
The originally defined "group_Drivers" should actually
be part of the device-driver component, so
"group_Drivers" is renamed to "group_device_driver".

In this way, the original "group_Device" and
"group_Drivers" are merged into "group_device_driver".

Adjusted the writing method of doxygen comments in the
driver code to be unified as follows:

```c
* @defgroup group_XXX XXX
* @brief xxxxxx
* @ingroup group_device_driver
```

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-05-29 13:47:46 +08:00
GuEe-GUI
99fc1bb72b [DM/PCI] Add /proc access in RT-Smart user.
1. Add ROM base info.
2. Save th PM status.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-05-23 13:22:25 +08:00
ryancw
ac8fba0129 [drivers][serial_v2]允许阻塞接收超过rx缓冲区大小的数据、增加超时时间、flush、获取缓冲区数据长度命令、数据溢出逻辑修复、稳定性细节优化、添加更多serial_v2测试用例
[components][serial_v2] 优化txflush逻辑、对tx的activated做中断保护

[components][at] at_client适配新版serial_v2

[components][at] at_server适配新版serial_v2

[components][serial_v2] 测试用例增加循环调用,format测试用例

[components][serial_v2] poll模式判断逻辑错误

[components][serial_v2] 测试用例去掉一些非必要延时

[components][serial_v2] 测试例程使用menuconfig进行配置,更新readme

[components][at_client] at_client_getchar返回值错误、at_client解析线程优先级错误设置

[components][at] 错误码应该返回负值

[components][serial_v2] TCFLSH和FIONREAD完善、control函数增加错误返回值

[components][serial_v2] RT_SERIAL_CTRL_GET_RX_DATA_LEN更改为RT_SERIAL_CTRL_GET_UNREAD_BYTES_COUNT

[utest][serial_v2] TC_UART_SEND_TIMES替换为RT_SERIAL_TC_SEND_ITERATIONS

[components][serial_v2] FIONREAD参数应该是无符号类型

[utest][serial_v2] 完善测试用例

[components][serial_v2] 避免使用三目运算符

[components][serial_v2] 使用clang-format格式化代码

[components][serial_v2] 添加get超时时间命令

[components][serial_v2] 完善posix接口

[components][serial_v2] 阻塞接口添加阻塞时间为0时的处理逻辑、优化RX阻塞接收逻辑

[components][serial_v2] 设置超时时间命令的参数改为指针形式

[components][serial_v2] nbuf发送添加超时时间为0时的逻辑

[components][serial_v2] 完善添加测试用例

[utest][serial_v2] 修复依赖关系

[components][serial_v2] 非阻塞模式下tx_flush错误修复

[components][serial_v2] activated使用原子API

[components][serial_v2] 优化DMA逻辑、没使能DMA时屏蔽DMA逻辑节约资源

[components][serial_v2] 提供写满时丢弃新数据和覆盖旧数据策略,写满丢弃策略效率更高

[components][serial_v2] 部分平台适配写满时两种策略功能

[components][serial_v2] DMA模式暂不支持丢弃新数据策略

[utest][serial_v2] 优化测试代码

[components][serial_v2] DMA模式下使用乒乓缓冲、DMA模式支持丢弃新数据策略

[utest][serial_v2] 适配DMA乒乓缓冲

[bsp][serial_v2] 部分bsp适配DMA下乒乓缓冲

[components][serial_v2] 使用spinlock替换中断,对部分结构体变量使用原子操作

[utest][serial_v2] 更新测试用例

[components][at] 适配new serialv2不再判断RTT版本号

[components][at] 删除多余的中文注释

[utest][serial_v2] 添加交叉echo示例,qemu环境下专用

[bsp][qemu] 适配串口v2并开启fifo

[components][at] 修复合并导致的错误

[bsp][n32] 适配serial_v2,没有经过测试

[components][serial_v2] 格式化代码

[utest][serial_v2] 删除无意义的打印
2025-05-16 09:42:11 +08:00
1078249029
79c93b6571 [doxygen][audio] Naming anonymous enumeration type audio_stream
Signed-off-by: 1078249029 <1078249029@qq.com>
2025-03-11 19:46:10 -04:00
wumingzi
2cc7320356 [doxygen][audio] Fix group names by adding group_ prefix (#10094)
Signed-off-by: 1078249029 <1078249029@qq.com>
2025-03-11 11:53:23 +08:00
1078249029
ed8d0bc36b [doxygen][audio] Fix doxygen comments for audio component
Added comments for data structure and rt_audio_ops in dev_audio.h.
Enriched comments for macro group. Moved and renamed folder audio.

Signed-off-by: 1078249029 <1078249029@qq.com>
2025-03-06 11:45:07 +08:00
wumingzi
fb64052722 [RFC][doxygen]Doxygen comment standard processing (#10058)
Signed-off-by: 1078249029 <1078249029@qq.com>
2025-03-01 16:02:17 +08:00
Chen Wang
c40b79037c doxygen: add prefix for groups (#9991)
* doxygen: add prefix for groups

Add "group_" prefix to doxygen group names. This makes
it easier to grep with group name later.

This patch only modifies the groups defined in the pathes
of INPUT of documentation/Doxyfile:

INPUT = . \
        ../src \
        ../include \
        ../components/finsh \
        ../components/drivers/include/drivers \
        ../components/drivers/clk \
        ../components/dfs/dfs_v2/src \
        ../components/dfs/dfs_v2/include

Other groups are not touched.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>

* ci: fixed error report when run file_check.py

Such as:
- "please delete extra space at the end of this line."
- "the RT-Thread error code should return negative value. e.g. return
  -RT_ERROR"

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>

---------

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-02-15 12:15:19 +08:00
GuEe-GUI
aaf18e497c [DM/LED] Rename LED register/unregister
rt_hw_* is use for DM and not DM, but LED only use in DM.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-02-11 14:58:18 +08:00
GuEe-GUI
5a455cb615 [DM/PIN] Reset the value of PIN_NONE
PIN_NONE is '-1', is similar to '-RT_ERROR',
'-RT_EEMPTY' is better.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-02-11 14:58:18 +08:00
GuEe-GUI
578cfc0b2a [DM/CORE] Add IDA init in runtime
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-02-11 14:58:18 +08:00
GUI
1564735b5c [DM/SPI] Make CS pin config fixed in system (#9977)
Make a max CS pin value (16) for SPI, that will not
alloc `*cs_pins` by malloc, because drivers call
`rt_device_unregister` may not free item.

Fixup the QSPI init configure member in DM mode.

Make SoC Kconfig import easy.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-02-11 14:54:59 +08:00