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.

ENABLE I2C2 IN BEAGLE XM

Other Parts Discussed in Thread: OMAP3530

hi all,

         i am using Beagle xm Android ics source code in that i want to enable the bus 2 i2c for camera interfacing i have added mt9t111 sensor in the board file but its not responding

ERROR COMING IN LOG:

mt9t111 2-003c: Unable to detectmt9t111sensor

isp_register_subdev: Unable to register subdev mt9t111

thanks,

shan

  • Hi Shan,

    It seems that you have problems with the I2C communication but I couldn't obtain enough information from the log which you post.

    There is some useful information which I found about I2C:

    http://processors.wiki.ti.com/index.php/I2C_Tips

    http://www.jumpnowtek.com/index.php?option=com_content&view=article&id=69&Itemid=78

    BR

    Tsvetolin Shulev

  • hi Tsvetolin Shulev,

                        i am a begineer in linux  C i tried to solve the issue but i cant, but i found out  what the error is occurring. herewith i have attached the log file and source code can you provide me assistance with these.


    ERROR WHICH I HAVE FOUND WAS:

    i2c address is not passing

    before getting i2c address the xclk is coming as 24mhz correctly but after that it goes to the power down sequence

    These error you can easily find out in log file

    LOG FILE:



    Texas Instruments X-Loader 1.51 (Oct 18 2012 - 11:49:53)
    Unsupported Chip!
    Beagle xM Rev C
    Starting X-loader on MMC
    Reading boot sector

    213256 Bytes Read from MMC
    Starting OS Bootloader from MMC...
    Starting OS Bootloader...


    U-Boot 2010.06 (Oct 18 2012 - 11:51:14)

    OMAP34xx/35xx-GP ES2.1, CPU-OPP2 L3-165MHz
    OMAP3 Beagle board + LPDDR/NAND
    I2C:   ready
    DRAM:  384 MiB
    NAND:  HW ECC [Kernel/FS layout] selected
    0 MiB
    *** Warning - bad CRC or NAND, using default environment

    In:    serial
    Out:   serial
    Err:   serial
    Beagle xM Rev A/C
    Die ID #74b200229ff800000160a7450501d026
    Hit any key to stop autoboot: 10 ### 9 ### 8 ### 7 ### 0
    OMAP3 beagleboard.org # mmc init
    mmc1 is available
    OMAP3 beagleboard.org # fatload mmc 0 82000000 uImage
    reading uImage

    3265972 bytes read
    OMAP3 beagleboard.org # setenv bootargs 'console=ttyO2,115200n8 mem=256M root=/d
    ev/mmcblk0p2 rw rootfstype=ext4 rootdelay=1 init=/init omap_vout.vid1_static_vrf
    b_alloc=y vram=8M omapfb.vram=0:8M '
    OMAP3 beagleboard.org # bootm 0x82000000
    ## Booting kernel from Legacy Image at 82000000 ...
       Image Name:   Linux-2.6.37-g5c414d7-dirty
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    3265908 Bytes = 3.1 MiB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
       Loading Kernel Image ... OK
    OK

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    Linux version 2.6.37-g5c414d7-dirty (oviserver@oviserver-Vostro-260s) (gcc versi
    on 4.4.3 (GCC) ) #95 Fri Jan 25 11:46:11 IST 2013
    CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
    CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
    Machine: OMAP3 Beagle Board
    Reserving 8388608 bytes SDRAM for VRAM
    Memory policy: ECC disabled, Data cache writeback
    OMAP3630 ES1.2 (l2cache iva sgx neon isp 192mhz_clk )
    SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x10000
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 62976
    Kernel command line: console=ttyO2,115200n8 mem=256M root=/dev/mmcblk0p2 rw root
    fstype=ext4 rootdelay=1 init=/init omap_vout.vid1_static_vrfb_alloc=y vram=8M om
    apfb.vram=0:8M
    PID hash table entries: 1024 (order: 0, 4096 bytes)
    Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    Memory: 248MB = 248MB total
    Memory: 243996k/243996k available, 18148k reserved, 0K highmem
    Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000   (   4 kB)
        fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
        DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
        vmalloc : 0xd0800000 - 0xf8000000   ( 632 MB)
        lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
        modules : 0xbf000000 - 0xc0000000   (  16 MB)
          .init : 0xc0008000 - 0xc003e000   ( 216 kB)
          .text : 0xc003e000 - 0xc0667000   (6308 kB)
          .data : 0xc0668000 - 0xc06b5ac0   ( 311 kB)
    NR_IRQS:409
    Clocking rate (Crystal/Core/MPU): 26.0/400/600 MHz
    Reprogramming SDRC clock to 400000000 Hz
    dpll3_m2_clk rate change failed: -22
    IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
    Total of 96 interrupts on 1 active controller
    GPMC revision 5.0
    Trying to install interrupt handler for IRQ402
    Trying to install interrupt handler for IRQ403
    Trying to install interrupt handler for IRQ404
    Trying to install interrupt handler for IRQ405
    Trying to install interrupt handler for IRQ406
    Trying to install interrupt handler for IRQ407
    Trying to install interrupt handler for IRQ408
    Trying to install type control for IRQ409
    Trying to set irq flags for IRQ409
    OMAP clockevent source: GPTIMER1 at 32768 Hz
    Console: colour dummy device 80x30
    Calibrating delay loop... 597.64 BogoMIPS (lpj=2334720)
    pid_max: default: 32768 minimum: 301
    Security Framework initialized
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    regulator: core version 0.5
    regulator: dummy:
    NET: Registered protocol family 16
    OMAP GPIO hardware version 2.5
    OMAP GPIO hardware version 2.5
    OMAP GPIO hardware version 2.5
    OMAP GPIO hardware version 2.5
    OMAP GPIO hardware version 2.5
    OMAP GPIO hardware version 2.5
    omap_mux_init: Add partition: #1: core, flags: 0
    OMAP3 Beagle Rev: xM C
    Found NAND on CS0
    Registering NAND on CS0
    Unable to get DVI reset GPIO
    deviceless supply cam_1v8 not found, using dummy regulator
    deviceless supply cam_2v8 not found, using dummy regulator
    OVIYA  beagle_cam_init  
    hw-breakpoint: debug architecture 0x4 unsupported.
    OMAP DMA hardware revision 5.0
    bio: create slab <bio-0> at 0
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    omap_i2c omap_i2c.1: bus 1 rev4.0 at 2600 kHz
    twl4030: PIH (irq 7) chaining IRQs 368..375
    twl4030: power (irq 373) chaining IRQs 376..383
    twl4030: gpio (irq 368) chaining IRQs 384..401
    regulator: VUSB1V5: 1500 mV normal standby
    regulator: VUSB1V8: 1800 mV normal standby
    regulator: VUSB3V1: 3100 mV normal standby
    twl4030_usb twl4030_usb: Initialized TWL4030 USB module
    regulator: VMMC1: 1850 <--> 3150 mV at 3000 mV normal standby
    regulator: VDAC: 1800 mV normal standby
    regulator: VDVI: 1800 mV normal standby
    regulator: VSIM: 1800 <--> 3000 mV at 1800 mV normal standby
    regulator: VAUX3: 1800 mV normal standby
    regulator: VAUX4: 1800 mV normal standby
    omap_i2c omap_i2c.2: bus 2 rev4.0 at 100 kHz
    omap_i2c omap_i2c.3: bus 3 rev4.0 at 100 kHz
    Advanced Linux Sound Architecture Driver Version 1.0.23.
    Switching to clocksource 32k_counter
    musb-hdrc: version 6.0, otg (peripheral+host), debug=0
    musb-hdrc musb-hdrc.0: dma type: dma-inventra
    musb-hdrc musb-hdrc.0: USB OTG mode controller at fa0ab000 using DMA, IRQ 92
    NET: Registered protocol family 2
    IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
    TCP established hash table entries: 8192 (order: 4, 65536 bytes)
    TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
    TCP: Hash tables configured (established 8192 bind 8192)
    TCP reno registered
    UDP hash table entries: 256 (order: 0, 4096 bytes)
    UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    NET: Registered protocol family 1
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    NetWinder Floating Point Emulator V0.97 (double precision)
    omap-iommu omap-iommu.0: isp registered
    AM37x/DM37x  Linux PSP version 04.02.00.07 (OMAP3BEAGLE)
    ashmem: initialized
    VFS: Disk quotas dquot_6.5.2
    Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
    msgmni has been set to 476
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    OMAP DSS rev 2.0
    OMAP DISPC rev 3.0
    OMAP VENC rev 2
    OMAP DSI rev 1.0
    Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
    omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
    omap_uart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2
    console [ttyO2] enabled
    omap_uart.3: ttyO3 at MMIO 0x49042000 (irq = 80) is a OMAP UART3
    brd: module loaded
    loop: module loaded
    mtdoops: mtd device (mtddev=name/number) must be supplied
    omap2-nand driver initializing
    No NAND device found.
    No NAND device found.
    OneNAND driver initializing
    usbcore: registered new interface driver asix
    usbcore: registered new interface driver cdc_ether
    usbcore: registered new interface driver smsc95xx
    usbcore: registered new interface driver net1080
    usbcore: registered new interface driver cdc_subset
    usbcore: registered new interface driver zaurus
    ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    ehci-omap.0 supply hsusb0 not found, using dummy regulator
    ehci-omap.0 supply hsusb1 not found, using dummy regulator
    ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
    ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
    ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
    ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
    usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb1: Product: OMAP-EHCI Host Controller
    usb usb1: Manufacturer: Linux 2.6.37-g5c414d7-dirty ehci_hcd
    usb usb1: SerialNumber: ehci-omap.0
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 3 ports detected
    Initializing USB Mass Storage driver...
    usbcore: registered new interface driver usb-storage
    USB Mass Storage support registered.
    android init
    android_probe pdata: c06780e4
    android_bind
    android_usb gadget: android_usb ready
    musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 2
    usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb2: Product: MUSB HDRC host driver
    usb usb2: Manufacturer: Linux 2.6.37-g5c414d7-dirty musb-hcd
    usb usb2: SerialNumber: musb-hdrc.0
    hub 2-0:1.0: USB hub found
    hub 2-0:1.0: 1 port detected
    mice: PS/2 mouse device common for all mice
    input: gpio-keys as /devices/platform/gpio-keys/input/input0
    input: twl4030_pwrbutton as /devices/platform/omap/omap_i2c.1/i2c-1/1-0049/twl40
    30_pwrbutton/input/input1
    using rtc device, twl_rtc, for alarms
    twl_rtc twl_rtc: rtc core: registered twl_rtc as rtc0
    twl_rtc twl_rtc: Power up reset detected.
    twl_rtc twl_rtc: Enabling TWL-RTC.
    i2c /dev entries driver
    Linux media interface: v0.10
    Linux video capture interface: v2.00
    OVIYA MT9T111 Init +++++++++++++++++++++++++OVIYA ISP PROBE ++++++
    omap3isp supply VDD_CSIPHY1 not found, using dummy regulator
    omap3isp supply VDD_CSIPHY2 not found, using dummy regulator
    OVIYA ISP ENABLE CLOCK +++++++++++++
    omap3isp omap3isp: Revision 15.0 found
    omap-iommu omap-iommu.0: isp: version 1.1
    OVIYA MT9T111 Probe +++++++++++++++++++++++++OVIYA RST  >>> 0OVIYA ISP isp_set_x
    clk
    OVIYA ISP    isp_set_xclk  214  xclk= 0  div= 7 cclk= 24685714   mclk 172800000
     
    OVIYA BOARD SET XCLK -----------------OVIYA RST  >>> 1 OVIYA RVAL S POWER ------
    --= 0
    OVIYA  Chip  3c   Reg 300a   mt9t111_read_reg  
    mt9t111_read_reg:write reg error:reg=300a
    OVIYA READ REG val=49255  ID  12298   ID_VAL 86    mt9t111_detect  
    OVIYA RVAL IN INIT -------------- -19
    mt9t111 2-003c: Unable to detectmt9t111sensor
    OVIYA POWER DOWN beagle_mt9v113_s_power OVIYA ISP isp_set_xclk
    OVIYA ISP    isp_set_xclk  214  xclk= 0  div= 0 cclk= 0   mclk 172800000  
    isp_register_subdev_group: Unable to register subdev mt9t111
    usbcore: registered new interface driver uvcvideo
    USB Video Class driver (v1.0.0)
    OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
    twl4030_wdt twl4030_wdt: Failed to register misc device
    twl4030_wdt: probe of twl4030_wdt failed with error -16
    device-mapper: uevent: version 1.0.3
    device-mapper: ioctl: 4.18.0-ioctl (2010-06-29) initialised: dm-devel@redhat.com
    usbcore: registered new interface driver usbhid
    usbhid: USB HID core driver
    logger: created 64K log 'log_main'
    logger: created 256K log 'log_events'
    logger: created 64K log 'log_radio'
    logger: created 64K log 'log_system'
    usbcore: registered new interface driver snd-usb-audio
    OMAP3 Beagle/Devkit8000 SoC init
    usb 1-2: new high speed USB device using ehci-omap and address 2
    asoc: twl4030-hifi <-> omap-mcbsp-dai.1 mapping ok
    ALSA device list:
      #0: omap3beagle
    oprofile: hardware counters not available
    oprofile: using timer interrupt.
    TCP cubic registered
    Initializing XFRM netlink socket
    NET: Registered protocol family 10
    IPv6 over IPv4 tunneling driver
    NET: Registered protocol family 17
    NET: Registered protocol family 15
    Registering the dns_resolver key type
    VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    ThumbEE CPU extension supported.
    Power Management for TI OMAP3.
    smartreflex smartreflex.0: omap_sr_probe: SmartReflex driver initialized
    smartreflex smartreflex.1: omap_sr_probe: SmartReflex driver initialized
    SmartReflex Class3 initialized
    clock: disabling unused clocks to save power
    platform iva.0: omap_voltage_scale: Already at the requestedrate 800000000
    platform mpu.0: omap_voltage_scale: Already at the requestedrate 1000000000
    usb 1-2: New USB device found, idVendor=0424, idProduct=9514
    usb 1-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    hub 1-2:1.0: USB hub found
    hub 1-2:1.0: 5 ports detected
    regulator_init_complete: incomplete constraints, leaving VAUX3 on
    regulator_init_complete: incomplete constraints, leaving VDAC on
    twl_rtc twl_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
    omap_vout omap_vout: Buffer Size = 3686400
    omap_vout omap_vout: : registered and initialized video device 15
    omap_vout omap_vout: Buffer Size = 3686400
    omap_vout omap_vout: : registered and initialized video device 16
    Waiting 1sec before mounting root device...
    mmc0: host does not support reading read-only switch. assuming write-enable.
    mmc0: new high speed SDHC card at address aaaa
    mmcblk0: mmc0:aaaa SU04G 3.69 GiB
     mmcblk0: p1 p2 p3
    usb 1-2.1: new high speed USB device using ehci-omap and address 3
    usb 1-2.1: New USB device found, idVendor=0424, idProduct=ec00
    usb 1-2.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    smsc95xx v1.0.4
    smsc95xx 1-2.1:1.0: usb0: register 'smsc95xx' at usb-ehci-omap.0-2.1, smsc95xx U
    SB 2.0 Ethernet, 92:74:ed:c5:e8:76
    EXT4-fs (mmcblk0p2): warning: maximal mount count reached, running e2fsck is rec
    ommended
    EXT4-fs (mmcblk0p2): recovery complete
    EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    VFS: Mounted root (ext4 filesystem) on device 179:2.
    Freeing init memory: 216K
    Failed to execute /init.  Attempting defaults...
    INIT: version 2.86 booting
    Please wait: booting...
    Starting udev
    udev: starting version 151
    udevd (716): /proc/716/oom_adj is deprecated, please use /proc/716/oom_score_adj
     instead.
    usb_id[726]: unable to access '/devices/platform/musb-omap2430/musb-hdrc.0/usb2'

    usb_id[748]: unable to access '/devices/platform/musb-omap2430/musb-hdrc.0/usb2'

    Remounting root file system...
    EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    Caching udev devnodes
    Populating dev cache
    root: mount: mount point /proc/bus/usb does not exist
    ALSA: Restoring mixer settings...
    Configuring network interfaces... /usr/sbin/alsactl: parse:1655: Unable to open
    file '/usr/share/alsa/init/00main': No such file or directory
    ifconfig: SIOCGIFFLAGS: No such device
    ifconfig: SIOCGIFFLAGS: No such device
    eth0      No such device

    ifconfig: SIOCGIFFLAGS: No such device
    usb0      no wireless extensions.

    udhcpc (v1.13.2) started
    run-parts: /etc/udhcpc.d/00avahi-autoipd exited with code 1
    Sending discover...
    Sending discover...
    Sending discover...
    No lease, forking to background
    done.
    Starting portmap daemon: portmap.
    net.ipv4.conf.default.rp_filter = 1
    net.ipv4.conf.all.rp_filter = 1
    Tue Jan 11 10:13:00 GMT 2011
    INIT: Entering runlevel: 5
    Starting system message bus: dbus.
    Starting Hardware abstraction layer hald
    OVIYA ISP ENABLE CLOCK +++++++++++++Starting Dropbear SSH server: dropbear.
    Starting advanced power management daemon: No APM support in kernel
    (failed.)
    Starting Vixie-cron.
    Starting Samba: smbd nmbd.
    Starting syslogd/klogd: done
    Starting internet superserver: xinetd.
     * Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon
     *[fail]
    Starting Network connection manager daemon: NetworkManager.
    Loading kernel modules for gstreamer-ti...
    Running /usr/share/ti/gst/omap3530/loadmodules.shFATAL: Module cmemk not found.
    FATAL: Module dsplinkk not found.
    FATAL: Module lpm_omap3530 not found.
    FATAL: Module sdmak not found.
      done
    Starting PVR
    Usage: insmod filename [args]
    FATAL: Module omaplfb not found.
    FATAL: Module bufferclass_ti not found.
    BusyBox v1.13.2 (2011-01-04 12:34:55 CET) multi-call binary

    Usage: mknod [OPTIONS] NAME TYPE MAJOR MINOR

    Create a special file (block, character, or pipe)

    Options:
        -m    Create the special file using the specified mode (default a=rw)
    TYPEs include:
        b:    Make a block device
        c or u:    Make a character device
        p:    Make a named pipe (MAJOR and MINOR are ignored)

    chmod: /dev/pvrsrvkm: No such file or directory
    Starting GNOME Display Manager gdm

    .-------.                                           
    |       |                  .-.                      
    |   |   |-----.-----.-----.| |   .----..-----.-----.
    |       |     | __  |  ---'| '--.|  .-'|     |     |
    |   |   |  |  |     |---  ||  --'|  |  |  '  | | | |
    '---'---'--'--'--.  |-----''----''--'  '-----'-'-'-'
                    -'  |
                    '---'

    The Angstrom Distribution beagleboard ttyO2

    Angstrom 2010.7-test-20110104 beagleboard ttyO2

    beagleboard login: root
    root@beagleboard:~#
    root@beagleboard:~#
    root@beagleboard:~# ls
    Desktop
    root@beagleboard:~# cd /
    root@beagleboard:/# ./capture
    OVIYA ISP ENABLE CLOCK +++++++++++++OPENED main 695
    /dev/video0 is no video capture device
    root@beagleboard:/#
    usb 1-2:

    thanks

    shan1638.board-omap3beagle.c0724.mt9t111.c4718.isp.c