summaryrefslogtreecommitdiff
path: root/bsp/cvitek
AgeCommit message (Collapse)Author
2025-03-17修复 MMCSD 宏拼写错误+内核开启LOG_D编译问题yixinghua121
2025-03-10bsp: cvitek: aarch64: add switchto-arm diagramChen Wang
In actual operation, we often forget how to connect the wires, so we just put the schematic diagram in the readme document for quick recall. Signed-off-by: Chen Wang <[email protected]>
2025-02-03bsp: cvitek: fix build error for aarch64Chen Wang
This patch fixed the error "bash: mksdimg.sh: No such file or directory" when building cv18xx_aarch64. The issue is introduced by commit "bsp: cvitek: removed useless files after using rttpkgtool". In addition, in order to unify the logic with riscv as much as possible, the name of the "milkv-duo256m" directory under cv18xx_aarch64 is uniformly changed to "duo256m". This patch also improve the README, adding instructions to install xz-utils. Signed-off-by: Chen Wang <[email protected]>
2025-01-30Update README.md (#9959)qilian
Fixed the issue where the absence of the u-boot-tools package caused rttpkgtools to fail to compile normally.
2025-01-29bsp: cvitek: c906_littel: fixed build warnings for board.cChen Wang
When building bsp/cvitek/c906_little, compiler warns: ``` board/board.c: In function 'rt_hw_board_init': board/board.c:26:5: warning: implicit declaration of function 'rt_hw_tick_init'; did you mean 'rt_hw_stack_init'? [-Wimplicit-function-declaration] 26 | rt_hw_tick_init(); | ^~~~~~~~~~~~~~~ | rt_hw_stack_init board/board.c:29:5: warning: implicit declaration of function 'rt_hw_uart_init'; did you mean 'rt_hw_board_init'? [-Wimplicit-function-declaration] 29 | rt_hw_uart_init(); | ^~~~~~~~~~~~~~~ | rt_hw_board_init ``` To remove these build warnings, include header files which declare these functions. Plus, remove the decalartion of `tick_isr()`, this function does not exist. Signed-off-by: Chen Wang <[email protected]>
2025-01-26bsp: cvitek: removed useless files after using rttpkgtoolChen Wang
Based on the patch "bsp: cvitek: use rttpkgtool to replace cvitek_bootloader", continue cleanup useless files. Signed-off-by: Chen Wang <[email protected]>
2025-01-26bsp: cvitek: use rttpkgtool to replace cvitek_bootloaderChen Wang
Originally, for riscv big and little cores under bsp/cvitek, after generating rtthread.bin, the cvitek_bootloader tool would be used to package it and generate fip.bin and boot.sd files that can be burned into sdcard. However, the cvitek_bootloader tool repository is relatively large, and it compiles and generates firmware such as fsbl, opensbi and uboot from the source code level. And when using it, it needs to be downloaded to the bsp/cvitek directory, which will introduce pollution to source files in the RTT repository under the original working path. The new solution uses rttpkgtool, which is similar to cvitek_bootloader, but it uses prebuilt firmware, so it is very small and does not introduce pollution to the source file. Signed-off-by: Chen Wang <[email protected]>
2025-01-23Revert "[action] add cvitek/c906_little ci" (#9945)Chen Wang
Revert "[action] add cvitek/c906_little ci (#9901)" This reverts commit 969e0e01ef603d3929a186e8bd03f3657ec8227c.
2025-01-23[action] add cvitek/c906_little ci (#9901)Supper Thomas
* [action] add cvitek/c906_little ci * Update bsp_buildings.yml * Update rtconfig.py
2025-01-20[bsp][cvitek] fix c906_little build warning in cache.cimcu
build warning: passing argument 1 of 'inv_icache_range' makes integer from pointer without a cast [-Wint-conversion] Analyze: The passed parameter type is void*, which is a pointer type, but the required type is uintptr_t, which is an integer type. Therefore, there will be a 'makes integer from pointer without a cast' warning. Solution: casting the void* pointer to uintptr_t, ensure that the function receives the correct type. Signed-off-by: zdtyuiop4444 <[email protected]>
2025-01-18bsp: cvitek: optimze build operations for aarch64Chen Wang
For bsp/cvitek, duo256m, the operation process is slightly different when building images for riscv and arm64. To improve the user experience, unify the building process and steps of the two as follows: - Enter c906_little and execute `scons` - Enter cv18xx_riscv/cv18xx_aarch64 and execute `scons` That's all. Finally, we can get `fip.bin` and `boot.sd` under `bsp/cvitek/output/milkv-duo256m`. Update the README.md accordingly. Signed-off-by: Chen Wang <[email protected]>
2025-01-16bsp/cvitek: print arch info. during boot-up (#9919)Chen Wang
Duo's CPU combination is more complicated: | BSP | B/L core| ISA | UART | | ------------- | ------- |---------------- |-------| | cv18xx_risc-v | Big | RISC-V C906 | UART0 | | c906-little | Littel | RISC-V C906 | UART1 | | cv18xx_aarch64| Big | ARM Cortex A53 | UART0 | Printing ISA and big and small core information during the boot process helps developers/testers determine the CPU and serial port corresponding to the current console. In addition, the RTT logo printing has already distinguished whether it is smart, so the bsp printing no longer distinguishes. Updated README to sync with this change. Signed-off-by: Chen Wang <[email protected]>
2025-01-16[bsp][cvitek] add cache opration functions for cache coherenceimcu
By default, the small core enables D-Cache without ensuring cache coherence. Therefore, when using shared memory, inconsistencies can occur in the data read by the small core and the big core. Solution: Migrate cache-related functions from the official duo-buildroot-sdk library to implement cache-related operations in rthw.h. This allows you to either disable D-Cache or call the flush_dcache_range function before reading and after writing for synchronization. It is recommended to use the flush_dcache_range function, as disabling D-Cache can have a significant performance impact. Signed-off-by: zdtyuiop4444 <[email protected]>
2025-01-16bsp: cvitek: fix bug in setting PLIC_PRIORITY[n]kenneth.liu
description: In the bsp/cvitek/c906_little/board/interrupt.c, There is an issue with setting the PLIC_PRIORITY[n]. analysis: PLIC_PRIORITY[n] each register corresponds to the priority of a hardware interrupt number. Solution: Each register is 4 bytes. Multiply the total number of IRQs by 4 instead of dividing by 4. Signed-off-by: Liu Gui <[email protected]>
2025-01-08bsp: cvitek: remove support for spinor/spinandChen Wang
Confirmed with milkv, only the sd card version is sold by default for duo in the market. The spi pins are provided through stamp holes, so that users can solder the corresponding components on their baseboard during secondary development. In order to simplify maintenance work, the mainline will only support the sd-card version and no longer support spinor/spinand. Updated config files the same in this patch. Signed-off-by: Chen Wang <[email protected]>
2025-01-01bsp: cvitek: remove RT_USING_VIRTIO for arm64Chen Wang
duo is a real hardware, no need for virtio. Disable RT_USING_VIRTIO and update configuration to latest. Signed-off-by: Chen Wang <[email protected]>
2024-12-30bsp: cvitek: update README for cv18xx_aarch64Chen Wang
Re-write README.md for aarch64. Signed-off-by: Chen Wang <[email protected]>
2024-12-30bsp: cvitek: update combine.sh for arm64Chen Wang
Move the combine.sh to under cv18xx_aarch64, so we can run this script the same as scons and no need to change cwd. Rename the folder boot to prebuild just becuase all the files under boot are prebuild binaries. Move the prebuilt fip.bin to under prebuild/milkv-duo256m because it's only for 256. Update combine.sh accordingly and output fip.bin to the output folder where we create fip.bin/boot.sd as other bsp. Signed-off-by: Chen Wang <[email protected]>
2024-12-30bsp: cvitek: use ioremap for arm64 coreChen Wang
For ARM, RT-smart and RT-standard both enable mmc (see rt_hw_board_init() in bsp/cvitek/cv18xx_aarch64/board/board.c, rt_hw_mmu_setup is called both for smart or standard). So ioremap is must to do for ARM. Signed-off-by: Chen Wang <[email protected]>
2024-12-26bsp: cvitek: doc updateChen Wang
Updated README for cvitek. Signed-off-by: Chen Wang <[email protected]>
2024-12-19bsp: cvitek: remove GPL license declarationChen Wang
GPL is conflict with Apache, which is used by RTT. See <https://www.apache.org/licenses/GPL-compatibility.html> Also clean up and remove some words such "LINUX". Signed-off-by: Chen Wang <[email protected]>
2024-12-18bsp: cvitek: update README for ext4 rootfs (#9785)Chen Wang
Now lwext4 package has supported ext4. Add description in README to introduce how to create rootfs of type ext4. Signed-off-by: Chen Wang <[email protected]>
2024-12-04update cvitek/README.mdflyingcys
Signed-off-by: flyingcys <[email protected]>
2024-11-26bsp: cvitek: fix warning on rtc driverChen Wang
When RTC is enabled, a warning appear during compiling: warning: implicit declaration of function 'rtc_alarm_enable' [-Wimplicit-function-declaration] 366 | rtc_alarm_enable(alarm->enable); | ^~~~~~~~~~~~~~~~ It's due to _rtc_set_alarm is not covered by RT_USING_ALARM. It's wrong. Solution: cover all functions including _rtc_get_alarm & _rtc_set_alarm under RT_USING_ALARM macro conditional defintion. Signed-off-by: Chen Wang <[email protected]>
2024-11-26bsp: cvitek: add introduction about rt-smart booting with rootfsChen Wang
README.md: add introduction about how to make rootfs(fat) and booting kernel with it. Plus some cleanup for this documentation. Signed-off-by: Chen Wang <[email protected]>
2024-11-26bsp: cvitek: support mount fat/ext rootfs for rt-smartChen Wang
Support mount rootfs automaticly during booting up. First try ext, then fat. Plus some code cleanup, such as remove BSP_USING_ON_CHIP_FLASH_FS, which is not defined and unused. Signed-off-by: Chen Wang <[email protected]>
2024-11-26bsp: cvitek: 906b: romfs -> diskfsChen Wang
ROMFS is Read-Only Memory Filesystem. But ext4/fat are not read-only. So renamed: - mnt_romfs.c -> mnt_diskfs.c - BSP_ROOTFS_TYPE_ROMFS -> BSP_ROOTFS_TYPE_DISKFS Signed-off-by: Chen Wang <[email protected]>
2024-11-25support milkv-duo rt-smartflyingcys
1. switches memory management to SLA 2. use ioremap modification driver Signed-off-by: flyingcys [email protected]
2024-11-24[klibc] add rt_vsnprintf_std.c and rename RT_KLIBC_USING_VSNPRINTF_LONGLONGMeco Man
2024-11-15[bsp][cvitek]fix milkv-duos-sd cann't startup big-core kernel (#9633)flyingcys
fix milkv-duos-sd cann't startup big-core kernel milkv-duos-sd use cv1813h folder store ld file Signed-off-by: flyingcys <[email protected]>
2024-11-08[bsp][cvitek] fix pinmux array order error (#9593)Alex Imcu
2024-10-23[kernel] Specification interrupt nested level variable declaration type (#9568)Yuqiang Wang
2024-09-25bsp:cvitek:add all function type of pinmuximcu
2024-09-13[drivers] Specifies the name of the drivers driver fileCXSforHPU
https://github.com/RT-Thread/rt-thread/pull/9420
2024-09-05bsp: cvitek: clean up useless variable assignments in SConstructChen Wang
CV18xx RISC-V C906L. Configuration value for CPU and ARCH are already defined in rtconfig.py. Remove these duplication from SConstruct. Signed-off-by: Chen Wang <[email protected]>
2024-09-03bsp: cvitek: fix cvitek uart driver can not repeat configureZ8MAN8
After first called from uart open, the dw8250_uart_configure API cannot be called again. Otherwise, this will mess up the device, and uart will not act properly to interrupt again. Analysis: Configure uart device will close recive interrupte, causing uart device to malfunction. Solution: After configure uart device, enable the device's recive interrupte. Signed-off-by: Shicheng Chu <[email protected]> Reviewed-by: Chen Wang <[email protected]>
2024-09-03[bsp/cvitek] eth driver support phy link detectflyingcys
Signed-off-by: flyingcys <[email protected]>
2024-08-28[bsp/cvitek]修正sdhci发送命令超时后触发两次信号量的问题heyuanjie87
修正命令超时后触发两次信号量的问题 详解: 中断状态寄存器的BIT0仅表示sdhci处理命令完成,完成结果由其它位指示,当出错时 BIT0也会值1产生中断 Signed-off-by: heyuanjie87 <[email protected]>
2024-08-27bsp: cvitek: Add support for duos_sdShicheng Chu
Supports both big and little cores of RISC-V C906, but does not support ARM cores. Currently, only UART drivers are supported on the peripherals. Signed-off-by: Shicheng Chu <[email protected]>
2024-08-27rename c906 FPU macro (#9290)flyingcys
1. 修改 ENABLE_FPU 为 ARCH_RISCV_FPU,与libcpu/common 保持统一 2. 对 bsp/cvitek/cv18xx_risc-v 中增加使能 ARCH_RISCV_FPU 的动作。解决了 issue #9075
2024-08-25bsp: cvitek: Add timer driverZ8MAN8
Signed-off-by: Shicheng Chu <[email protected]>
2024-08-23[device] add dev_ prefix for file namesCXSforHPU
2024-08-20bsp: cvitek: Canonically rename some macro definitionsZ8MAN8
Analysis: Some macro definition names are not standardized and lack prefixes. Solution: Add BSP_ prefix to GPIO_IRQ_BASE SYS_GPIO_IRQ_BASE PLIC_PHY_ADDR TIMER_CLK_FREQ UART_IRQ_BASE I2C_IRQ_BASE. Signed-off-by: Shicheng Chu <[email protected]>
2024-08-12bsp: cvitek: SConstruct: optimize drivers_path_prefixChen Wang
For bsp/cvitek, all drivers related files are moved to the directory bsp/cvitek/drivers, so the drivers_path_prefix processing in the SConstruct of the three bsp projects can be simplified. Signed-off-by: Chen Wang <[email protected]>
2024-08-07bsp: cvitek: fix c906_little IRQ_MAX_NR error numZ8MAN8
Analysis: The IRQ_MAX_NR value of c906_little is wrong. interrupt.h relies on IRQ_MAX_NR defined in rtconfig.h but does not explicitly include this header file. Solution: Change IRQ_MAX_NR to the correct value 61 in the datasheet. Explicitly include rtconfig.h in interrupt.h. Signed-off-by: Shicheng Chu <[email protected]> Reviewed-by: Chen Wang <[email protected]>
2024-08-07bsp: cvitek: fix cv18xx_risc-v IRQ_MAX_NR error numZ8MAN8
Analysis: The IRQ_MAX_NR value of cv18xx_risc-v is wrong. The wrong IRQ_MAX_NR will cause the install of an interrupt number larger than its value to fail. Solution: Change IRQ_MAX_NR to the correct value 101 in the datasheet. Signed-off-by: Shicheng Chu <[email protected]> Reviewed-by: Chen Wang <[email protected]>
2024-08-07bsp: cvitek: add support for RTCSYS_SARADCZ8MAN8
Cvitek adc dirver only supports one adc controller now, but the other adc controller RTCSYS_SARADC is missing. Signed-off-by: Shicheng Chu <[email protected]> Reviewed-by: Chen Wang <[email protected]>
2024-07-29bsp: enable KERNEL_REMAP for cvitek platformShell
Changes: - board.c: add static assert for KERNEL_VADDR_START to check if it's valid - board.h: updated deafult KERNEL_VADDR_START for standard version - config bsp for v5.2.0 smart requirements - kconfig: update bsp Kconfig for remap kernel Signed-off-by: Shell <[email protected]> Reviewed-on: https://github.com/RT-Thread/rt-thread/pull/9229 Reviewed-by: Chen Wang <[email protected]>
2024-07-29bsp: cvitek/c906B: feat: add config of bootfsShell
To support more choice on bootfs. romfs, cromfs are now supported on risc_v_big platform. Changes: - added mount operations under port - added prototypes for cromfs init APIs Signed-off-by: Shell <[email protected]> Reviewed-on: https://github.com/RT-Thread/rt-thread/pull/9229 Reviewed-by: Chen Wang <[email protected]>
2024-07-25bsp: cvitek: fix cv18xx_aarch64 mnt init blockingZ8MAN8
The aarch64 core of duo on the master cannot enter the console interface. It can only print the RT flag and hold it. Analysis: The latest commit that can work is ae6a328 ("Add psoc62, 61 config"). This phenomenon will occur after adding 754c59a ("[Feature] DFS mount auto by kernel parameters"). The specific reason is that when aarch bsp enables the device tree, the current u-boot will pass in bootargs, which contains "root=/dev/mmcblk0p2 rootwait rw", which means that the kernel is required to wait until the rootfs in /dev/mmcblk0p2 loaded successfully. However, the current aarch64 bsp default does not implement sdmmc device mounting, causing the kernel file system mounting module (rootfs_mnt_init() of components/drivers/core/mnt.c) to enter an infinite loop waiting. Solution: At present, we do not plan to modify the startup parameters of u-boot. The temporary solution adopted is to create a pseudo /dev/mmcblk0p2 device during the board initialization process, and then cancel the pseudo device after mnt is completed. This allows the kernel boot to be completed successfully. Signed-off-by: Shicheng Chu <[email protected]> Reviewed-by: Chen Wang <[email protected]>