Skip to content

Commit 7e302f7

Browse files
committed
k230 sdk release v2.0
1 parent 66dd75f commit 7e302f7

File tree

238 files changed

+50179
-5670
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+50179
-5670
lines changed

Kconfig.board

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ config BOARD_K230_CANMV_DONGSHANPI
4949
help
5050
"CANMV(DONGSHANPI)";
5151

52+
config BOARD_K230_CANMV_RTT_EVB
53+
bool "K230 CANMV(rtt evb)"
54+
help
55+
"CANMV(rtt evb)";
56+
5257
config BOARD_K230D_CANMV_BPI
5358
bool "K230 CANMV(BPI)"
5459
help

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ prepare_sourcecode:prepare_toolchain
120120
#ai
121121
@echo "download nncase sdk"
122122
@rm -rf src/big/utils/; rm -rf src/big/ai;
123-
@wget -q --show-progress $(DOWNLOAD_URL)/downloads/kmodel/kmodel_v2.9.0.tgz -O - | tar -xzC src/big/
124-
@wget -q --show-progress $(DOWNLOAD_URL)/downloads/nncase/nncase_k230_rtos_v2.9.0.tgz -O - | tar -xzC src/big/
123+
@wget -q --show-progress $(DOWNLOAD_URL)/downloads/kmodel/kmodel_v2.10.0.tgz -O - | tar -xzC src/big/
124+
@wget -q --show-progress $(DOWNLOAD_URL)/downloads/nncase/nncase_k230_rtos_v2.10.0.tgz -O - | tar -xzC src/big/
125125

126126
#big utils
127127
@echo "download big utils"
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#
2+
# Automatically generated file; DO NOT EDIT.
3+
# K230 SDK Configuration
4+
#
5+
6+
#
7+
# board configuration
8+
#
9+
# CONFIG_BOARD_K230_EVB is not set
10+
# CONFIG_BOARD_K230_FPGA is not set
11+
# CONFIG_BOARD_K230D is not set
12+
# CONFIG_BOARD_K230_CANMV is not set
13+
# CONFIG_BOARD_K230_CANMV_V2 is not set
14+
# CONFIG_BOARD_K230D_CANMV is not set
15+
# CONFIG_BOARD_K230_CANMV_01STUDIO is not set
16+
# CONFIG_BOARD_K230_CANMV_LCKFB is not set
17+
# CONFIG_BOARD_K230_CANMV_DONGSHANPI is not set
18+
CONFIG_BOARD_K230_CANMV_RTT_EVB=y
19+
# CONFIG_BOARD_K230D_CANMV_BPI is not set
20+
CONFIG_BOARD_NAME="k230_rtt_evb"
21+
# CONFIG_QUICK_BOOT is not set
22+
# CONFIG_GEN_SECURITY_IMG is not set
23+
CONFIG_UBOOT_DEFCONFIG="k230_canmv_dongshanpi"
24+
CONFIG_LINUX_DEFCONFIG="k230_canmv_dongshanpi"
25+
CONFIG_LINUX_DTB="k230_canmv_dongshanpi"
26+
CONFIG_BUILDROOT_DEFCONFIG="k230_evb"
27+
CONFIG_RTTHREAD_DEFCONFIG="k230_canmv_rtt_evb"
28+
# CONFIG_REMOTE_TEST_PLATFORM is not set
29+
CONFIG_GEN_IMG_SCRIPT="board/common/gen_image_script/gen_image.sh"
30+
CONFIG_RTT_CONSOLE_ID=3
31+
CONFIG_CANAAN_SITE_IMG_NAME_PREFIX=""
32+
33+
#
34+
# toolchain configurations
35+
#
36+
CONFIG_TOOLCHAIN_PREFIX_RTT="riscv64-unknown-linux-musl-"
37+
CONFIG_TOOLCHAIN_PATH_RTT="/opt/toolchain/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin"
38+
CONFIG_TOOLCHAIN_PREFIX_LINUX="riscv64-unknown-linux-gnu-"
39+
CONFIG_TOOLCHAIN_PATH_LINUX="/opt/toolchain/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.0/bin"
40+
41+
#
42+
# Memory configuration
43+
#
44+
CONFIG_MEM_TOTAL_SIZE=0x40000000
45+
CONFIG_MEM_IPCM_BASE=0x00100000
46+
CONFIG_MEM_IPCM_SIZE=0x00100000
47+
CONFIG_MEM_RTT_SYS_BASE=0x00200000
48+
CONFIG_MEM_RTT_SYS_SIZE=0x07E00000
49+
CONFIG_MEM_MMZ_BASE=0x10000000
50+
CONFIG_MEM_MMZ_SIZE=0x0FC00000
51+
CONFIG_MEM_LINUX_SYS_BASE=0x08000000
52+
CONFIG_MEM_LINUX_SYS_SIZE=0x08000000
53+
CONFIG_MEM_BOUNDARY_RESERVED_SIZE=0x00001000
54+
55+
#
56+
# storage configurations
57+
#
58+
# CONFIG_SPI_NOR is not set
59+
# CONFIG_SPI_NAND is not set
60+
CONFIG_SDCAED=y
61+
62+
#
63+
# wifi configurations
64+
#
65+
# CONFIG_AP6212A is not set
66+
# CONFIG_AP6256 is not set
67+
CONFIG_RTL8188FU=y
68+
# CONFIG_RTL8723DU is not set
69+
# CONFIG_AIC_8800 is not set
70+
CONFIG_SUPPORT_RTSMART=y
71+
CONFIG_SUPPORT_LINUX=y
72+
CONFIG_LINUX_RUN_CORE_ID=0
73+
# CONFIG_MPP_MIDDLEWARE is not set
74+
# CONFIG_BUILD_DEBUG_VER is not set
75+
CONFIG_BUILD_RELEASE_VER=y

repo.mak

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
RT-SMART_VERSION = "8a21a1a7ae223037a40c2e4328ed7bc17c5710f8"
2-
MPP_VERSION = "e13594a7e7412db9611d2639be9830d113885edb"
1+
RT-SMART_VERSION = "4096e1730f5e1b8c530a1c4fe05a90d09b2b0782"
2+
MPP_VERSION = "869e5a1ca170f658d8516122e4d95b8594265418"
33
UNITTEST_VERSION = "a07caf5e19a6a215605271cfeedce18111790e9d"
44
OPENSBI_VERSION = "1f89326f7dc48d701dbed79f828b80fa28e5b34c"
55
BUILDROOT-EXT_VERSION = "3cef3f973d261f96a6c8f7ccb3bc140b972e1f1c"
6-
LINUX_VERSION = "cf51662aaea9e4c594f48c6589f9c323830275c7"
7-
CDK_VERSION = "dd23db766f15e43e2ca4cf77c11666319f50e279"
8-
UBOOT_VERSION = "fd011fafcf2a1030a4a01b23151b1675fcf5e98c"
6+
LINUX_VERSION = "33d1e773a745e533637447812c9aad924bbea25b"
7+
CDK_VERSION = "193bd614c422065327ce4d68776e37bef94d19bf"
8+
UBOOT_VERSION = "9af86a1892e01bc329329a118f322fe77f05c9f7"
99

1010
RT-SMART_SRC_PATH = src/big/rt-smart
1111
MPP_SRC_PATH = src/big/mpp

src/big/mpp/include/comm/k_board_config_comm.h

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,51 @@ extern "C" {
451451
#define LT9611_SLAVE_ADDR 0x3b
452452
#define LT9611_I2C_BUS "i2c3"//"i2c4"
453453

454+
#elif defined(CONFIG_BOARD_K230_CANMV_RTT_EVB)
455+
// usip evb gpio config
456+
// display gpio
457+
#define DISPLAY_LCD_RST_GPIO 22
458+
#define DISPLAY_LCD_BACKLIGHT_EN 25
459+
460+
// imx335 gpio config
461+
#define VICAP_IMX335_RST_GPIO 46
462+
#define VICAP_IMX335_MASTER_GPIO 28
463+
//OV9286 gpio cinfig
464+
#define VICAP_OV9286_RST_GPIO 20
465+
466+
#define OV5647_IIC "i2c0"
467+
#define OV5647_CAM_PIN 61
468+
469+
#define OV5647_CSI1_IIC "i2c1"
470+
#define OV5647_CSI2_IIC "i2c4"
454471

472+
#define OV5647_CAM_PIN_CSI2 (21)
473+
#define OV5647_CAM_PIN_CSI1 (60)
474+
475+
#define OV9732_RST_PIN (28)
476+
477+
#define GC2053_CSI0_IIC "i2c4"
478+
#define VICAP_GC2053_RST_GPIO (21)
479+
480+
#define GC2093_CSI0_IIC "i2c4"
481+
#define GC2093_SLAVE_ADDR 0x7e
482+
#define VICAP_GC2093_RST_GPIO (21)
483+
484+
#define GC2093_CSI1_IIC "i2c3"
485+
#define GC2093_CSI1_SLAVE_ADDR 0x7e
486+
#define GC2093_CSI1_RST_GPIO (23)
487+
488+
#define GC2093_CSI2_IIC "i2c4"
489+
#define GC2093_CSI2_SLAVE_ADDR 0x37 //0x3f
490+
#define GC2093_CSI2_RST_GPIO (62)
491+
492+
#define BOARD_CSI0_CONN CONNECTOR_EXTERNAL_BOARD_SENOSR
493+
#define BOARD_CSI1_CONN CONNECTOR_EXTERNAL_BOARD_SENOSR
494+
#define BOARD_CSI2_CONN CONNECTOR_ON_BOARD_SENOSR
495+
496+
#define LT9611_RESET_GPIO 24 //42
497+
#define LT9611_SLAVE_ADDR 0x3b
498+
#define LT9611_I2C_BUS "i2c3"//"i2c4"
455499
#else
456500

457501
#define DISPLAY_LCD_RST_GPIO 9

src/big/mpp/include/comm/k_connector_comm.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ typedef enum {
5555
ST7701_V1_MIPI_2LAN_480X800_30FPS = 2,
5656
ST7701_V1_MIPI_2LAN_480X854_30FPS = 3,
5757
ILI9806_MIPI_2LAN_480X800_30FPS = 4,
58+
NT35516_MIPI_2LAN_540X960_30FPS = 5,
5859
LT9611_MIPI_ADAPT_RESOLUTION = 100,
5960
LT9611_MIPI_4LAN_1920X1080_60FPS,
6061
LT9611_MIPI_4LAN_1920X1080_50FPS,
@@ -94,7 +95,7 @@ typedef struct {
9495

9596
typedef enum
9697
{
97-
K_CONNECTOR_MIRROR_HOR = 1,
98+
K_CONNECTOR_MIRROR_HOR = 1,
9899
K_CONNECTOR_MIRROR_VER,
99100
K_CONNECTOR_MIRROR_BOTH,
100101
}k_connector_mirror;

src/big/mpp/include/comm/k_dma_comm.h

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ extern "C" {
5151
#define DMA_MAX_CHN_NUMS (GDMA_MAX_CHN_NUMS + SDMA_MAX_CHN_NUMS) /**< The maximum number of the DMA channel. FIXED! */
5252
#define DMA_LINKLIST_BYTE (24) /**< The number of bytes occupied by a linked list of DMA. */
5353

54+
#define GDMA_TYPE 0
55+
#define SDMA_TYPE 1
5456

5557
/**
5658
* @brief Defines the working mode of the dma
@@ -201,6 +203,37 @@ typedef struct
201203
k_video_frame_info vf_info; /**< video information */
202204
} k_dma_frame_info;
203205

206+
typedef union
207+
{
208+
struct {
209+
k_u32 dat_mode : 1;
210+
k_u32 dat_size : 2;
211+
k_u32 reserved_0 : 1;
212+
k_u32 dat_endian : 2;
213+
k_u32 reserved_1 : 2;
214+
k_u32 src_fixed : 1;
215+
k_u32 dst_fixed : 1;
216+
k_u32 dec_en : 1;
217+
k_u32 reserved_2 : 5;
218+
k_u32 wr_outstanding : 4;
219+
k_u32 rd_outstanding : 4;
220+
k_u32 reserved_3 : 8;
221+
};
222+
k_u32 value;
223+
} k_sdma_ch_cfg_t;
224+
225+
typedef struct
226+
{
227+
void *src_addr;
228+
void *dst_addr;
229+
k_u8 dimension;
230+
k_u16 line_num;
231+
k_u16 line_space;
232+
k_u32 line_size;
233+
k_u32 user_data;
234+
k_sdma_ch_cfg_t ch_cfg;
235+
} k_sdma_transfer_cfg_t;
236+
204237
#define K_ERR_DMA_INVALID_DEVID K_DEF_ERR(K_ID_DMA, K_ERR_LEVEL_ERROR, K_ERR_INVALID_DEVID)
205238
#define K_ERR_DMA_INVALID_CHNID K_DEF_ERR(K_ID_DMA, K_ERR_LEVEL_ERROR, K_ERR_INVALID_CHNID)
206239
#define K_ERR_DMA_ILLEGAL_PARAM K_DEF_ERR(K_ID_DMA, K_ERR_LEVEL_ERROR, K_ERR_ILLEGAL_PARAM)

src/big/mpp/include/comm/k_sensor_comm.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,17 @@ typedef struct {
623623
k_u8 otp_date[20];
624624
} k_sensor_otp_date;
625625

626+
typedef enum {
627+
SENSOR_FOCUS_POS_ABSOLUTE = 0,
628+
SENSOR_FOCUS_POS_RELATIVE,
629+
} k_sensor_focus_pos_mode;
630+
631+
typedef struct {
632+
k_sensor_focus_pos_mode posType;
633+
k_u32 pos;
634+
} k_sensor_focus_pos;
635+
636+
626637
#ifdef __cplusplus
627638
}
628639
#endif /* __cplusplus */

src/big/mpp/include/comm/k_vicap_comm.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ typedef enum {
244244
VICAP_WORK_LOAD_IMAGE_MODE,
245245
VICAP_WORK_ONLY_MCM_MODE,
246246
VICAP_WORK_SW_TILE_MODE,
247+
VICAP_WORK_MCM_MIPI_MODE,
247248
} k_vicap_work_mode;
248249

249250
/**
@@ -442,6 +443,7 @@ typedef struct {
442443
k_u32 buffer_num;
443444
k_u32 buffer_size;
444445
k_vicap_mirror mirror;
446+
k_bool fastboot_enable;
445447
} k_vicap_dev_attr;
446448

447449
/**
@@ -598,6 +600,7 @@ typedef struct {
598600
k_vicap_mcm_cfg cfg;
599601
k_vicap_chn mcm_chn;
600602
k_u32 buff_num;
603+
k_u32 work_mode;
601604
}k_vicap_mcm_chn_attr;
602605

603606
/**

src/big/mpp/include/ioctl/k_sensor_ioctl.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ typedef enum {
7575
KD_IOC_NR_SENSOR_DEV_GET_OTP_DATA,
7676
KD_IOC_NR_SENSOR_DEV_SET_OTP_DATA,
7777
KD_IOC_NR_SENSOR_DEV_SET_MIRROR,
78+
KD_IOC_NR_SENSOR_S_FOCUS_POINT,
79+
KD_IOC_NR_SENSOR_G_FOCUS_POINT,
80+
7881
} k_ioc_nr_sensor;
7982

8083
#define KD_IOC_SENSOR_S_POWER _IOW(K_IOC_TYPE_SENSOR, KD_IOC_NR_SENSOR_DEV_POWER, k_s32)
@@ -107,6 +110,9 @@ typedef enum {
107110
#define KD_IOC_SENSOR_G_OTP_DATA _IOW(K_IOC_TYPE_SENSOR, KD_IOC_NR_SENSOR_DEV_GET_OTP_DATA, void*)
108111
#define KD_IOC_SENSOR_S_OTP_DATA _IOW(K_IOC_TYPE_SENSOR, KD_IOC_NR_SENSOR_DEV_SET_OTP_DATA, void*)
109112
#define KD_IOC_SENSOR_S_MIRROR _IOW(K_IOC_TYPE_SENSOR, KD_IOC_NR_SENSOR_DEV_SET_MIRROR, k_vicap_mirror_mode)
113+
//AF
114+
#define KD_IOC_SENSOR_S_FOCUS_POINT _IOW(K_IOC_TYPE_SENSOR, KD_IOC_NR_SENSOR_S_FOCUS_POINT, k_sensor_focus_pos)
115+
#define KD_IOC_SENSOR_G_FOCUS_POINT _IOW(K_IOC_TYPE_SENSOR, KD_IOC_NR_SENSOR_G_FOCUS_POINT, k_sensor_focus_pos)
110116

111117
#ifdef __cplusplus
112118
}

0 commit comments

Comments
 (0)