This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: Unable to create /dev/video1 node on Android PSDK 4.03

Part Number: AM5728
Other Parts Discussed in Thread: TMDSEVM572X

Hello,

I have an AM572x Evaluation Module TMDSEVM572X with me.  I am using TI Camera Module (TMDSCM572X AM57XX Camera Board REV C). And this camera works successfully on Linux PSDK (all versions).

I am trying to open camera preview on Android Processor SDK 4.03. I have also done HAL changes required in my opinion to open a camera preview on 4.03 SDK. I took "jacinto 6 auto evm" as base for doing changes around Camera HAL. Now, I want to test if my HAL changes are correct or not. 

However, I am not able to test as I am not getting /dev/video1 node up on my EVM when I flash 4.03 SDK. TI experts have claimed in multiple threads that it is certainly possible to bring /dev/video1 node up with 4.03 SDK. I am attaching references of these threads as follows:

According to this e2e thread - https://e2e.ti.com/support/processors/f/791/p/681672/3085716 , I did dtb changes required to add new camera module in 4.03 SDK

https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/commit?id=787ca747231dd0419f474619c430461985e40485&dt=2

https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/commit?id=9ca69167d1bcf3ecf58d3e0dcdca331e2099c1a6&dt=2

According to this e2e thread  (which was also posted by me) - https://e2e.ti.com/support/processors/f/791/t/821863 , I was not getting /dev/video1 node created. 

TI locked this thread without resolving my query.

 

Note that I am only getting /dev/video0 registered as vpe but not /dev/video1 as vip. I think those dtb commits are either incomplete or there is something else.

I am not sure what I am missing here. I am attaching some important outputs for your perusal. Please acknowledge.

I did not use pre-built images as I did those dtb changes. After flashing image on my EVM, I copied both drivers ov1063x.ko and mt9t11x.ko on Android system and manually inserted both of them but got no prints.

am57xevm:/mnt # lsmod                                                          
Module                  Size  Used by
mt9t11x                18837  0 
ov1063x                14068  0 
pvrsrvkm              288948  43 
prueth                 15164  0 
pru_rproc              12161  5 prueth
rpmsg_pru               5140  0 
pruss                  11442  2 prueth,pru_rproc
pruss_intc              7826  5 pru_rproc
snd_soc_tlv320aic3x    48807  1 
gpio_pca953x            9709  0 
tvp5158                 7072  0 
ov490                   5014  0 
pixcir_i2c_ts           6920  0 
ldc3001_ts              4718  0 
goodix                  9068  0 
input_polldev           4492  1 goodix
edt_ft5x06             11534  0 
pwm_bl                  4714  0 
led_bl                  2991  0 
gpio_backlight          2844  0 
leds_tlc591xx           5019  0 
panel_dpi               4046  1 
connector_hdmi          4197  1 
ti_fpd3_serdes          8523  0 
encoder_tpd12s015       3933  1 
encoder_tc358768        5932  0 
dra7_evm_encoder_tpd12s015     5442  0 
sd_mod                 31226  0 
usb_storage            48124  0 
scsi_mod              164778  2 sd_mod,usb_storage
wlcore_sdio             6907  0 
wl18xx                 85776  0 
wlcore                183653  1 wl18xx

VPE is getting registered but it can not be used for capture.


am57xevm:/ # dmesg | grep vpe                                                  
[    4.619785] init: starting service 'exec 1 (/vendor/bin/modprobe -a -d /vendor/lib/modules wl18xx.ko wlcore.ko wlcore_sdio.ko scsi_mod.ko usb-storage.ko sd_mod.ko dra7-evm-encoder.
[    4.701181] init: Command 'exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules wl18xx.ko wlcore.ko wlcore_sdio.ko scsi_mod.ko usb-storage.ko sd_mod.ko dr.
[    5.145705] vpe 489d0000.vpe: loading firmware vpdma-1b8.bin
[    5.249518] init: Service 'exec 1 (/vendor/bin/modprobe -a -d /vendor/lib/modules wl18xx.ko wlcore.ko wlcore_sdio.ko scsi_mod.ko usb-storage.ko sd_mod.ko dra7-evm-encoder-tpd12s01s
[    6.820615] vpe 489d0000.vpe: Device registered as /dev/video0

am57xevm:/ # dmesg | grep ov1063x

--- no output----

am57xevm:/ # dmesg | grep vip

----- no output -----

ov10635 is driver responsible for my camera, I have confirmed this from results from Linux PSDK. 

Thanks & Regards

Devashish

  • UPDATE :

    I modified "am57xx-evm-common.dtsi" file to include OV10635 support. Earlier MT9T11 entry was present in this file.

    But since, OV10635 is actually the driver responsible for my camera, I modified this file to include OV10635 support.

    After doing this, I recompiled kernel and aosp and flashed the image on my EVM. After copying the file "ti-processor-sdk-android-am57xx-evm-04.03.00.05/board-support/linux-4.4.117+gitAUTOINC+eb496200ef- geb496200ef/drivers/media/i2c/ov1063x.ko" to Android filesystem and manually inserting it, I get following error -

    am57xevm:/mnt # insmod ov1063x.ko                                              
    [  109.493092] ov1063x 4-0030: Failed writing register 0x0103!
    [  109.498731] ov1063x: probe of 4-0030 failed with error -121

    I am now getting both vpe & vip loaded but unable to load my camera sensor driver (ov1063x.ko).

    am57xevm:/mnt # dmesg | grep vpe                                               
    [    2.435069] vpe 489d0000.vpe: loading firmware vpdma-1b8.bin
    [    2.459925] vpe 489d0000.vpe: Device registered as /dev/video0
    
    
    
    am57xevm:/mnt # dmesg | grep vip                                               
    [    2.442171] vip 48990000.vip: loading firmware vpdma-1b8.bin
    [    2.470499] vip 48990000.vip: VPDMA firmware loaded
    

    Kindly acknowledge and revert back.

    Thanks,

    Devashish

  • Devashish,

    Reiterating the disclaimer as you have opened multiple camera questions. 
    Camera is not supported on android sdk for am57x devices. all of the information below is just tips/recomendation.

    --

    Thats not the proper way to install  or take a external module from linuxFS to AndroidFS

    Android Kernel and Linux kernel branches are different so there could be many
    things different between the drivers and their properties.

    --

    Look in device/ti/am57xevm project and see how modules are handled.

    Also the vpdma firmware initialization happens early during boot cycle when driver is initialized ,

    So either make vpdma fw as built-in kernel

    "or"

    have firmware located and initialized in same place as other such images

    (tip:  check the graphics kernel and user binary initialization method in hardware/ti/<soc> project) 

  • Hello Praneeth,

    Thanks for your response. The reason I opened multiple threads because I have been working continuously to make camera work in Android sdk. And I am also well aware of the fact that TI doesn't support camera on android sdk yet for am57x devices.

    -

    Also, It seems like you haven't read my post properly. I haven't copied any module from linuxFS to AndroidFS.  Please see the path I have mentioned again. 

    -

    I went through device/ti/am57xevm/BoardConfig.mk and device/ti/am57xevm/init.am57xevmboard.rc to check how modules are handled. So I know about it.

    The VPDMA_LOADER_FW is already a part of built-in kernel in 4.03 SDK, as I am able to check from kernel config.

    -

    Anyways, my question was specifically about why I am not able to register my camera sensor OV10635 in 4.03 SDK? It's quite surprising because on other TI threads (links to which I mentioned in original question) claim that /dev/video1 node is created in 4.03 SDK.

    am57xevm:/ # dmesg | grep ov1063x
    [    5.104709] ov1063x 4-0030: Failed writing register 0x0103!
    [    5.110421] ov1063x: probe of 4-0030 failed with error -121
    

  • Hello Devashish,

    Could you please decompile your DTB and confirm if the "ov1063x" node is preset?

    Regards,
    Krunal