LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-03-2013, 07:36 AM   #1
tedminator
LQ Newbie
 
Registered: Oct 2013
Posts: 1

Rep: Reputation: Disabled
help: Chipidea driver failed to detect mx28 USB 0 as gadget Device


Hello,

first: sorry for my english.

Setup: Mx28 with USB0 connect to linux PC. USB0 is capable of OTG.

USB0 is set up to be an OTG device. I am running linux 3.10 rc6. I would like to turn the USB0 into a gadget_serial device so I can talk to it from the PC using minicom.

I compiled the linux image with the following config:

CONFIG_USB_CHIPIDEA=m
CONFIG_USB_CHIPIDEA_UDC=y
CONFIG_USB_CHIPIDEA_HOST=y
CONFIG_USB_CHIPIDEA_DEBUG=y

CONFIG_USB_GADGET=m
CONFIG_USB_G_SERIAL=m

I can't load the g_serial module because it couldn't find any UDC device. This is the chipidea core did not register any udc device in the udc_device list. The reason: it thinks the USB0 is a host device instead of a gadget device.

I put print statement inside the driver and observed the following:

Inside /chipidea/core.c: ci_hdrc_probe(), after calling ci_hdrc_gadet_init(ci), the result is a dual role for both host and gadget. This is correct since the DCCPARAMS register has both HC and DC bits set to 1. However, afterward, it calls ci_otg_role(ci). The result is always return as HOST. This is because bit OTGSC_ID of the OTGSC register is reporting 0 which stand for A device.

As i understand, and that's not much, the PC and the mx28 negotiate and determine who can be host/device. I would expect that the OTGSC register reports result of this negotiation. When and where does this happen? I also expect that the MX28 will be a Device, where did it go wrong?

What is the appropriate step to turn the USB0 into a gadget device?
What do I need as far as device tree? configuration?
Or is there a bug somewhere that cause the device to always be a host?
what am i missing?
Gosh, i am desperate.

Here is a catch: with the same hardware setup and the mx28 running kernel 2.6, works like a charm.

I appreciate any idea.

here is the device tree for USB0

usb0: usb@80080000 {
vbus-supply = <&reg_usb0_vbus>;
disable-over-current;
status = "okay";
};

reg_usb0_vbus: usb0_vbus {
compatible = "regulator-fixed";
regulator-name = "usb0_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
};
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
set feature halt endpoint fails always USB linux driver usb gadget serial dot c sarmads1 Linux - Kernel 0 08-14-2012 10:06 PM
About USB Gadget serial driver sdefayette Linux - General 1 08-12-2012 11:41 AM
Linux usb gadget HID driver problem Sebteams69 Linux - Newbie 7 06-12-2012 02:24 PM
usb gadget printer driver application grsandeep85 Programming 1 08-18-2010 01:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration