USB OTG connection to SAM3X from Ubuntu?

Discussion in 'Linux Ubuntu' started by garthz, Dec 26, 2013.

  1. garthz

    garthz New Member

    Joined:
    Dec 26, 2013
    Messages:
    2
    Likes Received:
    0
    Hello all,

    Has anybody succeeded in getting the i.MX6 to provide a USB OTG connection to the SAM3X under Ubuntu? I'd like to try using the 'native' SerialUSB implementation on the Arduino side for faster serial data transfer from the Linux CPU.

    The UDOO Starting Manual Rev 0.4 describes this option, but only for Android.

    The UDOO Block Diagram Rev 1.1 shows GPIO_8 controlling the switch connecting USB_OTG to either the external connector CN3 or the SAM3X. However, the UDOO Rev D Schematics show USB_OTG_SEL connected to EIM_WAIT. Which is correct?

    lsusb shows four devices, but none looks like the Arduino:
    ubuntu@udoo:~$ lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
    Bus 002 Device 003: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter

    For reference, an actual Arduino Due plugged in using the Native port identifies as follows:
    Bus 002 Device 004: ID 2341:003e

    It appears that some kind of driver is loaded at boot:

    ubuntu@udoo:~$ dmesg | grep -i otg
    [ 0.906609] Freescale USB OTG Driver loaded, $Revision: 1.55 $
    [ 1.949682] ARC USBOTG Device Controller driver (1 August 2005)
    [ 1.995865] Suspend udc for OTG auto detect

    I have used the Arduino Native/CDC USB port before from a x86_64 Debian Linux desktop, so I know in principle it is possible. On that machine the Arduino enumerated as /dev/ttyACM0.

    I am using a UDOO Quad Rev D with a stock sdcard image udoo_quad_ubuntu1204_v2.0.img:

    ubuntu@udoo:~$ uname -a
    Linux udoo 3.0.35 #1 SMP PREEMPT Thu Nov 28 13:14:24 CET 2013 armv7l armv7l armv7l GNU/Linux

    Does anyone have any advice?

    Thanks,

    Garth
     
  2. Hackbeere

    Hackbeere New Member

    Joined:
    Feb 26, 2014
    Messages:
    6
    Likes Received:
    0
    I have the same problem. I'm using Ubuntu 12.04 v2.1. Does anybody have an idea?
     
  3. Hackbeere

    Hackbeere New Member

    Joined:
    Feb 26, 2014
    Messages:
    6
    Likes Received:
    0
    Does anybody managed an OTG connection from Ubuntu (host) to SAM3X (device)?
     
  4. arthur

    arthur New Member

    Joined:
    Jul 7, 2014
    Messages:
    2
    Likes Received:
    0
    In Android ADK use case, Arduino (SAM3X) side is the USB host and Android (iMx6) side is the USB device.
    After checking the schematic, my thought had been confirmed.
    It seems there's no way to exchange the USB roles, to let iMx6 be the USB host and SAM3x to be the USB device, without modify the board.
     
  5. garthz

    garthz New Member

    Joined:
    Dec 26, 2013
    Messages:
    2
    Likes Received:
    0
    We have not yet attempted this, but here was an answer received by email from the Udoo team:

    To change pad settins you need to recompile UDOO kernel. The platform file that sets the pin muxing is located in /arch/arm/mach-mx6/board-mx6**.h
    On this file you can call macros that enable different iomux functions. To see pad alternatives please refer to Freescale imx6 processor reference manual.
     
  6. Oskar

    Oskar New Member

    Joined:
    Jan 21, 2014
    Messages:
    11
    Likes Received:
    0
    I'm not able to connect via the OTG usb from the mx6 to sam3x, running the latest UDOObuntu.
    I've done this with a arduino due and a linux laptop, worked great.

    Is the situation still that the kernel needs modification for this to work?
    If so, is there some relatively detailed information on how to do this available from somewhere?
     

Share This Page