mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-10-02 14:23:19 +08:00
bsp: cvitek: remove support for spinor/spinand
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 <unicorn_wang@outlook.com>
This commit is contained in:
@@ -146,9 +146,7 @@ $ scons --menuconfig
|
||||
```shell
|
||||
Board Type (milkv-duo) --->
|
||||
( ) milkv-duo
|
||||
( ) milkv-duo-spinor
|
||||
(X) milkv-duo256m
|
||||
( ) milkv-duo256m-spinor
|
||||
( ) milkv-duos
|
||||
```
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
function get_board_type()
|
||||
{
|
||||
BOARD_CONFIG=("CONFIG_BOARD_TYPE_MILKV_DUO" "CONFIG_BOARD_TYPE_MILKV_DUO_SPINOR" "CONFIG_BOARD_TYPE_MILKV_DUO_SPINAND" "CONFIG_BOARD_TYPE_MILKV_DUO256M" "CONFIG_BOARD_TYPE_MILKV_DUO256M_SPINOR" "CONFIG_BOARD_TYPE_MILKV_DUO256M_SPINAND" "CONFIG_BOARD_TYPE_MILKV_DUOS")
|
||||
BOARD_VALUE=("milkv-duo" "milkv-duo-spinor" "milkv-duo-spinand" "milkv-duo256m" "milkv-duo256m-spinor" "milkv-duo256m-spinand" "milkv-duos-sd")
|
||||
STORAGE_VAUE=("sd" "spinor" "spinand" "sd" "spinor" "spinand" "sd")
|
||||
BOARD_CONFIG=("CONFIG_BOARD_TYPE_MILKV_DUO" "CONFIG_BOARD_TYPE_MILKV_DUO256M" "CONFIG_BOARD_TYPE_MILKV_DUOS")
|
||||
BOARD_VALUE=("milkv-duo" "milkv-duo256m" "milkv-duos-sd")
|
||||
STORAGE_VAUE=("sd" "sd" "sd")
|
||||
|
||||
for ((i=0;i<${#BOARD_CONFIG[@]};i++))
|
||||
do
|
||||
|
||||
+135
-16
File diff suppressed because it is too large
Load Diff
@@ -58,18 +58,10 @@ choice
|
||||
select SOC_TYPE_CV180X
|
||||
bool "milkv-duo"
|
||||
|
||||
config BOARD_TYPE_MILKV_DUO_SPINOR
|
||||
select SOC_TYPE_CV180X
|
||||
bool "milkv-duo-spinor"
|
||||
|
||||
config BOARD_TYPE_MILKV_DUO256M
|
||||
select SOC_TYPE_SG2002
|
||||
bool "milkv-duo256m"
|
||||
|
||||
config BOARD_TYPE_MILKV_DUO256M_SPINOR
|
||||
select SOC_TYPE_SG2002
|
||||
bool "milkv-duo256m-spinor"
|
||||
|
||||
config BOARD_TYPE_MILKV_DUOS
|
||||
select SOC_TYPE_SG2000
|
||||
bool "milkv-duos"
|
||||
|
||||
@@ -3,12 +3,82 @@
|
||||
|
||||
/* RT-Thread Kernel */
|
||||
|
||||
/* klibc options */
|
||||
|
||||
/* rt_vsnprintf options */
|
||||
|
||||
#define RT_KLIBC_USING_VSNPRINTF_LONGLONG
|
||||
#define RT_KLIBC_USING_VSNPRINTF_STANDARD
|
||||
#define RT_KLIBC_USING_VSNPRINTF_DECIMAL_SPECIFIERS
|
||||
#define RT_KLIBC_USING_VSNPRINTF_EXPONENTIAL_SPECIFIERS
|
||||
#define RT_KLIBC_USING_VSNPRINTF_WRITEBACK_SPECIFIER
|
||||
#define RT_KLIBC_USING_VSNPRINTF_CHECK_NUL_IN_FORMAT_SPECIFIER
|
||||
#define RT_KLIBC_USING_VSNPRINTF_INTEGER_BUFFER_SIZE 32
|
||||
#define RT_KLIBC_USING_VSNPRINTF_DECIMAL_BUFFER_SIZE 32
|
||||
#define RT_KLIBC_USING_VSNPRINTF_FLOAT_PRECISION 6
|
||||
#define RT_KLIBC_USING_VSNPRINTF_MAX_INTEGRAL_DIGITS_FOR_DECIMAL 9
|
||||
#define RT_KLIBC_USING_VSNPRINTF_LOG10_TAYLOR_TERMS 4
|
||||
/* end of rt_vsnprintf options */
|
||||
|
||||
/* rt_vsscanf options */
|
||||
|
||||
/* end of rt_vsscanf options */
|
||||
|
||||
/* rt_memset options */
|
||||
|
||||
/* end of rt_memset options */
|
||||
|
||||
/* rt_memcpy options */
|
||||
|
||||
/* end of rt_memcpy options */
|
||||
|
||||
/* rt_memmove options */
|
||||
|
||||
/* end of rt_memmove options */
|
||||
|
||||
/* rt_memcmp options */
|
||||
|
||||
/* end of rt_memcmp options */
|
||||
|
||||
/* rt_strstr options */
|
||||
|
||||
/* end of rt_strstr options */
|
||||
|
||||
/* rt_strcasecmp options */
|
||||
|
||||
/* end of rt_strcasecmp options */
|
||||
|
||||
/* rt_strncpy options */
|
||||
|
||||
/* end of rt_strncpy options */
|
||||
|
||||
/* rt_strcpy options */
|
||||
|
||||
/* end of rt_strcpy options */
|
||||
|
||||
/* rt_strncmp options */
|
||||
|
||||
/* end of rt_strncmp options */
|
||||
|
||||
/* rt_strcmp options */
|
||||
|
||||
/* end of rt_strcmp options */
|
||||
|
||||
/* rt_strlen options */
|
||||
|
||||
/* end of rt_strlen options */
|
||||
|
||||
/* rt_strnlen options */
|
||||
|
||||
/* end of rt_strnlen options */
|
||||
/* end of klibc options */
|
||||
#define RT_NAME_MAX 32
|
||||
#define RT_CPUS_NR 1
|
||||
#define RT_ALIGN_SIZE 8
|
||||
#define RT_THREAD_PRIORITY_32
|
||||
#define RT_THREAD_PRIORITY_MAX 32
|
||||
#define RT_TICK_PER_SECOND 1000
|
||||
#define RT_USING_OVERFLOW_CHECK
|
||||
#define RT_USING_HOOK
|
||||
#define RT_HOOK_USING_FUNC_PTR
|
||||
#define RT_USING_IDLE_HOOK
|
||||
@@ -18,19 +88,13 @@
|
||||
#define RT_TIMER_THREAD_PRIO 4
|
||||
#define RT_TIMER_THREAD_STACK_SIZE 2048
|
||||
|
||||
/* kservice optimization */
|
||||
/* kservice options */
|
||||
|
||||
/* end of kservice optimization */
|
||||
|
||||
/* klibc optimization */
|
||||
|
||||
#define RT_KLIBC_USING_VSNPRINTF_LONGLONG
|
||||
/* end of klibc optimization */
|
||||
/* end of kservice options */
|
||||
#define RT_USING_DEBUG
|
||||
#define RT_DEBUGING_ASSERT
|
||||
#define RT_DEBUGING_COLOR
|
||||
#define RT_DEBUGING_CONTEXT
|
||||
#define RT_USING_OVERFLOW_CHECK
|
||||
|
||||
/* Inter-Thread communication */
|
||||
|
||||
@@ -60,6 +124,7 @@
|
||||
#define ARCH_RISCV_FPU
|
||||
#define ARCH_RISCV_FPU_D
|
||||
#define ARCH_RISCV64
|
||||
#define ARCH_USING_NEW_CTX_SWITCH
|
||||
|
||||
/* RT-Thread Components */
|
||||
|
||||
|
||||
@@ -288,7 +288,6 @@ CONFIG_RT_DFS_ELM_MUTEX_TIMEOUT=3000
|
||||
|
||||
CONFIG_RT_USING_DFS_DEVFS=y
|
||||
CONFIG_RT_USING_DFS_ROMFS=y
|
||||
# CONFIG_RT_USING_DFS_ROMFS_USER_ROOT is not set
|
||||
# CONFIG_RT_USING_DFS_CROMFS is not set
|
||||
# CONFIG_RT_USING_DFS_TMPFS is not set
|
||||
# CONFIG_RT_USING_DFS_MQUEUE is not set
|
||||
@@ -1380,7 +1379,6 @@ CONFIG_BSP_GPIO_IRQ_BASE=76
|
||||
CONFIG_BSP_SYS_GPIO_IRQ_BASE=86
|
||||
CONFIG_SOC_TYPE_SG2002=y
|
||||
CONFIG_BOARD_TYPE_MILKV_DUO256M=y
|
||||
# CONFIG_BOARD_TYPE_MILKV_DUO256M_SPINOR is not set
|
||||
|
||||
#
|
||||
# General Drivers Configuration
|
||||
|
||||
@@ -42,10 +42,6 @@ choice
|
||||
select SOC_TYPE_SG2002
|
||||
bool "milkv-duo256m"
|
||||
|
||||
config BOARD_TYPE_MILKV_DUO256M_SPINOR
|
||||
select SOC_TYPE_SG2002
|
||||
bool "milkv-duo256m-spinor"
|
||||
|
||||
endchoice
|
||||
|
||||
source "$(BSP_DIR)/board/Kconfig"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -64,18 +64,10 @@ choice
|
||||
select SOC_TYPE_CV180X
|
||||
bool "milkv-duo"
|
||||
|
||||
config BOARD_TYPE_MILKV_DUO_SPINOR
|
||||
select SOC_TYPE_CV180X
|
||||
bool "milkv-duo-spinor"
|
||||
|
||||
config BOARD_TYPE_MILKV_DUO256M
|
||||
select SOC_TYPE_SG2002
|
||||
bool "milkv-duo256m"
|
||||
|
||||
config BOARD_TYPE_MILKV_DUO256M_SPINOR
|
||||
select SOC_TYPE_SG2002
|
||||
bool "milkv-duo256m-spinor"
|
||||
|
||||
config BOARD_TYPE_MILKV_DUOS
|
||||
select SOC_TYPE_SG2000
|
||||
bool "milkv-duos"
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
#include <stdio.h>
|
||||
#include <drivers/dev_pin.h>
|
||||
|
||||
#if defined(BOARD_TYPE_MILKV_DUO256M) || defined(BOARD_TYPE_MILKV_DUO256M_SPINOR)
|
||||
#if defined(BOARD_TYPE_MILKV_DUO256M)
|
||||
#define LED_PIN "E02" /* Onboard LED pins */
|
||||
#elif defined(BOARD_TYPE_MILKV_DUO) || defined(BOARD_TYPE_MILKV_DUO_SPINOR)
|
||||
#elif defined(BOARD_TYPE_MILKV_DUO)
|
||||
#define LED_PIN "C24" /* Onboard LED pins */
|
||||
#elif defined(BOARD_TYPE_MILKV_DUOS)
|
||||
#define LED_PIN "A29" /* Onboard LED pins */
|
||||
|
||||
@@ -5,48 +5,7 @@
|
||||
|
||||
/* klibc options */
|
||||
|
||||
/* ------------rt_memset options------------ */
|
||||
|
||||
|
||||
/* ------------rt_memcpy options------------ */
|
||||
|
||||
|
||||
/* ------------rt_memmove options------------ */
|
||||
|
||||
|
||||
/* ------------rt_memcmp options------------ */
|
||||
|
||||
|
||||
/* ------------rt_strstr options------------ */
|
||||
|
||||
|
||||
/* ------------rt_strcasecmp options------------ */
|
||||
|
||||
|
||||
/* ------------rt_strncpy options------------ */
|
||||
|
||||
|
||||
/* ------------rt_strcpy options------------ */
|
||||
|
||||
|
||||
/* ------------rt_strncmp options------------ */
|
||||
|
||||
|
||||
/* ------------rt_strcmp options------------ */
|
||||
|
||||
|
||||
/* ------------rt_strlen options------------ */
|
||||
|
||||
|
||||
/* ------------rt_strlen options------------ */
|
||||
|
||||
/* ------------rt_strnlen options------------ */
|
||||
|
||||
|
||||
/* ------------rt_vsscanf options------------ */
|
||||
|
||||
|
||||
/* ------------rt_vsnprintf options------------ */
|
||||
/* rt_vsnprintf options */
|
||||
|
||||
#define RT_KLIBC_USING_VSNPRINTF_LONGLONG
|
||||
#define RT_KLIBC_USING_VSNPRINTF_STANDARD
|
||||
@@ -59,6 +18,59 @@
|
||||
#define RT_KLIBC_USING_VSNPRINTF_FLOAT_PRECISION 6
|
||||
#define RT_KLIBC_USING_VSNPRINTF_MAX_INTEGRAL_DIGITS_FOR_DECIMAL 9
|
||||
#define RT_KLIBC_USING_VSNPRINTF_LOG10_TAYLOR_TERMS 4
|
||||
/* end of rt_vsnprintf options */
|
||||
|
||||
/* rt_vsscanf options */
|
||||
|
||||
/* end of rt_vsscanf options */
|
||||
|
||||
/* rt_memset options */
|
||||
|
||||
/* end of rt_memset options */
|
||||
|
||||
/* rt_memcpy options */
|
||||
|
||||
/* end of rt_memcpy options */
|
||||
|
||||
/* rt_memmove options */
|
||||
|
||||
/* end of rt_memmove options */
|
||||
|
||||
/* rt_memcmp options */
|
||||
|
||||
/* end of rt_memcmp options */
|
||||
|
||||
/* rt_strstr options */
|
||||
|
||||
/* end of rt_strstr options */
|
||||
|
||||
/* rt_strcasecmp options */
|
||||
|
||||
/* end of rt_strcasecmp options */
|
||||
|
||||
/* rt_strncpy options */
|
||||
|
||||
/* end of rt_strncpy options */
|
||||
|
||||
/* rt_strcpy options */
|
||||
|
||||
/* end of rt_strcpy options */
|
||||
|
||||
/* rt_strncmp options */
|
||||
|
||||
/* end of rt_strncmp options */
|
||||
|
||||
/* rt_strcmp options */
|
||||
|
||||
/* end of rt_strcmp options */
|
||||
|
||||
/* rt_strlen options */
|
||||
|
||||
/* end of rt_strlen options */
|
||||
|
||||
/* rt_strnlen options */
|
||||
|
||||
/* end of rt_strnlen options */
|
||||
/* end of klibc options */
|
||||
#define RT_NAME_MAX 8
|
||||
#define RT_USING_SMART
|
||||
@@ -195,6 +207,7 @@
|
||||
#define RT_USING_SERIAL_V1
|
||||
#define RT_SERIAL_USING_DMA
|
||||
#define RT_SERIAL_RB_BUFSZ 64
|
||||
#define RT_USING_SERIAL_BYPASS
|
||||
#define RT_USING_CPUTIME
|
||||
#define RT_USING_CPUTIME_RISCV
|
||||
#define CPUTIME_TIMER_FREQ 25000000
|
||||
@@ -337,6 +350,7 @@
|
||||
/* end of Utilities */
|
||||
#define RT_USING_LWP
|
||||
#define LWP_DEBUG
|
||||
#define LWP_USING_RUNTIME
|
||||
#define RT_LWP_MAX_NR 30
|
||||
#define LWP_TASK_STACK_SIZE 16384
|
||||
#define RT_CH_MSG_MAX_NR 1024
|
||||
|
||||
@@ -12,9 +12,9 @@ CPPDEFINES = []
|
||||
CPPPATH = [cwd]
|
||||
|
||||
CHIP_TYPE = 'cv180x'
|
||||
if GetDepend('BOARD_TYPE_MILKV_DUO256M') or GetDepend('BOARD_TYPE_MILKV_DUO256M_SPINOR') or GetDepend('BOARD_TYPE_MILKV_DUO256M_SPINAND') or GetDepend('BOARD_TYPE_MILKV_DUOS'):
|
||||
if GetDepend('BOARD_TYPE_MILKV_DUO256M') or GetDepend('BOARD_TYPE_MILKV_DUOS'):
|
||||
CHIP_TYPE = 'cv181x'
|
||||
elif GetDepend('BOARD_TYPE_MILKV_DUO') or GetDepend('BOARD_TYPE_MILKV_DUO_SPINOR') or GetDepend('BOARD_TYPE_MILKV_DUO_SPINAND'):
|
||||
elif GetDepend('BOARD_TYPE_MILKV_DUO'):
|
||||
CHIP_TYPE = 'cv180x'
|
||||
|
||||
CPPPATH += [cwd + r'/libraries']
|
||||
|
||||
@@ -154,7 +154,7 @@ static const struct rt_adc_ops _adc_ops =
|
||||
};
|
||||
|
||||
|
||||
#if defined(BOARD_TYPE_MILKV_DUO) || defined(BOARD_TYPE_MILKV_DUO_SPINOR)
|
||||
#if defined(BOARD_TYPE_MILKV_DUO)
|
||||
|
||||
/*
|
||||
* cv180xb supports
|
||||
@@ -189,7 +189,7 @@ static const char *pinname_whitelist_adc3_nodie[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#elif defined(BOARD_TYPE_MILKV_DUO256M) || defined(BOARD_TYPE_MILKV_DUO256M_SPINOR)
|
||||
#elif defined(BOARD_TYPE_MILKV_DUO256M)
|
||||
|
||||
/*
|
||||
* sg2002 supports
|
||||
|
||||
@@ -428,7 +428,7 @@ static void dw_iic_init(dw_iic_regs_t *iic_base)
|
||||
dw_iic_set_standard_scl_lcnt(iic_base, (((IC_CLK * 4700) / 1000U) - 1U));
|
||||
}
|
||||
|
||||
#if defined(BOARD_TYPE_MILKV_DUO) || defined(BOARD_TYPE_MILKV_DUO_SPINOR)
|
||||
#if defined(BOARD_TYPE_MILKV_DUO)
|
||||
|
||||
#ifdef BSP_USING_I2C0
|
||||
static const char *pinname_whitelist_i2c0_scl[] = {
|
||||
@@ -487,7 +487,7 @@ static const char *pinname_whitelist_i2c4_sda[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#elif defined(BOARD_TYPE_MILKV_DUO256M) || defined(BOARD_TYPE_MILKV_DUO256M_SPINOR)
|
||||
#elif defined(BOARD_TYPE_MILKV_DUO256M)
|
||||
|
||||
#ifdef BSP_USING_I2C0
|
||||
// I2C0 is not ALLOWED for Duo256
|
||||
|
||||
@@ -137,7 +137,7 @@ static struct cvi_pwm_dev cvi_pwm[] =
|
||||
};
|
||||
|
||||
|
||||
#if defined(BOARD_TYPE_MILKV_DUO) || defined(BOARD_TYPE_MILKV_DUO_SPINOR)
|
||||
#if defined(BOARD_TYPE_MILKV_DUO)
|
||||
|
||||
#ifdef BSP_USING_PWM0
|
||||
static const char *pinname_whitelist_pwm0[] = {
|
||||
@@ -209,7 +209,7 @@ static const char *pinname_whitelist_pwm15[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#elif defined(BOARD_TYPE_MILKV_DUO256M) || defined(BOARD_TYPE_MILKV_DUO256M_SPINOR)
|
||||
#elif defined(BOARD_TYPE_MILKV_DUO256M)
|
||||
|
||||
#ifdef BSP_USING_PWM0
|
||||
static const char *pinname_whitelist_pwm0[] = {
|
||||
|
||||
@@ -225,7 +225,7 @@ static const struct rt_spi_ops _spi_ops =
|
||||
.xfer = spi_xfer,
|
||||
};
|
||||
|
||||
#if defined(BOARD_TYPE_MILKV_DUO) || defined(BOARD_TYPE_MILKV_DUO_SPINOR) || defined(BOARD_TYPE_MILKV_DUO256M) || defined(BOARD_TYPE_MILKV_DUO256M_SPINOR)
|
||||
#if defined(BOARD_TYPE_MILKV_DUO) || defined(BOARD_TYPE_MILKV_DUO256M)
|
||||
// For Duo / Duo 256m, only SPI2 are exported on board.
|
||||
#ifdef BSP_USING_SPI0
|
||||
static const char *pinname_whitelist_spi0_sck[] = {
|
||||
|
||||
@@ -240,7 +240,7 @@ static void rt_hw_uart_isr(int irqno, void *param)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(BOARD_TYPE_MILKV_DUO) || defined(BOARD_TYPE_MILKV_DUO_SPINOR)
|
||||
#if defined(BOARD_TYPE_MILKV_DUO)
|
||||
|
||||
#ifdef BSP_USING_UART0
|
||||
static const char *pinname_whitelist_uart0_rx[] = {
|
||||
@@ -301,7 +301,7 @@ static const char *pinname_whitelist_uart4_tx[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#elif defined(BOARD_TYPE_MILKV_DUO256M) || defined(BOARD_TYPE_MILKV_DUO256M_SPINOR)
|
||||
#elif defined(BOARD_TYPE_MILKV_DUO256M)
|
||||
|
||||
#ifdef BSP_USING_UART0
|
||||
static const char *pinname_whitelist_uart0_rx[] = {
|
||||
|
||||
@@ -22,23 +22,3 @@ lzma -c -9 -f -k ${PROJECT_PATH}/${IMAGE_NAME} > ${PROJECT_PATH}/dtb/${BOARD_TYP
|
||||
|
||||
mkdir -p ${ROOT_PATH}/output/${BOARD_TYPE}
|
||||
./mkimage -f ${PROJECT_PATH}/dtb/${BOARD_TYPE}/multi.its -r ${ROOT_PATH}/output/${BOARD_TYPE}/boot.${STORAGE_TYPE}
|
||||
|
||||
if [ "${STORAGE_TYPE}" == "spinor" ] || [ "${STORAGE_TYPE}" == "spinand" ]; then
|
||||
|
||||
check_bootloader || exit 0
|
||||
|
||||
pushd cvitek_bootloader
|
||||
|
||||
. env.sh
|
||||
get_build_board ${BOARD_TYPE}
|
||||
|
||||
CHIP_ARCH_L=$(echo $CHIP_ARCH | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
echo "board: ${MV_BOARD_LINK}"
|
||||
|
||||
IMGTOOL_PATH=build/tools/common/image_tool
|
||||
FLASH_PARTITION_XML=build/boards/"${CHIP_ARCH_L}"/"${MV_BOARD_LINK}"/partition/partition_"${STORAGE_TYPE}".xml
|
||||
python3 "$IMGTOOL_PATH"/raw2cimg.py "${ROOT_PATH}"/output/"${BOARD_TYPE}"/boot."$STORAGE_TYPE" "${ROOT_PATH}/output/${BOARD_TYPE}" "$FLASH_PARTITION_XML"
|
||||
|
||||
popd
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user