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.

Dm368 IMX 36 sensor in RDK V4.1

Expert 1840 points

Dear,

I am working with DM368 camera and software V4.1. Before our camera use Aptina sensor but now we are using IMX36. We have already success in using rdk IMX36_3.1 release for our camera. I saw that in the V41 RDK also have IMX36 driver to support for this sensor so I changed the sensor setting in Rules.make file and recompile to support IMX 36 instead of Aptina as default. But the error which relate to I2C always happen. Please give me some explanation about this if you can, thank you very much!

  • Hello,

    SPI driver is not enabled in this release, so IMX series of sensor wont work as  this require SPI interface.

    This will be done in v5.0 targeted this month end, if possible i will share the SPI driver patch moment we have it working

    Regards,

    Raghu

  • Thanks for your quick reply, I am looking forward to hearing a good news from you.

  • Dear Raghu Kudva,

    I have received v5.0 and tried it. However it still got the same problem for my IMX Sensor camera DRV_spiOpen()

    So do you have any ideas? I surely say my camera has already worked with IMX V3.1 release.

    Thanks

    p/s: just in case this patch was not integrated in V5 please share it to me.

  • Hi Ragu and  Bioz,

    Do you have a solution for IMX036  and SPI  in IPNC-5.0.0 ?

    Regards.

  • Hi,

    still has no progress to me. I am trying to port the V3.1 IMX to V5.0 for support IMX sensor but nothing going on. Looking for Ragu cause He may know something from his comment.

    regards

  • Hello Raghu, could you comment on whether the newly released IPNC V5.0 can work with the included SPI driver to allow operation with IMX036, or whether we need to get a custom patch from you for this ? Appro's IPNC IMX036 software is stuck at 3.011 and not sure if there are plans for update to the new kernel. Any information about this would be appreciated.

  • Hello,

    We have got the SPI driver working on v5.0 code , and are testing it now, we will share it to you by this weekend

    Regards,

    Raghu

  • Thanks very much, we look forward to receiving it. Would it be on this forum, through Appro, or another method ?

  • Hello,

    PLease find this patch that needs to be updated in kernel over 5.0 IPNC release

    ALso, in Application code, please make following changes

    change spi mode in userspace

        drv_spi.c

        line16 change "mode" initial value from 16 to 8

    3.make device node in filesys init rcS (Edit ipnc_app/root_filesys/etc/init.d/rcS, add the line below to line 74)

        mknod -m 666 /dev/spidev0.0 c 153 0

    Regards,

    Raghu

    spi_kernel_patch.zip
  • Hello,

    If you still face issue, in file drivers/spi/davinci_spi.c

    Please uncomment this line

                              gpio_direction_output(pdata->chip_sel[i], 1);

    Regards,

    Raghu

  • Dear Raghu Kudva,

    Really thanks for your support. This Patch worked for me but still got 2 issues:


    1. Whenever I changed the resolution to 2MB the camera stopped.

    spi mode: 8
    bits per word: 8
    max speed: 12000000 Hz (12000 KHz)
    ############SET REG###########
    ############OPEN END###########
    TI Setting Applied
    queue id:196612

    FR : 0 users registered from exsiting face album
    IPNC_DM368_5.0.0 (root@ubuntu) (gcc version 4.3.3 (GCC) ) #2 PREEMPT Wed Apr 1
    IPNC AUTO_IRIS = 0

    The debug message was ended at above line.

    2. For the Resolution 3M, the color was wrong.

    Thanks

  • Bioz,

    Are you using TI2A? looks like some hang in 2A algo

    I checked with 2M and 3M mode and it works fine for me

    Can you share which sensor you are using?

    Regards,

    Raghu

  • Dear Raghu,

    We are using Sony IMX 36 3M, even I set TI or APPro 2A we got the same issues. I want to confirm that our system worked correctly with V3.1 IMX.

    Regards

  • Dear Raghu,

    I am using IPNC 5.0. Please let me know in IPNC 5.0 capture driver is based on v4l2 or appro based custom capture driver.

    Regards,

    panshi

  • Hello,

    It is not based on v4l2, it uses TI's AV_Capture framework

    Regards,

    Raghu

  • Dear Raghu,

    Thank you.

    Can I refer UserGuide-03.21.00.04 (Writing V4L2 Media Controller Applications on) which we received in IPNC 5.0 to understand AV capture framework? It describes V4l2 or TI's AV_Capture framework.

    Is the desrption in the document similar to IPNC 5.0 av capture implmentation?

    What is the difference between TI's AV_Capture framework and APPRO's av capture fremework.

    Please suggest good reference documents to understand the AV capture (sensor interface, interrupt ect).

    In boot log of IPNC 5.0 I am getting below boot log,

    [    0.975862] Linux media interface: v0.10
    [    0.976797] Linux video capture interface: v2.00
    [    0.979597] vpbe-osd vpbe-osd: OSD sub device probe success
    [    0.980800] vpbe-venc vpbe-venc: VENC sub device probe success
    [    0.981662] vpbe_display_init
    [    0.981894] vpbe_display_probe
    [    0.982060] vpbe-v4l2 vpbe-v4l2: vpbe v4l2 device registered
    [    0.982197] vpbe-venc: venc_set_ntsc

    What is the signifcane of the above boot log.

    is "[    0.976797] Linux video capture interface: v2.00 " mean that TI's AV capture framework?

    Regards,

    panshi

  • Hi,

    I tried the SPI patch. In boot log I am getting the error.

    mknod: /dev/spidev0.0: No space left on device

    with df -h command I can see rootfs 100% used

    Filesystem                Size      Used Available Use% Mounted on
    ubi0:rootfs              18.4M     18.4M         0 100% /
    /dev/mtdblock4            1.0M    136.0K    888.0K  13% /mnt/nand
    none                      5.0M         0      5.0M   0% /dev/shm
    none                     22.1M     20.0K     22.1M   0% /var/volatile/run
    none                     25.0M      4.0K     25.0M   0% /tmp
    /dev/ram0                 4.0M         0      4.0M   0% /mnt/ramdisk

    Please help.

  • Raghu, thanks very much for posting the IMX036 patch. We applied it and got the same results as bioz.

    D1, 720P, 1080P and 3MP resolutions work, but any attempt to set 2MP results in black screen even if resolution is set back to one of the previously working configurations.

    Then a simple restart shows wrong colors, but a reset to defaults followed by a restart restores the previous functionality.

    Maybe it's because 2MP is not valid for IMX036 ? The Appro version 3.1 did not show 2MP as a valid choice.

    Best Regards

     

  • Hi, This patch doesn't work for me, I am using RDK 5 release too.

    The line number looks match but when apply it, it will fail.  if I merge the patch mannually, there is error when compile  the kernel. 

    Could you help have a look?

    arch/arm/mach-davinci/board-dm368-ipnc.c:535: error: variable 'davinci_spi_sony_info' has initializer but incomplete type
    arch/arm/mach-davinci/board-dm368-ipnc.c:536: error: unknown field 'eeprom_size' specified in initializer
    arch/arm/mach-davinci/board-dm368-ipnc.c:536: warning: excess elements in struct initializer
    arch/arm/mach-davinci/board-dm368-ipnc.c:536: warning: (near initialization for 'davinci_spi_sony_info')
    arch/arm/mach-davinci/board-dm368-ipnc.c:537: error: unknown field 'page_size' specified in initializer
    arch/arm/mach-davinci/board-dm368-ipnc.c:537: warning: excess elements in struct initializer
    arch/arm/mach-davinci/board-dm368-ipnc.c:537: warning: (near initialization for 'davinci_spi_sony_info')
    arch/arm/mach-davinci/board-dm368-ipnc.c:538: error: unknown field 'page_mask' specified in initializer
    arch/arm/mach-davinci/board-dm368-ipnc.c:538: warning: excess elements in struct initializer
    arch/arm/mach-davinci/board-dm368-ipnc.c:538: warning: (near initialization for 'davinci_spi_sony_info')
    arch/arm/mach-davinci/board-dm368-ipnc.c:539: error: unknown field 'chip_sel' specified in initializer
    arch/arm/mach-davinci/board-dm368-ipnc.c:539: warning: excess elements in struct initializer
    arch/arm/mach-davinci/board-dm368-ipnc.c:539: warning: (near initialization for 'davinci_spi_sony_info')
    arch/arm/mach-davinci/board-dm368-ipnc.c:540: error: unknown field 'parts' specified in initializer
    arch/arm/mach-davinci/board-dm368-ipnc.c:540: warning: excess elements in struct initializer
    arch/arm/mach-davinci/board-dm368-ipnc.c:540: warning: (near initialization for 'davinci_spi_sony_info')
    arch/arm/mach-davinci/board-dm368-ipnc.c:541: error: unknown field 'nr_parts' specified in initializer
    arch/arm/mach-davinci/board-dm368-ipnc.c:541: warning: excess elements in struct initializer
    arch/arm/mach-davinci/board-dm368-ipnc.c:541: warning: (near initialization for 'davinci_spi_sony_info')
    arch/arm/mach-davinci/board-dm368-ipnc.c:542: error: unknown field 'commit_delay' specified in initializer
    arch/arm/mach-davinci/board-dm368-ipnc.c:542: warning: excess elements in struct initializer
    arch/arm/mach-davinci/board-dm368-ipnc.c:542: warning: (near initialization for 'davinci_spi_sony_info')
    make[4]: *** [arch/arm/mach-davinci/board-dm368-ipnc.o] Error 1
    make[3]: *** [arch/arm/mach-davinci] Error 2
    make[3]: Leaving directory `/home/easonwang/IPNCRDK500demo_only/Source/dvsdk_ipnctools/ipnc_psp_03_21_00_04/kernel'
    make[2]: *** [lspbuild] Error 2
    make[2]: Leaving directory `/home/easonwang/IPNCRDK500demo_only/Source/ipnc_rdk'
    make[1]: *** [lsp] Error 2
    make[1]: Leaving directory `/home/easonwang/IPNC

    BR,

    Eason

  • Hi Raghu,

              I have some questions for you about IMX036 sensor, which I am using on DM8127 IPNC.
    It may look out of context for this thread, but I couldn't get much help in my own thread.

            On DM8127, we wrote sensor driver for IMX036 for 1920*1080 resolution. We able to get the Image  on screen and via RTSP streaming.
    However in the image the top most 32 lines & bottom 6 lines appears to be garbage in all frames. This portion of the image is always black !!
    I can fix the issue in IPIPE level by cropping, but my Image tuning tool expecte a RAW Frame to process. Since my image frame contains garbage data, tuning is screwed up.

           So, I want to know how to resolve this issue..

             



  • hi,

    I used the patch and the PIO mode works well. But, I want to transfer compressed data to FPGA using spi on our dm368 board, so need to use SPI DMA mode. but this patch does not support DMA transfer.

    Please give me some suggestion about how to modify the spi driver to support dma transfer mode.

    thank much!