project:build.sh: Added fastboot support; custom modifications to U-Boot and kernel implemented using patches.

project:cfg:BoardConfig_IPC: Added fastboot BoardConfig file and firmware post-scripts, distinguishing between
the BoardConfigs for Luckfox Pico Pro and Luckfox Pico Max. project:app: Added fastboot_client and rk_smart_door
for quick boot applications; updated rkipc app to adapt to the latest media library. media:samples: Added more
usage examples. media:rockit: Fixed bugs; removed support for retrieving data frames from VPSS. media:isp:
Updated rkaiq library and related tools to support connection to RKISP_Tuner. sysdrv:Makefile: Added support for
compiling drv_ko on Luckfox Pico Ultra W using Ubuntu; added support for custom root filesystem.
sysdrv:tools:board: Updated Buildroot optional mirror sources, updated some software versions, and stored device
tree files and configuration files that undergo multiple modifications for U-Boot and kernel separately.
sysdrv:source:mcu: Used RISC-V MCU SDK with RT-Thread system, mainly for initializing camera AE during quick
boot. sysdrv:source:uboot: Added support for fastboot; added high baud rate DDR bin for serial firmware upgrades.
sysdrv:source:kernel: Upgraded to version 5.10.160; increased NPU frequency for RV1106G3; added support for
fastboot.

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
This commit is contained in:
luckfox-eng29
2024-08-21 10:05:47 +08:00
parent e79fd21975
commit 8f34c2760d
20902 changed files with 6567362 additions and 11248383 deletions

View File

@@ -6,12 +6,21 @@
#define __SOC_ROCKCHIP_ROCKIT_H
#include <linux/dma-buf.h>
#include <linux/rkisp2-config.h>
#include <linux/rk-isp2-config.h>
#define ROCKIT_BUF_NUM_MAX 5
#define ROCKIT_BUF_NUM_MAX 20
#define ROCKIT_ISP_NUM_MAX 3
#define ROCKIT_STREAM_NUM_MAX 12
#define ROCKIT_VICAP_NUM_MAX 6
enum {
RKISP_NORMAL_ONLINE,
RKISP_NORMAL_OFFLINE,
RKISP_FAST_ONLINE,
RKISP_FAST_OFFLINE,
};
enum function_cmd {
ROCKIT_BUF_QUE,
ROCKIT_MPIBUF_DONE
@@ -26,6 +35,7 @@ struct rkisp_stream_cfg {
int cur_fps;
u64 old_time;
bool is_discard;
struct mutex freebuf_lock;
};
struct ISP_VIDEO_FRAMES {
@@ -65,6 +75,10 @@ struct rockit_cfg {
int isp_num;
u32 nick_id;
u32 event;
u32 y_offset;
u32 u_offset;
u32 v_offset;
u32 vir_width;
void *node;
void *mpibuf;
void *vvi_dev[ROCKIT_ISP_NUM_MAX];
@@ -74,10 +88,47 @@ struct rockit_cfg {
int (*rkisp_rockit_mpibuf_done)(struct rockit_cfg *rockit_isp_cfg);
};
struct rkcif_stream_cfg {
struct rkcif_rockit_buffer *rkcif_buff[ROCKIT_BUF_NUM_MAX];
int buff_id[ROCKIT_BUF_NUM_MAX];
void *node;
int fps_cnt;
int dst_fps;
int cur_fps;
u64 old_time;
bool is_discard;
};
struct rkcif_dev_cfg {
const char *cif_name;
void *cif_dev;
struct rkcif_stream_cfg rkcif_stream_cfg[ROCKIT_STREAM_NUM_MAX];
};
struct rockit_rkcif_cfg {
bool is_alloc;
bool is_empty;
bool is_qbuf;
const char *cur_name;
int *buff_id;
int mpi_id;
u32 nick_id;
u32 event;
int cif_num;
void *node;
void *mpibuf;
void *vvi_dev[ROCKIT_VICAP_NUM_MAX];
struct dma_buf *buf;
struct ISP_VIDEO_FRAMES frame;
struct rkcif_dev_cfg rkcif_dev_cfg[ROCKIT_VICAP_NUM_MAX];
int (*rkcif_rockit_mpibuf_done)(struct rockit_rkcif_cfg *rockit_cif_cfg);
};
#if IS_ENABLED(CONFIG_VIDEO_ROCKCHIP_ISP_VERSION_V32)
void *rkisp_rockit_function_register(void *function, int cmd);
int rkisp_rockit_get_ispdev(char **name);
int rkisp_rockit_get_isp_mode(const char *name);
int rkisp_rockit_buf_queue(struct rockit_cfg *input_rockit_cfg);
int rkisp_rockit_pause_stream(struct rockit_cfg *input_rockit_cfg);
int rkisp_rockit_resume_stream(struct rockit_cfg *input_rockit_cfg);
@@ -86,10 +137,21 @@ int rkisp_rockit_config_stream(struct rockit_cfg *input_rockit_cfg,
int rkisp_rockit_get_tb_stream_info(struct rockit_cfg *input_rockit_cfg,
struct rkisp_tb_stream_info *info);
int rkisp_rockit_free_tb_stream_buf(struct rockit_cfg *input_rockit_cfg);
int rkisp_rockit_free_stream_buf(struct rockit_cfg *input_rockit_cfg);
void *rkcif_rockit_function_register(void *function, int cmd);
int rkcif_rockit_get_cifdev(char **name);
int rkcif_rockit_buf_queue(struct rockit_rkcif_cfg *input_rockit_cfg);
int rkcif_rockit_config_stream(struct rockit_rkcif_cfg *input_rockit_cfg,
int width, int height, int v4l2_fmt);
int rkcif_rockit_resume_stream(struct rockit_rkcif_cfg *input_rockit_cfg);
int rkcif_rockit_pause_stream(struct rockit_rkcif_cfg *input_rockit_cfg);
#else
static inline void *rkisp_rockit_function_register(void *function, int cmd) { return NULL; }
static inline int rkisp_rockit_get_ispdev(char **name) { return -EINVAL; }
static inline int rkisp_rockit_get_isp_mode(const char *name) { return -EINVAL; }
static inline int rkisp_rockit_buf_queue(struct rockit_cfg *input_rockit_cfg)
{
return -EINVAL;
@@ -119,6 +181,11 @@ static inline int rkisp_rockit_free_tb_stream_buf(struct rockit_cfg *input_rocki
return -EINVAL;
}
static inline int rkisp_rockit_free_stream_buf(struct rockit_cfg *input_rockit_cfg)
{
return -EINVAL;
}
#endif
#endif