您尚未登录。

楼主 # 今天 11:42:03

xuuu
会员
注册时间: 2026-01-05
已发帖子: 18
积分: 18

GC05A2 mipi摄像头 预览是黑屏是什么情况

日志:
        Line 1266: [    8.129222] [gc05a2_mipi]init_sensor: Initializing GC05A2 sensor driver
    Line 1266: [    8.129222] [gc05a2_mipi]init_sensor: Initializing GC05A2 sensor driver
    Line 1267: [    8.198429] [gc05a2_mipi]sensor_probe: Probing GC05A2 sensor
    Line 1267: [    8.198429] [gc05a2_mipi]sensor_probe: Probing GC05A2 sensor
    Line 1268: [    8.204892] [gc05a2_mipi]sensor_probe: I2C client addr=0x37, adapter=twi2
    Line 1269: [    8.212647] [gc05a2_mipi]sensor_probe: Calling cci_dev_probe_helper
    Line 1270: [    8.219903] [gc05a2_mipi]sensor_probe: Initializing controls
    Line 1271: [    8.226286] [gc05a2_mipi]sensor_init_controls: initializing controls
    Line 1272: [    8.233511] [gc05a2_mipi]sensor_init_controls: completed, ret=0
    Line 1273: [    8.240242] [gc05a2_mipi]sensor_probe: I2C address set to 0x37
    Line 1274: [    8.246834] [gc05a2_mipi]sensor_probe: Probe completed successfully
    Line 1275: [    8.253881] [gc05a2_mipi]sensor_probe: fmt_num=1, win_size_num=3, lane_num=2, bit_width=10
    Line 1276: [    8.263277] [gc05a2_mipi]sensor_power: on=1
    Line 1277: [    8.267974] [gc05a2_mipi]PWR_ON! - Starting power up sequence
    Line 1278: [    8.274418] [gc05a2_mipi]PWR_ON: Setting PWDN/RESET status
    Line 1279: [    8.280782] [gc05a2_mipi]PWR_ON: Setting IOVDD
    Line 1280: [    8.286358] [gc05a2_mipi]PWR_ON: Setting DVDD
    Line 1281: [    8.291773] [gc05a2_mipi]PWR_ON: Setting AVDD and AFVDD
    Line 1282: [    8.298258] [gc05a2_mipi]PWR_ON: Setting MCLK freq=24000000
    Line 1283: [    8.304923] [gc05a2_mipi]PWR_ON: Setting PWDN high
    Line 1284: [    8.310431] [gc05a2_mipi]PWR_ON: Setting RESET high
    Line 1285: [    8.316222] [gc05a2_mipi]PWR_ON: Setting CAMERAVDD
    Line 1286: [    8.321596] [gc05a2_mipi]PWR_ON: Power up sequence completed
    Line 1287: [    8.327935] [gc05a2_mipi]sensor_init: val=0
    Line 1288: [    8.332625] [gc05a2_mipi]sensor_detect: Starting sensor detection
    Line 1289: [    8.340489] [gc05a2_mipi]gc05a2 detect V4L2_IDENT_SENSOR = 0x5a2 (expected 0x5a2)
    Line 1289: [    8.340489] [gc05a2_mipi]gc05a2 detect V4L2_IDENT_SENSOR = 0x5a2 (expected 0x5a2)
    Line 1290: [    8.348877] [gc05a2_mipi]sensor_detect: Sensor detected successfully
    Line 1291: [    8.356000] [gc05a2_mipi]sensor_init: success, width=1296, height=972, gain=16, exp=13088
    Line 1292: [    8.365159] [gc05a2_mipi]sensor_power: on=0
    Line 1293: [    8.369843] [gc05a2_mipi]PWR_OFF! - Starting power down sequence
    Line 1294: [    8.376864] [gc05a2_mipi]PWR_OFF: Disabling power channels
    Line 1295: [    8.384629] [gc05a2_mipi]PWR_OFF: Power down sequence completed
    Line 1380: [   12.031320] [gc05a2_mipi]sensor_power: on=1
    Line 1381: [   12.036246] [gc05a2_mipi]PWR_ON! - Starting power up sequence
    Line 1382: [   12.042903] [gc05a2_mipi]PWR_ON: Setting PWDN/RESET status
    Line 1383: [   12.049486] [gc05a2_mipi]PWR_ON: Setting IOVDD
    Line 1384: [   12.055251] [gc05a2_mipi]PWR_ON: Setting DVDD
    Line 1385: [   12.060877] [gc05a2_mipi]PWR_ON: Setting AVDD and AFVDD
    Line 1386: [   12.067614] [gc05a2_mipi]PWR_ON: Setting MCLK freq=24000000
    Line 1387: [   12.074145] [gc05a2_mipi]PWR_ON: Setting PWDN high
    Line 1388: [   12.079736] [gc05a2_mipi]PWR_ON: Setting RESET high
    Line 1389: [   12.085608] [gc05a2_mipi]PWR_ON: Setting CAMERAVDD
    Line 1390: [   12.091239] [gc05a2_mipi]PWR_ON: Power up sequence completed
    Line 1391: [   12.097846] [gc05a2_mipi]sensor_init: val=1
    Line 1392: [   12.102644] [gc05a2_mipi]sensor_detect: Starting sensor detection
    Line 1393: [   12.110358] [gc05a2_mipi]gc05a2 detect V4L2_IDENT_SENSOR = 0x5a2 (expected 0x5a2)
    Line 1393: [   12.110358] [gc05a2_mipi]gc05a2 detect V4L2_IDENT_SENSOR = 0x5a2 (expected 0x5a2)
    Line 1394: [   12.130247] [gc05a2_mipi]sensor_detect: Sensor detected successfully
    Line 1395: [   12.141846] [gc05a2_mipi]sensor_init: success, width=1296, height=972, gain=16, exp=13088
    Line 1396: [   12.152691] [gc05a2_mipi]sensor_power: on=0
    Line 1397: [   12.157436] [gc05a2_mipi]PWR_OFF! - Starting power down sequence
    Line 1398: [   12.164674] [gc05a2_mipi]PWR_OFF: Disabling power channels
    Line 1399: [   12.172202] [gc05a2_mipi]PWR_OFF: Power down sequence completed
    Line 1781: [  135.900033] [gc05a2_mipi]sensor_power: on=1
    Line 1782: [  135.905131] [gc05a2_mipi]PWR_ON! - Starting power up sequence
    Line 1783: [  135.912296] [gc05a2_mipi]PWR_ON: Setting PWDN/RESET status
    Line 1784: [  135.919616] [gc05a2_mipi]PWR_ON: Setting IOVDD
    Line 1785: [  135.925587] [gc05a2_mipi]PWR_ON: Setting DVDD
    Line 1786: [  135.931292] [gc05a2_mipi]PWR_ON: Setting AVDD and AFVDD
    Line 1787: [  135.938022] [gc05a2_mipi]PWR_ON: Setting MCLK freq=24000000
    Line 1788: [  135.944609] [gc05a2_mipi]PWR_ON: Setting PWDN high
    Line 1789: [  135.950373] [gc05a2_mipi]PWR_ON: Setting RESET high
    Line 1790: [  135.956780] [gc05a2_mipi]PWR_ON: Setting CAMERAVDD
    Line 1791: [  135.962582] [gc05a2_mipi]PWR_ON: Power up sequence completed
    Line 1792: [  135.969267] [gc05a2_mipi]sensor_init: val=1
    Line 1793: [  135.974111] [gc05a2_mipi]sensor_detect: Starting sensor detection
    Line 1794: [  135.981851] [gc05a2_mipi]gc05a2 detect V4L2_IDENT_SENSOR = 0x5a2 (expected 0x5a2)
    Line 1794: [  135.981851] [gc05a2_mipi]gc05a2 detect V4L2_IDENT_SENSOR = 0x5a2 (expected 0x5a2)
    Line 1795: [  135.990617] [gc05a2_mipi]sensor_detect: Sensor detected successfully
    Line 1796: [  135.997889] [gc05a2_mipi]sensor_init: success, width=1296, height=972, gain=16, exp=13088
    Line 1797: [  136.017074] [gc05a2_mipi]sensor_s_stream: enable=1, 1296*972 fps: 30 code: 300a
    Line 1798: [  136.025425] [gc05a2_mipi]sensor_s_stream: stream enabled, initializing registers
    Line 1799: [  136.033990] [gc05a2_mipi]sensor_reg_init: Starting register initialization
    Line 1800: [  136.041760] [gc05a2_mipi]sensor_reg_init: fmt=ffffff8000b818d0, wsize=ffffff8000b818f0
    Line 1801: [  136.119765] [gc05a2_mipi]sensor_reg_init: sensor_default_regs written successfully
    Line 1802: [  136.128273] [gc05a2_mipi]sensor_reg_init: writing sensor format regs
    Line 1803: [  136.135427] [gc05a2_mipi]sensor_reg_init: writing window size regs
    Line 1804: [  136.165082] [gc05a2_mipi]sensor_reg_init: vts=2064, frame_length=2064, width=1296, height=972
    Line 1805: [  136.174616] [gc05a2_mipi]sensor_reg_init: setting exp_gain: exp=13088, gain=16
    Line 1806: [  136.184740] [gc05a2_mipi]sensor_reg_init: completed successfully
    Line 1810: [  136.220413] [gc05a2_mipi] ignore unknown ioctl 0xc008570a
    Line 1811: [  136.239142] [gc05a2_mipi]sensor_init: val=1
    Line 1812: [  136.244173] [gc05a2_mipi]sensor_detect: Starting sensor detection
    Line 1813: [  136.252018] [gc05a2_mipi]gc05a2 detect V4L2_IDENT_SENSOR = 0x5a2 (expected 0x5a2)
    Line 1813: [  136.252018] [gc05a2_mipi]gc05a2 detect V4L2_IDENT_SENSOR = 0x5a2 (expected 0x5a2)
    Line 1814: [  136.260445] [gc05a2_mipi]sensor_detect: Sensor detected successfully
    Line 1815: [  136.267589] [gc05a2_mipi]sensor_init: success, width=1296, height=972, gain=16, exp=13088

// adb 测试:
ceres-c3:/ # i2cdetect -y 2
0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- 0c -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
ceres-c3:/ # cat /sys/class/regulator/regulator.14/state
enabled
ceres-c3:/ # cat /sys/class/regulator/regulator.14/microvolts
1800000
ceres-c3:/ # cat /sys/class/regulator/regulator.15/state
enabled
ceres-c3:/ # cat /sys/class/regulator/regulator.15/microvolts
2800000
ceres-c3:/ # cat /sys/class/regulator/regulator.18/state
enabled
ceres-c3:/ # cat /sys/class/regulator/regulator.18/microvolts
1500000
ceres-c3:/ # ls /dev/video*
/dev/video0 /dev/video1 /dev/video2 /dev/video3
ceres-c3:/ # dmesg | grep -i v4l2
[    8.390476] [gc05a2_mipi]gc05a2 detect V4L2_IDENT_SENSOR = 0x5a2 (expected 0x5a2)
[   12.287083] [gc05a2_mipi]gc05a2 detect V4L2_IDENT_SENSOR = 0x5a2 (expected 0x5a2)
[   78.212654] [gc05a2_mipi]gc05a2 detect V4L2_IDENT_SENSOR = 0x5a2 (expected 0x5a2)
[   78.494089] [gc05a2_mipi]gc05a2 detect V4L2_IDENT_SENSOR = 0x5a2 (expected 0x5a2)
ceres-c3:/ # dmesg | grep -i csi
[   78.443291] [VIN]csic_dma0 stream on, 1296*972 hoff: 0 voff: 0
[   78.537193] [VIN]csic_dma1 stream on, 640*480 hoff: 0 voff: 0

// 设备树配置如下:(后置摄像头)
    vind0:vind@0 {
            vind0_clk = <336000000>;
            vind0_isp = <300000000>;
            status = "okay";

            actuator0:actuator@0 {
                device_type = "actuator0";
                actuator0_name = "ad5820_act";
                actuator0_slave = <0x18>;
                actuator0_af_pwdn = <>;
                actuator0_afvdd = "afvcc-csi";
                actuator0_afvdd_vol = <2800000>;
                status = "okay";
            };
            flash0:flash@0 {
                device_type = "flash0";
                flash0_type = <2>;
                /* FLASHLIGHT_EN - PE6 */
                flash0_en = <&pio PE 6 1 0 1 0>;
                flash0_mode = <>;
                flash0_flvdd = "";
                flash0_flvdd_vol = <>;
                device_id = <0>;
                status = "okay";
            };
            sensor0:sensor@0 {
                device_type = "sensor0";
                sensor0_mname = "gc05a2_mipi";
                sensor0_twi_cci_id = <2>;
                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>;
                /* IOVDD-CSI */
                sensor0_iovdd-supply = <&reg_dldo2>;
                sensor0_iovdd_vol = <1800000>;
                /* AVDD-CSI */
                sensor0_avdd-supply = <&reg_dldo3>;
                sensor0_avdd_vol = <2800000>;
                /* DVDD-CSI */
                sensor0_dvdd-supply = <&reg_eldo2>;
                sensor0_dvdd_vol = <1500000>;
                sensor0_power_en = <>;
                /* MCSI-RST-R - PE9 */
                sensor0_reset = <&pio PE 9 1 0 1 0>;
                /* MCSI-STBY-R - PE8 */
                sensor0_pwdn  = <&pio PE 8 1 0 1 0>;
                status    = "okay";
            };
            sensor1:sensor@1 {
                device_type = "sensor1";
                sensor1_mname = "gc030a_mipi";
                sensor1_twi_cci_id = <2>;
                sensor1_twi_addr = <0x42>;
                sensor1_mclk_id = <0>;
                sensor1_pos = "front";
                sensor1_isp_used = <1>;
                sensor1_fmt = <1>;
                sensor1_stby_mode = <0>;
                sensor1_vflip = <0>;
                sensor1_hflip = <0>;
                sensor1_iovdd-supply = <&reg_dldo2>;
                sensor1_iovdd_vol = <1800000>;
                sensor1_avdd-supply = <&reg_dldo3>;
                sensor1_avdd_vol = <2800000>;
                sensor1_dvdd-supply = <>;
                sensor1_dvdd_vol = <>;
                sensor1_power_en = <>;
                sensor1_reset = <&pio PE 7 1 0 1 0>;
                sensor1_pwdn = <&pio PE 6 1 0 1 0>;
                status    = "disabled";
            };
            vinc0:vinc@0 {
                vinc0_csi_sel = <0>;
                vinc0_mipi_sel = <0>;
                vinc0_isp_sel = <0>;
                vinc0_isp_tx_ch = <0>;
                vinc0_tdm_rx_sel = <0xff>;
                vinc0_rear_sensor_sel = <0>;
                vinc0_front_sensor_sel = <1>;
                vinc0_sensor_list = <0>;
                status = "okay";
            };
            vinc1:vinc@1 {
                vinc1_csi_sel = <0>;
                vinc1_mipi_sel = <0>;
                vinc1_isp_sel = <0>;
                vinc1_isp_tx_ch = <0>;
                vinc1_tdm_rx_sel = <0xff>;
                vinc1_rear_sensor_sel = <0>;
                vinc1_front_sensor_sel = <1>;
                vinc1_sensor_list = <0>;
                status = "okay";
            };
            vinc2:vinc@2 {
                vinc2_csi_sel = <1>;
                vinc2_mipi_sel = <1>;
                vinc2_isp_sel = <0>;
                vinc2_isp_tx_ch = <0>;
                vinc2_tdm_rx_sel = <0xff>;
                vinc2_rear_sensor_sel = <0>;
                vinc2_front_sensor_sel = <1>;
                vinc2_sensor_list = <0>;
                status = "okay";
            };
            vinc3:vinc@3 {
                vinc3_csi_sel = <1>;
                vinc3_mipi_sel = <1>;
                vinc3_isp_sel = <0>;
                vinc3_isp_tx_ch = <0>;
                vinc3_tdm_rx_sel = <0xff>;
                vinc3_rear_sensor_sel = <0>;
                vinc3_front_sensor_sel = <1>;
                vinc3_sensor_list = <0>;
                status = "okay";
            };
        };1.png2.png2.png1.png

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn


太原小智科技有限责任公司 - 东莞哇酷科技有限公司联合开发