sync(system): update front board system configuration.
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
#define SENSOR_NAME_2 "ov02b1b_mipi"
|
||||
|
||||
#define SENSOR_1600x1200_30FPS 1
|
||||
#define SENSOR_1280x720_30FPS 1
|
||||
#define SENSOR_1280x720_30FPS 0
|
||||
#define SENSOR_1280x720_15FPS 0
|
||||
#define SENSOR_800x600_15FPS 0
|
||||
#define SENSOR_640x480_15FPS 0
|
||||
@@ -193,6 +193,7 @@ static struct regval_list sensor_1600x1200_30fps_regs[] = {
|
||||
{0xfd, 0x01},
|
||||
{0x0e, 0x02},
|
||||
{0x0f, 0x1a},
|
||||
{0x12, 0x01}, //mirror and flip
|
||||
{0x18, 0x00},
|
||||
{0x22, 0xff},
|
||||
{0x23, 0x02},
|
||||
@@ -711,10 +712,9 @@ static int sensor_s_exp_gain(int id, struct sensor_exp_gain *exp_gain)
|
||||
/*
|
||||
* Stuff that knows about the sensor.
|
||||
*/
|
||||
static int pwdn_flag = 0;
|
||||
static int sensor_power(int id, int on)
|
||||
{
|
||||
sensor_dbg("sensor_power \n");
|
||||
|
||||
if (on && (sensor_power_count[id])++ > 0)
|
||||
return 0;
|
||||
else if (!on && (sensor_power_count[id] == 0 || --(sensor_power_count[id]) > 0))
|
||||
@@ -723,23 +723,19 @@ static int sensor_power(int id, int on)
|
||||
switch (on) {
|
||||
case PWR_ON:
|
||||
sensor_dbg("PWR_ON!\n");
|
||||
#if 1
|
||||
//if((id==0 && sensor_power_count[1]==0) || (id==1 && sensor_power_count[0]==0)) {
|
||||
hal_gpio_set_direction(GPIOD(2), GPIO_DIRECTION_OUTPUT);
|
||||
hal_gpio_set_data(GPIOD(2), GPIO_DATA_HIGH);
|
||||
hal_gpio_set_direction(GPIOF(3), GPIO_DIRECTION_OUTPUT);
|
||||
hal_gpio_set_data(GPIOF(3), GPIO_DATA_HIGH);
|
||||
hal_gpio_set_direction(GPIOF(4), GPIO_DIRECTION_OUTPUT);
|
||||
hal_gpio_set_data(GPIOF(4), GPIO_DATA_HIGH);
|
||||
// hal_gpio_set_direction(GPIOH(0), GPIO_DIRECTION_OUTPUT);
|
||||
// hal_gpio_set_data(GPIOH(0), GPIO_DATA_LOW);
|
||||
//}
|
||||
#endif
|
||||
if (pwdn_flag == 0)
|
||||
{
|
||||
pwdn_flag = 1;
|
||||
vin_gpio_set_status(id, PWDN, 1);
|
||||
}
|
||||
|
||||
vin_gpio_set_status(id, PWDN, 1);
|
||||
// vin_gpio_set_status(id, PWDN, 1);
|
||||
vin_gpio_set_status(id, RESET, 1);
|
||||
vin_gpio_write(id, PWDN, CSI_GPIO_LOW);
|
||||
vin_gpio_set_status(id, IR_LED, 1);
|
||||
|
||||
// vin_gpio_write(id, PWDN, CSI_GPIO_LOW);
|
||||
vin_gpio_write(id, RESET, CSI_GPIO_LOW);
|
||||
vin_gpio_write(id, IR_LED, CSI_GPIO_HIGH);
|
||||
hal_usleep(5000);
|
||||
|
||||
vin_set_mclk_freq(id, MCLK);
|
||||
@@ -757,13 +753,7 @@ static int sensor_power(int id, int on)
|
||||
|
||||
vin_gpio_write(id, RESET, CSI_GPIO_LOW);
|
||||
vin_set_mclk(id, 0);
|
||||
vin_gpio_write(id, PWDN, CSI_GPIO_LOW);
|
||||
|
||||
//if(sensor_power_count[0]==0 && sensor_power_count[1]==0) {
|
||||
// hal_gpio_set_data(GPIOD(2), GPIO_DATA_LOW);
|
||||
// hal_gpio_set_data(GPIOF(3), GPIO_DATA_LOW);
|
||||
// hal_gpio_set_data(GPIOF(4), GPIO_DATA_LOW);
|
||||
//}
|
||||
// vin_gpio_write(id, PWDN, CSI_GPIO_LOW);
|
||||
|
||||
break;
|
||||
default:
|
||||
@@ -774,6 +764,7 @@ static int sensor_power(int id, int on)
|
||||
|
||||
static int sensor_set_ir(int id, int status)
|
||||
{
|
||||
#if 0
|
||||
vin_gpio_set_status(id, IR_LED, 1);
|
||||
switch (status) {
|
||||
case IR_DAY:
|
||||
@@ -785,6 +776,7 @@ static int sensor_set_ir(int id, int status)
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -829,7 +821,8 @@ static struct sensor_format_struct sensor_formats[] = {
|
||||
#if SENSOR_1600x1200_30FPS
|
||||
/* 1600x1200 30fps */
|
||||
{
|
||||
.mbus_code = MEDIA_BUS_FMT_SRGGB10_1X10,//MEDIA_BUS_FMT_SBGGR10_1X10,
|
||||
//.mbus_code = MEDIA_BUS_FMT_SRGGB10_1X10,//MEDIA_BUS_FMT_SBGGR10_1X10,
|
||||
.mbus_code = MEDIA_BUS_FMT_SGRBG10_1X10,//MEDIA_BUS_FMT_SBGGR10_1X10,//MEDIA_BUS_FMT_SBGGR10_1X10,
|
||||
.width = 1600,
|
||||
.height = 1200,
|
||||
.hoffset = 0,
|
||||
@@ -936,7 +929,6 @@ static struct sensor_format_struct *sensor_get_format(int id, int isp_id)
|
||||
int fps = isp_get_cfg[ispid].sensor_get_fps;
|
||||
int i;
|
||||
|
||||
sensor_print("%s(), %d, id:%d, ispid:%d\n", __func__, __LINE__, id, ispid);
|
||||
if (current_win[id])
|
||||
return current_win[id];
|
||||
|
||||
@@ -949,11 +941,10 @@ static struct sensor_format_struct *sensor_get_format(int id, int isp_id)
|
||||
}
|
||||
}
|
||||
}
|
||||
sensor_print("%s(), %d, id:%d, ispid:%d\n", __func__, __LINE__, id, ispid);
|
||||
|
||||
if (sensor_format == NULL) {
|
||||
for (i = 0; i < ARRAY_SIZE(sensor_formats); i++) {
|
||||
sensor_print("%s(), %d, ispid:%d, width:%d\n", __func__, __LINE__, ispid, sensor_formats[i].width);
|
||||
if (sensor_formats[i].wdr_mode == wdr_on && ((ispid == 0 && sensor_formats[i].width == 1280) || (ispid == 1 && sensor_formats[i].width == 1600))) {
|
||||
if (sensor_formats[i].wdr_mode == wdr_on) {
|
||||
sensor_format = &sensor_formats[i];
|
||||
isp_get_cfg[ispid].sensor_get_fps = sensor_format->fps_fixed;
|
||||
sensor_print("fine wdr is %d, use fps is %d\n", wdr_on, sensor_format->fps_fixed);
|
||||
@@ -961,14 +952,14 @@ static struct sensor_format_struct *sensor_get_format(int id, int isp_id)
|
||||
}
|
||||
}
|
||||
}
|
||||
sensor_print("%s(), %d, id:%d, ispid:%d\n", __func__, __LINE__, id, ispid);
|
||||
|
||||
if (sensor_format == NULL) {
|
||||
sensor_format = &sensor_formats[0];
|
||||
isp_get_cfg[ispid].sensor_wdr_on = sensor_format->wdr_mode;
|
||||
isp_get_cfg[ispid].sensor_get_fps = sensor_format->fps_fixed;
|
||||
sensor_print("use wdr is %d, use fps is %d\n", sensor_format->wdr_mode, sensor_format->fps_fixed);
|
||||
}
|
||||
sensor_print("%s(), %d, id:%d, ispid:%d\n", __func__, __LINE__, id, ispid);
|
||||
|
||||
done:
|
||||
current_win[id] = sensor_format;
|
||||
return sensor_format;
|
||||
@@ -1050,7 +1041,6 @@ static struct sensor_format_struct *sensor_get_switch_format(int id, int isp_id)
|
||||
}
|
||||
|
||||
done:
|
||||
sensor_wdr_mode[id] = sensor_format->wdr_mode;
|
||||
current_switch_win[id] = sensor_format;
|
||||
return sensor_format;
|
||||
#else
|
||||
|
||||
@@ -60,6 +60,7 @@ struct sensor_cfg_array sensor_array[] = {
|
||||
#endif
|
||||
#ifdef CONFIG_SENSOR_OV02B10_MIPI
|
||||
{"ov02b10_mipi", &ov02b10_core},
|
||||
{"ov02b1b_mipi", &ov02b10_core},
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ unsigned int vin_vipp_irq[VIN_MAX_SCALER/DEV_VIRT_NUM] = {
|
||||
struct vin_clk_info vind_default_clk[VIN_MAX_CLK] = {
|
||||
[VIN_TOP_CLK] = {
|
||||
.clock = HAL_CLK_PERIPH_CSI_TOP,
|
||||
.frequency = 300000000,
|
||||
.frequency = 340000000,
|
||||
},
|
||||
[VIN_TOP_CLK_SRC] = {
|
||||
.clock = HAL_CLK_PLL_CSIX4,
|
||||
@@ -418,7 +418,7 @@ struct vin_mclk_info vind_default_mclk[VIN_MAX_CCI] = {
|
||||
struct sensor_list global_sensors[VIN_MAX_CSI] = {
|
||||
/*mipi0 parser0*/
|
||||
[0] = {
|
||||
#ifdef CONFIG_SENSOR_BF2257CS_MIPI
|
||||
#if defined(CONFIG_SENSOR_BF2257CS_MIPI)
|
||||
.used = 1,
|
||||
.sensor_name = "bf2257cs_mipi",
|
||||
.sensor_twi_addr = 0x7C,
|
||||
@@ -433,6 +433,21 @@ struct sensor_list global_sensors[VIN_MAX_CSI] = {
|
||||
.ir_cut_gpio[0] = 0xffff,/*-cut*/
|
||||
.ir_cut_gpio[1] = 0xffff,/*+cut*/
|
||||
.ir_led_gpio = 0xffff,
|
||||
#elif defined(CONFIG_SENSOR_OV02B10_MIPI)
|
||||
.used = 1,
|
||||
.sensor_name = "ov02b10_mipi",
|
||||
.sensor_twi_addr = 0x78,
|
||||
.sensor_twi_id = 1,
|
||||
.mclk_id = 0,
|
||||
.use_isp = 1,
|
||||
.id = 0,
|
||||
.addr_width = 8,
|
||||
.data_width = 8,
|
||||
.reset_gpio = GPIOE(7),
|
||||
.pwdn_gpio = GPIOE(8),
|
||||
.ir_cut_gpio[0] = 0xffff,/*-cut*/
|
||||
.ir_cut_gpio[1] = 0xffff,/*+cut*/
|
||||
.ir_led_gpio = GPIOF(3),
|
||||
#else
|
||||
.used = 1,
|
||||
.sensor_name = "gc2053_mipi",
|
||||
@@ -452,7 +467,7 @@ struct sensor_list global_sensors[VIN_MAX_CSI] = {
|
||||
},
|
||||
/*mipi1 parser1*/
|
||||
[1] = {
|
||||
#ifdef CONFIG_SENSOR_BF2257CS_MIPI
|
||||
#if defined(CONFIG_SENSOR_BF2257CS_MIPI)
|
||||
.used = 1,
|
||||
.sensor_name = "bf2257cs_mipi_2",
|
||||
.sensor_twi_addr = 0xdc,
|
||||
@@ -467,6 +482,21 @@ struct sensor_list global_sensors[VIN_MAX_CSI] = {
|
||||
.ir_cut_gpio[0] = 0xffff,/*-cut*/
|
||||
.ir_cut_gpio[1] = 0xffff,/*+cut*/
|
||||
.ir_led_gpio = 0xffff,
|
||||
#elif defined(CONFIG_SENSOR_OV02B10_MIPI)
|
||||
.used = 1,
|
||||
.sensor_name = "ov02b1b_mipi",
|
||||
.sensor_twi_addr = 0x78,
|
||||
.sensor_twi_id = 0,
|
||||
.mclk_id = 1,
|
||||
.use_isp = 1,
|
||||
.id = 1,
|
||||
.addr_width = 8,
|
||||
.data_width = 8,
|
||||
.reset_gpio = GPIOE(9),
|
||||
.pwdn_gpio = GPIOE(10),
|
||||
.ir_cut_gpio[0] = 0xffff,/*-cut*/
|
||||
.ir_cut_gpio[1] = 0xffff,/*+cut*/
|
||||
.ir_led_gpio = 0xffff,
|
||||
#else
|
||||
.used = 1,
|
||||
.sensor_name = "gc2053_mipi",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -102,8 +102,8 @@
|
||||
#endif // CONFIG_SENSOR_F355P_MIPI
|
||||
|
||||
#ifdef CONFIG_SENSOR_OV02B10_MIPI
|
||||
#include "SENSOR_H/ov02b10_mipi_isp600_20221114b_color.h"
|
||||
#include "SENSOR_H/ov02b10_mipi_isp600_20230811_104819_ir_v3.h"
|
||||
#include "SENSOR_H/ov02b10_mipi_isp600_20240423_135454_rgb.h"
|
||||
#include "SENSOR_H/ov02b10_mipi_isp600_20240423_133842_ir.h"
|
||||
#endif // CONFIG_SENSOR_OV02B10_MIPI
|
||||
|
||||
#else
|
||||
@@ -172,8 +172,10 @@ struct isp_cfg_array cfg_arr[] = {
|
||||
#endif // CONFIG_SENSOR_F355P_MIPI
|
||||
|
||||
#ifdef CONFIG_SENSOR_OV02B10_MIPI
|
||||
{"ov02b10_mipi", "ov02b10_mipi_isp600_20221114b_color", 1600, 1200, 30, 0, 0, &ov02b10_mipi_isp_cfg},
|
||||
{"ov02b10_mipi", "ov02b10_mipi_isp600_20230811_104819_ir_v3", 1600, 1200, 30, 1, 0, &ov02b10_mipi_isp_ir_cfg},
|
||||
{"ov02b1b_mipi", "ov02b10_mipi_isp600_20240423_135454_rgb", 1600, 1200, 30, 0, 0, &ov02b10_mipi_isp_cfg},
|
||||
{"ov02b1b_mipi", "ov02b10_mipi_isp600_20240423_135454_rgb", 1600, 1200, 30, 1, 0, &ov02b10_mipi_isp_cfg},
|
||||
{"ov02b10_mipi", "ov02b10_mipi_isp600_20240423_133842_ir", 1600, 1200, 30, 0, 0, &ov02b10_mipi_isp_ir_cfg},
|
||||
{"ov02b10_mipi", "ov02b10_mipi_isp600_20240423_133842_ir", 1600, 1200, 30, 1, 0, &ov02b10_mipi_isp_ir_cfg},
|
||||
#endif // CONFIG_SENSOR_OV02B10_MIPI
|
||||
|
||||
#ifdef CONFIG_SENSOR_GC1084_MIPI
|
||||
@@ -198,10 +200,10 @@ int parser_ini_info(struct isp_param_config *param, char *isp_cfg_name, char *se
|
||||
{
|
||||
int i;
|
||||
struct isp_cfg_pt *cfg = NULL;
|
||||
|
||||
ISP_WARN("%s(), L:%d, sensor_name:%s\n", __func__, __LINE__, sensor_name);
|
||||
//load header parameter
|
||||
for (i = 0; i < ARRAY_SIZE(cfg_arr); i++) {
|
||||
if (!strncmp(sensor_name, cfg_arr[i].sensor_name, 6) &&
|
||||
if (!strncmp(sensor_name, cfg_arr[i].sensor_name, 8) &&
|
||||
(w == cfg_arr[i].width) && (h == cfg_arr[i].height) &&
|
||||
(fps == cfg_arr[i].fps) && (wdr == cfg_arr[i].wdr) &&
|
||||
(ir == cfg_arr[i].ir)) {
|
||||
@@ -214,7 +216,7 @@ int parser_ini_info(struct isp_param_config *param, char *isp_cfg_name, char *se
|
||||
|
||||
if (i == ARRAY_SIZE(cfg_arr)) {
|
||||
for (i = 0; i < ARRAY_SIZE(cfg_arr); i++) {
|
||||
if (!strncmp(sensor_name, cfg_arr[i].sensor_name, 6) && (wdr == cfg_arr[i].wdr)) {
|
||||
if (!strncmp(sensor_name, cfg_arr[i].sensor_name, 8) && (wdr == cfg_arr[i].wdr)) {
|
||||
cfg = cfg_arr[i].cfg;
|
||||
ISP_WARN("cannot find %s_%d_%d_%d_%d_%d isp config, use %s_%d_%d_%d_%d_%d -> [%s]\n", sensor_name, w, h, fps, wdr, ir,
|
||||
cfg_arr[i].sensor_name, cfg_arr[i].width, cfg_arr[i].height, cfg_arr[i].fps, cfg_arr[i].wdr,
|
||||
@@ -301,9 +303,9 @@ int parser_ini_regs_info(struct isp_lib_context *ctx, char *sensor_name,
|
||||
{
|
||||
int i;
|
||||
struct isp_reg_pt *reg = NULL;
|
||||
|
||||
ISP_WARN("%s(), L:%d, sensor_name:%s\n", __func__, __LINE__, sensor_name);
|
||||
for (i = 0; i < ARRAY_SIZE(reg_arr); i++) {
|
||||
if (!strncmp(sensor_name, reg_arr[i].sensor_name, 6) &&
|
||||
if (!strncmp(sensor_name, reg_arr[i].sensor_name, 8) &&
|
||||
(w == reg_arr[i].width) && (h == reg_arr[i].height) &&// (fps == reg_arr[i].fps) &&
|
||||
(wdr == reg_arr[i].wdr)) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user