luckfox-pico-sdk/sysdrv/source/kernel/include/uapi/linux/rkcif-config.h
luckfox-eng29 8f34c2760d 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>
2024-10-14 09:47:04 +08:00

95 lines
2.2 KiB
C

/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR MIT)
*
* Copyright (C) 2019 Rockchip Electronics Co., Ltd.
*/
#ifndef _UAPI_RKCIF_CONFIG_H
#define _UAPI_RKCIF_CONFIG_H
#include <linux/types.h>
#include <linux/v4l2-controls.h>
#define RKCIF_MAX_CSI_NUM 4
#define RKCIF_API_VERSION KERNEL_VERSION(0, 2, 0)
#define V4L2_EVENT_RESET_DEV 0X1001
#define RKCIF_CMD_GET_CSI_MEMORY_MODE \
_IOR('V', BASE_VIDIOC_PRIVATE + 0, int)
#define RKCIF_CMD_SET_CSI_MEMORY_MODE \
_IOW('V', BASE_VIDIOC_PRIVATE + 1, int)
#define RKCIF_CMD_GET_SCALE_BLC \
_IOR('V', BASE_VIDIOC_PRIVATE + 2, struct bayer_blc)
#define RKCIF_CMD_SET_SCALE_BLC \
_IOW('V', BASE_VIDIOC_PRIVATE + 3, struct bayer_blc)
#define RKCIF_CMD_SET_FPS \
_IOW('V', BASE_VIDIOC_PRIVATE + 4, struct rkcif_fps)
#define RKCIF_CMD_SET_RESET \
_IOW('V', BASE_VIDIOC_PRIVATE + 6, int)
#define RKCIF_CMD_SET_CSI_IDX \
_IOW('V', BASE_VIDIOC_PRIVATE + 7, struct rkcif_csi_info)
#define RKCIF_CMD_SET_QUICK_STREAM \
_IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct rkcif_quick_stream_param)
#define RKCIF_CMD_START_CAPTURE_ONE_FRAME_AOV \
_IOW('V', BASE_VIDIOC_PRIVATE + 9, int)
/* cif memory mode
* 0: raw12/raw10/raw8 8bit memory compact
* 1: raw12/raw10 16bit memory one pixel
* low align for rv1126/rv1109/rk356x
* |15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
* | -| -| -| -|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
* 2: raw12/raw10 16bit memory one pixel
* high align for rv1126/rv1109/rk356x
* |15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
* |11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0| -| -| -| -|
*
* note: rv1109/rv1126/rk356x dvp only support uncompact mode,
* and can be set low align or high align
*/
enum cif_csi_lvds_memory {
CSI_LVDS_MEM_COMPACT = 0,
CSI_LVDS_MEM_WORD_LOW_ALIGN = 1,
CSI_LVDS_MEM_WORD_HIGH_ALIGN = 2,
};
/* black level for scale image
* The sequence of pattern00~03 is the same as the output of sensor bayer
*/
struct bayer_blc {
u8 pattern00;
u8 pattern01;
u8 pattern02;
u8 pattern03;
};
struct rkcif_fps {
int ch_num;
int fps;
};
struct rkcif_csi_info {
int csi_num;
int csi_idx[RKCIF_MAX_CSI_NUM];
int dphy_vendor[RKCIF_MAX_CSI_NUM];
};
struct rkcif_quick_stream_param {
int on;
__u32 frame_num;
int resume_mode;
};
#endif