Commit Graph

16103 Commits

Author SHA1 Message Date
Fan YANG 1a1514640a [components][drivers][mmc] add HS400 support to mmc driver
- added HS400 supprt (both eMMC5.0 and eMMC5.1 flavor are supported)

Signed-off-by: Fan YANG <fan.yang@hpmicro.com>
2024-05-26 12:36:02 +08:00
Chen Wang 5dd3b7427a
Accumulated patchsets for bsp/cvitek (#8968)
* bsp: cvitek: kconfig: add wdt for cv18xx_riscv

Add Watchdog timer in Kconfig.

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

* drv: cvitek: remove using macro from source file

Building of source file should be controlled by SConscript,
but not in source file itself.

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

* bsp: cvitek: kconfig: add i2c for cv18xx_riscv

Add I2C in Kconfig for c906B.

Note, the IRQ# is different from that of c906L.

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

* bsp: cvitek: kconfig: add rtc for cv18xx_riscv

Add RTC in Kconfig for c906B.

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

* bsp: cvitek: fix channel issue for pwm driver

The original code confuses the concepts of controllers and channels.
Fixed it and do some code cleanup.

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

* bsp:cvitek: add i2c pinmux config for cv18xx_riscv

Pinmux in driver code is controlled by SOC type, bcos driver
code should be general and support all pins defined by SoC.

Pinmux configuration in Kconfig is controlled by BOARD type,
bcos when we operate on board, it does not expose all chip-level
pin signals and we can only use part of them.

Following is I2C signals exported by duo family. Details see
https://milkv.io/docs/duo/overview.

Note: we have not added support for duo-S.

Duo
===

NAME    I2C         CV1800B/GPIO    <PINNAME>__<FUNCNAME>
----    ---         ------------    ---------------------
GP0     I2C0_SCL    XGPIOA[28]      IIC0_SCL__IIC0_SCL
GP1     I2C0_SDA    XGPIOA[29]      IIC0_SDA__IIC0_SDA

GP4     I2C1_SCL    PWR_GPIO[19]    SD1_D2__IIC1_SCL
GP9     I2C1_SCL    PWR_GPIO[18]    SD1_D3__IIC1_SCL
GP11    I2C1_SCL    XGPIOC[10]      PAD_MIPIRX0N__IIC1_SCL
GP5     I2C1_SDA    PWR_GPIO[20]    SD1_D1__IIC1_SDA
GP8     I2C1_SDA    PWR_GPIO[21]    SD1_D0__IIC1_SDA
GP10    I2C1_SDA    XGPIOC[9]       PAD_MIPIRX1P__IIC1_SDA

GP7     I2C3_SCL    PWR_GPIO[22]    SD1_CMD__IIC3_SCL
GP6     I2C3_SDA    PWR_GPIO[23]    SD1_CLK__IIC3_SDA

Duo 256m
========

NAME    I2C         CV1800B/GPIO    <PINNAME>__<FUNCNAME>
----    ---         ------------    ---------------------
GP4     I2C1_SCL    PWR_GPIO[19]    SD1_D2__IIC1_SCL
GP9     I2C1_SCL    PWR_GPIO[18]    SD1_D3__IIC1_SCL
GP5     I2C1_SDA    PWR_GPIO[20]    SD1_D1__IIC1_SDA
GP8     I2C1_SDA    PWR_GPIO[21]    SD1_D0__IIC1_SDA

GP11    I2C2_SCL    XGPIOC[15]      PAD_MIPI_TXP1__IIC2_SCL
GP10    I2C2_SDA    XGPIOC[14]      PAD_MIPI_TXM1__IIC2_SDA

GP7     I2C3_SCL    PWR_GPIO[22]    SD1_CMD__IIC3_SCL
GP6     I2C3_SDA    PWR_GPIO[23]    SD1_CLK__IIC3_SDA

Duo S
=====

NAME    I2C         CV1800B/GPIO    <PINNAME>__<FUNCNAME>
----    ---         ------------    ---------------------

J3-B18  I2C1_SCL    XGPIOB[18]      VIVO_D3__IIC1_SCL
J3-B12  I2C1_SCL    XGPIOB[12]      VIVO_D9__IIC1_SCL
J3-B11  I2C1_SDA    XGPIOB[11]      VIVO_D10__IIC1_SDA

J3-B13  I2C2_SCL    XGPIOB[13]      VIVO_D8__IIC2_SCL
J4-E1   I2C2_SCL    PWR_GPIO[1]     PWR_GPIO1__IIC2_SCL
J3-B14  I2C2_SDA    XGPIOB[14]      VIVO_D7__IIC2_SDA
J4-E2   I2C2_SDA    PWR_GPIO[2]     PWR_GPIO2__IIC2_SDA

J3-B20  I2C4_SCL    XGPIOB[20]      VIVO_D1__IIC4_SCL
J4-B1   I2C4_SCL    XGPIOB[1]       ADC3__IIC4_SCL
J3-B21  I2C4_SDA    XGPIOB[21]      VIVO_D0__IIC4_SDA
J4-B2   I2C4_SDA    XGPIOB[2]       ADC2__IIC4_SDA

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

* bsp:cvitek: remove using macro from source file for i2c

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

* bsp:cvitek: unify menu message text for i2c as other drivers

Other dirvers has no extra word "HW".

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

* bsp:cvitek: add i2c pinmux config for c906_little

Porting what we have done in commit "bsp:cvitek: add i2c pinmux config
for cv18xx_riscv" to c906_little.

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

---------

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: flyingcys <flyingcys@163.com>
Co-authored-by: flyingcys <flyingcys@163.com>
2024-05-22 08:19:07 +08:00
zms123456 adf2b35ec6
[component][driver]init dm serial naming framework in a separate phase (#8971)
init dm serial naming framework in a phase
2024-05-21 22:36:20 +08:00
Shell 6b12bce22f
[quality] fixup compiler warning (#8961)
Signed-off-by: Shell <smokewood@qq.com>
2024-05-21 19:47:42 +08:00
Shell 5f947863b4
[dfsv2] fixup out-of-memory access (#8973)
This change addresses a potential out-of-memory access issue in the
devfs filesystem component. The issue arises when the `rt_malloc`
function allocates memory for a path string without accounting for
the null terminator, leading to undefined behavior.

As the manual documented:

> DESCRIPTION
>   The strlen() function calculates the length of the string pointed to
>   by s, excluding the terminating null byte ('\0').

To fix this, the memory allocation size was increased by one byte
to ensure space for the null terminator. This prevents potential
out-of-memory access and ensures proper string termination.

Signed-off-by: Shell <smokewood@qq.com>
2024-05-21 19:45:08 +08:00
zms123456 6101f1fd29
[components][driver]add isr statistics (#8955)
add isr statistics
2024-05-21 09:01:42 +08:00
Astrozen ce913b95c7
[tools/cmake] fix the issue of the missing link flags added in Sconscript (#8957) 2024-05-21 08:58:26 +08:00
Shell e82c53559b
[utest] add device find (#8959)
* [utest] add device find

Signed-off-by: Shell <smokewood@qq.com>

* fixup: add test

* fixup: ptr aliasing

* quality: meaning parameter

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-05-21 08:56:35 +08:00
蒙蒙plus 2f559906d6 feat(bsp): hc32L196增加IAR_8.40支持
Signed-off-by: 蒙蒙plus <chengmeng_2@outlook.com>
2024-05-17 18:38:05 -04:00
Shell f2d6325b43
[smart] select console device dynamically (#8949)
* [smart] select console device dynamically

- Fixed compiler warning on terminal subsystem for
  `components/lwp/terminal/terminal.h`
- Updated default console setup to dynamically select an appropriate tty
  device based on the configured console device name.

Signed-off-by: Shell <smokewood@qq.com>

* fixup: remove useless codes

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-05-17 13:19:00 +08:00
JamieTx 3d30b56c86 [HC32] Fixed a bug about erase flash. 2024-05-16 19:15:38 -04:00
sheltonyu 194fd6df05 [bsp/at32] 1.fixed f402 uart7/8 pierph clock source error, 2.fixed compiling error of drv_usart_v2.c with no dma 2024-05-16 19:15:17 -04:00
Shell e25fc8b511
[libcpu/arm64] add C11 atomic ticket spinlock (#8882)
* [libcpu/arm64] add C11 atomic ticket spinlock

Replace the former implementation of flag-based spinlock which is unfair

Besides, C11 atomic implementation is more readable (it's C anyway),
and maintainable. Cause toolchain can use their builtin optimization and
tune for different micro-architectures. For example armv8.5 introduces a
better instruction. The compiler can help with that when it knows your
target platform in support of it.

Signed-off-by: Shell <smokewood@qq.com>

* fixup: RT_CPUS_NR

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-05-16 15:45:12 +08:00
xiao-mang e46333496f
fix specified network card not taking effect with msh's ping error (#8937)
* fix specified network card not taking effect with msh's ping error

* fix specified network card not taking effect with msh's ping error
2024-05-16 15:43:50 +08:00
zms123456 ed002bb84a
[drivers][serial]fix error in getting serial_tty settings (#8953)
fix error in getting serial_tty settings
2024-05-16 15:36:16 +08:00
flyingcys ec8ff90a4a
[bsp/cvitek]update gpio driver (#8946)
update gpio driver
2024-05-13 18:20:57 -04:00
liYangYang 78bdf67ab2
[drivers][ofw] fix ofw_alias_scan() bug (#8908)
* fix ofw_alias_scan() bug

* fix tag_len
2024-05-13 20:56:32 +08:00
atwww b421b4e1f4
修复C++11 thread_local对象析构函数与实际内存释放动作顺序相反问题 2024-05-11 13:50:02 -04:00
Yang Xijing f55187f830 [include/rtthread.h] rt_thread_close函数声明应当与RT_USING_HEAP无关 2024-05-11 13:42:27 -04:00
Meco Man 634f50572e
[tools] fix env toolchain path parse issue (#8936) 2024-05-11 16:06:23 +08:00
zms123456 151a96cb88
[components][drivers]fix compiler error in serial dm (#8927)
fix compiler error in serial dm
2024-05-11 11:16:26 +08:00
xiao-mang b3277fa704
fix eth error (#8929)
* fix eth error

* fix eth error

* fix eth error

* fix eth error

* fix eth error
2024-05-11 11:10:53 +08:00
Shell 989cc61f48
[hrtimer] fixup use-after-free (#8928)
Signed-off-by: Shell <smokewood@qq.com>
2024-05-11 08:53:42 +08:00
zhao maosheng 5dba9a4214 remove intr disable 2024-05-10 14:39:53 +08:00
zhao maosheng e2214cc899 add percpu interrupt info 2024-05-10 14:39:53 +08:00
Shell 017b2a5a44
[smart] fixup arm64 aspace switch (#8925)
* [smart] fixup arm64 aspace switch

Signed-off-by: Shell <smokewood@qq.com>

* fixup: arm add arch_kernel_mmu_table_get

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-05-10 09:17:19 +08:00
Rbb666 5712ff1a32 [renesas][hmi-board]update lvgl config and doc. 2024-05-09 14:44:58 +08:00
LZero 1cac9e92b5 Stm32F411 Blackpill CubeMX delete SPI_NSS 2024-05-09 00:37:10 -04:00
geniusgogo 79b3d5ec1e fix_serial_baudrate_set 2024-05-09 00:35:46 -04:00
geniusgogo f770f543a6 fix RT_DEBUGING_ASSERT 2024-05-09 00:33:32 -04:00
sp-cai 95f0b029b0 [BSP][HC32F460]清理已不再使用的文件
PWM 配置文件 pwm_tmra_config.h 已合并到 pwm_tmr_config.h 了。
2024-05-08 18:09:17 -04:00
WaterFishJ 5f077a6df0 [bsp][at32]修复at32_transmit返回类型错误 2024-05-08 18:08:59 -04:00
liYangYang dbf8a26e6c
[libcpu][aarch64] Fixed the rt_hw_secondary_cpu_bsp_start() bug (#8898)
* fix rt_hw_secondary_cpu_bsp_start() bug

* timer init

* comment
2024-05-08 19:48:17 +08:00
Bernard Xiong 73153ac06a
[tools] fix the issue of cc detection failure in Windows (#8914) 2024-05-08 10:50:45 +08:00
Meco Man 0871140759 [kernel][timer] remove wordy logs 2024-05-07 21:50:52 -04:00
Rbb666 a723014e32
[renesas][hmi-board]Support lvgl-9.x 2024-05-07 21:43:52 -04:00
wdfk-prog 7879986e38
[timer] The rt_timer_check and _soft_timer_check functions are merged (#8884) 2024-05-08 09:27:38 +08:00
Shell 48bd0e49f2
[ipc] support of lockless rt_completion (#8887)
* [ipc] lockless rt_completion implementation

The new rt_completion implemented by lockless algorithm can improve timer resolution for up to ~12%, compare to sem IPC.

Signed-off-by: Shell <smokewood@qq.com>

* fixup: error

* remove useless changes

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-05-08 09:25:57 +08:00
Shell 9ba6cec663
[libcpu/arm64] dealing with mem region out of kernel space (#8847)
* [ofw] dealing with mem region out of kernel space

- Fix parameter checking in _out_of_range() that NULL is excluded for
  fixed mapping
- Split page install with a deferred stage to avoid mapping over
  ARCH_EARLY_MAP_SIZE

Signed-off-by: Shell <smokewood@qq.com>

* fixup: restrict vstart for using of RT_NULL

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-05-08 09:23:31 +08:00
Shell 6977cf9101
[src] add rt_hw_cpu_id() wrapper API (#8894)
* [src] add rt_hw_cpu_id() wrapper API

rt_hw_cpu_id() is an unsafe API which should not be used by most codes
directly. It's error-prone because it must be used in proper context,
otherwise it can lead to errors and unpredictable behavior.

This patch adds a wrapper API for rt_hw_cpu_id() to address this risk.
It includes the context-checking functionality and provides a safer
alternative for obtaining CPU IDs, ensuring that it is used correctly
within the appropriate context.

Signed-off-by: Shell <smokewood@qq.com>

* fixup UMP

* update API & comment

* ci: cpp_check

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-05-08 09:22:09 +08:00
geniusgogo 02e0334ac3 fix_serial_baudrate_set
Signed-off-by: geniusgogo <xpxyr@sina.com>
2024-05-07 19:03:14 -04:00
luhuadong 1e9ed637d8 docs: fix source code catalog Name item 2024-05-07 19:02:02 -04:00
QTbin 7245dbd54f 修改scons的脚本文件,使其适配更多芯片的工程生成 2024-05-07 02:03:28 -04:00
Meco Man 84f8d209c4 [stm32l4] export env 2024-05-07 13:27:15 +08:00
zms123456 9112dffec8
[src][Kconfig]make RT_ASSERT independent of RT_USING_DEUBG 2024-05-06 20:40:30 -04:00
Meco Man 12ad1703df [bsp][stm32l4] remove local HAL 2024-05-06 21:42:10 +08:00
Meco Man ac45676830 [stm32l4] select PKG_USING_STM32L4_HAL_DRIVER 2024-05-06 21:42:10 +08:00
Meco Man b29b29b205 [stm32l4] remove HAL 2024-05-06 21:42:10 +08:00
Meco Man 0db3cfacda [stm32l4] remove STM32L4xx_HAL/CMSIS 2024-05-06 21:42:10 +08:00
xiao-mang 89164b19a8
fix art-pi smart boot from emmc (#8904)
* fix art-pi smart boot from emmc

* fix art-pi smart boot from emmc

* fix art-pi smart boot from emmc
2024-05-06 13:31:17 +08:00