Qualcomm msm8926 camera debugging notes, msm8926camera

Source: Internet
Author: User

Qualcomm msm8926 camera debugging notes, msm8926camera

Debugging a set of cameras on Qualcomm msm8926 a few days ago, ov5648 + imx135 was previously properly lit up, but a mini configuration version solution was needed in the future and must be compatible with ov2685 + ov8865, therefore, we should prepare for the preliminary debugging, and ask the camera module factory for the module spec and The datasheet of the chip. First, we should carefully read the ic datasheet and carefully check the module proofing drawings and the module spec, the first thing to confirm is that the voltage of each circuit of the ic can be properly supplied. Generally, you need to pay attention to DVDD, IOVDD, AVDD, and STANDBY and RESET, the connection of these pins should be compatible with the motherboard to ensure that the motherboard can be normally compatible with the camera module on the hardware, so I began to be fooled by the module factory, there is a set of DVDD voltage that can be used without power supply, and the ic can work normally. I read the ic datasheet and find it wrong, but since the module factory has confirmed that it is compatible, I was naive to believe it! Ah, the sorrow of kind programmers is so easy to trust others ,!

After the module factory provides the basic ic driver code, first you need to be compatible with this set of cameras in the kernel, Zhan Xun configures the Kconfig and Makefile of the Camera, as well as sensorcfg, the compatibility with the new Camera senssor can be basically completed, and the processing on Qualcomm is somewhat different. As the current Qualcomm platform has introduced the Device Tree dts to configure kernel information, regarding the Device Tree, for more information, see my blog, the first step is to configure the configuration information of the Camera ic i2c slave address chip and the gpio and e2prom of each control pin in the Device Tree, the module Manual does not have a uniform Writing Method for the device address. Some give 8-bit addresses and some give 7-bit addresses, which are easy to confuse at the beginning. If the address is an 8-bit address, the 8th-bit address indicates Write-0 or Read-1. The actual I2C chip address is a 7-bit address, and the address configured in the kernel is a real address, this requires special attention. Otherwise, i2c will fail, resulting in loading failure of the camera driver.

After configuring the relevant information, start the camera and test it. The camera is stopped and cannot be connected to the device. Capture the related kernel log and find that the match id fails. As a result, the driver cannot be loaded, I initially suspected that the related voltage could not work properly. I started the test with a voltage meter and found that the voltage seemed to be normal. Then I again suspected that there was a problem with the device's slave address, I have repeatedly confirmed with the module factory that they still said that this address is okay. Alas, this product is just a blind talk. As we all know, ov's FAE is very difficult to come to the site for debugging, therefore, you can only copy the oscilloscope and check it out first. It turns out that the voltage of the oscilloscope capture driver seems to be faulty. Although the power-on process is very short, it is still being captured several times, finally, I successfully caught the transient power-on timing waveform of the boot and load driver. I will analyze the log of the load driver again. The log is as follows:

<6>[    4.582687] synaptics_rmi4_i2c 5-0020: fwu_read_f34_queries perm:1, bl:1, display:0<3>[    4.594144] msm_camera_power_up type 2<3>[    4.599995] msm_camera_power_up index 1<3>[    4.602787] msm_camera_power_up type 2<3>[    4.608830] msm_camera_power_up index 2<3>[    4.611622] msm_camera_power_up type 2<3>[    4.617866] msm_camera_power_up index 3<3>[    4.620658] msm_camera_power_up type 2<3>[    4.630691] msm_camera_power_up index 4<3>[    4.633482] msm_camera_power_up type 1<3>[    4.637215] msm_camera_power_up index 5<3>[    4.641060] msm_camera_power_up type 1<3>[    4.644768] msm_camera_power_up:1023 gpio set val 37<3>[    4.655759] msm_camera_power_up index 6<3>[    4.658573] msm_camera_power_up type 1<3>[    4.662282] msm_camera_power_up index 7<3>[    4.666102] msm_camera_power_up type 1<3>[    4.669857] msm_camera_power_up index 8<3>[    4.673654] msm_camera_power_up type 1<3>[    4.677408] msm_camera_power_up:1023 gpio set val 37<3>[    4.693360] msm_camera_power_up index 9<3>[    4.696151] msm_camera_power_up type 1<3>[    4.699907] msm_camera_power_up index 10<3>[    4.703790] msm_camera_power_up type 0<3>[    4.718602] msm_camera_power_up index 11<3>[    4.721480] msm_camera_power_up type 3<3>[    4.725312] msm_camera_power_up exit<3>[    4.728945] msm_cci_irq:852 MASTER_0 error 10000000<3>[    4.733666] msm_cci_i2c_read:426 read_words = 0, exp words = 1<3>[    4.739474] msm_cci_i2c_read_bytes:504 failed rc -22<3>[    4.744398] msm_camera_cci_i2c_read: line 53 rc = -22<3>[    4.749454] msm_sensor_match_id: ov8865_q8v18a: read id failed<3>[    4.755249] msm_sensor_check_id:1055 match id failed rc -22<3>[    4.760824] msm_camera_power_down:1154<3>[    4.764581] msm_camera_power_down index 0<3>[    4.768552] msm_camera_power_down type 3<3>[    4.772434] msm_camera_power_down index 1<3>[    4.776427] msm_camera_power_down type 0<3>[    4.791392] msm_camera_power_down index 2<3>[    4.794358] msm_camera_power_down type 1<3>[    4.798288] msm_camera_power_down index 3<3>[    4.802256] msm_camera_power_down type 1<3>[    4.817189] msm_camera_power_down index 4<3>[    4.820213] msm_camera_power_down type 1<3>[    4.824060] msm_camera_power_down index 5<3>[    4.828076] msm_camera_power_down type 1<3>[    4.831959] msm_camera_power_down index 6<3>[    4.835951] msm_camera_power_down type 1<3>[    4.845902] msm_camera_power_down index 7<3>[    4.848890] msm_camera_power_down type 1<3>[    4.852773] msm_camera_power_down index 8<3>[    4.856766] msm_camera_power_down type 2<3>[    4.866952] msm_camera_power_down index 9<3>[    4.869942] msm_camera_power_down type 2<3>[    4.876452] msm_camera_power_down index 10<3>[    4.879527] msm_camera_power_down type 2<3>[    4.885664] msm_camera_power_down index 11<3>[    4.888740] msm_camera_power_down type 2<3>[    4.894707] msm_camera_power_down exit<3>[    4.897436] msm_sensor_platform_probe ov8865_q8v18a power up failed<4>[    4.903675] ovti,ov8865: probe of 20.qcom,camera failed with error -22<3>[    4.910245] ov8865_init_module:158 rc -19<3>[    4.915152] msm_sensor_platform_probe called data c0e98778<3>[    4.919663] msm_sensor_platform_probe pdev name (null)<3>[    4.924760] msm_sensor_get_dt_data qcom,sensor-name ov2685, rc 0<3>[    4.930771] msm_sensor_get_dt_data qcom,cci-master 0, rc 0<3>[    4.936217] msm_sensor_get_sub_module_index:125 src_node NULL<3>[    4.941968] msm_sensor_get_sub_module_index:141 eeprom src_node NULL<3>[    4.948305] msm_sensor_get_sub_module_index:169 src_node NULL<3>[    4.954014] msm_sensor_get_sub_module_index csiphy_core[0] = 1<3>[    4.959851] msm_sensor_get_sub_module_index csid_core[0] = 1<3>[    4.965469] msm_sensor_get_dt_data qcom,mount-angle 90, rc 0<3>[    4.971135] msm_sensor_get_dt_data qcom,sensor-position 1, rc 0<3>[    4.977014] msm_sensor_get_dt_data qcom,sensor-mode 1, rc 0<3>[    4.982594] msm_sensor_get_dt_csi_data qcom,csi-lane-assign 4320, rc 0<3>[    4.989102] msm_sensor_get_dt_csi_data qcom,csi-lane-mask 3, rc 0<3>[    4.995157] msm_camera_get_dt_vreg_data qcom,cam-vreg-name count 3<3>[    5.001343] msm_camera_get_dt_vreg_data reg_name[0] = cam_vdig<3>[    5.007136] msm_camera_get_dt_vreg_data reg_name[1] = cam_vio<3>[    5.012892] msm_camera_get_dt_vreg_data reg_name[2] = cam_vana<3>[    5.018704] msm_camera_get_dt_vreg_data cam_vreg[0].type = 0<3>[    5.024322] msm_camera_get_dt_vreg_data cam_vreg[1].type = 1<3>[    5.029987] msm_camera_get_dt_vreg_data cam_vreg[2].type = 0<3>[    5.035608] msm_camera_get_dt_vreg_data cam_vreg[0].min_voltage = 2050000<3>[    5.042399] msm_camera_get_dt_vreg_data cam_vreg[1].min_voltage = 2800000<3>[    5.049196] msm_camera_get_dt_vreg_data cam_vreg[2].min_voltage = 2850000<3>[    5.055921] msm_camera_get_dt_vreg_data cam_vreg[0].max_voltage = 2050000<3>[    5.062713] msm_camera_get_dt_vreg_data cam_vreg[1].max_voltage = 2800000<3>[    5.069519] msm_camera_get_dt_vreg_data cam_vreg[2].max_voltage = 2850000<3>[    5.076233] msm_camera_get_dt_vreg_data cam_vreg[0].op_mode = 200000<3>[    5.082592] msm_camera_get_dt_vreg_data cam_vreg[1].op_mode = 0<3>[    5.088493] msm_camera_get_dt_vreg_data cam_vreg[2].op_mode = 80000<3>[    5.094724] msm_camera_get_dt_power_setting_data qcom,cam-power-seq-type count -22<3>[    5.102345] msm_sensor_get_dt_data gpio count 2<3>[    5.106795] msm_sensor_get_dt_data gpio_array[0] = 26<3>[    5.111860] msm_sensor_get_dt_data gpio_array[1] = 35<3>[    5.116863] msm_camera_get_dt_gpio_req_tbl cam_gpio_req_tbl[0].gpio = 26<3>[    5.123565] msm_camera_get_dt_gpio_req_tbl cam_gpio_req_tbl[1].gpio = 35<3>[    5.130249] msm_camera_get_dt_gpio_req_tbl cam_gpio_req_tbl[0].flags = 1<3>[    5.136909] msm_camera_get_dt_gpio_req_tbl cam_gpio_req_tbl[1].flags = 0<3>[    5.143617] msm_camera_get_dt_gpio_req_tbl cam_gpio_req_tbl[0].label = CAMIF_MCLK<3>[    5.151082] msm_camera_get_dt_gpio_req_tbl cam_gpio_req_tbl[1].label = CAM_STANDBY<3>[    5.158640] msm_camera_get_dt_gpio_set_tbl cam_gpio_set_tbl[0].gpio = 35<3>[    5.165295] msm_camera_get_dt_gpio_set_tbl cam_gpio_set_tbl[1].gpio = 35<3>[    5.172003] msm_camera_get_dt_gpio_set_tbl cam_gpio_set_tbl[0].flags = 0<3>[    5.178684] msm_camera_get_dt_gpio_set_tbl cam_gpio_set_tbl[1].flags = 2<3>[    5.185349] msm_camera_get_dt_gpio_set_tbl cam_gpio_set_tbl[0].delay = 1000<3>[    5.192312] msm_camera_get_dt_gpio_set_tbl cam_gpio_set_tbl[1].delay = 4000<3>[    5.199265] msm_camera_init_gpio_pin_tbl qcom,gpio-reset 35<3>[    5.204797] msm_sensor_get_dt_actuator_data qcom,actuator-cam-name 0, rc -22<3>[    5.211848] msm_sensor_get_dt_data:291 slave addr 78 sensor reg 300a id 2685<3>[    5.218878] msm_sensor_get_dt_data qcom,misc_regulator (null), rc -22<3>[    5.225280] msm_camera_power_up:959<3>[    5.228782] msm_camera_power_up index 0<3>[    5.232568] msm_camera_power_up type 2<3>[    5.240940] msm_camera_power_up index 1<3>[    5.243731] msm_camera_power_up type 2<3>[    5.250775] msm_camera_power_up index 2<3>[    5.253566] msm_camera_power_up type 2<3>[    5.263427] msm_camera_power_up index 3<3>[    5.266218] msm_camera_power_up type 1<3>[    5.269976] msm_camera_power_up:1023 gpio set val 35<3>[    5.280925] msm_camera_power_up index 4<3>[    5.283716] msm_camera_power_up type 1<3>[    5.287473] msm_camera_power_up:1023 gpio set val 35<3>[    5.298422] msm_camera_power_up index 5<3>[    5.301212] msm_camera_power_up type 0<3>[    5.325996] msm_camera_power_up index 6<3>[    5.328812] msm_camera_power_up type 3<3>[    5.332624] msm_camera_power_up exit<3>[    5.427310] msm_cci_i2c_read: wait_for_completion_interruptible_timeout 410<3>[    5.527309] msm_cci_flush_queue:106 wait timeout<3>[    5.530899] msm_cci_i2c_read_bytes:504 failed rc -110<3>[    5.535916] msm_camera_cci_i2c_read: line 53 rc = -110<3>[    5.541063] msm_sensor_match_id: ov2685: read id failed<3>[    5.546247] msm_sensor_check_id:1055 match id failed rc -110<3>[    5.551911] msm_camera_power_down:1154<3>[    5.555665] msm_camera_power_down index 0<3>[    5.559638] msm_camera_power_down type 3<3>[    5.563521] msm_camera_power_down index 1<3>[    5.567571] msm_camera_power_down type 0<3>[    5.592458] msm_camera_power_down index 2<3>[    5.595424] msm_camera_power_down type 1<5>[    5.599370] fwu_start_reflash: Start of reflash process
Carefully analyze the log and find that there should be a problem with the i2c address, report a try attitude, shift the address, convert it to the desired real address, compile the code to find that the device still cannot be opened, carefully check the schematic diagram and proofing drawings, and let the hardware pull the dvdd to the control foot of a PMIC. I Want To compile and burn the file again according to the power-on sequence of datasheet, with an uneasy mood, I opened the camera and turned it on. I was so excited. I wiped it, and my module Factory almost gave up on this camera!

After the camera is still unable to open the camera, refer to the power-on timing and circuit schematic, The STANDBYf flying line to the motherboard on a non-gpio, I modified the poweron code according to the power-on timing, it is also normal to light up-now, it has basically completed compatibility with ov2685 + ov8865 on Qualcomm msm8926!

The debugging experience is as follows:

1 Camera driver loading failure is mostly caused by incorrect i2c and voltage. Make sure these are configured properly.

2. carefully analyze the kernel debugging log, add debugging information in key areas, and use the oscilloscope, voltmeter, and other auxiliary debugging devices to analyze the root cause of the failure.

3. Strictly follow spec and datasheet. Of course, make sure that your information is correct. Do not trust others' information easily, especially when debugging encounters problems, you need to eliminate various possible errors step by step

I hope these will help programmers who are suffering from normal debugging!


When debugging camera on the Qualcomm platform, if you cannot take a photo, an error is reported:

I don't know. I have never played smart phones.
 
Which of the following CPUs is more advantageous? Thank you very much.

6592 is much better than Yunlong 400, and 6592 is the eight-core synchronization A7 architecture. In general, Yunlong 600 can be used, but it is not comparable to 5420. In addition, the power consumption of 6592 is not low.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.