upate:更新双目sensor驱动
This commit is contained in:
parent
e265e27c69
commit
2077a3997d
|
@ -159,8 +159,8 @@
|
|||
status = "okay";
|
||||
ch_id = <0>;//vipp_num
|
||||
codec_type = <0>;//0//0:H264; 1:JPG; 2:H265
|
||||
res_w = <1920>;
|
||||
res_h = <1080>;
|
||||
res_w = <1600>;
|
||||
res_h = <1200>;
|
||||
fps = <15>;
|
||||
bit_rate = <1536>;//kb
|
||||
gop = <40>;
|
||||
|
@ -190,8 +190,8 @@
|
|||
status = "disabled";
|
||||
ch_id = <1>;//vipp_num
|
||||
codec_type = <0>;//0//0:H264; 1:JPG; 2:H265
|
||||
res_w = <1920>;
|
||||
res_h = <1080>;
|
||||
res_w = <1600>;
|
||||
res_h = <1200>;
|
||||
fps = <15>;
|
||||
bit_rate = <1536>;//kb
|
||||
gop = <40>;
|
||||
|
@ -262,11 +262,12 @@
|
|||
|
||||
tdm0:tdm@0 {
|
||||
iommus = <&mmu_aw 4 0>;
|
||||
work_mode = <0>;
|
||||
work_mode = <1>;
|
||||
delay_init = <1>;
|
||||
};
|
||||
|
||||
isp00:isp@0 {
|
||||
work_mode = <0>;
|
||||
work_mode = <1>;
|
||||
rpbuf = <&rpbuf_controller0>;
|
||||
iommus = <&mmu_aw 4 0>;
|
||||
isp-region = <&isp_reserved>;
|
||||
|
@ -274,6 +275,11 @@
|
|||
};
|
||||
|
||||
isp01:isp@1 {
|
||||
/*
|
||||
rpbuf = <&rpbuf_controller0>;
|
||||
iommus = <&mmu_aw 4 0>;
|
||||
delay_init = <1>;
|
||||
*/
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -291,13 +297,14 @@
|
|||
};
|
||||
|
||||
scaler00:scaler@0 {
|
||||
work_mode = <0>;
|
||||
work_mode = <1>;
|
||||
iommus = <&mmu_aw 1 0>;
|
||||
delay_init = <1>;
|
||||
};
|
||||
|
||||
scaler01:scaler@1 {
|
||||
status = "disabled";
|
||||
iommus = <&mmu_aw 1 0>;
|
||||
delay_init = <1>;
|
||||
};
|
||||
|
||||
scaler02:scaler@2 {
|
||||
|
@ -309,13 +316,14 @@
|
|||
};
|
||||
|
||||
scaler10:scaler@4 {
|
||||
work_mode = <0>;
|
||||
work_mode = <1>;
|
||||
iommus = <&mmu_aw 1 0>;
|
||||
delay_init = <1>;
|
||||
};
|
||||
|
||||
scaler11:scaler@5 {
|
||||
status = "disabled";
|
||||
iommus = <&mmu_aw 1 0>;
|
||||
delay_init = <1>;
|
||||
};
|
||||
|
||||
scaler12:scaler@6 {
|
||||
|
@ -327,13 +335,14 @@
|
|||
};
|
||||
|
||||
scaler20:scaler@8 {
|
||||
work_mode = <0>;
|
||||
work_mode = <1>;
|
||||
iommus = <&mmu_aw 1 0>;
|
||||
delay_init = <1>;
|
||||
};
|
||||
|
||||
scaler21:scaler@9 {
|
||||
status = "disabled";
|
||||
iommus = <&mmu_aw 1 0>;
|
||||
delay_init = <1>;
|
||||
};
|
||||
|
||||
scaler22:scaler@10 {
|
||||
|
@ -345,13 +354,14 @@
|
|||
};
|
||||
|
||||
scaler30:scaler@12 {
|
||||
work_mode = <0>;
|
||||
work_mode = <1>;
|
||||
iommus = <&mmu_aw 1 0>;
|
||||
delay_init = <1>;
|
||||
};
|
||||
|
||||
scaler31:scaler@13 {
|
||||
status = "disabled";
|
||||
iommus = <&mmu_aw 1 0>;
|
||||
delay_init = <1>;
|
||||
};
|
||||
|
||||
scaler32:scaler@14 {
|
||||
|
@ -384,25 +394,17 @@
|
|||
|
||||
sensor0:sensor@0 {
|
||||
device_type = "sensor0";
|
||||
sensor0_mname = "gc2083_mipi";
|
||||
sensor0_twi_cci_id = <1>;
|
||||
sensor0_twi_addr = <0x6e>;
|
||||
sensor0_mclk_id = <0>;
|
||||
sensor0_mname = "sc202cs_mipi";
|
||||
sensor0_twi_cci_id = <0>;
|
||||
sensor0_twi_addr = <0x20>;
|
||||
sensor0_mclk_id = <1>;
|
||||
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_reset = <&pio PA 10 1 0 1 0>; */
|
||||
sensor0_pwdn = <&pio PA 9 1 0 1 0>;
|
||||
sensor0_reset = <&pio PE 10 1 0 1 0>;
|
||||
sensor0_sm_hs = <>;
|
||||
sensor0_sm_vs = <>;
|
||||
sensor0_power_en = <>;
|
||||
|
@ -413,9 +415,9 @@
|
|||
|
||||
sensor1:sensor@1 {
|
||||
device_type = "sensor1";
|
||||
sensor1_mname = "imx386_mipi_2";
|
||||
sensor1_mname = "sc202cs_mipi_2";
|
||||
sensor1_twi_cci_id = <0>;
|
||||
sensor1_twi_addr = <0x20>;
|
||||
sensor1_twi_addr = <0x6c>;
|
||||
sensor1_mclk_id = <1>;
|
||||
sensor1_pos = "front";
|
||||
sensor1_isp_used = <1>;
|
||||
|
@ -423,15 +425,7 @@
|
|||
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_reset = <&pio PA 20 1 0 1 0>;
|
||||
sensor1_pwdn = <&pio PA 21 1 0 1 0>;
|
||||
sensor1_reset = <&pio PE 11 1 0 1 0>;
|
||||
sensor1_sm_hs = <>;
|
||||
sensor1_sm_vs = <>;
|
||||
flash_handle = <>;
|
||||
|
@ -448,21 +442,24 @@
|
|||
vinc0_rear_sensor_sel = <0>;
|
||||
vinc0_front_sensor_sel = <0>;
|
||||
vinc0_sensor_list = <0>;
|
||||
work_mode = <0x0>;
|
||||
work_mode = <0x1>;
|
||||
iommus = <&mmu_aw 1 0>;
|
||||
delay_init = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
vinc01:vinc@1 {
|
||||
vinc1_csi_sel = <2>;
|
||||
vinc1_mipi_sel = <0xff>;
|
||||
vinc1_csi_sel = <1>;
|
||||
vinc1_mipi_sel = <1>;
|
||||
vinc1_isp_sel = <1>;
|
||||
vinc1_isp_tx_ch = <1>;
|
||||
vinc1_isp_tx_ch = <0>;
|
||||
vinc1_tdm_rx_sel = <1>;
|
||||
vinc1_rear_sensor_sel = <0>;
|
||||
vinc1_front_sensor_sel = <0>;
|
||||
vinc1_rear_sensor_sel = <1>;
|
||||
vinc1_front_sensor_sel = <1>;
|
||||
vinc1_sensor_list = <0>;
|
||||
work_mode = <0x1>;
|
||||
iommus = <&mmu_aw 1 0>;
|
||||
delay_init = <1>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -499,21 +496,24 @@
|
|||
vinc4_rear_sensor_sel = <0>;
|
||||
vinc4_front_sensor_sel = <0>;
|
||||
vinc4_sensor_list = <0>;
|
||||
work_mode = <0x0>;
|
||||
work_mode = <0x1>;
|
||||
iommus = <&mmu_aw 1 0>;
|
||||
delay_init = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
vinc11:vinc@5 {
|
||||
vinc5_csi_sel = <2>;
|
||||
vinc5_mipi_sel = <0xff>;
|
||||
vinc5_csi_sel = <1>;
|
||||
vinc5_mipi_sel = <1>;
|
||||
vinc5_isp_sel = <1>;
|
||||
vinc5_isp_tx_ch = <1>;
|
||||
vinc5_isp_tx_ch = <0>;
|
||||
vinc5_tdm_rx_sel = <1>;
|
||||
vinc5_rear_sensor_sel = <0>;
|
||||
vinc5_front_sensor_sel = <0>;
|
||||
vinc5_rear_sensor_sel = <1>;
|
||||
vinc5_front_sensor_sel = <1>;
|
||||
vinc5_sensor_list = <0>;
|
||||
work_mode = <0x1>;
|
||||
iommus = <&mmu_aw 1 0>;
|
||||
delay_init = <1>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -543,28 +543,31 @@
|
|||
|
||||
vinc20:vinc@8 {
|
||||
vinc8_csi_sel = <0>;
|
||||
vinc8_mipi_sel = <0x0>;
|
||||
vinc8_mipi_sel = <0>;
|
||||
vinc8_isp_sel = <0>;
|
||||
vinc8_isp_tx_ch = <0>;
|
||||
vinc8_tdm_rx_sel = <0>;
|
||||
vinc8_rear_sensor_sel = <0>;
|
||||
vinc8_front_sensor_sel = <0>;
|
||||
vinc8_sensor_list = <0>;
|
||||
work_mode = <0x0>;
|
||||
work_mode = <0x1>;
|
||||
iommus = <&mmu_aw 1 0>;
|
||||
delay_init = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
vinc21:vinc@9 {
|
||||
vinc9_csi_sel = <2>;
|
||||
vinc9_mipi_sel = <0xff>;
|
||||
vinc9_isp_sel = <0>;
|
||||
vinc9_csi_sel = <1>;
|
||||
vinc9_mipi_sel = <1>;
|
||||
vinc9_isp_sel = <1>;
|
||||
vinc9_isp_tx_ch = <0>;
|
||||
vinc9_tdm_rx_sel = <0>;
|
||||
vinc9_rear_sensor_sel = <0>;
|
||||
vinc9_front_sensor_sel = <0>;
|
||||
vinc9_tdm_rx_sel = <1>;
|
||||
vinc9_rear_sensor_sel = <1>;
|
||||
vinc9_front_sensor_sel = <1>;
|
||||
vinc9_sensor_list = <0>;
|
||||
work_mode = <0x1>;
|
||||
iommus = <&mmu_aw 1 0>;
|
||||
delay_init = <1>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -594,28 +597,31 @@
|
|||
|
||||
vinc30:vinc@12 {
|
||||
vinc12_csi_sel = <0>;
|
||||
vinc12_mipi_sel = <0x0>;
|
||||
vinc12_mipi_sel = <0>;
|
||||
vinc12_isp_sel = <0>;
|
||||
vinc12_isp_tx_ch = <0>;
|
||||
vinc12_tdm_rx_sel = <0>;
|
||||
vinc12_rear_sensor_sel = <0>;
|
||||
vinc12_front_sensor_sel = <0>;
|
||||
vinc12_sensor_list = <0>;
|
||||
work_mode = <0x0>;
|
||||
work_mode = <0x1>;
|
||||
iommus = <&mmu_aw 1 0>;
|
||||
delay_init = <1>;
|
||||
status = "disabled";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
vinc31:vinc@13 {
|
||||
vinc13_csi_sel = <2>;
|
||||
vinc13_mipi_sel = <0xff>;
|
||||
vinc13_isp_sel = <0>;
|
||||
vinc13_csi_sel = <1>;
|
||||
vinc13_mipi_sel = <1>;
|
||||
vinc13_isp_sel = <1>;
|
||||
vinc13_isp_tx_ch = <0>;
|
||||
vinc13_tdm_rx_sel = <0>;
|
||||
vinc13_rear_sensor_sel = <0>;
|
||||
vinc13_front_sensor_sel = <0>;
|
||||
vinc13_tdm_rx_sel = <1>;
|
||||
vinc13_rear_sensor_sel = <1>;
|
||||
vinc13_front_sensor_sel = <1>;
|
||||
vinc13_sensor_list = <0>;
|
||||
work_mode = <0x1>;
|
||||
iommus = <&mmu_aw 1 0>;
|
||||
delay_init = <1>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -655,12 +661,6 @@
|
|||
pinctrl-0 = <&key_pins_pcduino>;*/
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
set_key@0 {
|
||||
label = "Key Back";
|
||||
linux,code = <28>;
|
||||
gpios = <&pio PE 4 0 1 1 1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -887,8 +887,8 @@
|
|||
};
|
||||
|
||||
mipib_pins_a: mipib@0 {
|
||||
allwinner,pins = "PA8", "PA9", "PA10", "PA11";
|
||||
allwinner,pname = "mipib_d1n", "mipib_d1p", "mipib_ck0n", "mipib_ck0p";
|
||||
allwinner,pins = "PA10", "PA11";
|
||||
allwinner,pname = "mipib_ck0n", "mipib_ck0p";
|
||||
allwinner,function = "mipib_rx";
|
||||
allwinner,muxsel = <2>;
|
||||
allwinner,drive = <1>;
|
||||
|
@ -896,14 +896,14 @@
|
|||
};
|
||||
|
||||
mipib_pins_b: mipib@1 {
|
||||
allwinner,pins = "PA8", "PA9", "PA10", "PA11";
|
||||
allwinner,pins = "PA10", "PA11";
|
||||
allwinner,pname = "mipib_d1n", "mipib_d1p", "mipib_ck0n", "mipib_ck0p";
|
||||
allwinner,function = "io_disabled";
|
||||
allwinner,muxsel = <0xf>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
/*
|
||||
mipib_4lane_pins_a: mipib_4lane@0 {
|
||||
allwinner,pins = "PA8", "PA9";
|
||||
allwinner,pname = "mipib_d1n", "mipib_d1p";
|
||||
|
@ -921,18 +921,18 @@
|
|||
allwinner,drive = <1>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
*/
|
||||
twi0_pins_a: twi0@0 {
|
||||
allwinner,pins = "PA16", "PA17";
|
||||
allwinner,pins = "PE4", "PE5";
|
||||
allwinner,pname = "twi0_scl", "twi0_sda";
|
||||
allwinner,function = "twi0";
|
||||
allwinner,muxsel = <4>;
|
||||
allwinner,muxsel = <8>;
|
||||
allwinner,drive = <0>;
|
||||
allwinner,pull = <1>;
|
||||
};
|
||||
|
||||
twi0_pins_b: twi0@1 {
|
||||
allwinner,pins = "PA16", "PA17";
|
||||
allwinner,pins = "PE4", "PE5";
|
||||
allwinner,function = "io_disabled";
|
||||
allwinner,muxsel = <0xf>;
|
||||
allwinner,drive = <0>;
|
||||
|
@ -1055,6 +1055,20 @@
|
|||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
pwm0_pin_a: pwm0@0 {
|
||||
pins = "PH0";
|
||||
function = "pwm0";
|
||||
muxsel = <2>;
|
||||
drive-strength = <10>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
pwm0_pin_b: pwm0@1 {
|
||||
pins = "PH0";
|
||||
function = "gpio_in";
|
||||
muxsel = <0>;
|
||||
};
|
||||
|
||||
pwm4_pin_a: pwm4@0 {
|
||||
pins = "PH11";
|
||||
function = "pwm4";
|
||||
|
@ -1134,16 +1148,16 @@
|
|||
};
|
||||
|
||||
csi_mclk0_pins_a: csi_mclk0@0 {
|
||||
allwinner,pins = "PA10";
|
||||
allwinner,pins = "PE12";
|
||||
allwinner,pname = "mipi_csi_mclk0";
|
||||
allwinner,function = "mipi_csi_mclk0";
|
||||
allwinner,muxsel = <4>;
|
||||
allwinner,muxsel = <5>;
|
||||
allwinner,drive = <2>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
csi_mclk0_pins_b: csi_mclk0@1 {
|
||||
allwinner,pins = "PA10";
|
||||
allwinner,pins = "PE12";
|
||||
allwinner,pname = "mipi_csi_mclk0";
|
||||
allwinner,function = "io_disabled";
|
||||
allwinner,muxsel = <0xf>;
|
||||
|
@ -1152,16 +1166,16 @@
|
|||
};
|
||||
|
||||
csi_mclk1_pins_a: csi_mclk1@0 {
|
||||
allwinner,pins = "PA13";
|
||||
allwinner,pins = "PE13";
|
||||
allwinner,pname = "mipi_csi_mclk1";
|
||||
allwinner,function = "mipi_csi_mclk1";
|
||||
allwinner,muxsel = <4>;
|
||||
allwinner,muxsel = <5>;
|
||||
allwinner,drive = <2>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
csi_mclk1_pins_b: csi_mclk1@1 {
|
||||
allwinner,pins = "PA13";
|
||||
allwinner,pins = "PE13";
|
||||
allwinner,pname = "mipi_csi_mclk1";
|
||||
allwinner,function = "io_disabled";
|
||||
allwinner,muxsel = <0xf>;
|
||||
|
@ -1335,7 +1349,9 @@
|
|||
twi_drv_used = <0>;
|
||||
/* twi-supply = <®_dcdc1>; */
|
||||
twi_pkt_interval = <0>;
|
||||
status = "disabled";
|
||||
rproc-name = "e907_rproc@0";
|
||||
no_suspend = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&twi1 {
|
||||
|
@ -1349,7 +1365,7 @@
|
|||
twi_pkt_interval = <0>;
|
||||
rproc-name = "e907_rproc@0";
|
||||
no_suspend = <1>;
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&twi2 {
|
||||
|
@ -1377,7 +1393,7 @@
|
|||
};
|
||||
|
||||
&twi4 {
|
||||
clock-frequency = <200000>;
|
||||
clock-frequency = <100000>;
|
||||
//<400000>;
|
||||
pinctrl-0 = <&twi4_pins_a>;
|
||||
pinctrl-1 = <&twi4_pins_b>;
|
||||
|
@ -1458,7 +1474,7 @@
|
|||
/* mic1-single; */
|
||||
/* mic2-single; */
|
||||
pa-pin-max = <1>; /* set pa */
|
||||
pa-pin-0 = <&pio PE 11 1 1 1 0>;
|
||||
/* pa-pin-0 = <&pio PE 11 1 1 1 0>; */
|
||||
pa-pin-level-0 = <1>;
|
||||
pa-pin-msleep-0 = <0>;
|
||||
// tx-hub-en;
|
||||
|
@ -1599,6 +1615,13 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&pwm0 {
|
||||
pinctrl-names = "active", "sleep";
|
||||
pinctrl-0 = <&pwm0_pin_a>;
|
||||
pinctrl-1 = <&pwm0_pin_b>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwm4 {
|
||||
pinctrl-names = "active", "sleep";
|
||||
pinctrl-0 = <&pwm4_pin_a>;
|
||||
|
|
|
@ -1648,9 +1648,12 @@ CONFIG_ENABLE_SENSOR_FLIP_OPTION=y
|
|||
# CONFIG_VIN_LOG is not set
|
||||
# CONFIG_PIPELINE_RESET is not set
|
||||
# CONFIG_MULTI_FRAME is not set
|
||||
# CONFIG_SUPPORT_ISP_TDM is not set
|
||||
CONFIG_SUPPORT_ISP_TDM=y
|
||||
# CONFIG_TDM_LBC_EN is not set
|
||||
# CONFIG_TDM_ONE_BUFFER is not set
|
||||
# CONFIG_TDM_OFFLINE_HANDLE_RAW is not set
|
||||
# CONFIG_MIPI_VC is not set
|
||||
# CONFIG_AVG_TDM_FIFO is not set
|
||||
CONFIG_AVG_TDM_FIFO=y
|
||||
# CONFIG_DISPPLAY_SYNC is not set
|
||||
CONFIG_VIN_IOMMU=y
|
||||
CONFIG_D3D=y
|
||||
|
@ -1685,7 +1688,7 @@ CONFIG_VIDEO_SUNXI_VIN_SPECIAL=y
|
|||
# CONFIG_SENSOR_GC0310_MIPI is not set
|
||||
# CONFIG_SENSOR_GC2355_MIPI is not set
|
||||
# CONFIG_SENSOR_GC2053_MIPI is not set
|
||||
CONFIG_SENSOR_GC2083_MIPI=y
|
||||
# CONFIG_SENSOR_GC2083_MIPI is not set
|
||||
# CONFIG_SENSOR_GC2093_MIPI is not set
|
||||
# CONFIG_SENSOR_GC4023_MIPI is not set
|
||||
# CONFIG_SENSOR_GC4663_MIPI is not set
|
||||
|
@ -1745,7 +1748,7 @@ CONFIG_SENSOR_GC2083_MIPI=y
|
|||
# CONFIG_SENSOR_GC0406_MIPI is not set
|
||||
# CONFIG_SENSOR_SC2336P_MIPI is not set
|
||||
# CONFIG_SENSOR_BF2257CS_MIPI is not set
|
||||
# CONFIG_SENSOR_SC202CS_MIPI is not set
|
||||
CONFIG_SENSOR_SC202CS_MIPI=y
|
||||
# CONFIG_SENSOR_POWER is not set
|
||||
# CONFIG_VIDEO_SUNXI_VFE is not set
|
||||
# CONFIG_V4L_MEM2MEM_DRIVERS is not set
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -131,8 +131,8 @@
|
|||
#endif
|
||||
|
||||
#ifdef SENSOR_SC202CS
|
||||
#include "SENSOR_H/sc202cs/sc202cs_mipi_isp600_20231207_141119_rgb.h"
|
||||
#include "SENSOR_H/sc202cs/sc202cs_mipi_2_isp600_20231212_191412_ir.h"
|
||||
#include "SENSOR_H/sc202cs/sc202cs_mipi_isp600_ir_20250221_141621.h"
|
||||
#include "SENSOR_H/sc202cs/sc202cs_mipi_isp600_rgb_20250304_100237.h"
|
||||
#endif
|
||||
|
||||
#ifdef SENSOR_SC2336P
|
||||
|
@ -1107,8 +1107,10 @@ struct isp_cfg_array cfg_arr[] = {
|
|||
#endif
|
||||
|
||||
#ifdef SENSOR_SC202CS
|
||||
{"sc202cs_mipi", "sc202cs_mipi_isp600_20231207_141119_rgb", 800, 600, 30, 0, 0, &sc202cs_mipi_rgb_isp_cfg},
|
||||
{"sc202cs_mipi", "sc202cs_mipi_2_isp600_20231212_191412_ir", 800, 600, 30, 0, 1, &sc202cs_mipi_ir_isp_cfg},
|
||||
{"sc202cs_mipi", "sc202cs_mipi_isp600_rgb_20250304_100237", 1600, 1200, 30, 0, 0, &sc202cs_mipi_rgb_isp_cfg},
|
||||
{"sc202cs_mipi", "sc202cs_mipi_isp600_rgb_20250304_100237", 1600, 1200, 30, 0, 1, &sc202cs_mipi_rgb_isp_cfg},
|
||||
{"sc202cs_mipi_2", "sc202cs_mipi_isp600_ir_20250221_141621", 1600, 1200, 30, 0, 0, &sc202cs_mipi_ir_isp_cfg},
|
||||
{"sc202cs_mipi_2", "sc202cs_mipi_isp600_ir_20250221_141621", 1600, 1200, 30, 0, 1, &sc202cs_mipi_ir_isp_cfg},
|
||||
#endif
|
||||
|
||||
#ifdef SENSOR_SC2336P
|
||||
|
|
161
lichee/linux-4.9/drivers/media/platform/sunxi-vin/modules/sensor/sc202cs_mipi.c
Normal file → Executable file
161
lichee/linux-4.9/drivers/media/platform/sunxi-vin/modules/sensor/sc202cs_mipi.c
Normal file → Executable file
|
@ -74,6 +74,10 @@ MODULE_LICENSE("GPL");
|
|||
#define GAIN_MAX 0xF8
|
||||
#define GAIN_STEP 1
|
||||
#define GAIN_DEFAULT 20
|
||||
#define GAIN_STEP_BASE 128 //mean gain min step is 1/64gain
|
||||
#define DIG_GAIN 0x3e06
|
||||
#define DIG_FINE_GAIN 0x3e07
|
||||
#define ANA_GAIN 0x3e09
|
||||
|
||||
#define MCLK (24*1000*1000)
|
||||
|
||||
|
@ -331,32 +335,21 @@ static int sensor_s_exp(struct v4l2_subdev *sd, unsigned int exp_val)
|
|||
{
|
||||
data_type explow, expmid, exphigh;
|
||||
struct sensor_info *info = to_state(sd);
|
||||
/*struct vin_md *vind = dev_get_drvdata(sd->v4l2_dev->dev);*/
|
||||
/*struct vin_core *vinc = vind->vinc[0];*/
|
||||
|
||||
if (exp_val > EXPOSURE_MAX << 4)
|
||||
exp_val = EXPOSURE_MAX << 4;
|
||||
|
||||
if (exp_val < 16)
|
||||
exp_val = 16;
|
||||
|
||||
if (exp_val == info->exp) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if (SC202CS == 1)
|
||||
exphigh = (unsigned char)(0xf & (exp_val >> 12)); // upper 4 bits
|
||||
expmid = (unsigned char)(0xff & (exp_val >> 4)); // middle 7 bits
|
||||
explow = (unsigned char)(0xf0 & (exp_val << 4)); // lower 4 bits
|
||||
sensor_write(sd, 0x3e02, explow); //[7:4]
|
||||
sensor_write(sd, 0x3e01, expmid); //[7:0]
|
||||
sensor_write(sd, 0x3e00, exphigh); //[3:0]
|
||||
#else
|
||||
exphigh = (unsigned char)(exp_val >> 8);
|
||||
explow = (unsigned char)(exp_val & 0xFF);
|
||||
expmid = 0;
|
||||
sensor_write(sd, 0x3e01, exphigh);
|
||||
exphigh = (unsigned char) (0x0f & (exp_val>>16));
|
||||
expmid = (unsigned char) (0xff & (exp_val>>8));
|
||||
explow = (unsigned char) (0xf0 & (exp_val<<0));
|
||||
sensor_write(sd, 0x3e02, explow);
|
||||
sensor_write(sd, 0x3e01, expmid);
|
||||
sensor_write(sd, 0x3e00, exphigh);
|
||||
|
||||
#else
|
||||
exphigh = (unsigned char) (0x0f & (exp_val>>16));
|
||||
expmid = (unsigned char) (0xff & (exp_val>>8));
|
||||
explow = (unsigned char) (0xf0 & (exp_val<<0));
|
||||
sensor_write(sd, 0x3e02, explow);
|
||||
sensor_write(sd, 0x3e01, expmid);
|
||||
sensor_write(sd, 0x3e00, exphigh);
|
||||
#endif
|
||||
|
||||
sensor_dbg("%s():%d, exp_val = %d\n", __func__, __LINE__, exp_val);
|
||||
|
@ -373,56 +366,96 @@ static int sensor_g_gain(struct v4l2_subdev *sd, __s32 *value)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static unsigned char analog_Gain_Reg[] = {0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f};
|
||||
|
||||
static int setSensorGain(struct v4l2_subdev *sd, int gain)
|
||||
{
|
||||
int ana_gain = gain / GAIN_STEP_BASE;
|
||||
int dig_Gain;
|
||||
int gain_flag = 1;
|
||||
|
||||
if (ana_gain >= 16) {
|
||||
gain_flag = 4;
|
||||
} else if (ana_gain >= 8) {
|
||||
gain_flag = 3;
|
||||
} else if (ana_gain >= 4) {
|
||||
gain_flag = 2;
|
||||
} else if (ana_gain >= 2) {
|
||||
gain_flag = 1;
|
||||
} else {
|
||||
gain_flag = 0;
|
||||
}
|
||||
|
||||
sensor_write(sd, ANA_GAIN, analog_Gain_Reg[gain_flag]);
|
||||
dig_Gain = gain >> gain_flag; //dig_Gain min mean 1/128gain
|
||||
if (dig_Gain < 2 * GAIN_STEP_BASE) {
|
||||
//step1/128
|
||||
sensor_write(sd, DIG_GAIN, 0x00);
|
||||
sensor_write(sd, DIG_FINE_GAIN, dig_Gain - GAIN_STEP_BASE + 0x80);
|
||||
//sensor_print("sensor set analog_gain:0x%02x, dig_gain:0x%02x, dig_fine_gain:0x%02x", analog_Gain_Reg[gain_flag], 0x00, dig_Gain - 128 + 0x80);
|
||||
} else if (dig_Gain < 4 * GAIN_STEP_BASE) {
|
||||
//step1/64
|
||||
sensor_write(sd, DIG_GAIN, 0x01);
|
||||
sensor_write(sd, DIG_FINE_GAIN, (dig_Gain - GAIN_STEP_BASE * 2) / 2 + 0x80);
|
||||
//sensor_print("sensor set analog_gain:0x%02x, dig_gain:0x%02x, dig_fine_gain:0x%02x", analog_Gain_Reg[gain_flag], 0x01, (dig_Gain - 128 * 2) / 2 + 0x80);
|
||||
} else {
|
||||
sensor_write(sd, DIG_GAIN, 0x01);
|
||||
sensor_write(sd, DIG_FINE_GAIN, 0xfc);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sensor_s_gain(struct v4l2_subdev *sd, int gain_val)
|
||||
{
|
||||
struct sensor_info *info = to_state(sd);
|
||||
//sensor_dbg("%s():%d. info:%p, gain_val:%d\n", __func__, __LINE__, info, gain_val);
|
||||
if (gain_val == info->gain) {
|
||||
return 0;
|
||||
}
|
||||
sensor_dbg("%s():%d. info:%p, gain_val:%d\n", __func__, __LINE__, info, gain_val);
|
||||
info->gain = gain_val;
|
||||
int tem_gain_val;
|
||||
|
||||
return 0;
|
||||
|
||||
// if (gain_val < 1 * 16)
|
||||
// gain_val = 16;
|
||||
if (gain_val > 16 * 16 - 1)
|
||||
gain_val = 16 * 16 - 1;
|
||||
|
||||
if (gain_val < 32) {
|
||||
sensor_write(sd, 0x3314, 0x1e);
|
||||
sensor_write(sd, 0x3317, 0x10);
|
||||
//gain min step is 1/128gain
|
||||
tem_gain_val = gain_val * GAIN_STEP_BASE;
|
||||
if ((tem_gain_val - tem_gain_val / 16 * 16) > 0) {
|
||||
tem_gain_val = tem_gain_val / 16 + 1;
|
||||
} else {
|
||||
sensor_write(sd, 0x3314, 0x4f);
|
||||
sensor_write(sd, 0x3317, 0x0f);
|
||||
}
|
||||
tem_gain_val = tem_gain_val / 16;
|
||||
}
|
||||
|
||||
if (gain_val < 32) {
|
||||
sensor_write(sd, 0x3e08, 0x03);
|
||||
sensor_write(sd, 0x3e09, gain_val);
|
||||
} else if (gain_val >= 32 && gain_val < 64) {
|
||||
sensor_write(sd, 0x3e08, 0x07);
|
||||
sensor_write(sd, 0x3e09, gain_val >> 1);
|
||||
} else if (gain_val >= 64 && gain_val < 128) {
|
||||
sensor_write(sd, 0x3e08, 0x0f);
|
||||
sensor_write(sd, 0x3e09, gain_val >> 2);
|
||||
} else if (gain_val >= 128) {
|
||||
sensor_write(sd, 0x3e08, 0x1f);
|
||||
sensor_write(sd, 0x3e09, gain_val >> 3);
|
||||
}
|
||||
sensor_dbg("%s(), L:%d, gain_val:%d, tem_gain_val:%d, info->gain:%d\n",
|
||||
__func__, __LINE__, gain_val, tem_gain_val, info->gain);
|
||||
|
||||
sensor_dbg("drv sensor_s_gain(%d)\n", gain_val);
|
||||
setSensorGain(sd, tem_gain_val);
|
||||
info->gain = gain_val;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sc202cs_sensor_vts;
|
||||
static int sensor_s_exp_gain(struct v4l2_subdev *sd,
|
||||
struct sensor_exp_gain *exp_gain)
|
||||
{
|
||||
struct sensor_info *info = to_state(sd);
|
||||
struct i2c_client *client = v4l2_get_subdevdata(sd);
|
||||
int shutter = 0, frame_length = 0;
|
||||
|
||||
sensor_dbg("(%d, %d)\n", exp_gain->exp_val, exp_gain->gain_val);
|
||||
|
||||
|
||||
shutter = exp_gain->exp_val >> 4;
|
||||
if (shutter > sc202cs_sensor_vts - 8)
|
||||
frame_length = shutter + 8;
|
||||
else
|
||||
frame_length = sc202cs_sensor_vts;
|
||||
|
||||
|
||||
sensor_dbg("shutter = %d, frame_length = %d\n", shutter, frame_length);
|
||||
sensor_write(sd, 0x320e, (frame_length >> 8));
|
||||
sensor_write(sd, 0x320f, (frame_length & 0xff));
|
||||
|
||||
|
||||
sensor_s_exp(sd, exp_gain->exp_val);
|
||||
sensor_s_gain(sd, exp_gain->gain_val);
|
||||
info->exp = exp_gain->exp_val;
|
||||
info->gain = exp_gain->gain_val;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -466,7 +499,7 @@ static int sensor_s_hflip(struct v4l2_subdev *sd, int enable)
|
|||
|
||||
static int sensor_get_fmt_mbus_core(struct v4l2_subdev *sd, int *code)
|
||||
{
|
||||
*code = MEDIA_BUS_FMT_SRGGB10_1X10; // gc2053 support change the rgb format by itself
|
||||
*code = MEDIA_BUS_FMT_SBGGR10_1X10;//MEDIA_BUS_FMT_SRGGB10_1X10; // gc2053 support change the rgb format by itself
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -727,7 +760,7 @@ static long sensor_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
|
|||
static struct sensor_format_struct sensor_formats[] = {
|
||||
{
|
||||
.desc = "Raw RGB Bayer",
|
||||
.mbus_code = MEDIA_BUS_FMT_SRGGB10_1X10, /*.mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10, */
|
||||
.mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10,//MEDIA_BUS_FMT_SRGGB10_1X10, /*.mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10, */
|
||||
.regs = sensor_fmt_raw,
|
||||
.regs_size = ARRAY_SIZE(sensor_fmt_raw),
|
||||
.bpp = 1
|
||||
|
@ -746,16 +779,16 @@ static struct sensor_win_size sensor_win_sizes[] = {
|
|||
.height = 1200, //
|
||||
.hoffset = 0,
|
||||
.voffset = 0,
|
||||
.hts = 2200,
|
||||
.hts = 1920,
|
||||
.vts = 1250,
|
||||
.pclk = 74250000,
|
||||
.pclk = 72000000,
|
||||
.mipi_bps = 371250000,
|
||||
.fps_fixed = 30,
|
||||
.bin_factor = 1,
|
||||
.intg_min = 1 << 4,
|
||||
.intg_max = (1250 - 8) << 4,
|
||||
.gain_min = 1 << 4,
|
||||
.gain_max = 128 << 4,
|
||||
.gain_max = 64 << 4,
|
||||
.regs = sensor_normal_regs,
|
||||
.regs_size = ARRAY_SIZE(sensor_normal_regs),
|
||||
.set_size = NULL,
|
||||
|
@ -885,7 +918,7 @@ static int sensor_reg_init(struct sensor_info *info)
|
|||
|
||||
info->width = wsize->width;
|
||||
info->height = wsize->height;
|
||||
|
||||
sc202cs_sensor_vts = wsize->vts;
|
||||
exp_gain.exp_val = EXPOSURE_DEFAULT;
|
||||
exp_gain.gain_val = GAIN_DEFAULT;
|
||||
sensor_s_exp_gain(sd, &exp_gain);
|
||||
|
@ -1037,6 +1070,8 @@ static int sensor_probe(struct i2c_client *client,
|
|||
//info->combo_mode = CMB_PHYA_OFFSET2 | MIPI_NORMAL_MODE;
|
||||
info->stream_seq = MIPI_BEFORE_SENSOR;
|
||||
info->af_first_flag = 1;
|
||||
//info->time_hs = 0x11;
|
||||
info->deskew = 0x02;
|
||||
info->exp = 0;
|
||||
info->gain = 0;
|
||||
|
||||
|
|
|
@ -88,9 +88,10 @@ CONFIG_RT_USING_WORKQUEUE=y
|
|||
CONFIG_RT_USING_MEMPOOL=y
|
||||
CONFIG_RT_USING_MEMHEAP=y
|
||||
# CONFIG_RT_USING_NOHEAP is not set
|
||||
# CONFIG_RT_USING_SMALL_MEM is not set
|
||||
CONFIG_RT_USING_SLAB=y
|
||||
CONFIG_RT_USING_SMALL_MEM=y
|
||||
# CONFIG_RT_USING_SLAB is not set
|
||||
# CONFIG_RT_USING_MEMHEAP_AS_HEAP is not set
|
||||
# CONFIG_RT_USING_MEMTRACE is not set
|
||||
CONFIG_RT_USING_HEAP=y
|
||||
|
||||
#
|
||||
|
@ -219,7 +220,7 @@ CONFIG_ISP_NUMBER=1
|
|||
# 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=y
|
||||
# CONFIG_SENSOR_GC2083_MIPI is not set
|
||||
# CONFIG_SENSOR_GC4663_MIPI is not set
|
||||
# CONFIG_SENSOR_SC2355_MIPI is not set
|
||||
# CONFIG_SENSOR_SC2356_MIPI is not set
|
||||
|
@ -242,6 +243,7 @@ CONFIG_SENSOR_GC2083_MIPI=y
|
|||
# CONFIG_SENSOR_F37P_DVP is not set
|
||||
# CONFIG_SENSOR_F37P_MIPI is not set
|
||||
# CONFIG_SENSOR_OV02B10_MIPI is not set
|
||||
CONFIG_SENSOR_SC202CS_MIPI=y
|
||||
|
||||
#
|
||||
# Osal Setup
|
||||
|
@ -285,7 +287,7 @@ CONFIG_RPMSG_NOTIFY=y
|
|||
# CONFIG_RPMSG_SPEEDTEST is not set
|
||||
CONFIG_AMP_SHARE_IRQ=y
|
||||
CONFIG_RPMSG_CLIENT=y
|
||||
# CONFIG_RPMSG_CLIENT_TEST is not set
|
||||
CONFIG_RPMSG_CLIENT_TEST=y
|
||||
CONFIG_RPMSG_CLIENT_QUEUE_SIZE=16
|
||||
# CONFIG_RPMSG_CLIENT_DEBUG is not set
|
||||
CONFIG_RPMSG_HEARBEAT=y
|
||||
|
@ -426,7 +428,7 @@ CONFIG_MODVERSIONS=y
|
|||
# CONFIG_SHOW_FULL_VERSION is not set
|
||||
CONFIG_CROSS_COMPILE="riscv64-unknown-elf-"
|
||||
# CONFIG_INIT_CARD_PRODUCT is not set
|
||||
CONFIG_LOG_DEFAULT_LEVEL=1
|
||||
CONFIG_LOG_DEFAULT_LEVEL=4
|
||||
# CONFIG_CC_STACKPROTECTOR_STRONG is not set
|
||||
# CONFIG_LOG_RELEASE is not set
|
||||
# CONFIG_BOOTUP_TURBO is not set
|
||||
|
@ -435,7 +437,7 @@ CONFIG_LOG_DEFAULT_LEVEL=1
|
|||
CONFIG_DYNAMIC_LOG_LEVEL_SUPPORT=y
|
||||
CONFIG_LOG_LEVEL_STORAGE_NONE=y
|
||||
# CONFIG_LOG_LEVEL_STORAGE_RTC is not set
|
||||
CONFIG_DYNAMIC_LOG_DEFAULT_LEVEL=2
|
||||
CONFIG_DYNAMIC_LOG_DEFAULT_LEVEL=4
|
||||
# CONFIG_FRAME_POINTER is not set
|
||||
CONFIG_FRAME_WARN=8192
|
||||
CONFIG_UART_CLI_USE_NONE=y
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
;----------------------------------------------------------------------------------
|
||||
;i2c configuration
|
||||
;----------------------------------------------------------------------------------
|
||||
;[twi0]
|
||||
;twi0_scl = port:PA16<4><1><default><default>
|
||||
;twi0_sda = port:PA17<4><1><default><default>
|
||||
[twi0]
|
||||
twi0_scl = port:PE4<8><1><default><default>
|
||||
twi0_sda = port:PE5<8><1><default><default>
|
||||
|
||||
[twi1]
|
||||
twi1_scl = port:PA06<4><1><default><default>
|
||||
twi1_sda = port:PA07<4><1><default><default>
|
||||
;twi1_scl = port:PA06<4><1><default><default>
|
||||
;twi1_sda = port:PA07<4><1><default><default>
|
||||
|
||||
;[twi2]
|
||||
;twi2_scl = port:PH05<4><1><default><default>
|
||||
|
@ -47,7 +47,6 @@ uart_rx = port:PE01<7><1><default><default>
|
|||
|
||||
[sensor0]
|
||||
used0 = 1
|
||||
reset0 = port:PA11<1><1><default><default>
|
||||
pwdn0 = port:PA09<1><1><default><default>
|
||||
mclk0 = port:PA10<4><1><default><default>
|
||||
|
||||
reset0 = port:PE10<1><1><default><default>
|
||||
pwdn0 = port:PF0<1><1><default><default>
|
||||
mclk0 = port:PE13<5><1><default><default>
|
||||
|
|
|
@ -16,17 +16,26 @@ int app_entry(void *param)
|
|||
printf("csi init fail!\n");
|
||||
}
|
||||
#if 1
|
||||
rpmsg_notify("twi1", NULL, 0);
|
||||
rpmsg_notify("twi0", NULL, 0);
|
||||
rpmsg_notify("tdm0", NULL, 0);
|
||||
rpmsg_notify("isp0", NULL, 0);
|
||||
// rpmsg_notify("isp1", NULL, 0);
|
||||
rpmsg_notify("scaler0", NULL, 0);
|
||||
// rpmsg_notify("scaler1", NULL, 0);
|
||||
rpmsg_notify("scaler4", NULL, 0);
|
||||
// rpmsg_notify("scaler5", NULL, 0);
|
||||
rpmsg_notify("scaler8", NULL, 0);
|
||||
// rpmsg_notify("scaler9", NULL, 0);
|
||||
rpmsg_notify("scaler12", NULL, 0);
|
||||
// rpmsg_notify("scaler13", NULL, 0);
|
||||
rpmsg_notify("vinc0", NULL, 0);
|
||||
// rpmsg_notify("vinc1", NULL, 0);
|
||||
rpmsg_notify("vinc4", NULL, 0);
|
||||
// rpmsg_notify("vinc5", NULL, 0);
|
||||
rpmsg_notify("vinc8", NULL, 0);
|
||||
// rpmsg_notify("vinc9", NULL, 0);
|
||||
rpmsg_notify("vinc12", NULL, 0);
|
||||
// rpmsg_notify("vinc13", NULL, 0);
|
||||
#endif
|
||||
#else
|
||||
hal_msleep(200);
|
||||
|
|
|
@ -110,4 +110,8 @@ config SENSOR_F37P_MIPI
|
|||
|
||||
config SENSOR_OV02B10_MIPI
|
||||
tristate "use ov02b10_mipi driver"
|
||||
default n
|
||||
|
||||
config SENSOR_SC202CS_MIPI
|
||||
tristate "use sc202cs_mipi driver"
|
||||
default n
|
|
@ -24,3 +24,4 @@ obj-$(CONFIG_SENSOR_F355P_DVP) += f355p_dvp.o
|
|||
obj-$(CONFIG_SENSOR_F37P_DVP) += f37p_dvp.o
|
||||
obj-$(CONFIG_SENSOR_F37P_MIPI) += f37p_mipi.o
|
||||
obj-$(CONFIG_SENSOR_OV02B10_MIPI) += ov02b10_mipi.o
|
||||
obj-$(CONFIG_SENSOR_SC202CS_MIPI) += sc202cs_mipi.o
|
||||
|
|
|
@ -178,4 +178,5 @@ extern struct sensor_fuc_core f355p_dvp_core;
|
|||
extern struct sensor_fuc_core f355p_core;
|
||||
extern struct sensor_fuc_core bf2257cs_core;
|
||||
extern struct sensor_fuc_core ov02b10_core;
|
||||
extern struct sensor_fuc_core sc202cs_core;
|
||||
#endif /*__CAMERA__H__*/
|
||||
|
|
|
@ -0,0 +1,857 @@
|
|||
/*
|
||||
* A V4L2 driver for Raw cameras.
|
||||
*
|
||||
* Copyright (c) 2017 by Allwinnertech Co., Ltd. http://www.allwinnertech.com
|
||||
*
|
||||
* Authors: Zhao Wei <zhaowei@allwinnertech.com>
|
||||
* Liang WeiJie <liangweijie@allwinnertech.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <hal_timer.h>
|
||||
|
||||
#include "../../vin_mipi/combo_common.h"
|
||||
#include "camera.h"
|
||||
#include "../../utility/sunxi_camera_v2.h"
|
||||
#include "../../utility/media-bus-format.h"
|
||||
#include "../../utility/vin_supply.h"
|
||||
|
||||
#define MCLK (24*1000*1000)
|
||||
#define V4L2_IDENT_SENSOR 0xeb52
|
||||
|
||||
/*
|
||||
* Our nominal (default) frame rate.
|
||||
*/
|
||||
#define ID_REG_HIGH 0xf0
|
||||
#define ID_REG_LOW 0xf1
|
||||
#define ID_VAL_HIGH ((V4L2_IDENT_SENSOR) >> 8)
|
||||
#define ID_VAL_LOW ((V4L2_IDENT_SENSOR) & 0xff)
|
||||
#define SENSOR_FRAME_RATE 30
|
||||
|
||||
#define VTS 1250
|
||||
|
||||
#define EXPOSURE_MIN 6
|
||||
#define EXPOSURE_MAX (VTS - 6)
|
||||
#define EXPOSURE_STEP 1
|
||||
#define EXPOSURE_DEFAULT 0x0148
|
||||
|
||||
#define GAIN_MIN 0x00
|
||||
#define GAIN_MAX 0xF8
|
||||
#define GAIN_STEP 1
|
||||
#define GAIN_DEFAULT 20
|
||||
#define GAIN_STEP_BASE 128 //mean gain min step is 1/64gain
|
||||
#define DIG_GAIN 0x3e06
|
||||
#define DIG_FINE_GAIN 0x3e07
|
||||
#define ANA_GAIN 0x3e09
|
||||
|
||||
/*
|
||||
* The sc202cs i2c address
|
||||
*/
|
||||
#define I2C_ADDR 0x7c//0xdc
|
||||
|
||||
#define SENSOR_NUM 0x2
|
||||
#define SENSOR_NAME "sc202cs_mipi"
|
||||
#define SENSOR_NAME_2 "sc202cs_mipi_2"
|
||||
|
||||
static int sensor_power_count[2];
|
||||
static int sensor_stream_count[2];
|
||||
static struct sensor_format_struct *current_win[2];
|
||||
static struct sensor_format_struct *current_switch_win[2];
|
||||
|
||||
#define SENSOR_30FPS 1
|
||||
#define SENSOR_25FPS 0
|
||||
#define SENSOR_20FPS 0
|
||||
#define SENSOR_15FPS 0
|
||||
|
||||
/*
|
||||
* The default register settings
|
||||
*/
|
||||
|
||||
static struct regval_list sensor_default_regs[] = {
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#if defined CONFIG_ISP_READ_THRESHOLD || defined CONFIG_ISP_ONLY_HARD_LIGHTADC//FULL_SIZE
|
||||
#if SENSOR_30FPS
|
||||
|
||||
static struct regval_list sensor_1600x1200_30_regs[] = {
|
||||
{0x0103, 0x01},
|
||||
{0x0100, 0x00},
|
||||
{0x36e9, 0x80},
|
||||
{0x36e9, 0x24},
|
||||
{0x301f, 0x01},
|
||||
{0x3301, 0xff},
|
||||
{0x3304, 0x68},
|
||||
{0x3306, 0x40},
|
||||
{0x3308, 0x08},
|
||||
{0x3309, 0xa8},
|
||||
{0x330b, 0xb0},
|
||||
{0x330c, 0x18},
|
||||
{0x330d, 0xff},
|
||||
{0x330e, 0x20},
|
||||
{0x331e, 0x59},
|
||||
{0x331f, 0x99},
|
||||
{0x3333, 0x10},
|
||||
{0x335e, 0x06},
|
||||
{0x335f, 0x08},
|
||||
{0x3364, 0x1f},
|
||||
{0x337c, 0x02},
|
||||
{0x337d, 0x0a},
|
||||
{0x338f, 0xa0},
|
||||
{0x3390, 0x01},
|
||||
{0x3391, 0x03},
|
||||
{0x3392, 0x1f},
|
||||
{0x3393, 0xff},
|
||||
{0x3394, 0xff},
|
||||
{0x3395, 0xff},
|
||||
{0x33a2, 0x04},
|
||||
{0x33ad, 0x0c},
|
||||
{0x33b1, 0x20},
|
||||
{0x33b3, 0x38},
|
||||
{0x33f9, 0x40},
|
||||
{0x33fb, 0x48},
|
||||
{0x33fc, 0x0f},
|
||||
{0x33fd, 0x1f},
|
||||
{0x349f, 0x03},
|
||||
{0x34a6, 0x03},
|
||||
{0x34a7, 0x1f},
|
||||
{0x34a8, 0x38},
|
||||
{0x34a9, 0x30},
|
||||
{0x34ab, 0xb0},
|
||||
{0x34ad, 0xb0},
|
||||
{0x34f8, 0x1f},
|
||||
{0x34f9, 0x20},
|
||||
{0x3630, 0xa0},
|
||||
{0x3631, 0x92},
|
||||
{0x3632, 0x64},
|
||||
{0x3633, 0x43},
|
||||
{0x3637, 0x49},
|
||||
{0x363a, 0x85},
|
||||
{0x363c, 0x0f},
|
||||
{0x3650, 0x31},
|
||||
{0x3670, 0x0d},
|
||||
{0x3674, 0xc0},
|
||||
{0x3675, 0xa0},
|
||||
{0x3676, 0xa0},
|
||||
{0x3677, 0x92},
|
||||
{0x3678, 0x96},
|
||||
{0x3679, 0x9a},
|
||||
{0x367c, 0x03},
|
||||
{0x367d, 0x0f},
|
||||
{0x367e, 0x01},
|
||||
{0x367f, 0x0f},
|
||||
{0x3698, 0x83},
|
||||
{0x3699, 0x86},
|
||||
{0x369a, 0x8c},
|
||||
{0x369b, 0x94},
|
||||
{0x36a2, 0x01},
|
||||
{0x36a3, 0x03},
|
||||
{0x36a4, 0x07},
|
||||
{0x36ae, 0x0f},
|
||||
{0x36af, 0x1f},
|
||||
{0x36bd, 0x22},
|
||||
{0x36be, 0x22},
|
||||
{0x36bf, 0x22},
|
||||
{0x36d0, 0x01},
|
||||
{0x370f, 0x02},
|
||||
{0x3721, 0x6c},
|
||||
{0x3722, 0x8d},
|
||||
{0x3725, 0xc5},
|
||||
{0x3727, 0x14},
|
||||
{0x3728, 0x04},
|
||||
{0x37b7, 0x04},
|
||||
{0x37b8, 0x04},
|
||||
{0x37b9, 0x06},
|
||||
{0x37bd, 0x07},
|
||||
{0x37be, 0x0f},
|
||||
{0x3901, 0x02},
|
||||
{0x3903, 0x40},
|
||||
{0x3905, 0x8d},
|
||||
{0x3907, 0x00},
|
||||
{0x3908, 0x41},
|
||||
{0x391f, 0x41},
|
||||
{0x3933, 0x80},
|
||||
{0x3934, 0x02},
|
||||
{0x3937, 0x6f},
|
||||
{0x393a, 0x01},
|
||||
{0x393d, 0x01},
|
||||
{0x393e, 0xc0},
|
||||
{0x39dd, 0x41},
|
||||
{0x3e00, 0x00},
|
||||
{0x3e01, 0x4d},
|
||||
{0x3e02, 0xc0},
|
||||
{0x3e09, 0x00},
|
||||
{0x4509, 0x28},
|
||||
{0x450d, 0x61},
|
||||
{0x0100, 0x01},
|
||||
};
|
||||
#endif
|
||||
|
||||
#else //CONFIG_ISP_FAST_CONVERGENCE || CONFIG_ISP_HARD_LIGHTADC
|
||||
static struct regval_list sensor_480p120_regs[] = {
|
||||
|
||||
};
|
||||
#if SENSOR_30FPS
|
||||
static struct regval_list sensor_480p120fps_to_1600x1200_30fps[] = {
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/*
|
||||
* Here we'll try to encapsulate the changes for just the output
|
||||
* video format.
|
||||
*
|
||||
*/
|
||||
|
||||
static struct regval_list sensor_fmt_raw[] = {
|
||||
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Code for dealing with controls.
|
||||
* fill with different sensor module
|
||||
* different sensor module has different settings here
|
||||
* if not support the follow function , retrun -EINVAL
|
||||
*/
|
||||
#if 0
|
||||
static int sensor_g_exp(struct v4l2_subdev *sd, __s32 *value)
|
||||
{
|
||||
struct sensor_info *info = to_state(sd);
|
||||
*value = info->exp;
|
||||
sensor_dbg("sensor_get_exposure = %d\n", info->exp);
|
||||
return 0;
|
||||
}
|
||||
static int sensor_g_gain(struct v4l2_subdev *sd, __s32 *value)
|
||||
{
|
||||
struct sensor_info *info = to_state(sd);
|
||||
*value = info->gain;
|
||||
sensor_dbg("sensor_get_gain = %d\n", info->gain);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int sensor_s_exp(int id, unsigned int exp_val)
|
||||
{
|
||||
|
||||
int explow, expmid, exphigh;
|
||||
//struct sensor_info *info = to_state(sd);
|
||||
/*struct vin_md *vind = dev_get_drvdata(sd->v4l2_dev->dev);*/
|
||||
/*struct vin_core *vinc = vind->vinc[0];*/
|
||||
|
||||
if (exp_val > EXPOSURE_MAX << 4)
|
||||
exp_val = EXPOSURE_MAX << 4;
|
||||
|
||||
if (exp_val < 16)
|
||||
exp_val = 16;
|
||||
|
||||
exphigh = (unsigned char) (0x0f & (exp_val>>16));
|
||||
expmid = (unsigned char) (0xff & (exp_val>>8));
|
||||
explow = (unsigned char) (0xf0 & (exp_val<<0));
|
||||
sensor_write(id, 0x3e02, explow);
|
||||
sensor_write(id, 0x3e01, expmid);
|
||||
sensor_write(id, 0x3e00, exphigh);
|
||||
sensor_dbg("%s():%d, exp_val = %d\n", __func__, __LINE__, exp_val);
|
||||
//info->exp = exp_val;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned char analog_Gain_Reg[] = {0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f};
|
||||
|
||||
static int setSensorGain(int id, int gain)
|
||||
{
|
||||
int ana_gain = gain / GAIN_STEP_BASE;
|
||||
int dig_Gain;
|
||||
int gain_flag = 1;
|
||||
|
||||
if (ana_gain >= 16) {
|
||||
gain_flag = 4;
|
||||
} else if (ana_gain >= 8) {
|
||||
gain_flag = 3;
|
||||
} else if (ana_gain >= 4) {
|
||||
gain_flag = 2;
|
||||
} else if (ana_gain >= 2) {
|
||||
gain_flag = 1;
|
||||
} else {
|
||||
gain_flag = 0;
|
||||
}
|
||||
|
||||
sensor_write(id, ANA_GAIN, analog_Gain_Reg[gain_flag]);
|
||||
dig_Gain = gain >> gain_flag; //dig_Gain min mean 1/128gain
|
||||
if (dig_Gain < 2 * GAIN_STEP_BASE) {
|
||||
//step1/128
|
||||
sensor_write(id, DIG_GAIN, 0x00);
|
||||
sensor_write(id, DIG_FINE_GAIN, dig_Gain - GAIN_STEP_BASE + 0x80);
|
||||
//sensor_print("sensor set analog_gain:0x%02x, dig_gain:0x%02x, dig_fine_gain:0x%02x", analog_Gain_Reg[gain_flag], 0x00, dig_Gain - 128 + 0x80);
|
||||
} else if (dig_Gain < 4 * GAIN_STEP_BASE) {
|
||||
//step1/64
|
||||
sensor_write(id, DIG_GAIN, 0x01);
|
||||
sensor_write(id, DIG_FINE_GAIN, (dig_Gain - GAIN_STEP_BASE * 2) / 2 + 0x80);
|
||||
//sensor_print("sensor set analog_gain:0x%02x, dig_gain:0x%02x, dig_fine_gain:0x%02x", analog_Gain_Reg[gain_flag], 0x01, (dig_Gain - 128 * 2) / 2 + 0x80);
|
||||
} else {
|
||||
sensor_write(id, DIG_GAIN, 0x01);
|
||||
sensor_write(id, DIG_FINE_GAIN, 0xfc);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sensor_s_gain(int id, int gain_val)
|
||||
{
|
||||
int tem_gain_val;
|
||||
|
||||
//gain min step is 1/128gain
|
||||
tem_gain_val = gain_val * GAIN_STEP_BASE;
|
||||
if ((tem_gain_val - tem_gain_val / 16 * 16) > 0) {
|
||||
tem_gain_val = tem_gain_val / 16 + 1;
|
||||
} else {
|
||||
tem_gain_val = tem_gain_val / 16;
|
||||
}
|
||||
|
||||
sensor_dbg("%s(), L:%d, gain_val:%d, tem_gain_val:%d, info->gain:%d\n",
|
||||
__func__, __LINE__, gain_val, tem_gain_val, info->gain);
|
||||
|
||||
setSensorGain(id, tem_gain_val);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int sc202cs_sensor_vts;
|
||||
static int sensor_s_exp_gain(int id, struct sensor_exp_gain *exp_gain)
|
||||
{
|
||||
int exp_val, gain_val;
|
||||
int shutter = 0, frame_length = 0;
|
||||
|
||||
exp_val = exp_gain->exp_val;
|
||||
gain_val = exp_gain->gain_val;
|
||||
sensor_s_exp(id, exp_gain->exp_val);
|
||||
sensor_s_gain(id, exp_gain->gain_val);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int sensor_flip_status;
|
||||
static int sensor_s_vflip(int id, int enable)
|
||||
{
|
||||
data_type get_value;
|
||||
data_type set_value;
|
||||
|
||||
if (!(enable == 0 || enable == 1))
|
||||
return -1;
|
||||
|
||||
sensor_read(id, 0x00, &get_value);
|
||||
sensor_dbg("ready to vflip, regs_data = 0x%x\n", get_value);
|
||||
|
||||
if (enable) {
|
||||
set_value = get_value | 0x04;
|
||||
sensor_flip_status |= 0x04;
|
||||
} else {
|
||||
set_value = get_value & 0xFB;
|
||||
sensor_flip_status &= 0xFB;
|
||||
}
|
||||
sensor_write(id, 0x00, set_value);
|
||||
usleep_range(80000, 100000);
|
||||
sensor_read(id, 0x00, &get_value);
|
||||
sensor_dbg("after vflip, regs_data = 0x%x, sensor_flip_status = %d\n",
|
||||
get_value, sensor_flip_status);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sensor_s_hflip(int id, int enable)
|
||||
{
|
||||
data_type get_value;
|
||||
data_type set_value;
|
||||
|
||||
if (!(enable == 0 || enable == 1))
|
||||
return -1;
|
||||
|
||||
sensor_read(id, 0x00, &get_value);
|
||||
sensor_dbg("ready to hflip, regs_data = 0x%x\n", get_value);
|
||||
|
||||
if (enable) {
|
||||
set_value = get_value | 0x08;
|
||||
sensor_flip_status |= 0x08;
|
||||
} else {
|
||||
set_value = get_value & 0xF7;
|
||||
sensor_flip_status &= 0xF7;
|
||||
}
|
||||
sensor_write(id, 0x00, set_value);
|
||||
usleep_range(80000, 100000);
|
||||
sensor_read(id, 0x00, &get_value);
|
||||
sensor_dbg("after hflip, regs_data = 0x%x, sensor_flip_status = %d\n",
|
||||
get_value, sensor_flip_status);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sensor_get_fmt_mbus_core(struct v4l2_subdev *sd, int *code)
|
||||
{
|
||||
// struct sensor_info *info = to_state(sd);
|
||||
// data_type get_value = 0, check_value = 0;
|
||||
|
||||
// sensor_read(sd, 0x17, &get_value);
|
||||
// check_value = get_value & 0x03;
|
||||
// check_value = sensor_flip_status & 0x3;
|
||||
// sensor_dbg("0x17 = 0x%x, check_value = 0x%x\n", get_value, check_value);
|
||||
|
||||
// switch (check_value) {
|
||||
// case 0x00:
|
||||
// sensor_dbg("RGGB\n");
|
||||
// *code = MEDIA_BUS_FMT_SRGGB10_1X10;
|
||||
// break;
|
||||
// case 0x01:
|
||||
// sensor_dbg("GRBG\n");
|
||||
// *code = MEDIA_BUS_FMT_SGRBG10_1X10;
|
||||
// break;
|
||||
// case 0x02:
|
||||
// sensor_dbg("GBRG\n");
|
||||
// *code = MEDIA_BUS_FMT_SGBRG10_1X10;
|
||||
// break;
|
||||
// case 0x03:
|
||||
// sensor_dbg("BGGR\n");
|
||||
// *code = MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
// break;
|
||||
// default:
|
||||
// *code = info->fmt->mbus_code;
|
||||
// }
|
||||
*code = MEDIA_BUS_FMT_SRGGB10_1X10; // sc202cs support change the rgb format by itself
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Stuff that knows about the sensor.
|
||||
*/
|
||||
static int sensor_power(int id, int on)
|
||||
{
|
||||
if (on && (sensor_power_count[id])++ > 0)
|
||||
return 0;
|
||||
else if (!on && (sensor_power_count[id] == 0 || --(sensor_power_count[id]) > 0))
|
||||
return 0;
|
||||
|
||||
switch (on) {
|
||||
case PWR_ON:
|
||||
sensor_print("PWR_ON!\n");
|
||||
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(sd, POWER_EN, 1);
|
||||
//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);
|
||||
hal_usleep(1000);
|
||||
vin_gpio_write(id, RESET, CSI_GPIO_HIGH);
|
||||
hal_usleep(1000);
|
||||
break;
|
||||
case PWR_OFF:
|
||||
sensor_print("PWR_OFF!\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);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sensor_set_ir(int id, int status)
|
||||
{
|
||||
#if 0
|
||||
vin_gpio_set_status(id, IR_CUT0, 1);
|
||||
vin_gpio_set_status(id, IR_CUT1, 1);
|
||||
vin_gpio_set_status(id, IR_LED, 1);
|
||||
switch (status) {
|
||||
case IR_DAY:
|
||||
vin_gpio_write(id, IR_CUT0, CSI_GPIO_HIGH);
|
||||
vin_gpio_write(id, IR_CUT1, CSI_GPIO_LOW);
|
||||
vin_gpio_write(id, IR_LED, CSI_GPIO_LOW);
|
||||
break;
|
||||
case IR_NIGHT:
|
||||
vin_gpio_write(id, IR_CUT0, CSI_GPIO_LOW);
|
||||
vin_gpio_write(id, IR_CUT1, CSI_GPIO_HIGH);
|
||||
vin_gpio_write(id, IR_LED, CSI_GPIO_HIGH);
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int sensor_reset(int id, u32 val)
|
||||
{
|
||||
|
||||
sensor_dbg("%s: val=%d\n", __func__);
|
||||
switch (val) {
|
||||
case 0:
|
||||
vin_gpio_write(id, RESET, CSI_GPIO_HIGH);
|
||||
hal_usleep(1000);
|
||||
break;
|
||||
case 1:
|
||||
vin_gpio_write(id, RESET, CSI_GPIO_LOW);
|
||||
hal_usleep(1000);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int sensor_detect(int id)
|
||||
{
|
||||
data_type rdval;
|
||||
int eRet;
|
||||
int times_out = 3;
|
||||
do {
|
||||
eRet = sensor_read(id, ID_REG_HIGH, &rdval);
|
||||
sensor_dbg("eRet:%d, ID_VAL_HIGH:0x%x, times_out:%d\n", eRet, rdval, times_out);
|
||||
hal_usleep(200);
|
||||
times_out--;
|
||||
} while (eRet < 0 && times_out > 0);
|
||||
|
||||
sensor_read(id, ID_REG_HIGH, &rdval);
|
||||
sensor_dbg("ID_VAL_HIGH = %2x, Done!\n", rdval);
|
||||
if (rdval != ID_VAL_HIGH)
|
||||
return -ENODEV;
|
||||
|
||||
sensor_read(id, ID_REG_LOW, &rdval);
|
||||
sensor_dbg("ID_VAL_LOW = %2x, Done!\n", rdval);
|
||||
if (rdval != ID_VAL_LOW)
|
||||
return -ENODEV;
|
||||
|
||||
sensor_dbg("Done!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sensor_init(int id)
|
||||
{
|
||||
int ret;
|
||||
|
||||
sensor_dbg("sensor_init\n");
|
||||
|
||||
/*Make sure it is a target sensor */
|
||||
ret = sensor_detect(id);
|
||||
if (ret) {
|
||||
sensor_err("chip found is not an target chip.\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Store information about the video data format.
|
||||
*/
|
||||
static struct sensor_format_struct sensor_formats[] = {
|
||||
#if defined CONFIG_ISP_READ_THRESHOLD || defined CONFIG_ISP_ONLY_HARD_LIGHTADC // FULL_SIZE
|
||||
#if SENSOR_30FPS
|
||||
{
|
||||
.mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10,//MEDIA_BUS_FMT_SRGGB10_1X10, /*.mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10, */
|
||||
.width = 1600,
|
||||
.height = 1200,
|
||||
.hoffset = 0,
|
||||
.voffset = 0,
|
||||
.hts = 1920,
|
||||
.vts = 1250,
|
||||
.pclk = 72000000,
|
||||
.mipi_bps = 371250000,
|
||||
.fps_fixed = 30,
|
||||
.bin_factor = 1,
|
||||
.intg_min = 1 << 4,
|
||||
.intg_max = (1250 - 8) << 4,
|
||||
.gain_min = 1 << 4,
|
||||
.gain_max = 64 << 4,
|
||||
.offs_h = 0,
|
||||
.offs_v = 0,
|
||||
.regs = sensor_1600x1200_30_regs,
|
||||
.regs_size = ARRAY_SIZE(sensor_1600x1200_30_regs),
|
||||
}
|
||||
#endif
|
||||
#else //CONFIG_ISP_FAST_CONVERGENCE || CONFIG_ISP_HARD_LIGHTADC
|
||||
{
|
||||
.mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10,
|
||||
.width = 640,
|
||||
.height = 480,
|
||||
.hoffset = 0,
|
||||
.voffset = 0,
|
||||
.hts = 1696,
|
||||
.vts = 525,
|
||||
.pclk = 106848000,
|
||||
.mipi_bps = 648 * 1000 * 1000,
|
||||
.fps_fixed = 120,
|
||||
.bin_factor = 1,
|
||||
.intg_min = 1 << 4,
|
||||
.intg_max = (525 - 16) << 4,
|
||||
.gain_min = 1 << 4,
|
||||
.gain_max = 110 << 4,
|
||||
.offs_h = 0,
|
||||
.offs_v = 0,
|
||||
.regs = sensor_480p120_regs,
|
||||
.regs_size = ARRAY_SIZE(sensor_480p120_regs),
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct sensor_format_struct *sensor_get_format(int id, int isp_id)
|
||||
{
|
||||
#if defined CONFIG_ISP_READ_THRESHOLD || defined CONFIG_ISP_ONLY_HARD_LIGHTADC
|
||||
int ispid = clamp(isp_id, 0, ISP_GET_CFG_NUM - 1);
|
||||
struct sensor_format_struct *sensor_format = NULL;
|
||||
int wdr_on = isp_get_cfg[ispid].sensor_wdr_on;
|
||||
int fps = isp_get_cfg[ispid].sensor_get_fps;
|
||||
int i;
|
||||
|
||||
if (current_win[id])
|
||||
return current_win[id];
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(sensor_formats); i++) {
|
||||
if (sensor_formats[i].wdr_mode == wdr_on) {
|
||||
if (sensor_formats[i].fps_fixed == fps) {
|
||||
sensor_format = &sensor_formats[i];
|
||||
sensor_print("fine wdr is %d, fine fps is %d\n", wdr_on, fps);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sensor_format == NULL) {
|
||||
for (i = 0; i < ARRAY_SIZE(sensor_formats); i++) {
|
||||
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);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
done:
|
||||
current_win[id] = sensor_format;
|
||||
return sensor_format;
|
||||
#else //CONFIG_ISP_FAST_CONVERGENCE || CONFIG_ISP_HARD_LIGHTADC
|
||||
if (current_win[id])
|
||||
return current_win[id];
|
||||
|
||||
current_win[id] = &sensor_formats[0];
|
||||
sensor_print("fine wdr is %d, fps is %d\n", sensor_formats[0].wdr_mode, sensor_formats[0].fps_fixed);
|
||||
return &sensor_formats[0];
|
||||
#endif
|
||||
}
|
||||
|
||||
static struct sensor_format_struct switch_sensor_formats[] = {
|
||||
#if defined CONFIG_ISP_FAST_CONVERGENCE || defined CONFIG_ISP_HARD_LIGHTADC
|
||||
|
||||
#if SENSOR_30FPS
|
||||
{
|
||||
.mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10,
|
||||
.width = 1600,
|
||||
.height = 1200,//1080,
|
||||
.hoffset = 0,
|
||||
.voffset = 0,
|
||||
.hts = 1920,
|
||||
.vts = 1250,
|
||||
.pclk = 72000000,
|
||||
.mipi_bps = 672 * 1000 * 1000,
|
||||
.fps_fixed = 30,
|
||||
.bin_factor = 1,
|
||||
.intg_min = 1 << 4,
|
||||
.intg_max = (1250 - 16) << 4,
|
||||
.gain_min = 1 << 4,
|
||||
.gain_max = 110 << 4,
|
||||
.switch_regs = sensor_480p120fps_to_1600x1200_30fps,
|
||||
.switch_regs_size = ARRAY_SIZE(sensor_480p120fps_to_1600x1200_30fps),
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct sensor_format_struct *sensor_get_switch_format(int id, int isp_id)
|
||||
{
|
||||
#if defined CONFIG_ISP_FAST_CONVERGENCE || defined CONFIG_ISP_HARD_LIGHTADC
|
||||
int ispid = clamp(isp_id, 0, ISP_GET_CFG_NUM - 1);
|
||||
struct sensor_format_struct *sensor_format = NULL;
|
||||
int wdr_on = isp_get_cfg[ispid].sensor_wdr_on;
|
||||
int fps = isp_get_cfg[ispid].sensor_get_fps;
|
||||
int i;
|
||||
|
||||
if (current_switch_win[id])
|
||||
return current_switch_win[id];
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(switch_sensor_formats); i++) {
|
||||
if (switch_sensor_formats[i].wdr_mode == wdr_on) {
|
||||
if (switch_sensor_formats[i].fps_fixed == fps) {
|
||||
sensor_format = &switch_sensor_formats[i];
|
||||
sensor_print("switch fine wdr is %d, fine fps is %d\n", wdr_on, fps);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sensor_format == NULL) {
|
||||
for (i = 0; i < ARRAY_SIZE(switch_sensor_formats); i++) {
|
||||
if (switch_sensor_formats[i].wdr_mode == wdr_on) {
|
||||
sensor_format = &switch_sensor_formats[i];
|
||||
isp_get_cfg[ispid].sensor_get_fps = sensor_format->fps_fixed;
|
||||
sensor_print("switch fine wdr is %d, use fps is %d\n", wdr_on, sensor_format->fps_fixed);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sensor_format == NULL) {
|
||||
sensor_format = &switch_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("switch use wdr is %d, use fps is %d\n", sensor_format->wdr_mode, sensor_format->fps_fixed);
|
||||
}
|
||||
|
||||
done:
|
||||
current_switch_win[id] = sensor_format;
|
||||
return sensor_format;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int sensor_g_mbus_config(int id, struct v4l2_mbus_config *cfg, struct mbus_framefmt_res *res)
|
||||
{
|
||||
//struct sensor_info *info = to_state(sd);
|
||||
|
||||
cfg->type = V4L2_MBUS_CSI2;
|
||||
cfg->flags = 0 | V4L2_MBUS_CSI2_1_LANE | V4L2_MBUS_CSI2_CHANNEL_0;
|
||||
// res->res_time_hs = 0x11;
|
||||
res->deskew = 2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sensor_reg_init(int id, int isp_id)
|
||||
{
|
||||
int ret = 0;
|
||||
int ispid = clamp(isp_id, 0, ISP_GET_CFG_NUM - 1);
|
||||
struct sensor_exp_gain exp_gain;
|
||||
|
||||
ret = sensor_write_array(id, sensor_default_regs,
|
||||
ARRAY_SIZE(sensor_default_regs));
|
||||
if (ret < 0) {
|
||||
sensor_err("write sensor_default_regs error\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (current_win[id]->regs)
|
||||
ret = sensor_write_array(id, current_win[id]->regs, current_win[id]->regs_size);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
sc202cs_sensor_vts = current_win[id]->vts;
|
||||
#if 0
|
||||
//#if defined CONFIG_ISP_READ_THRESHOLD || defined CONFIG_ISP_FAST_CONVERGENCE
|
||||
if (ispid == 0) {
|
||||
exp_gain.exp_val = clamp(*((unsigned int *)ISP0_NORFLASH_SAVE + 2), 16, 1125 << 4);
|
||||
exp_gain.gain_val = clamp(*((unsigned int *)ISP0_NORFLASH_SAVE + 1), 16, 110 << 4);
|
||||
} else {
|
||||
exp_gain.exp_val = clamp(*((unsigned int *)ISP1_NORFLASH_SAVE + 2), 16, 1125 << 4);
|
||||
exp_gain.gain_val = clamp(*((unsigned int *)ISP1_NORFLASH_SAVE + 1), 16, 110 << 4);
|
||||
}
|
||||
#if defined CONFIG_ISP_FAST_CONVERGENCE || defined CONFIG_ISP_HARD_LIGHTADC
|
||||
temperature_ctrl = 0;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
exp_gain.exp_val = 0xff0302;
|
||||
exp_gain.gain_val = 0xff24;
|
||||
sensor_s_exp_gain(id, &exp_gain);
|
||||
// sensor_write(id, 0x3e, 0x91);
|
||||
//#else //CONFIG_ISP_HARD_LIGHTADC
|
||||
|
||||
//#endif
|
||||
//sensor_flip_status = 0x0;
|
||||
//sensor_dbg("sc202cs_sensor_vts = %d\n", sc202cs_sensor_vts);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sensor_s_stream(int id, int isp_id, int enable)
|
||||
{
|
||||
if (enable && sensor_stream_count[id]++ > 0)
|
||||
return 0;
|
||||
else if (!enable && (sensor_stream_count[id] == 0 || --sensor_stream_count[id] > 0))
|
||||
return 0;
|
||||
|
||||
sensor_dbg("%s on = %d, 2560*1440 fps: 15\n", __func__, enable);
|
||||
|
||||
if (!enable)
|
||||
return 0;
|
||||
|
||||
return sensor_reg_init(id, isp_id);
|
||||
}
|
||||
|
||||
static int sensor_s_switch(int id)
|
||||
{
|
||||
#if defined CONFIG_ISP_FAST_CONVERGENCE || defined CONFIG_ISP_HARD_LIGHTADC
|
||||
struct sensor_exp_gain exp_gain;
|
||||
int ret = -1;
|
||||
temperature_ctrl = 1;
|
||||
sc202cs_sensor_vts = current_switch_win[id]->vts;
|
||||
if (current_switch_win[id]->switch_regs)
|
||||
ret = sensor_write_array(id, current_switch_win[id]->switch_regs, current_switch_win[id]->switch_regs_size);
|
||||
else
|
||||
sensor_err("cannot find 480p120fps to 1600x1200_%dfps reg\n", current_switch_win[id]->fps_fixed);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sensor_test_i2c(int id)
|
||||
{
|
||||
int ret;
|
||||
sensor_power(id, PWR_ON);
|
||||
ret = sensor_init(id);
|
||||
sensor_power(id, PWR_OFF);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct sensor_fuc_core sc202cs_core = {
|
||||
.g_mbus_config = sensor_g_mbus_config,
|
||||
.sensor_test_i2c = sensor_test_i2c,
|
||||
.sensor_power = sensor_power,
|
||||
.s_ir_status = sensor_set_ir,
|
||||
.s_stream = sensor_s_stream,
|
||||
.s_switch = sensor_s_switch,
|
||||
.s_exp_gain = sensor_s_exp_gain,
|
||||
.sensor_g_format = sensor_get_format,
|
||||
.sensor_g_switch_format = sensor_get_switch_format,
|
||||
};
|
|
@ -68,6 +68,9 @@ struct sensor_cfg_array sensor_array[] = {
|
|||
#ifdef CONFIG_SENSOR_GC2083_MIPI
|
||||
{"gc2083_mipi", &gc2083_core},
|
||||
#endif
|
||||
#ifdef CONFIG_SENSOR_SC202CS_MIPI
|
||||
{"sc202cs_mipi", &sc202cs_core},
|
||||
#endif
|
||||
};
|
||||
|
||||
struct sensor_fuc_core *find_sensor_func(char *sensor_name)
|
||||
|
|
|
@ -159,15 +159,15 @@ struct vin_mclk_info vind_default_mclk[VIN_MAX_CCI] = {
|
|||
.mclk = HAL_CLK_PERIPH_CSI_MASTER0,
|
||||
.clk_24m = HAL_CLK_SRC_HOSC,
|
||||
.clk_pll = HAL_CLK_PLL_CSI,
|
||||
.pin = GPIOA(10),
|
||||
.pin_func = {0x4, 0xf},
|
||||
.pin = GPIOE(12),
|
||||
.pin_func = {0x5, 0xf},
|
||||
},
|
||||
{
|
||||
.mclk = HAL_CLK_PERIPH_CSI_MASTER1,
|
||||
.clk_24m = HAL_CLK_SRC_HOSC,
|
||||
.clk_pll = HAL_CLK_PLL_CSI,
|
||||
.pin = GPIOA(13),
|
||||
.pin_func = {0x4, 0xf},
|
||||
.pin = GPIOE(13),
|
||||
.pin_func = {0x5, 0xf},
|
||||
},
|
||||
{
|
||||
.mclk = HAL_CLK_PERIPH_CSI_MASTER1,
|
||||
|
@ -226,6 +226,21 @@ struct sensor_list global_sensors[VIN_MAX_CSI] = {
|
|||
.ir_cut_gpio[0] = GPIOD(18), /*-cut*/
|
||||
.ir_cut_gpio[1] = GPIOD(8), /*+cut*/
|
||||
.ir_led_gpio = 0xffff, //GPIOE(10)
|
||||
#elif defined(CONFIG_SENSOR_SC202CS_MIPI)
|
||||
.used = 1,
|
||||
.sensor_name = "sc202cs_mipi",
|
||||
.sensor_twi_addr = 0x20,
|
||||
.sensor_twi_id = 0,
|
||||
.mclk_id = 1,
|
||||
.use_isp = 1,
|
||||
.id = 0,
|
||||
.addr_width = 16,
|
||||
.data_width = 8,
|
||||
.reset_gpio = GPIOE(10),
|
||||
.pwdn_gpio = 0xffff,
|
||||
.ir_cut_gpio[0] = 0xffff,/*-cut*/
|
||||
.ir_cut_gpio[1] = 0xffff,/*+cut*/
|
||||
.ir_led_gpio = 0xffff,
|
||||
#else //CONFIG_SENSOR_GC2053_MIPI
|
||||
.used = 1,
|
||||
.sensor_name = "gc2083_mipi",
|
||||
|
@ -478,6 +493,21 @@ struct sensor_list global_sensors[VIN_MAX_CSI] = {
|
|||
// .ir_cut_gpio[0] = 0xffff,/*-cut*/
|
||||
// .ir_cut_gpio[1] = 0xffff,/*+cut*/
|
||||
// .ir_led_gpio = GPIOF(3),
|
||||
#elif defined(CONFIG_SENSOR_SC202CS_MIPI)
|
||||
.used = 1,
|
||||
.sensor_name = "sc202cs_mipi",
|
||||
.sensor_twi_addr = 0x20,
|
||||
.sensor_twi_id = 0,
|
||||
.mclk_id = 1,
|
||||
.use_isp = 1,
|
||||
.id = 0,
|
||||
.addr_width = 16,
|
||||
.data_width = 8,
|
||||
.reset_gpio = GPIOE(10),
|
||||
.pwdn_gpio = 0xffff,
|
||||
.ir_cut_gpio[0] = 0xffff,/*-cut*/
|
||||
.ir_cut_gpio[1] = 0xffff,/*+cut*/
|
||||
.ir_led_gpio = 0xffff,
|
||||
#else
|
||||
.used = 1,
|
||||
.sensor_name = "gc2083_mipi",
|
||||
|
@ -527,6 +557,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_SC202CS_MIPI)
|
||||
.used = 1,
|
||||
.sensor_name = "sc202cs_mipi_2",
|
||||
.sensor_twi_addr = 0x6c,
|
||||
.sensor_twi_id = 0,
|
||||
.mclk_id = 1,
|
||||
.use_isp = 1,
|
||||
.id = 1,
|
||||
.addr_width = 16,
|
||||
.data_width = 8,
|
||||
.reset_gpio = GPIOE(11),
|
||||
.pwdn_gpio = 0xffff,
|
||||
.ir_cut_gpio[0] = 0xffff,/*-cut*/
|
||||
.ir_cut_gpio[1] = 0xffff,/*+cut*/
|
||||
.ir_led_gpio = 0xffff,
|
||||
#else
|
||||
.used = 1,
|
||||
.sensor_name = "gc2083_mipi",
|
||||
|
@ -559,8 +604,8 @@ struct vin_core global_video[VIN_MAX_VIDEO] = {
|
|||
.isp_tx_ch = 0,
|
||||
.base = CSI_DMA0_REG_BASE,
|
||||
.irq = SUNXI_IRQ_CSIC_DMA0,
|
||||
.o_width = 512,
|
||||
.o_height = 288,
|
||||
.o_width = 1600,
|
||||
.o_height = 1200,
|
||||
//.fourcc = V4L2_PIX_FMT_LBC_2_5X,
|
||||
.fourcc = V4L2_PIX_FMT_NV12,
|
||||
.use_sensor_list = 0,
|
||||
|
@ -569,7 +614,7 @@ struct vin_core global_video[VIN_MAX_VIDEO] = {
|
|||
.used = 1,
|
||||
.id = 1,
|
||||
.rear_sensor = 1,
|
||||
.front_sensor = 0,
|
||||
.front_sensor = 1,
|
||||
.csi_sel = 1,
|
||||
.mipi_sel = 1,
|
||||
.isp_sel = 1,
|
||||
|
@ -577,8 +622,8 @@ struct vin_core global_video[VIN_MAX_VIDEO] = {
|
|||
.isp_tx_ch = 0,
|
||||
.base = CSI_DMA0_REG_BASE,
|
||||
.irq = SUNXI_IRQ_CSIC_DMA0,
|
||||
.o_width = 512,
|
||||
.o_height = 288,
|
||||
.o_width = 1600,
|
||||
.o_height = 1200,
|
||||
//.fourcc = V4L2_PIX_FMT_LBC_2_5X,
|
||||
.fourcc = V4L2_PIX_FMT_NV12,
|
||||
.use_sensor_list = 0,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -37,7 +37,8 @@
|
|||
#if (ISP_VERSION >= 600)
|
||||
#if defined CONFIG_SENSOR_GC2053_MIPI || defined CONFIG_SENSOR_GC4663_MIPI || defined CONFIG_SENSOR_SC5336_MIPI || \
|
||||
defined CONFIG_SENSOR_GC1084_MIPI || CONFIG_SENSOR_BF2257CS_MIPI || CONFIG_SENSOR_SC2355_MIPI || CONFIG_SENSOR_F37P_MIPI || \
|
||||
defined CONFIG_SENSOR_F355P_MIPI || CONFIG_SENSOR_OV02B10_MIPI || CONFIG_SENSOR_GC2083_MIPI || CONFIG_SENSOR_SC2356_MIPI
|
||||
defined CONFIG_SENSOR_F355P_MIPI || CONFIG_SENSOR_OV02B10_MIPI || CONFIG_SENSOR_GC2083_MIPI || CONFIG_SENSOR_SC2356_MIPI || CONFIG_SENSOR_SC202CS_MIPI
|
||||
|
||||
#ifdef CONFIG_SENSOR_GC4663_MIPI
|
||||
#include "SENSOR_H/gc4663_mipi_default_ini_v853.h"
|
||||
#include "SENSOR_H/gc4663_120fps_mipi_default_ini_v853.h"
|
||||
|
@ -122,6 +123,11 @@
|
|||
#include "SENSOR_H/sc2365_mipi_isp600_20250107_100622.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SENSOR_SC202CS_MIPI
|
||||
#include "SENSOR_H/sc202cs_mipi_isp600_ir_20250221_141621.h"
|
||||
#include "SENSOR_H/sc202cs_mipi_isp600_rgb_20250304_100237.h"
|
||||
#endif
|
||||
|
||||
#else
|
||||
#include "SENSOR_H/gc2053_mipi_default_ini_v853.h"
|
||||
#endif
|
||||
|
@ -136,7 +142,7 @@ struct isp_cfg_array cfg_arr[] = {
|
|||
#if (ISP_VERSION >= 600)
|
||||
#if defined CONFIG_SENSOR_GC2053_MIPI || defined CONFIG_SENSOR_GC4663_MIPI || defined CONFIG_SENSOR_SC5336_MIPI || \
|
||||
defined CONFIG_SENSOR_GC1084_MIPI || CONFIG_SENSOR_BF2257CS_MIPI || CONFIG_SENSOR_SC2355_MIPI || CONFIG_SENSOR_F37P_MIPI || \
|
||||
defined CONFIG_SENSOR_F355P_MIPI || CONFIG_SENSOR_OV02B10_MIPI || CONFIG_SENSOR_GC2083_MIPI || CONFIG_SENSOR_SC2356_MIPI
|
||||
defined CONFIG_SENSOR_F355P_MIPI || CONFIG_SENSOR_OV02B10_MIPI || CONFIG_SENSOR_GC2083_MIPI || CONFIG_SENSOR_SC2356_MIPI || CONFIG_SENSOR_SC202CS_MIPI
|
||||
|
||||
#ifdef CONFIG_SENSOR_GC2053_MIPI
|
||||
{"gc2053_mipi", "gc2053_mipi_isp600_20231212_111630_day", 1920, 1088, 20, 0, 0, &gc2053_mipi_v853_isp_cfg},
|
||||
|
@ -212,6 +218,13 @@ struct isp_cfg_array cfg_arr[] = {
|
|||
{"sc2356_mipi", "sc2365_mipi_isp600_20250107_100622", 1600, 1200, 15, 1, 0, &sc2356_mipi_isp_cfg},
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SENSOR_SC202CS_MIPI
|
||||
{"sc202cs_mipi", "sc202cs_mipi_isp600_rgb_20250304_100237", 1600, 1200, 30, 0, 0, &sc202cs_mipi_rgb_isp_cfg},
|
||||
{"sc202cs_mipi", "sc202cs_mipi_isp600_rgb_20250304_100237", 1600, 1200, 30, 1, 0, &sc202cs_mipi_rgb_isp_cfg},
|
||||
{"sc202ms_mipi", "sc202cs_mipi_isp600_ir_20250221_141621", 1600, 1200, 30, 0, 0, &sc202cs_mipi_ir_isp_cfg},
|
||||
{"sc202ms_mipi", "sc202cs_mipi_isp600_ir_20250221_141621", 1600, 1200, 30, 1, 0, &sc202cs_mipi_ir_isp_cfg},
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SENSOR_GC1084_MIPI
|
||||
{"gc1084_mipi", "gc1084_mipi_v853_20230410_164555_day", 1280, 720, 15, 0, 0, &gc1084_mipi_v853_isp_cfg},
|
||||
#ifdef CONFIG_ENABLE_AIISP
|
||||
|
|
|
@ -2263,7 +2263,7 @@ CONFIG_select_sensor=y
|
|||
# CONFIG_gc1084 is not set
|
||||
# CONFIG_gc2053 is not set
|
||||
# CONFIG_gc0406 is not set
|
||||
CONFIG_gc2083=y
|
||||
# CONFIG_gc2083 is not set
|
||||
# CONFIG_f37p is not set
|
||||
# CONFIG_f355p is not set
|
||||
# CONFIG_mis2008 is not set
|
||||
|
@ -2276,6 +2276,7 @@ CONFIG_gc2083=y
|
|||
# CONFIG_sc5336 is not set
|
||||
# CONFIG_sc200ai is not set
|
||||
# CONFIG_os02g10 is not set
|
||||
# CONFIG_sc202cs is not set
|
||||
# CONFIG_mpp_log_level_close is not set
|
||||
# CONFIG_mpp_log_level_error is not set
|
||||
# CONFIG_mpp_log_level_warn is not set
|
||||
|
|
Loading…
Reference in New Issue