USB Gadget w. kernel 3.10.1

Started by devslashfoo, July 22, 2013, 06:00:08 PM

Previous topic - Next topic

devslashfoo

I'm having problems getting USB gadget support working with iMX233-OLinuXino-Micro. According to an earlier (ancient) thread, it can be (and has been) done: https://www.olimex.com/forum/index.php?topic=169.0

USB host is working perfectly. However, the best I've got with USB device is:
[    0.770000] imx_usb 80080000.usb: pinctrl get/select failed, err=-19
[    0.780000] ci_hdrc ci_hdrc.0: doesn't support host
[    0.790000] ci_hdrc ci_hdrc.0: can't start gadget role


This was reached with related kernel config:
Device Drivers -> USB Support:
< >   Support for Host-side USB
<*>   ChipIdea Highspeed Dual Role Controller
[*]     ChipIdea device controller
[*]   USB Physical Layer drivers  --->
  <*>   Freescale MXS USB PHY support
<*>   USB Gadget Support  --->
  [*]   Debugging messages (DEVELOPMENT)
  [*]   Debugging information files (DEVELOPMENT)
  (200) Maximum VBUS Power usage (2-500 mA)
  (2)   Number of storage pipeline buffers
  <M>   USB Gadget Drivers
    <M>     Gadget Zero (DEVELOPMENT)
    <M>     Ethernet Gadget (with CDC Ethernet support)
      [*]       RNDIS support


Can anyone advice? I tried to read drivers/usb/chipidea/* but I couldn't make heads or tails of it.

devslashfoo

#1
ChipIdea kernel driver seems to be under heavy development. A partially working patch can be found at:  http://git.pengutronix.de/?p=mgr/linux.git;a=shortlog;h=refs/heads/v3.10/topic/usb-peterchen

The patch also requires following changes to arch/arm/boot/dts/imx23-olinuxino.dts:
usb0: usb@80080000 {
        dr_mode = "peripheral";
        status = "okay";
};


For additional information, see: http://archive.arm.linux.org.uk/lurker/thread/20130529.075044.56137dd8.en.html#i20130529.075044.56137dd8