您尚未登录。

楼主 #1 2019-11-26 14:10:56

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

@augyy A33 驱动 ov5640 问题

接这个: https://whycan.cn/t_561_2.html#p28557


你用的是 axp 哪个芯片? 把完整log用文字发上来, 加上 code 标签: https://whycan.cn/help.php#bbcode





离线

#2 2019-11-26 14:53:10

augyy
会员
注册时间: 2019-01-29
已发帖子: 46
积分: 46

Re: @augyy A33 驱动 ov5640 问题

AXP = axp223

log file
session.txt

code 我是用A33-Vstar 提供Linux-SDK

离线

楼主 #3 2019-11-26 15:13:17

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

Re: @augyy A33 驱动 ov5640 问题

从这里看, 电源应该正常才是:

[    0.520047] axp22_board axp22_board: AXP (CHIP ID: 0x06) detected
[    0.522070] axp22_dcdc1: 1600 <--> 3400 mV at 3000 mV 
[    0.522070] axp22_dcdc2: 600 <--> 1540 mV at 1100 mV 
[    0.522070] axp22_dcdc3: 600 <--> 1860 mV at 1200 mV 
[    0.522070] axp22_dcdc4: 600 <--> 1540 mV at 1100 mV 
[    0.522070] axp22_dcdc5: 1000 <--> 2550 mV at 1500 mV 
[    0.522070] axp22_rtc: 3000 mV 
[    0.522070] axp22_aldo1: 700 <--> 3300 mV at 3000 mV 
[    0.522070] axp22_aldo2: 700 <--> 3300 mV at 2500 mV 
[    0.522070] axp22_aldo3: 700 <--> 3300 mV at 3000 mV 
[    0.522070] axp22_dldo1: 700 <--> 3300 mV at 700 mV 
[    0.522070] axp22_dldo2: 700 <--> 3300 mV at 700 mV 
[    0.522070] axp22_dldo3: 700 <--> 3300 mV at 700 mV 
[    0.522070] axp22_dldo4: 700 <--> 3300 mV at 700 mV 
[    0.522070] axp22_eldo1: 700 <--> 3300 mV at 700 mV 
[    0.522070] axp22_eldo1: supplied by axp22_dcdc1
[    0.522070] axp22_eldo2: 700 <--> 3300 mV at 700 mV 
[    0.522070] axp22_eldo2: supplied by axp22_dcdc1
[    0.522070] axp22_eldo3: 700 <--> 3300 mV at 700 mV 
[    0.522070] axp22_eldo3: supplied by axp22_dcdc1
[    0.522070] axp22_dc5ldo: 700 <--> 1400 mV at 1100 mV 
[    0.522070] axp22_ldoio0: 700 <--> 3300 mV at 3800 mV 
[    0.530089] axp22_ldoio1: 700 <--> 3300 mV at 3800 mV 
[    0.530243] axp22_dc1sw: at 700 mV 
[    0.530243] axp22_dc1sw: supplied by axp22_dcdc1

DOVDD-CSI 無 2.8V, AVDD-CSI 無 2.8V, DVDD18V-CSI 無1.8V

这三组确认都是 axp223 供电吗?有没有pdf原理图?





离线

#4 2019-11-26 15:27:20

augyy
会员
注册时间: 2019-01-29
已发帖子: 46
积分: 46

Re: @augyy A33 驱动 ov5640 问题

晕哥 说:

从这里看, 电源应该正常才是:

[    0.520047] axp22_board axp22_board: AXP (CHIP ID: 0x06) detected
[    0.522070] axp22_dcdc1: 1600 <--> 3400 mV at 3000 mV 
[    0.522070] axp22_dcdc2: 600 <--> 1540 mV at 1100 mV 
[    0.522070] axp22_dcdc3: 600 <--> 1860 mV at 1200 mV 
[    0.522070] axp22_dcdc4: 600 <--> 1540 mV at 1100 mV 
[    0.522070] axp22_dcdc5: 1000 <--> 2550 mV at 1500 mV 
[    0.522070] axp22_rtc: 3000 mV 
[    0.522070] axp22_aldo1: 700 <--> 3300 mV at 3000 mV 
[    0.522070] axp22_aldo2: 700 <--> 3300 mV at 2500 mV 
[    0.522070] axp22_aldo3: 700 <--> 3300 mV at 3000 mV 
[    0.522070] axp22_dldo1: 700 <--> 3300 mV at 700 mV 
[    0.522070] axp22_dldo2: 700 <--> 3300 mV at 700 mV 
[    0.522070] axp22_dldo3: 700 <--> 3300 mV at 700 mV 
[    0.522070] axp22_dldo4: 700 <--> 3300 mV at 700 mV 
[    0.522070] axp22_eldo1: 700 <--> 3300 mV at 700 mV 
[    0.522070] axp22_eldo1: supplied by axp22_dcdc1
[    0.522070] axp22_eldo2: 700 <--> 3300 mV at 700 mV 
[    0.522070] axp22_eldo2: supplied by axp22_dcdc1
[    0.522070] axp22_eldo3: 700 <--> 3300 mV at 700 mV 
[    0.522070] axp22_eldo3: supplied by axp22_dcdc1
[    0.522070] axp22_dc5ldo: 700 <--> 1400 mV at 1100 mV 
[    0.522070] axp22_ldoio0: 700 <--> 3300 mV at 3800 mV 
[    0.530089] axp22_ldoio1: 700 <--> 3300 mV at 3800 mV 
[    0.530243] axp22_dc1sw: at 700 mV 
[    0.530243] axp22_dc1sw: supplied by axp22_dcdc1



这三组确认都是 axp223 供电吗?有没有pdf原理图?

我試過用他們提供的android img file. 是無問題可以出 DOVDD-CSI 2.8V, AVDD-CSI 2.8V, DVDD18V-CSI 1.8V 同可控制 ov5640
A33-Vstar2-DVK.pdf

离线

楼主 #5 2019-11-26 15:36:55

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

Re: @augyy A33 驱动 ov5640 问题

那这个问题用逻辑分析仪抓i2c数据对比,可以快速定位问题

正常的固件,和不正常的固件。





离线

#6 2019-12-03 13:37:39

augyy
会员
注册时间: 2019-01-29
已发帖子: 46
积分: 46

Re: @augyy A33 驱动 ov5640 问题

晕哥 说:

那这个问题用逻辑分析仪抓i2c数据对比,可以快速定位问题

正常的固件,和不正常的固件。

找到是 vfe.c 程式中 出現 "Error registering v4l2 subdevice No such device", 請問什麼解決?

vfe_sensor_subdev_register_check(struct vfe_dev *dev, struct v4l2_device *v4l2_dev,
                                                   struct ccm_config *ccm_cfg, struct i2c_board_info *sensor i2c_board)
...............
ccm_cfg->sd = v4l2_i2c_new_subdev_board(v4l2_dev, i2c_adap, sensor_i2c_board, NULL);
if (IS_ERR_OR_NULL(ccm_cfg->sd))
{
    i2c_put_adpter(i2c_adap);
    vfe_err("Error registering v4l2 subdevice No such device!\n");
    return -ENODEV;
}

离线

#7 2019-12-03 13:50:04

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: @augyy A33 驱动 ov5640 问题

https://whycan.cn/t_561_2.html#p18934

摄像头的 i2c 地址没有检测到吧?

离线

#8 2019-12-04 12:17:54

augyy
会员
注册时间: 2019-01-29
已发帖子: 46
积分: 46

Re: @augyy A33 驱动 ov5640 问题

xgui 说:

https://whycan.cn/t_561_2.html#p18934

摄像头的 i2c 地址没有检测到吧?

之前有望過...但無說明解決方法

离线

楼主 #9 2019-12-04 12:19:42

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

Re: @augyy A33 驱动 ov5640 问题

augyy 说:

之前有望過...但無說明解決方法

逻辑分析仪抓 i2c 数据, 应该是i2c没有检测到摄像头的存在.





离线

#10 2019-12-05 16:41:45

augyy
会员
注册时间: 2019-01-29
已发帖子: 46
积分: 46

Re: @augyy A33 驱动 ov5640 问题

晕哥 说:

逻辑分析仪抓 i2c 数据, 应该是i2c没有检测到摄像头的存在.


應該是 v4l2-common.c 中 i2c_new_device function return 了 client 等於 NULL,

struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev,......
{
    client = i2c_new_device(adapter, info);
    if (client == NULL || client=>driver == NULL)
        goto error;
}

以下是 i2c_new_device function 数据
[    7.971422] [VFE_I2C] client=, driver=(null), flags=0, addr=60, irq=0
[    7.978674] [VFE_I2C] client_name=ov5640, dev_name=1-003c
[    7.984812] [VFE_I2C] dev.parent=-283474880, dev.bus=-1063747452, dev.type=-1063747524, dev.of_node=0

Android i2c 数据
Android.png

Linux i2c 数据
Linux.png

离线

#11 2019-12-05 16:52:48

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: @augyy A33 驱动 ov5640 问题

Android正常, Linux不正常吗? 看来数据差异有点大哦。

离线

#12 2019-12-05 16:58:03

augyy
会员
注册时间: 2019-01-29
已发帖子: 46
积分: 46

Re: @augyy A33 驱动 ov5640 问题

xgui 说:

Android正常, Linux不正常吗? 看来数据差异有点大哦。

係!!!Android是正常

离线

#13 2019-12-05 17:04:54

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: @augyy A33 驱动 ov5640 问题

看起来 Android 向 camera 写的数据, 和Linux向 camera 写的数据 都不同吧?

是不是用同一个驱动程序?

离线

#14 2019-12-06 15:22:05

augyy
会员
注册时间: 2019-01-29
已发帖子: 46
积分: 46

Re: @augyy A33 驱动 ov5640 问题

xgui 说:

看起来 Android 向 camera 写的数据, 和Linux向 camera 写的数据 都不同吧?

是不是用同一个驱动程序?

不是同一个驱动程序, 因為提供者分了兩個android 同 camera 驱动程序給我.

离线

#15 2019-12-06 16:03:27

还能这么玩
会员
注册时间: 2019-04-14
已发帖子: 119
积分: 119

Re: @augyy A33 驱动 ov5640 问题

我记得 V3s 的 camdroid ov5647 驱动, camdroid 和 linux 是一套驱动, 都可以用的。

离线

#16 2019-12-06 17:56:58

augyy
会员
注册时间: 2019-01-29
已发帖子: 46
积分: 46

Re: @augyy A33 驱动 ov5640 问题

終於解決registered sensor subdev 同找到OV5640 sensor.
但還有新問題 [VFE_WARN] Nobody is waiting on this video buffer,buf = xxxx. 是什麼解決?

log_camera.txt

最近编辑记录 augyy (2019-12-06 18:36:24)

离线

#17 2019-12-06 18:03:25

jimmy
会员
注册时间: 2017-10-29
已发帖子: 316
积分: 315

Re: @augyy A33 驱动 ov5640 问题

augyy 说:

終於解決registered sensor subdev 同找到OV5640 sensor.
但還有新問題 [VFE_WARN] Nobody is waiting on this video buffer,buf = xxxx. 是什麼問題?

log_camera.txt

前面那个问题是怎么解决的?

离线

#18 2019-12-20 20:41:23

泽被苍生
会员
注册时间: 2019-12-15
已发帖子: 24
积分: 24

Re: @augyy A33 驱动 ov5640 问题

使用272*480的屏幕uboot可以正常显示logo,但是内核启动后就白屏了,翻阅资料说是设备树的问题,怎么替换设备树呢?

离线

楼主 #19 2019-12-20 21:02:57

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

Re: @augyy A33 驱动 ov5640 问题

泽被苍生 说:

使用272*480的屏幕uboot可以正常显示logo,但是内核启动后就白屏了,翻阅资料说是设备树的问题,怎么替换设备树呢?

驱动,设备树都有可能,量下 pclk,vsync,hsync,de 有没有信号





离线

#20 2019-12-20 21:25:27

泽被苍生
会员
注册时间: 2019-12-15
已发帖子: 24
积分: 24

Re: @augyy A33 驱动 ov5640 问题

晕哥 说:

驱动,设备树都有可能,量下 pclk,vsync,hsync,de 有没有信号

感谢晕哥的及时回复。现在在家里面没有示波器,明天去公司测量一下。我想单独的编译一下设备树用什么指令呢找到了这样一个设备树文件sun8i-v3s-blueberrypi-480x272LCD.dts

离线

#21 2020-07-30 16:19:08

nbhonghong
会员
注册时间: 2020-07-30
已发帖子: 1
积分: 1

Re: @augyy A33 驱动 ov5640 问题

augyy 说:

終於解決registered sensor subdev 同找到OV5640 sensor.
但還有新問題 [VFE_WARN] Nobody is waiting on this video buffer,buf = xxxx. 是什麼解決?

log_camera.txt

问题怎么解决的 ,我a33 Linux 用ov2640 也遇到和你一样的问题,怎么解决的

[    4.001631] [sw_device]:sw_register_device_detect end!
[    4.001906] [sw_device]:sw_devices_events end!
[    4.034797] [VFE]Welcome to Video Front End driver
[    4.036174] [VFE]pdev->id = 0
[    4.036197] [VFE]dev->mipi_sel = 0
[    4.036208] [VFE]dev->vip_sel = 0
[    4.036215] [VFE]dev->isp_sel = 0
[    4.042369] [VFE_WARN]vfe vpu clock is null
[    4.042976] [ISP] isp platform_id = 3!
[    4.042991] [ISP] isp isp_get_driver = bf228d98!
[    4.043692] [VFE]vfe_init end
[    4.050236] [VFE]probe_work_handle start!
[    4.050266] [VFE]v4l2 subdev register input_num = 0
[    4.050315] axp22_dldo3: Failed to create debugfs directory
[    4.050335] axp22_ldoio0: Failed to create debugfs directory
[    4.050353] axp22_eldo2: Failed to create debugfs directory
[    4.050363] [VFE]vfe sensor detect start! input_num = 0
[    4.050377] [VFE]Find sensor name is "ov2640", i2c address is 60, type is "YUV" !
[    4.050387] [VFE]Sub device register "ov2640" i2c_addr = 0x60 start!
[    4.056822] [VFE_ERR]Error registering v4l2 subdevice No such device!
[    4.064204] [VFE_ERR]vfe sensor register check error at input_num = 0
[    4.073642] [VFE]V4L2 device registered as video0
[    4.073700] [VFE]register_early_suspend @ probe handle!
[    4.073709] [VFE]probe_work_handle end!

最近编辑记录 nbhonghong (2020-07-30 16:20:31)

离线

#22 2021-03-05 11:54:48

hxhlb
会员
注册时间: 2019-11-11
已发帖子: 27
积分: 27

Re: @augyy A33 驱动 ov5640 问题

nbhonghong 说:
augyy 说:

終於解決registered sensor subdev 同找到OV5640 sensor.
但還有新問題 [VFE_WARN] Nobody is waiting on this video buffer,buf = xxxx. 是什麼解決?

log_camera.txt

问题怎么解决的 ,我a33 Linux 用ov2640 也遇到和你一样的问题,怎么解决的

[    4.001631] [sw_device]:sw_register_device_detect end!
[    4.001906] [sw_device]:sw_devices_events end!
[    4.034797] [VFE]Welcome to Video Front End driver
[    4.036174] [VFE]pdev->id = 0
[    4.036197] [VFE]dev->mipi_sel = 0
[    4.036208] [VFE]dev->vip_sel = 0
[    4.036215] [VFE]dev->isp_sel = 0
[    4.042369] [VFE_WARN]vfe vpu clock is null
[    4.042976] [ISP] isp platform_id = 3!
[    4.042991] [ISP] isp isp_get_driver = bf228d98!
[    4.043692] [VFE]vfe_init end
[    4.050236] [VFE]probe_work_handle start!
[    4.050266] [VFE]v4l2 subdev register input_num = 0
[    4.050315] axp22_dldo3: Failed to create debugfs directory
[    4.050335] axp22_ldoio0: Failed to create debugfs directory
[    4.050353] axp22_eldo2: Failed to create debugfs directory
[    4.050363] [VFE]vfe sensor detect start! input_num = 0
[    4.050377] [VFE]Find sensor name is "ov2640", i2c address is 60, type is "YUV" !
[    4.050387] [VFE]Sub device register "ov2640" i2c_addr = 0x60 start!
[    4.056822] [VFE_ERR]Error registering v4l2 subdevice No such device!
[    4.064204] [VFE_ERR]vfe sensor register check error at input_num = 0
[    4.073642] [VFE]V4L2 device registered as video0
[    4.073700] [VFE]register_early_suspend @ probe handle!
[    4.073709] [VFE]probe_work_handle end!


唉,经过了3天的挣扎,发现如果在vfe_v4l2.ko加载之前加载ov5640.ko 就不会出那个问题了。。。哥们,试试。

虽然不出那个问题了,但是我这里依然不能用,我还要继续挣扎。。

[    6.547587] usbcore: registered new interface driver r8152
[    6.628724] RTL871X: module init start
[    6.633078] RTL871X: rtl8723bu v4.3.16_14189.20150519_BTCOEX20150119-5844
[    6.640630] RTL871X: build time: Dec  9 2020 10:56:49
[    6.646229] RTL871X: rtl8723bu BT-Coex version = BTCOEX20150119-5844
[    6.653294] sw_usb_enable_hcd: usbc_num = 1
[    6.657931] [rtl8188eu]: rtl8188eu module power set by axp.
[    6.664174] axp22_dldo1: Failed to create debugfs directory
[    6.670384] [rtl8188eu]: get power regulator  failed.
[    6.675983] [rtl8188eu]: regulator on.
[    6.680881] [rtl8188eu]: usb wifi power state: on
[    6.696303] usbcore: registered new interface driver rtl8723bu
[    6.702801] RTL871X: module init ret=0
[    6.808275] [VFE]Welcome to Video Front End driver
[    6.814122] [VFE]pdev->id = 0
[    6.817412] [VFE]dev->mipi_sel = 0
[    6.821198] [VFE]dev->vip_sel = 0
[    6.824869] [VFE]dev->isp_sel = 0
[    6.834633] [VFE_WARN]vfe vpu clock is null
[    6.840401] sunxi-pinctrl sunxi-pinctrl: pin already requested
[    6.846875] sunxi-pinctrl sunxi-pinctrl: pin-140 (csi0) status -22
[    6.853751] sunxi-pinctrl sunxi-pinctrl: could not get request pin 140 on device sunxi-pinctrl
[    6.863326] [VFE_ERR]vip0 request pinctrl handle for device [csi0] failed!
[    6.871048] [ISP] isp platform_id = 3!
[    6.875203] [ISP] isp isp_get_driver = bf304ca0!
[    6.880433] [VFE]vfe_init end
[    6.890075] [VFE]probe_work_handle start!
[    6.894548] [VFE]v4l2 subdev register input_num = 0
[    6.900068] axp22_dldo3: Failed to create debugfs directory
[    6.906283] axp22_ldoio0: Failed to create debugfs directory
[    6.912645] axp22_eldo2: Failed to create debugfs directory
[    6.918839] [VFE]vfe sensor detect start! input_num = 0
[    6.924674] [VFE]Find sensor name is "ov5640", i2c address is 78, type is "YUV" !
[    6.933004] [VFE]Sub device register "ov5640" i2c_addr = 0x78 start!
[    6.944770] [VFE]registered sensor subdev is OK!
[    6.949902] [VFE]Check sensor!
[    6.966913] [VFE]mclk on
[    6.990797] Get mali parameter successfully
[    6.995470] Init Mali gpu successfully
[    7.000933] Mali: Mali device driver loaded

[    7.024511] sunxi_i2c_do_xfer()950 - [i2c2] incomplete xfer (status: 0x20, dev addr: 0x3c)
[    7.033729] [VFE_DEV_I2C_ERR]cci_read_a16_d8 error! slave = 0x3c, addr = 0x300a, value = 0xef
[    7.033736]  sunxi_i2c_do_xfer()950 - [i2c2] incomplete xfer (status: 0x20, dev addr: 0x3c)
[    7.052675] [VFE_DEV_I2C_ERR]cci_read_a16_d8 error! slave = 0x3c, addr = 0x300a, value = 0xef
[    7.052681]  sunxi_i2c_do_xfer()950 - [i2c2] incomplete xfer (status: 0x20, dev addr: 0x3c)
[    7.071615] [VFE_DEV_I2C_ERR]cci_read_a16_d8 error! slave = 0x3c, addr = 0x300a, value = 0xef
[    7.071621]  [OV5640]error at sensor_detect
[    7.085716] [OV5640]chip found is not an target chip.
[    7.091327] [VFE]mclk off
[    7.118779] [VFE]vfe sensor subdev unregister!
[    7.123863] sensor_remove ov5640 sd = ee738e80!
[    7.128918] [VFE]Sub device register "ov5640" failed!
[    7.134533] [VFE_ERR]vfe sensor register check error at input_num = 0
[    7.141936] [VFE]V4L2 device registered as video0
[    7.147169] [VFE]register_early_suspend @ probe handle!
[    7.152977] [VFE]probe_work_handle end!

最近编辑记录 hxhlb (2021-03-05 11:56:48)

离线

#23 2021-03-05 13:33:57

hxhlb
会员
注册时间: 2019-11-11
已发帖子: 27
积分: 27

Re: @augyy A33 驱动 ov5640 问题

问题已解决,竟然是我把电源腿给用错了,前置用了后置的腿,后置却没启用,真是悲伤。

离线

页脚

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

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