Hi,
currently, i want to enable OTG as device function in i.MX25 platform, kernel is linux-2.6.31 in your L2.6.31_09.12.01_SDK_source,
but in the menuconfig, i didn't find the option of it, it seems that it is forbidden, because configuration options is "*** OTG and related infrastructure ***"
under "USB support".
second, if we suppose we can enable OTG, i glanced at the Kconfig and Make under "linux-2.6.31/drivers/usb/otg",
i'm not sure whether we need configure "CONFIG_UTMI_MXC_OTG", because there is fsl_otg_arc.c which is needed by "CONFIG_UTMI_MXC_OTG".
if i can't enable OTG in linux kernel, Can you supply me another way to embedded OTG function in linux as soon as possible?
Thanks from heart!
To enable the USB2.0 OTG, configure ltib menuconfig (command ltib -c) to
configure the kernel marking [*]Configure the kernel.
On Kernel configuration, mark the options:
Device Drivers
<*> USB Support
<M> EHCI HCD (USB 2.0) support
[*] Support for Freescale controller
[*] Support for DR host port on Freescale controller
Select transceiver for DR port (Internal UTMI) --->
On i.MX25 target system load the fsl_otg_arc and ehci_hcd (if host mode needed) modules:
$ modprobe fsl_otg_arc
$ modprobe ehci_hcd
Yuri Muhin,
Why there isn't fsl_otg_arc.c in "linux-2.6.31/drivers/usb/otg", but Makefile have it(previous attached picture),
and i built kernel successfully as your suggestion, it didn't generate fsl_otg_arc.o or fsl_otg_arc.ko, so the target board display:
root@freescale /$ modprobe fsl_otg_arc
modprobe: module fsl_otg_arc not found in modules.dep
Pleased try to prepare Linux kernel files via LTIB :
$ ./ltib -p kernel -m prep
Thanks Yuri Muhin,
i did it, but i have a puzzle, it seems that your configuration is OTG working as USB host, but i need OTG as USB device.
my configuration is:
Device Drivers
<*> USB Support
<M> Support for Host-side USB
<M> EHCI HCD (USB 2.0) support
[*] Support for Freescale controller
[*] Support for DR host port on Freescale controller
Select transceiver for DR port (Internal UTMI) --->
<*> USB Gadget Support --->
[*] Support for DR peripheral port on Freescale controller
Select transceiver for DR port (On-chip UTMI) --->
[*] OTG Support
<M> Gadget Filesystem (EXPERIMENTAL)
Can you help me to check this configuration?
thanks Yuri again!
To enable the USB2.0 OTG (connector J10) for Ethernet Gadget, configure ltib menuconfig (command ltib -c)
and mark “[*]Configure the kernel”. On Kernel configuration, mark the options:
Device Drivers
<*> USB Support
<*> EHCI HCD (USB 2.0) support
[*] Support for Freescale controller
Support for DR host port on Freescale controller
USB Gadget Drivers --->
[*] Support for DR peripheral port on Freescale controller
Select transceiver for DR port (On-chip UTMI) --->
<M> Ethernet Gadget (with CDC Ethernet support)
For tests :
Connect a USB cable to PC and USB Host OTG (J10 connector) on I.MX25 Board.
Load the g_ether module:
$ modprobe fsl_otg_arc
$ modprobe arcotg_udc
$ modprobe g_ether
Configure host ethernet by typing on host:
$ ifconfig usb0 192.168.0.1
Configure target ethernet by typing on target:
$ ifconfig usb0 192.168.0.2