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: Camera Detection in Android SDK 4.3

Part Number: AM5728
Other Parts Discussed in Thread: TMDSCM572X

Hello TI Experts,

I have an AM572x Evaluation Module TMDSEVM572X with me.

With reference to this thread here, I have already done changes related to dtb files in Android SDK 4.3 (kernel 4.4). I have then built the dtbs, compiled SDK and flashed the image onboard eMMC as per this link.

Despite of doing all this, I still do not see any entry of /dev/video1 on the AM5728 EVM for camera. I am not sure if I am missing any step here.

Please help.

 

Best Regards,

Devashish Tiwari

  • Hello,

    I am wondering if you could please share the dts changes and the camera you are using. Also, please share the boot logs.

    Regards,
    Krunal

  • Hello,

    I am using TI Camera Module (TMDSCM572X AM57XX Camera Board REV C).

    1) Please note that I've done changes in dts files as according to the following commits :

    http://git.ti.com/../787ca747231dd0419f474619c430461985e40485

    http://git.ti.com/../9ca69167d1bcf3ecf58d3e0dcdca331e2099c1a6

    2) I am attaching two files : bootlogs.txt and logcat.txt to help you with detailed analysis.

    Best Regards,

    Devashish

    2844.bootlogs.txt

    4263.logcat.txt

    BOOTLOGS

    LOGCAT

  • Hello,

    This is a gentle reminder regarding my previous query. I am still waiting for your reply.

    BR,

    Devashish

  • Hello Devashish,

    I am still looking into the issue and please keep in mind that we have not tested the Camera on PSDK Android v4.3. Currently, I am internally discussing with our Android expert and I will get back to you in a couple of days. 

    Regards,
    Krunal 

  • Hello Devashish,

    If you are using the PSDK Android v4.3, please ignore the patch because "MT9T11" support is already enabled in the file am57xx-evm-common.dtsi. By default, we do not copy the camera module into the Android filesystem. As an experiment, please copy the file "ti-processor-sdk-android-am57xx-evm-04.03.00.05/board-support/linux-4.4.117+gitAUTOINC+eb496200ef-geb496200ef/drivers/media/i2c/mt9t11x.ko" to any Android partition of your choice. After copying the file, please run "insmod mt9t11x.ko" and the following prompt should be observed:

    am57xevm:/data # insmod mt9t11x.ko                                             
    [ 3654.008711] type=1400 audit(1521870640.197:19): avc: denied { read } for pid=202 comm="sh" path="/dev/ttyS2" dev="tmpfs" ino=6196 scontext=u:r:shell:s0 tcontext=u:object_r:serial_device:s0 tclass=chr_file permissive=1
    [ 3654.029851] mt9t11x 4-003c: input-clock-freq: 32000000
    [ 3654.035013] mt9t11x 4-003c: pixel-clock-freq: 96000000
    [ 3654.040595] type=1400 audit(1521872376.465:20): avc: denied { module_load } for pid=1153 comm="insmod" path="/data/mt9t11x.ko" dev="mmcblk0p15" ino=25 scontext=u:r:su:s0 tcontext=u:object_r:system_data_file:s0 tclass=system per1
    [ 3654.080730] mt9t11x 4-003c: mt9t111 chip ID 2680
    [ 3654.086848] vip2-s0: Port A: Using subdev mt9t11x for capture
    [ 3654.093762] vip2-s0: device registered as video1
    [ 3654.098409] mt9t11x 4-003c: mt9t11x sensor driver registered !!
    

    If the above experiment was successful, please modify the following file to copy the module from kernel directory to filesystem. Lastly, please use the following file as a reference to install the module. Rebuild the filesystem and upon boot the camera module should be installed automatically. 

    Regards,
    Krunal

     

  • Hello Krunal,

    The camera device entry (/dev/video1) is created in Linux SDK 5.3 when I do insmod ov1063x.ko . It means that camera has Omni Vision's OV1063X sensor.

    In Android PSDK 4.3, there is no such entry. Moreover, I aslo tried with mt9t11x.ko as suggested by you and got following output :

    am57xevm:/mnt # insmod mt9t11x.ko
    [  119.678490] type=1400 audit(1564032550.559:13): avc: denied { read } for pid=202 comm="sh" path="/dev/ttyS2" dev="tmpfs" ino=5546 scontext=u:r:shel1
    [  119.698301] type=1400 audit(1564032643.129:14): avc: denied { module_load } for pid=1063 comm="insmod" path="/mnt/mt9t11x.ko" dev="1
    

    I used to get same output with ov1063x.ko when I used to insert the driver earlier manually. But after doing dts/dtsi changes as suggested in the commits mentioned by me in previous posts, the ov1063x module was automatically inserted on boot up. 

    am57xevm:/mnt # lsmod
    
    Module                  Size         Used by
    pvrsrvkm              235829         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
    ov1063x                14068           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


    However, the /dev/video1 entry is still not present. Kindly help as I really think I am stuck right now.
    I am attaching boot logs of this experiment to help you with analysis.

    dmesg_logs.txt




    Regards,
    Devashish


  • Hi Devashish,

    If you are using the "TMDSCM572X AM57XX Camera Board REV C" camera that corresponds to "mt9t11". The only reason ov1063x enumerates because the following file adds the ko to the system. On my setup, I do not even have the ov1063x connected and no support in kernel dts file but it still shows up:

    gpio_pca953x            9709  0                                                                                                                                                                                                        
    tvp5158                 7072  0                                                                                                                                                                                                        
    ov490                   5014  0                                                                                                                                                                                                        
    ov1063x                14068  0                                                                                                                                                                                                        
    pixcir_i2c_ts           6920  0                                                                                                                                                                                                        
    ldc3001_ts              4718  0                                                                                                                                                                                                        
    goodix                  9068  0

    I am not sure what changes have you made on your system but I just installed PSDK4.3 and copied the pre-built files to the AM572x GP EVM. Next, I build the kernel without any software changes and copied the mt9t11x.ko to my Android system. After manually inserting the module, "/dev/video1" node was up.

    Regards,
    Krunal

     

  • Hi Krunal,

    The only thing that proves ov1063x being the driver for my setup is the fact that it works in Linux SDK . On my Linux setup, I have the ov1063x inserted and it shows that it is being used by some process. Camera works in Linux. The /dev/vdeo1 entry is created after I insert ov1063x.ko and the entry is deleted on removing the driver. 

    On following the procedure as described you, i.e., installing PSDK4.3 and copying the pre-built files to the AM572x GP EVM and copying mt9t11x.ko to Android system, I get following error :

    am57xevm:/mnt # insmod mt9t11x.ko                                              
    [ 8987.509169] type=1400 audit(1521868935.778:13): avc: denied { module_load } for pid=1251 comm="insmod" path="/mnt/mt9t11x.ko" dev="tmpfs" ino=22126 scontext=u:r:su:s0 tcontext=u:o1
    [ 8987.510919] mt9t11x 4-003c: input-clock-freq: 32000000
    [ 8987.510926] mt9t11x 4-003c: pixel-clock-freq: 96000000
    [ 8987.539732] type=1400 audit(1521877702.400:14): avc: denied { module_load } for pid=1380 comm="insmod" path="/mnt/mt9t11x.ko" dev="tmpfs" ino=22126 scontext=u:r:su:s0 tcontext=u:o1
    [ 8987.550106] mt9t11x 4-003c: Product ID error ffffff87
    

    Kindly let me know how should I proceed next as I am still not getting entry of /dev/video1 on my system.

    Regards,

    Devashish

  • Hello,

    I am wondering if the camera is seated properly because on the following thread, the issue was resolved by removing and installing the camera again. Also, using the same camera as your current setup, please install PSDK Linux v4.3 and post the output of the following command:" dmesg | grep "mt9t11"

    Regards,
    Krunal 

  • Hello,

    Following is the output as requested by you in PSDK Linux v4.03 :

    root@am57xx-evm:~# dmesg | grep mt9t11x
    [    9.444508] mt9t11x 4-003c: input-clock-freq: 32000000
    [    9.444514] mt9t11x 4-003c: pixel-clock-freq: 96000000
    [    9.444520] mt9t11x 4-003c: GPIO lookup for consumer reset
    [    9.444523] mt9t11x 4-003c: using device tree for GPIO lookup
    [    9.444582] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/ocp/i2c@4807c000/mt9t11x@3C[0]' - status (0)
    [    9.444593] mt9t11x 4-003c: GPIO lookup for consumer powerdown
    [    9.444596] mt9t11x 4-003c: using device tree for GPIO lookup
    [    9.444613] of_get_named_gpiod_flags: parsed 'powerdown-gpios' property of node '/ocp/i2c@4807c000/mt9t11x@3C[0]' - status (0)
    [    9.444621] mt9t11x 4-003c: GPIO lookup for consumer oscen
    [    9.444624] mt9t11x 4-003c: using device tree for GPIO lookup
    [    9.444639] of_get_named_gpiod_flags: parsed 'oscen-gpios' property of node '/ocp/i2c@4807c000/mt9t11x@3C[0]' - status (0)
    [    9.444645] mt9t11x 4-003c: GPIO lookup for consumer bufen
    [    9.444649] mt9t11x 4-003c: using device tree for GPIO lookup
    [    9.444665] of_get_named_gpiod_flags: parsed 'bufen-gpios' property of node '/ocp/i2c@4807c000/mt9t11x@3C[0]' - status (0)
    [    9.444674] mt9t11x 4-003c: GPIO lookup for consumer camen
    [    9.444676] mt9t11x 4-003c: using device tree for GPIO lookup
    [    9.444691] of_get_named_gpiod_flags: parsed 'camen-gpios' property of node '/ocp/i2c@4807c000/mt9t11x@3C[0]' - status (0)
    [    9.470481] mt9t11x 4-003c: Product ID error ffffff87
    
    
    

    Regards,

    Devashish

  • Hello Devashish,

    It seems like your camera is not working and I am wondering if you could please try another camera module.

    Regards,
    Krunal