update(driver): adapt v1.1 hardware configuration.
This commit is contained in:
parent
a0d979a885
commit
6e4b2234c8
|
@ -372,7 +372,7 @@
|
|||
flash0_flvdd_vol = <>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
/*
|
||||
sensor0:sensor@0 {
|
||||
device_type = "sensor0";
|
||||
sensor0_mname = "ov02b10_mipi";
|
||||
|
@ -392,7 +392,7 @@
|
|||
/* sensor0_dvdd-supply = <®_dldo2>; */
|
||||
/* sensor0_dvdd_vol = <1200000>; */
|
||||
/* sensor0_power_en = <>; */
|
||||
sensor0_power_en = <&pio PF 3 1 1 1 0>;
|
||||
/* sensor0_power_en = <&pio PF 3 1 1 1 0>;
|
||||
sensor0_reset = <&pio PD 20 1 0 1 0>;
|
||||
sensor0_pwdn = <&pio PE 10 1 0 1 0>;
|
||||
sensor0_sm_hs = <>;
|
||||
|
@ -401,11 +401,41 @@
|
|||
act_handle = <&actuator0>;
|
||||
status = "okay";
|
||||
};
|
||||
*/
|
||||
sensor0:sensor@0 {
|
||||
device_type = "sensor0";
|
||||
sensor0_mname = "gc2083_mipi";
|
||||
sensor0_twi_cci_id = <0>;
|
||||
sensor0_twi_addr = <0x6e>;
|
||||
sensor0_mclk_id = <0>;
|
||||
sensor0_pos = "rear";
|
||||
sensor0_isp_used = <1>;
|
||||
sensor0_fmt = <1>;
|
||||
sensor0_stby_mode = <0>;
|
||||
sensor0_vflip = <0>;
|
||||
sensor0_hflip = <0>;
|
||||
/* sensor0_iovdd-supply = <®_aldo2>; */
|
||||
/* sensor0_iovdd_vol = <1800000>; */
|
||||
/* sensor0_avdd-supply = <®_bldo2>; */
|
||||
/* sensor0_avdd_vol = <2800000>; */
|
||||
/* sensor0_dvdd-supply = <®_dldo2>; */
|
||||
/* sensor0_dvdd_vol = <1200000>; */
|
||||
/* sensor0_power_en = <>; */
|
||||
/* sensor0_power_en = <&pio PF 3 1 0 1 0>; */
|
||||
/* sensor0_reset = <&pio PD 20 1 0 1 0>; */
|
||||
sensor0_pwdn = <&pio PE 8 1 0 1 0>;
|
||||
sensor0_sm_hs = <>;
|
||||
sensor0_sm_vs = <>;
|
||||
flash_handle = <&flash0>;
|
||||
act_handle = <&actuator0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
// right
|
||||
sensor1:sensor@1 {
|
||||
device_type = "sensor1";
|
||||
sensor1_mname = "ov02b1b_mipi";
|
||||
sensor1_twi_cci_id = <0>;
|
||||
sensor1_mname = "ov02b10_mipi";
|
||||
sensor1_twi_cci_id = <1>;
|
||||
sensor1_twi_addr = <0x78>;
|
||||
sensor1_mclk_id = <1>;
|
||||
sensor1_pos = "front";
|
||||
|
@ -420,9 +450,9 @@
|
|||
/* sensor1_avdd_vol = <2800000>; */
|
||||
/* sensor1_dvdd-supply = <®_dldo2>; */
|
||||
/* sensor1_dvdd_vol = <1200000>; */
|
||||
/* sensor1_power_en = <>; */
|
||||
sensor1_reset = <&pio PD 21 1 0 1 0>;
|
||||
sensor1_pwdn = <&pio PE 10 1 0 1 0>;
|
||||
sensor1_power_en = <&pio PF 3 1 0 1 0>;
|
||||
sensor1_reset = <&pio PE 6 1 0 1 0>;
|
||||
sensor1_pwdn = <&pio PE 9 1 0 1 0>;
|
||||
sensor1_sm_hs = <>;
|
||||
sensor1_sm_vs = <>;
|
||||
flash_handle = <>;
|
||||
|
@ -430,6 +460,36 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
// left
|
||||
// sensor1:sensor@1 {
|
||||
// device_type = "sensor1";
|
||||
// sensor1_mname = "ov02b10_mipi";
|
||||
// sensor1_twi_cci_id = <1>;
|
||||
// sensor1_twi_addr = <0x7A>;
|
||||
// sensor1_mclk_id = <1>;
|
||||
// sensor1_pos = "front";
|
||||
// sensor1_isp_used = <1>;
|
||||
// sensor1_fmt = <1>;
|
||||
// sensor1_stby_mode = <0>;
|
||||
// sensor1_vflip = <0>;
|
||||
// sensor1_hflip = <0>;
|
||||
// /* sensor1_iovdd-supply = <®_aldo2>; */
|
||||
// /* sensor1_iovdd_vol = <1800000>; */
|
||||
// /* sensor1_avdd-supply = <®_bldo2>; */
|
||||
// /* sensor1_avdd_vol = <2800000>; */
|
||||
// /* sensor1_dvdd-supply = <®_dldo2>; */
|
||||
// /* sensor1_dvdd_vol = <1200000>; */
|
||||
// /* sensor1_power_en = <>; */
|
||||
// sensor1_power_en = <&pio PF 3 1 0 1 0>;
|
||||
// sensor1_reset = <&pio PE 7 1 0 1 0>;
|
||||
// sensor1_pwdn = <&pio PE 10 1 0 1 0>;
|
||||
// sensor1_sm_hs = <>;
|
||||
// sensor1_sm_vs = <>;
|
||||
// flash_handle = <>;
|
||||
// act_handle = <>;
|
||||
// status = "okay";
|
||||
// };
|
||||
|
||||
vinc00:vinc@0 {
|
||||
vinc0_csi_sel = <0>;
|
||||
vinc0_mipi_sel = <0>;
|
||||
|
@ -949,16 +1009,16 @@
|
|||
};
|
||||
|
||||
twi2_pins_a: twi2@0 {
|
||||
allwinner,pins = "PH5", "PH6";
|
||||
allwinner,pins = "PH11", "PH12";
|
||||
allwinner,pname = "twi2_scl", "twi2_sda";
|
||||
allwinner,function = "twi2";
|
||||
allwinner,muxsel = <4>;
|
||||
allwinner,muxsel = <5>;
|
||||
allwinner,drive = <0>;
|
||||
allwinner,pull = <1>;
|
||||
};
|
||||
|
||||
twi2_pins_b: twi2@1 {
|
||||
allwinner,pins = "PH5", "PH6";
|
||||
allwinner,pins = "PH11", "PH12";
|
||||
allwinner,function = "io_disabled";
|
||||
allwinner,muxsel = <0xf>;
|
||||
allwinner,drive = <0>;
|
||||
|
@ -1103,6 +1163,20 @@
|
|||
muxsel = <0>;
|
||||
};
|
||||
|
||||
pwm10_pin_a: pwm10@0 {
|
||||
pins = "PD20";
|
||||
function = "pwm10";
|
||||
muxsel = <3>;
|
||||
drive-strength = <10>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
pwm10_pin_b: pwm10@1 {
|
||||
pins = "PD20";
|
||||
function = "gpio_in";
|
||||
muxsel = <0>;
|
||||
};
|
||||
|
||||
wiegand_pins_a: wiegand@0 {
|
||||
pins = "PH13", "PH14";
|
||||
function = "wiegand";
|
||||
|
@ -1344,7 +1418,7 @@
|
|||
};
|
||||
|
||||
&twi2 {
|
||||
clock-frequency = <400000>;
|
||||
clock-frequency = <200000>;
|
||||
pinctrl-0 = <&twi2_pins_a>;
|
||||
pinctrl-1 = <&twi2_pins_b>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
|
@ -1352,7 +1426,40 @@
|
|||
twi_drv_used = <0>;
|
||||
/* twi-supply = <®_dcdc1>; */
|
||||
twi_pkt_interval = <0>;
|
||||
status = "disabled";
|
||||
status = "okay";
|
||||
|
||||
ctp@0 {
|
||||
compatible = "hynitron,hyn_ts";
|
||||
status = "okay";
|
||||
reg = <0x5a>;
|
||||
|
||||
ctp_name = "cst9220_hyn";
|
||||
ctp_twi_id = <0x2>;
|
||||
|
||||
device_type = "ctp";
|
||||
ctp_twi_addr = <0x5a>;
|
||||
ctp_screen_max_x = <0x2d0>;
|
||||
ctp_screen_max_y = <0x500>;
|
||||
ctp_revert_x_flag = <0x0>;
|
||||
ctp_revert_y_flag = <0x1>;
|
||||
ctp_exchange_x_y_flag = <0x1>;
|
||||
ctp_int_port = <&pio PH 13 6 1 3 0xffffffff>;
|
||||
ctp_wakeup = <&pio PH 14 1 1 3 0xffffffff>;
|
||||
ctp_power_ldo_vol = <3300>;
|
||||
|
||||
hynitron,irq-gpio = <&pio PH 13 6 1 3 0xffffffff>;
|
||||
//<&pio PH 13 0 0 1 0>;
|
||||
hynitron,reset-gpio = <&pio PH 14 1 1 3 0xffffffff>;
|
||||
//<&pio PH 14 1 0 1 0>;
|
||||
hynitron,max-touch-number = <5>;
|
||||
hynitron,display-coords = <720 1280>;
|
||||
|
||||
hynitron,have-key;
|
||||
hynitron,key-number = <3>;
|
||||
hynitron,key-code = <139 172 158>;
|
||||
hynitron,key-y-coord = <2000 2000 2000>;
|
||||
hynitron,key-x-coord = <200 600 800>;
|
||||
};
|
||||
};
|
||||
|
||||
&twi3 {
|
||||
|
@ -1378,7 +1485,7 @@
|
|||
/* twi-supply = <®_aldo1>; */
|
||||
twi_pkt_interval = <0>;
|
||||
/*no_suspend = <1>;*/
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
|
||||
/*
|
||||
ctp@14 {
|
||||
|
@ -1400,39 +1507,6 @@
|
|||
};
|
||||
*/
|
||||
|
||||
ctp@0 {
|
||||
compatible = "hynitron,hyn_ts";
|
||||
status = "okay";
|
||||
reg = <0x1a>;
|
||||
|
||||
ctp_name = "cst9220_hyn";
|
||||
ctp_twi_id = <0x4>;
|
||||
|
||||
device_type = "ctp";
|
||||
ctp_twi_addr = <0x1a>;
|
||||
ctp_screen_max_x = <0x2d0>;
|
||||
ctp_screen_max_y = <0x500>;
|
||||
ctp_revert_x_flag = <0x0>;
|
||||
ctp_revert_y_flag = <0x1>;
|
||||
ctp_exchange_x_y_flag = <0x1>;
|
||||
ctp_int_port = <&pio PE 8 6 1 3 0xffffffff>;
|
||||
ctp_wakeup = <&pio PE 9 1 1 3 0xffffffff>;
|
||||
ctp_power_ldo_vol = <3300>;
|
||||
|
||||
hynitron,irq-gpio = <&pio PE 8 6 1 3 0xffffffff>;
|
||||
//<&pio PE 8 0 0 1 0>;
|
||||
hynitron,reset-gpio = <&pio PE 9 1 1 3 0xffffffff>;
|
||||
//<&pio PE 9 1 0 1 0>;
|
||||
hynitron,max-touch-number = <5>;
|
||||
hynitron,display-coords = <720 1280>;
|
||||
|
||||
hynitron,have-key;
|
||||
hynitron,key-number = <3>;
|
||||
hynitron,key-code = <139 172 158>;
|
||||
hynitron,key-y-coord = <2000 2000 2000>;
|
||||
hynitron,key-x-coord = <200 600 800>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -1449,7 +1523,7 @@
|
|||
/* mic1-single; */
|
||||
/* mic2-single; */
|
||||
pa-pin-max = <1>; /* set pa */
|
||||
pa-pin-0 = <&pio PH 12 1 1 1 0>;
|
||||
pa-pin-0 = <&pio PD 21 1 1 1 0>;
|
||||
pa-pin-level-0 = <1>;
|
||||
pa-pin-msleep-0 = <0>;
|
||||
tx-hub-en;
|
||||
|
@ -1602,7 +1676,7 @@
|
|||
pinctrl-names = "active", "sleep";
|
||||
pinctrl-0 = <&pwm4_pin_a>;
|
||||
pinctrl-1 = <&pwm4_pin_b>;
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pwm6 {
|
||||
|
@ -1619,6 +1693,13 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
&pwm10 {
|
||||
pinctrl-names = "active", "sleep";
|
||||
pinctrl-0 = <&pwm10_pin_a>;
|
||||
pinctrl-1 = <&pwm10_pin_b>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpadc {
|
||||
channel_num = <1>;
|
||||
channel_select = <0x01>;
|
||||
|
@ -1807,10 +1888,10 @@
|
|||
lcd_y = <1280>;
|
||||
lcd_width = <62>;
|
||||
lcd_height = <110>;
|
||||
lcd_dclk_freq = <64>;
|
||||
lcd_dclk_freq = <54>;
|
||||
|
||||
lcd_pwm_used = <1>;
|
||||
lcd_pwm_ch = <4>;
|
||||
lcd_pwm_ch = <10>;
|
||||
lcd_pwm_freq = <50000>;
|
||||
lcd_pwm_pol = <1>;
|
||||
lcd_pwm_max_limit = <255>;
|
||||
|
|
|
@ -1049,11 +1049,11 @@ static int sensor_power(struct v4l2_subdev *sd, int on)
|
|||
usleep_range(1000, 1200);
|
||||
vin_gpio_set_status(sd, PWDN, 1);
|
||||
vin_gpio_set_status(sd, RESET, 1);
|
||||
vin_gpio_set_status(sd, POWER_EN, 1);
|
||||
// vin_gpio_set_status(sd, POWER_EN, 1);
|
||||
vin_gpio_write(sd, PWDN, CSI_GPIO_LOW);
|
||||
vin_gpio_write(sd, RESET, CSI_GPIO_LOW);
|
||||
usleep_range(1000, 1200);
|
||||
vin_gpio_write(sd, POWER_EN, CSI_GPIO_LOW);
|
||||
// vin_gpio_write(sd, POWER_EN, CSI_GPIO_LOW);
|
||||
//vin_set_pmu_channel(sd, CMBCSI, ON);
|
||||
vin_set_pmu_channel(sd, IOVDD, ON);
|
||||
usleep_range(1000, 1200);
|
||||
|
@ -1072,7 +1072,7 @@ static int sensor_power(struct v4l2_subdev *sd, int on)
|
|||
sensor_dbg("PWR_OFF!do nothing\n");
|
||||
cci_lock(sd);
|
||||
vin_set_mclk(sd, OFF);
|
||||
vin_gpio_write(sd, POWER_EN, CSI_GPIO_HIGH);
|
||||
// vin_gpio_write(sd, POWER_EN, CSI_GPIO_HIGH);
|
||||
//vin_set_pmu_channel(sd, CMBCSI, OFF);
|
||||
vin_set_pmu_channel(sd, AVDD, OFF);
|
||||
vin_set_pmu_channel(sd, DVDD, OFF);
|
||||
|
|
|
@ -27,7 +27,7 @@ MODULE_LICENSE("GPL");
|
|||
#define MCLK (24*1000*1000)
|
||||
#define V4L2_IDENT_SENSOR (0x002B)
|
||||
|
||||
#define HC_ORIGIN_DEFINED_BOARD
|
||||
// #define HC_ORIGIN_DEFINED_BOARD
|
||||
|
||||
/*
|
||||
* Our nominal (default) frame rate.
|
||||
|
@ -42,8 +42,8 @@ MODULE_LICENSE("GPL");
|
|||
#define OV02B10_I2C_ADDR (0x7A>>1)
|
||||
|
||||
#define SENSOR_NUM 2
|
||||
#define SENSOR_NAME "ov02b1b_mipi"
|
||||
#define SENSOR_NAME_2 "ov02b10_mipi"
|
||||
#define SENSOR_NAME "ov02b10_mipi"
|
||||
#define SENSOR_NAME_2 "ov02b1b_mipi"
|
||||
|
||||
#define SENSOR_1600x1200_30FPS 1
|
||||
#define SENSOR_1280x720_30FPS 0
|
||||
|
@ -666,7 +666,7 @@ static struct regval_list sensor_1600x1200_30fps_regs[] = {
|
|||
{0xfd, 0x01},
|
||||
{0x0e, 0x02},
|
||||
{0x0f, 0x1a},
|
||||
{0x12, 0x01}, //mirror and flip
|
||||
{0x12, 0x03}, //mirror and flip
|
||||
{0x18, 0x00},
|
||||
{0x22, 0xff},
|
||||
{0x23, 0x02},
|
||||
|
@ -955,7 +955,8 @@ static int sensor_power(struct v4l2_subdev *sd, int on)
|
|||
cci_lock(sd);
|
||||
|
||||
vin_gpio_set_status(sd, RESET, 1);
|
||||
vin_gpio_set_status(sd, POWER_EN, 1);
|
||||
// vin_gpio_set_status(sd, POWER_EN, 1);
|
||||
// vin_gpio_write(sd, POWER_EN, CSI_GPIO_LOW);
|
||||
#ifdef HC_ORIGIN_DEFINED_BOARD
|
||||
if (pwdn_flag == 0)
|
||||
{
|
||||
|
@ -967,7 +968,7 @@ static int sensor_power(struct v4l2_subdev *sd, int on)
|
|||
vin_gpio_write(sd, PWDN, CSI_GPIO_LOW);
|
||||
#endif
|
||||
vin_gpio_write(sd, RESET, CSI_GPIO_LOW);
|
||||
vin_gpio_write(sd, POWER_EN, CSI_GPIO_HIGH);
|
||||
// vin_gpio_write(sd, POWER_EN, CSI_GPIO_HIGH);
|
||||
usleep_range(5000, 6000);
|
||||
|
||||
vin_set_mclk_freq(sd, MCLK);
|
||||
|
@ -1105,7 +1106,8 @@ static int sensor_get_fmt_mbus_core(struct v4l2_subdev *sd, int *code)
|
|||
// *code = info->fmt->mbus_code;
|
||||
// }
|
||||
// *code = MEDIA_BUS_FMT_SRGGB10_1X10;//MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
*code = MEDIA_BUS_FMT_SGRBG10_1X10;//MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
// *code = MEDIA_BUS_FMT_SGRBG10_1X10;//MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
*code = MEDIA_BUS_FMT_SBGGR10_1X10;//MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
sensor_print("%s(), L:%d, MEDIA_BUS_FMT_SBGGR10_1X10\n", __func__, __LINE__);
|
||||
return 0;
|
||||
}
|
||||
|
@ -1160,7 +1162,8 @@ static struct sensor_format_struct sensor_formats[] = {
|
|||
{
|
||||
.desc = "Raw RGB Bayer",
|
||||
//.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,
|
||||
// .mbus_code = MEDIA_BUS_FMT_SGRBG10_1X10,//MEDIA_BUS_FMT_SBGGR10_1X10,//MEDIA_BUS_FMT_SBGGR10_1X10,
|
||||
.mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10,
|
||||
.regs = sensor_fmt_raw,
|
||||
.regs_size = ARRAY_SIZE(sensor_fmt_raw),
|
||||
.bpp = 1
|
||||
|
|
|
@ -139,6 +139,7 @@ static void lcd_cfg_panel_info(struct panel_extend_para *info)
|
|||
|
||||
}
|
||||
|
||||
/* <20><>ʼ<EFBFBD><CABC>ʱ<EFBFBD><EFBFBD><F2A3ACB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD>лص<D0BB>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD>ʱʱ<CAB1>䣬<EFBFBD><E4A3AC>ע<EFBFBD><D7A2><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>,<2C><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>䰴<EFBFBD><E4B0B4><EFBFBD><EFBFBD>Ļ<EFBFBD>ֲ<EFBFBD><D6B2><EFBFBD> */
|
||||
static s32 lcd_open_flow(u32 sel)
|
||||
{
|
||||
DBG_INFO("\n");
|
||||
|
@ -171,13 +172,13 @@ static void lcd_power_on(u32 sel)
|
|||
sunxi_lcd_power_enable(sel, 0);
|
||||
sunxi_lcd_delay_ms(10);
|
||||
sunxi_lcd_gpio_set_value(sel, 1, 1);
|
||||
#if 0
|
||||
#if 1
|
||||
panel_reset(sel, 1);
|
||||
sunxi_lcd_delay_ms(300);
|
||||
sunxi_lcd_delay_ms(50);
|
||||
panel_reset(sel, 0);
|
||||
sunxi_lcd_delay_ms(20);
|
||||
sunxi_lcd_delay_ms(50);
|
||||
panel_reset(sel, 1);
|
||||
sunxi_lcd_delay_ms(10);
|
||||
sunxi_lcd_delay_ms(130);
|
||||
#endif
|
||||
sunxi_lcd_power_enable(sel, 1);
|
||||
}
|
||||
|
@ -219,390 +220,35 @@ struct LCM_setting_table {
|
|||
};
|
||||
#if 1
|
||||
static struct LCM_setting_table jd9365_initialization_setting[] = {
|
||||
#if 0
|
||||
{0xE0, 1, {0x00}},
|
||||
{0xE1, 1, {0x93}},
|
||||
{0xE2, 1, {0x65}},
|
||||
{0xE3, 1, {0xF8}},
|
||||
{0xE0, 1, {0x01}},
|
||||
{0x00, 1, {0x00}},
|
||||
{0x01, 1, {0x22}},
|
||||
{0x03, 1, {0x00}},
|
||||
{0x04, 1, {0x24}},
|
||||
{0x17, 1, {0x00}},
|
||||
{0x18, 1, {0xBF}}, //VGMP=4.7V
|
||||
{0x19, 1, {0x03}},
|
||||
{0x1A, 1, {0x00}},
|
||||
{0x1B, 1, {0xBF}}, //VGMN=-4.7V
|
||||
{0x1C, 1, {0x03}},
|
||||
{0x1F, 1, {0x79}},
|
||||
{0x20, 1, {0x2D}},
|
||||
{0x21, 1, {0x2D}},
|
||||
{0x22, 1, {0x4F}},
|
||||
{0x26, 1, {0xF1}},
|
||||
{0x37, 1, {0x05}}, //0x09
|
||||
{0x38, 1, {0x04}}, //JDT=100 column inversion
|
||||
{0x39, 1, {0x0C}},
|
||||
{0x3A, 1, {0x18}},
|
||||
{0x3C, 1, {0x78}},
|
||||
{0x40, 1, {0x04}}, //RSO=720RGB
|
||||
{0x41, 1, {0xA0}}, //LN=640->1280 line
|
||||
{0x55, 1, {0x01}}, //DCDCM=0010,
|
||||
{0x56, 1, {0x01}},
|
||||
{0x57, 1, {0x6D}},
|
||||
{0x58, 1, {0x0A}},
|
||||
{0x59, 1, {0x1A}},
|
||||
{0x5A, 1, {0x65}},
|
||||
{0x5B, 1, {0x14}},
|
||||
{0x5C, 1, {0x15}},
|
||||
{0x5D, 1, {0x70}},
|
||||
{0x5E, 1, {0x5F}},
|
||||
{0x5F, 1, {0x50}},
|
||||
{0x60, 1, {0x45}},
|
||||
{0x61, 1, {0x40}},
|
||||
{0x62, 1, {0x30}},
|
||||
{0x63, 1, {0x33}},
|
||||
{0x64, 1, {0x1B}},
|
||||
{0x65, 1, {0x32}},
|
||||
{0x66, 1, {0x31}},
|
||||
{0x67, 1, {0x30}},
|
||||
{0x68, 1, {0x4E}},
|
||||
{0x69, 1, {0x3C}},
|
||||
{0x6A, 1, {0x45}},
|
||||
{0x6B, 1, {0x39}},
|
||||
{0x6C, 1, {0x39}},
|
||||
{0x6D, 1, {0x2F}},
|
||||
{0x6E, 1, {0x26}},
|
||||
{0x6F, 1, {0x02}},
|
||||
{0x70, 1, {0x70}},
|
||||
{0x71, 1, {0x5F}},
|
||||
{0x72, 1, {0x50}},
|
||||
{0x73, 1, {0x45}},
|
||||
{0x74, 1, {0x40}},
|
||||
{0x75, 1, {0x30}},
|
||||
{0x76, 1, {0x33}},
|
||||
{0x77, 1, {0x1B}},
|
||||
{0x78, 1, {0x32}},
|
||||
{0x79, 1, {0x31}},
|
||||
{0x7A, 1, {0x30}},
|
||||
{0x7B, 1, {0x4E}},
|
||||
{0x7C, 1, {0x3C}},
|
||||
{0x7D, 1, {0x45}},
|
||||
{0x7E, 1, {0x39}},
|
||||
{0x7F, 1, {0x39}},
|
||||
{0x80, 1, {0x2F}},
|
||||
{0x81, 1, {0x26}},
|
||||
{0x82, 1, {0x02}},
|
||||
{0xE0, 1, {0x02}},
|
||||
{0x00, 1, {0x13}},
|
||||
{0x01, 1, {0x11}},
|
||||
{0x02, 1, {0x0B}},
|
||||
{0x03, 1, {0x09}},
|
||||
{0x04, 1, {0x07}},
|
||||
{0x05, 1, {0x05}},
|
||||
{0x06, 1, {0x1F}},
|
||||
{0x07, 1, {0x1F}},
|
||||
{0x08, 1, {0x1F}},
|
||||
{0x09, 1, {0x1F}},
|
||||
{0x0A, 1, {0x1F}},
|
||||
{0x0B, 1, {0x1F}},
|
||||
{0x0C, 1, {0x1F}},
|
||||
{0x0D, 1, {0x1F}},
|
||||
{0x0E, 1, {0x1F}},
|
||||
{0x0F, 1, {0x1F}},
|
||||
{0x10, 1, {0x1F}},
|
||||
{0x11, 1, {0x1F}},
|
||||
{0x12, 1, {0x01}},
|
||||
{0x13, 1, {0x03}},
|
||||
{0x14, 1, {0x1F}},
|
||||
{0x15, 1, {0x1F}},
|
||||
{0x16, 1, {0x12}},
|
||||
{0x17, 1, {0x10}},
|
||||
{0x18, 1, {0x0A}},
|
||||
{0x19, 1, {0x08}},
|
||||
{0x1A, 1, {0x06}},
|
||||
{0x1B, 1, {0x04}},
|
||||
{0x1C, 1, {0x1F}},
|
||||
{0x1D, 1, {0x1F}},
|
||||
{0x1E, 1, {0x1F}},
|
||||
{0x1F, 1, {0x1F}},
|
||||
{0x20, 1, {0x1F}},
|
||||
{0x21, 1, {0x1F}},
|
||||
{0x22, 1, {0x1F}},
|
||||
{0x23, 1, {0x1F}},
|
||||
{0x24, 1, {0x1F}},
|
||||
{0x25, 1, {0x1F}},
|
||||
{0x26, 1, {0x1F}},
|
||||
{0x27, 1, {0x1F}},
|
||||
{0x28, 1, {0x00}},
|
||||
{0x29, 1, {0x02}},
|
||||
{0x2A, 1, {0x1F}},
|
||||
{0x2B, 1, {0x1F}},
|
||||
{0x2C, 1, {0x00}},
|
||||
{0x2D, 1, {0x02}},
|
||||
{0x2E, 1, {0x08}},
|
||||
{0x2F, 1, {0x0A}},
|
||||
{0x30, 1, {0x04}},
|
||||
{0x31, 1, {0x06}},
|
||||
{0x32, 1, {0x1F}},
|
||||
{0x33, 1, {0x1F}},
|
||||
{0x34, 1, {0x1F}},
|
||||
{0x35, 1, {0x1F}},
|
||||
{0x36, 1, {0x1F}},
|
||||
{0x37, 1, {0x1F}},
|
||||
{0x38, 1, {0x1F}},
|
||||
{0x39, 1, {0x1F}},
|
||||
{0x3A, 1, {0x1F}},
|
||||
{0x3B, 1, {0x1F}},
|
||||
{0x3C, 1, {0x1F}},
|
||||
{0x3D, 1, {0x1F}},
|
||||
{0x3E, 1, {0x12}},
|
||||
{0x3F, 1, {0x10}},
|
||||
{0x40, 1, {0x1F}},
|
||||
{0x41, 1, {0x1F}},
|
||||
{0x42, 1, {0x01}},
|
||||
{0x43, 1, {0x03}},
|
||||
{0x44, 1, {0x09}},
|
||||
{0x45, 1, {0x0B}},
|
||||
{0x46, 1, {0x05}},
|
||||
{0x47, 1, {0x07}},
|
||||
{0x48, 1, {0x1F}},
|
||||
{0x49, 1, {0x1F}},
|
||||
{0x4A, 1, {0x1F}},
|
||||
{0x4B, 1, {0x1F}},
|
||||
{0x4C, 1, {0x1F}},
|
||||
{0x4D, 1, {0x1F}},
|
||||
{0x4E, 1, {0x1F}},
|
||||
{0x4F, 1, {0x1F}},
|
||||
{0x50, 1, {0x1F}},
|
||||
{0x51, 1, {0x1F}},
|
||||
{0x52, 1, {0x1F}},
|
||||
{0x53, 1, {0x1F}},
|
||||
{0x54, 1, {0x13}},
|
||||
{0x55, 1, {0x11}},
|
||||
{0x56, 1, {0x1F}},
|
||||
{0x57, 1, {0x1F}},
|
||||
{0x58, 1, {0x40}},
|
||||
{0x59, 1, {0x00}},
|
||||
{0x5A, 1, {0x00}},
|
||||
{0x5B, 1, {0x30}},
|
||||
{0x5C, 1, {0x04}},
|
||||
{0x5D, 1, {0x30}},
|
||||
{0x5E, 1, {0x01}},
|
||||
{0x5F, 1, {0x02}},
|
||||
{0x60, 1, {0x30}},
|
||||
{0x61, 1, {0x01}},
|
||||
{0x62, 1, {0x02}},
|
||||
{0x63, 1, {0x03}},
|
||||
{0x64, 1, {0x64}},
|
||||
{0x65, 1, {0x75}},
|
||||
{0x66, 1, {0x08}},
|
||||
{0x67, 1, {0x72}},
|
||||
{0x68, 1, {0x07}},
|
||||
{0x69, 1, {0x10}},
|
||||
{0x6A, 1, {0x64}},
|
||||
{0x6B, 1, {0x08}},
|
||||
{0x6C, 1, {0x00}},
|
||||
{0x6D, 1, {0x00}},
|
||||
{0x6E, 1, {0x00}},
|
||||
{0x6F, 1, {0x00}},
|
||||
{0x70, 1, {0x00}},
|
||||
{0x71, 1, {0x00}},
|
||||
{0x72, 1, {0x06}},
|
||||
{0x73, 1, {0x86}},
|
||||
{0x74, 1, {0x00}},
|
||||
{0x75, 1, {0x07}},
|
||||
{0x76, 1, {0x00}},
|
||||
{0x77, 1, {0x5D}},
|
||||
{0x78, 1, {0x19}},
|
||||
{0x79, 1, {0x00}},
|
||||
{0x7A, 1, {0x05}},
|
||||
{0x7B, 1, {0x05}},
|
||||
{0x7C, 1, {0x00}},
|
||||
{0x7D, 1, {0x03}},
|
||||
{0x7E, 1, {0x86}},
|
||||
{0xE0, 1, {0x04}},
|
||||
{0x09, 1, {0x10}},
|
||||
{0xE0, 1, {0x00}},
|
||||
{0xE6, 1, {0x02}},
|
||||
{0xE7, 1, {0x02}},
|
||||
|
||||
{0xB9,3,{0xF1,0x12,0x87}},//4
|
||||
{0xB2,3,{0x40,0x13,0x78}},//4
|
||||
{0xB3,10,{0x10,0x10,0x28,0x28,0x03,0xFF,0x00,0x00,0x00,0x00}},//11
|
||||
{0xB4,1,{0x80}},//2
|
||||
{0xB5,2,{0x09,0x09}},//3
|
||||
{0xB6,2,{0xc0,0xc0}},//3 //F_VCOM //B_VCOM//b7 /c0
|
||||
{0xB8,4,{0x26,0x22,0xF0,0x13}},//5 //0x75 for 3 Power Mode,0x25 for Power IC Mode
|
||||
{0xBA,27,{0x31,0x81,0x05,0xF9,0x0E,0x0E,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44,0x25,0x00,0x91,0x0A,0x00,0x00,0x01,0x4F,0x01,0x00,0x00,0x37}},//28 0x33:4Lane, 0x32:3Lane 0x31Lane
|
||||
{0xBC,1,{0x47}},//2
|
||||
{0xBF,5,{0x02,0x10,0x00,0x80,0x04}},//6
|
||||
{0xC0,9,{0x73,0x73,0x50,0x50,0x00,0x00,0x12,0x73,0x00}},//10
|
||||
{0xC1,17,{0x53,0x80,0x32,0x32,0x77,0xE4,0xF7,0xF7,0xCC,0xCC,0x7F,0x7F,0x11,0x11,0x00,0x00,0x32}},//18
|
||||
{0xC7,12,{0x10,0x00,0x0A,0x00,0x00,0x00,0x00,0x00,0xED,0xC7,0x00,0xA5}},//13
|
||||
{0xC8,4,{0x10,0x40,0x1E,0x03}},//5
|
||||
{0xCC,1,{0x0b}},//2
|
||||
{0xE0,34,{0x00,0x01,0x02,0x3D,0x3F,0x3F,0x2D,0x2F,0x04,0x09,0x0C,0x10,0x11,0x0F,0x12,0x0F,0x15,0x00,0x01,0x02,0x3D,0x3F,0x3F,0x2D,0x2F,0x04,0x09,0x0C,0x10,0x11,0x0F,0x12,0x0F,0x15}},//35
|
||||
{0xE1,7,{0x11,0x11,0x91,0x00,0x00,0x00,0x00}},//8
|
||||
{0xE3,14,{0x07,0x07,0x0B,0x0B,0x0B,0x0B,0x00,0x00,0x00,0x00,0xFF,0x04,0xC0,0x10}},//15
|
||||
{0xE9,63,{0xC8,0x10,0x09,0x00,0x00,0x80,0x81,0x12,0x31,0x23,0x37,0x85,0x80,0x81,0x37,0x08,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0xF8,0xBA,0x46,0x02,0x08,0x28,0x88,0x88,0x88,0x88,0x88,0xF8,0xBA,0x57,0x13,0x18,0x38,0x88,0x88,0x88,0x88,0x88,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},//64
|
||||
{0xEA,61,{0x96,0x12,0x01,0x01,0x02,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x8F,0xBA,0x31,0x75,0x38,0x18,0x88,0x88,0x88,0x88,0x88,0x8F,0xBA,0x20,0x64,0x28,0x08,0x88,0x88,0x88,0x88,0x88,0x23,0x30,0x00,0x00,0x68,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},//62
|
||||
{0xEF,3,{0xFF,0xFF,0x01}},//4
|
||||
|
||||
{0x11, 0, {0x00}},
|
||||
{REGFLAG_DELAY, 120, {}},
|
||||
{0x29, 0, {0x00}},
|
||||
{REGFLAG_DELAY, 5, {}},
|
||||
{0x35, 0, {0x00}},
|
||||
#else
|
||||
{REGFLAG_DELAY, 50, {}},
|
||||
|
||||
|
||||
#if 0
|
||||
{0x7A, 1, {0xC1}},
|
||||
{0x20, 1, {0x00}},
|
||||
{0x21, 1, {0x20}},
|
||||
{0x22, 1, {0x35}},
|
||||
{0x23, 1, {0x6C}},
|
||||
{0x24, 1, {0x0A}},
|
||||
{0x25, 1, {0x14}},
|
||||
{0x26, 1, {0x00}},
|
||||
{0x27, 1, {0x14}},
|
||||
{0x28, 1, {0x0F}},
|
||||
{0x29, 1, {0x0A}},
|
||||
{0x34, 1, {0x80}},
|
||||
{0x36, 1, {0x6C}},
|
||||
{0xB5, 1, {0xA0}},
|
||||
{0x5C, 1, {0xFF}},
|
||||
{0x56, 1, {0x90}},
|
||||
{0x6B, 1, {0x21}},
|
||||
{0x69, 1, {0x27}},
|
||||
/* color bar*/
|
||||
//{0x10, 1, {0x47}},
|
||||
//{0x2A, 1, {0x41}},
|
||||
/***/
|
||||
{0xB6, 1, {0x20}},
|
||||
{0x51, 1, {0x20}},
|
||||
{0x09, 1, {0x10}},
|
||||
|
||||
#else
|
||||
/*
|
||||
0x7A = 0xC1
|
||||
0x20 = 0x00
|
||||
0x21 = 0x20
|
||||
0x22 = 0x35
|
||||
0x23 = 0x6C
|
||||
0x24 = 0x0A
|
||||
0x25 = 0x14
|
||||
0x26 = 0x00
|
||||
0x27 = 0x0F
|
||||
0x28 = 0x05
|
||||
0x29 = 0x0A
|
||||
0x34 = 0x80
|
||||
0x36 = 0x6C
|
||||
0xB5 = 0xA0
|
||||
0x5C = 0xFF
|
||||
0x13 = 0x10
|
||||
0x56 = 0x90
|
||||
0x6B = 0x21
|
||||
0x69 = 0x27
|
||||
0xB6 = 0x20
|
||||
0x51 = 0x20
|
||||
0x09 = 0x10
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#if LJL_TEST
|
||||
|
||||
{0xD5,3,{0x61,0x74,0x97}},
|
||||
{0xD0,1,{0x10}},
|
||||
{0x60,1,{0x07}},
|
||||
{0x61,1,{0x3f}},
|
||||
{0x62,1,{0xC3}},
|
||||
{0x63,1,{0x10}},
|
||||
{0x66,1,{0x40}},
|
||||
{0x67,1,{0x1C}},
|
||||
{0x68,1,{0x3B}},
|
||||
{0x69,1,{0x32}},
|
||||
{0x6A,1,{0x0C}},
|
||||
{0x6B,1,{0xBE}},
|
||||
{0xBC,1,{0x74}},
|
||||
{0xBA,1,{0x01}},
|
||||
{0xB6,1,{0x22}},
|
||||
{0xA5,1,{0x5B}},
|
||||
{0xA1,1,{0xFF}},
|
||||
{0xA4,1,{0x55}},
|
||||
{0xA0,1,{0xCC}},
|
||||
{0xF1,1,{0x45}},
|
||||
{0xF2,1,{0x15}},
|
||||
{0x93,1,{0x62}},
|
||||
{0x9D,3,{0x59,0x59,0x59}},
|
||||
{0x9F,3,{0x10,0x10,0x10}},
|
||||
{0xFF,1,{0xFF}},
|
||||
{0xFF,1,{0xFF}},
|
||||
{0xFF,1,{0xFF}},
|
||||
{0xFF,1,{0xFF}},
|
||||
{0xD0,1,{0x11}},
|
||||
{0x60,1,{0x06}},
|
||||
{0x62,1,{0xC0}},
|
||||
{0x63,1,{0x60}},
|
||||
{0x64,1,{0x04}},
|
||||
{0x66,1,{0x89}},
|
||||
{0x67,1,{0x17}},
|
||||
{0x68,1,{0x89}},
|
||||
{0x69,1,{0xC3}},
|
||||
{0xB7,1,{0x07}},
|
||||
{0xB8,2,{0xFF,0xFF}},
|
||||
{0xB9,1,{0xFF}},
|
||||
{0xBA,1,{0xFF}},
|
||||
{0xBC,2,{0x00,0x09}},
|
||||
{0xB3,44,{0x35,0x37,0x07,0x01,0x15,0x17,0x09,0x0b,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x35,0x35,0x35,0x33,0x39,0x35,0x37,0x06,0x00,0x14,0x16,0x08,0x0a,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x35,0x35,0x35,0x33,0x39}},
|
||||
{0xA0,8,{0x30,0x01,0x1A,0x6A,0x30,0x02,0x1A,0x6A}},
|
||||
{0xA3,8,{0x30,0x03,0x1A,0x6A,0x30,0x04,0x1A,0x6A}},
|
||||
{0xA7,5,{0x33,0x1A,0x6A,0x1A,0x6A}},
|
||||
{0xA8,12,{0x00,0x03,0x05,0x0B,0x03,0x00,0x04,0x05,0x0C,0x03,0x03,0x03}},
|
||||
{0xA9,12,{0x00,0x05,0x05,0x0D,0x03,0x00,0x06,0x05,0x0E,0x03,0x03,0x03}},
|
||||
{0xAE,12,{0x00,0x07,0x05,0x0F,0x03,0x00,0x08,0x05,0x10,0x03,0x03,0x03}},
|
||||
{0xAF,12,{0x00,0x09,0x05,0x11,0x03,0x00,0x0A,0x05,0x12,0x03,0x03,0x03}},
|
||||
{0xB0,7,{0x12,0x22,0x12,0x22,0x22,0x22,0x74}},
|
||||
{0xE6,1,{0xE7}},
|
||||
{0xE7,3,{0x02,0x01,0x7F}},
|
||||
{0xED,1,{0x01}},
|
||||
{0xEE,1,{0x17}},
|
||||
{0xF1,19,{0x7F,0x6E,0x60,0x55,0x55,0x46,0x4A,0x33,0x4C,0x4B,0x4A,0x68,0x57,0x5f,0x4f,0x49,0x37,0x1B,0x00}},
|
||||
{0xF2,19,{0x7F,0x6E,0x60,0x55,0x55,0x46,0x4A,0x33,0x4C,0x4B,0x4A,0x68,0x57,0x5f,0x4f,0x49,0x37,0x1B,0x00}},
|
||||
{0xC2,1,{0x00}},
|
||||
{0xFF,1,{0xFF}},
|
||||
{0xFF,1,{0xFF}},
|
||||
{0xFF,1,{0xFF}},
|
||||
{0xFF,1,{0xFF}},
|
||||
{0xD0,1,{0x00}},
|
||||
{0xFF,1,{0xFF}},
|
||||
{0x11,1,{0x00}},
|
||||
{0xFF,1,{0xFF}},
|
||||
{REGFLAG_DELAY, 120, {}},
|
||||
{0x29,1,{0x00}},
|
||||
{0xFF,1,{0xFF}},
|
||||
{REGFLAG_DELAY, 120, {}},
|
||||
|
||||
#else
|
||||
|
||||
{0x7A, 1, {0xC1}},
|
||||
{0x20, 1, {0x00}},
|
||||
{0x21, 1, {0x20}},
|
||||
{0x22, 1, {0x35}},
|
||||
{0x23, 1, {0x6C}},
|
||||
{0x24, 1, {0x0A}},
|
||||
{0x25, 1, {0x14}},
|
||||
{0x26, 1, {0x00}},
|
||||
{0x27, 1, {0x0F}},
|
||||
{0x28, 1, {0x05}},
|
||||
{0x29, 1, {0x0A}},
|
||||
{0x34, 1, {0x80}},
|
||||
{0x36, 1, {0x6C}},
|
||||
/**/
|
||||
{0x86, 1, {0x29}}, //2 lane
|
||||
/**/
|
||||
{0xB5, 1, {0xA0}},
|
||||
{0x5C, 1, {0xFF}},
|
||||
// {0x13, 1, {0x10}},
|
||||
|
||||
{0x56, 1, {0x90}},
|
||||
{0x6B, 1, {0x21}},
|
||||
{0x69, 1, {0x27}},
|
||||
/* color bar*/
|
||||
//{0x10, 1, {0x47}},
|
||||
//{0x2A, 1, {0x41}},
|
||||
/***/
|
||||
{0xB6, 1, {0x20}},
|
||||
{0x51, 1, {0x20}},
|
||||
{0x09, 1, {0x10}},
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// Setting ending by predefined flag
|
||||
//{REGFLAG_END_OF_TABLE, REGFLAG_END_OF_TABLE, {}},
|
||||
};
|
||||
|
|
|
@ -221,7 +221,7 @@ CONFIG_ISP_NUMBER=2
|
|||
# CONFIG_SENSOR_GC1054_MIPI is not set
|
||||
# CONFIG_SENSOR_GC1084_MIPI is not set
|
||||
# CONFIG_SENSOR_GC2053_MIPI is not set
|
||||
# CONFIG_SENSOR_GC2083_MIPI is not set
|
||||
CONFIG_SENSOR_GC2083_MIPI=y
|
||||
# CONFIG_SENSOR_GC4663_MIPI is not set
|
||||
# CONFIG_SENSOR_SC2355_MIPI is not set
|
||||
# CONFIG_SENSOR_SC2336_MIPI is not set
|
||||
|
|
|
@ -47,12 +47,12 @@ uart_rx = port:PE01<7><1><default><default>
|
|||
|
||||
[sensor0]
|
||||
used0 = 1
|
||||
reset0 = port:PD20<1><1><default><default>
|
||||
pwdn0 = port:PE10<1><1><default><default>
|
||||
reset0 = port:PF05<1><1><default><default>
|
||||
pwdn0 = port:PE08<1><1><default><default>
|
||||
mclk0 = port:PE12<5><1><default><default>
|
||||
|
||||
[sensor1]
|
||||
used1 = 1
|
||||
reset1 = port:PD21<1><1><default><default>
|
||||
pwdn1 = port:PE10<1><1><default><default>
|
||||
reset1 = port:PE06<1><1><default><default>
|
||||
pwdn1 = port:PE09<1><1><default><default>
|
||||
mclk1 = port:PE13<5><1><default><default>
|
||||
|
|
|
@ -677,12 +677,26 @@ static int sensor_power(int id, int on)
|
|||
vin_set_mclk_freq(id, MCLK);
|
||||
vin_set_mclk(id, 1);
|
||||
hal_usleep(1000);
|
||||
vin_gpio_set_status(id, PWDN, 1);
|
||||
vin_gpio_set_status(id, RESET, 1);
|
||||
// vin_gpio_set_status(id, 163, 1);
|
||||
// vin_gpio_write(id, 163, CSI_GPIO_LOW);
|
||||
vin_gpio_write(id, PWDN, CSI_GPIO_LOW);
|
||||
vin_gpio_write(id, RESET, CSI_GPIO_LOW);
|
||||
hal_usleep(1000);
|
||||
vin_gpio_write(id, PWDN, CSI_GPIO_HIGH);
|
||||
vin_gpio_write(id, RESET, CSI_GPIO_HIGH);
|
||||
hal_usleep(1000);
|
||||
break;
|
||||
case PWR_OFF:
|
||||
sensor_dbg("PWR_OFF!do nothing\n");
|
||||
vin_set_mclk(id, 0);
|
||||
hal_usleep(1000);
|
||||
vin_gpio_set_status(id, PWDN, 1);
|
||||
vin_gpio_set_status(id, RESET, 1);
|
||||
vin_gpio_write(id, PWDN, CSI_GPIO_LOW);
|
||||
vin_gpio_write(id, RESET, CSI_GPIO_LOW);
|
||||
// vin_gpio_write(id, 163, CSI_GPIO_HIGH);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
|
|
@ -193,7 +193,7 @@ static struct regval_list sensor_1600x1200_30fps_regs[] = {
|
|||
{0xfd, 0x01},
|
||||
{0x0e, 0x02},
|
||||
{0x0f, 0x1a},
|
||||
{0x12, 0x01}, //mirror and flip
|
||||
{0x12, 0x03}, //mirror and flip
|
||||
{0x18, 0x00},
|
||||
{0x22, 0xff},
|
||||
{0x23, 0x02},
|
||||
|
@ -712,7 +712,7 @@ 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 pwdn_flag = 0;
|
||||
static int sensor_power(int id, int on)
|
||||
{
|
||||
if (on && (sensor_power_count[id])++ > 0)
|
||||
|
@ -723,17 +723,18 @@ static int sensor_power(int id, int on)
|
|||
switch (on) {
|
||||
case PWR_ON:
|
||||
sensor_dbg("PWR_ON!\n");
|
||||
if (pwdn_flag == 0)
|
||||
{
|
||||
pwdn_flag = 1;
|
||||
vin_gpio_set_status(id, PWDN, 1);
|
||||
}
|
||||
|
||||
// if (pwdn_flag == 0)
|
||||
// {
|
||||
// pwdn_flag = 1;
|
||||
// vin_gpio_set_status(id, PWDN, 1);
|
||||
// }
|
||||
vin_gpio_set_status(id, 163, 1);
|
||||
vin_gpio_write(id, 163, CSI_GPIO_LOW);
|
||||
vin_gpio_set_status(id, PWDN, 1);
|
||||
vin_gpio_set_status(id, RESET, 1);
|
||||
vin_gpio_set_status(id, IR_LED, 1);
|
||||
|
||||
// vin_gpio_write(id, PWDN, CSI_GPIO_LOW);
|
||||
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);
|
||||
|
@ -753,7 +754,8 @@ 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);
|
||||
vin_gpio_write(id, PWDN, CSI_GPIO_LOW);
|
||||
// vin_gpio_write(id, 163, CSI_GPIO_HIGH);
|
||||
|
||||
break;
|
||||
default:
|
||||
|
@ -822,7 +824,8 @@ static struct sensor_format_struct sensor_formats[] = {
|
|||
/* 1600x1200 30fps */
|
||||
{
|
||||
//.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,
|
||||
// .mbus_code = MEDIA_BUS_FMT_SGRBG10_1X10,//MEDIA_BUS_FMT_SBGGR10_1X10,//MEDIA_BUS_FMT_SBGGR10_1X10,
|
||||
.mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10,//MEDIA_BUS_FMT_SBGGR10_1X10,//MEDIA_BUS_FMT_SBGGR10_1X10,
|
||||
.width = 1600,
|
||||
.height = 1200,
|
||||
.hoffset = 0,
|
||||
|
|
|
@ -91,16 +91,16 @@ struct sensor_list global_sensors_list[2][MAX_DETECT_SENSOR] = {
|
|||
[0] = {
|
||||
.sensor_name = "gc2083_mipi",
|
||||
.sensor_twi_addr = 0x6e,
|
||||
.sensor_twi_id = 1,
|
||||
.sensor_twi_id = 0,
|
||||
.mclk_id = 0,
|
||||
.use_isp = 1,
|
||||
.id = 0,
|
||||
.addr_width = 16,
|
||||
.data_width = 8,
|
||||
.reset_gpio = GPIOA(11),
|
||||
.pwdn_gpio = GPIOA(9),
|
||||
.ir_cut_gpio[0] = GPIOD(18), /*-cut*/
|
||||
.ir_cut_gpio[1] = GPIOD(8), /*+cut*/
|
||||
.reset_gpio = GPIOF(5),
|
||||
.pwdn_gpio = GPIOE(8),
|
||||
.ir_cut_gpio[0] = GPIOF(1), /*-cut*/
|
||||
.ir_cut_gpio[1] = GPIOF(2), /*+cut*/
|
||||
.ir_led_gpio = 0xffff, //GPIOE(10)
|
||||
},
|
||||
[1] = {
|
||||
|
@ -448,35 +448,50 @@ 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)
|
||||
#elif defined(CONFIG_SENSOR_GC2083_MIPI)
|
||||
.used = 1,
|
||||
.sensor_name = "ov02b10_mipi",
|
||||
.sensor_twi_addr = 0x78,
|
||||
.sensor_twi_id = 1,
|
||||
.sensor_name = "gc2083_mipi",
|
||||
.sensor_twi_addr = 0x6e,
|
||||
.sensor_twi_id = 0,
|
||||
.mclk_id = 0,
|
||||
.use_isp = 1,
|
||||
.id = 0,
|
||||
.addr_width = 8,
|
||||
.addr_width = 16,
|
||||
.data_width = 8,
|
||||
.reset_gpio = GPIOE(7),
|
||||
.reset_gpio = GPIOF(5),
|
||||
.pwdn_gpio = GPIOE(8),
|
||||
.ir_cut_gpio[0] = 0xffff,/*-cut*/
|
||||
.ir_cut_gpio[1] = 0xffff,/*+cut*/
|
||||
.ir_led_gpio = GPIOF(3),
|
||||
.ir_cut_gpio[0] = GPIOF(1),/*-cut*/
|
||||
.ir_cut_gpio[1] = GPIOF(2),/*+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 = "gc2083_mipi",
|
||||
.sensor_twi_addr = 0x6e,
|
||||
.sensor_twi_id = 1,
|
||||
.sensor_twi_id = 0,
|
||||
.mclk_id = 0,
|
||||
.use_isp = 1,
|
||||
.id = 0,
|
||||
.addr_width = 8,
|
||||
.addr_width = 16,
|
||||
.data_width = 8,
|
||||
.reset_gpio = GPIOA(11),
|
||||
.pwdn_gpio = GPIOA(9),
|
||||
.ir_cut_gpio[0] = 0xffff,/*-cut*/
|
||||
.ir_cut_gpio[1] = 0xffff,/*+cut*/
|
||||
.reset_gpio = GPIOF(5),
|
||||
.pwdn_gpio = GPIOE(8),
|
||||
.ir_cut_gpio[0] = GPIOF(1),/*-cut*/
|
||||
.ir_cut_gpio[1] = GPIOF(2),/*+cut*/
|
||||
.ir_led_gpio = 0xffff,
|
||||
#endif
|
||||
},
|
||||
|
@ -499,16 +514,16 @@ struct sensor_list global_sensors[VIN_MAX_CSI] = {
|
|||
.ir_led_gpio = 0xffff,
|
||||
#elif defined(CONFIG_SENSOR_OV02B10_MIPI)
|
||||
.used = 1,
|
||||
.sensor_name = "ov02b1b_mipi",
|
||||
.sensor_name = "ov02b10_mipi",
|
||||
.sensor_twi_addr = 0x78,
|
||||
.sensor_twi_id = 0,
|
||||
.sensor_twi_id = 1,
|
||||
.mclk_id = 1,
|
||||
.use_isp = 1,
|
||||
.id = 1,
|
||||
.addr_width = 8,
|
||||
.data_width = 8,
|
||||
.reset_gpio = GPIOE(9),
|
||||
.pwdn_gpio = GPIOE(10),
|
||||
.reset_gpio = GPIOE(6),
|
||||
.pwdn_gpio = GPIOE(9),
|
||||
.ir_cut_gpio[0] = 0xffff,/*-cut*/
|
||||
.ir_cut_gpio[1] = 0xffff,/*+cut*/
|
||||
.ir_led_gpio = 0xffff,
|
||||
|
|
|
@ -99,12 +99,17 @@ echo 160 > /sys/class/gpio/export
|
|||
echo out > /sys/class/gpio/gpio160/direction
|
||||
echo 0 > /sys/class/gpio/gpio160/value
|
||||
|
||||
echo 164 > /sys/class/gpio/export
|
||||
echo out > /sys/class/gpio/gpio164/direction
|
||||
echo 0 > /sys/class/gpio/gpio164/value
|
||||
|
||||
echo 0 > /sys/class/pwm/pwmchip0/export
|
||||
echo 100000 > /sys/class/pwm/pwmchip0/pwm0/period
|
||||
echo 40000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
|
||||
echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
|
||||
|
||||
echo 1 > /sys/class/gpio/gpio160/value
|
||||
# echo 1 > /sys/class/gpio/gpio160/value
|
||||
echo 1 > /sys/class/gpio/gpio164/value
|
||||
|
||||
# run_usb_adb
|
||||
|
||||
|
|
Loading…
Reference in New Issue