Re: [PATCH 0/5] usb: musb: am335x support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08.03.2013 17:44, Daniel Mack wrote:
> On 07.03.2013 13:51, Daniel Mack wrote:
>> On 04.03.2013 00:53, Daniel Mack wrote:
>>> Hi Peter,
>>>
>>> On 03.03.2013 23:24, Peter Korsgaard wrote:
>>>>>>>>> "Daniel" == Daniel Mack <zonque@xxxxxxxxx> writes:
>>>>
>>>> Hi,
>>>>
>>>>  Daniel> On my board, the USB is purely used as host interface, with a
>>>>  Daniel> type B plug soldered. In the DT, I'm using the following
>>>>  Daniel> sniplet in accordance to the documentation of the bindings:
>>>>
>>>>  Daniel> 	usb_otg_hs: usb@47400000 {
>>>>  Daniel> 		compatible = "ti,musb-am33xx";
>>>>  Daniel> 		reg = <0x47400000 0x1000	/* usbss */
>>>>  Daniel> 		       0x47401000 0x800		/* musb instance 0 */
>>>>  Daniel> 		       0x47401800 0x800>;	/* musb instance 1 */
>>>>  Daniel> 		interrupt-parent = <&intc>;
>>>>  Daniel> 		interrupts = <17		/* usbss */
>>>>  Daniel> 			      18		/* musb instance 0 */
>>>>  19> ;		/* musb instance 1 */
>>>>  Daniel> 		multipoint = <1>;
>>>>  Daniel> 		num-eps = <16>;
>>>>  Daniel> 		ram-bits = <12>;
>>>>  Daniel> 		port0-mode = <3>;
>>>>  Daniel> 		port1-mode = <3>;
>>>>  Daniel> 		power = <250>;
>>>>  Daniel> 		ti,hwmods = "usb_otg_hs";
>>>>  Daniel> 	};
>>>>
>>>>  Daniel> The relevant config options are
>>>>
>>>>  Daniel> CONFIG_USB_MUSB_HDRC=y
>>>>  Daniel> # CONFIG_USB_MUSB_TUSB6010 is not set
>>>>  Daniel> # CONFIG_USB_MUSB_OMAP2PLUS is not set
>>>>  Daniel> # CONFIG_USB_MUSB_AM35X is not set
>>>>  Daniel> CONFIG_USB_MUSB_DSPS=y
>>>>  Daniel> CONFIG_MUSB_PIO_ONLY=y
>>>>  Daniel> CONFIG_USB_GADGET=y
>>>>  Daniel> CONFIG_USB_GADGET_DEBUG=y
>>>>  Daniel> CONFIG_USB_GADGET_DEBUG_FILES=y
>>>>  Daniel> CONFIG_USB_GADGET_DEBUG_FS=y
>>>>  Daniel> CONFIG_USB_GADGET_VBUS_DRAW=2
>>>>  Daniel> CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
>>>>  Daniel> CONFIG_USB_GADGET_MUSB_HDRC=y
>>>>
>>>> Ehh, I'm confused here. You talk about host mode, a single 'B' (gadget)
>>>> connector
>>>
>>> I'm sorry for the confusion caused. This is a stupid mistake - I'm in
>>> fact talking about an 'A' type plug of course (host mode).
>>>
>>>> and your device tree mentions 2 OTG ports.
>>>
>>> That's what I said in a follow up - the same happens for mode '1'.
>>>
>>>> What is the configuration exactly?
>>>
>>> Again to summarize: host-only mode, type 'A' plug.
>>>
>>> The gadget driver is is enabled in the config because the only
>>> occurrence of usb_add_hcd() in the musb driver is in the gagdget part,
>>> so supposedly, there has to be a gadget driver loaded in order to make
>>> the host interface going.
>>
>> Just be clear: I'd happily help and dig for the reason of this, I'd just
>> need to know how things are _supposed_ to work ...
> 
> So I dug a little on this topic, and restored the behaviour I need with
> the attached patch.
> 
> The funny part is that the value set in the port0-mode/port1-mode DT
> properties are not even looked at by the code.
> 
> I know this patch reintroduces bits that have been intentionally removed
> before, in particular by 032ec49f53 ("usb: musb: drop useless board_mode
> usage"), but I don't know how this usb driver is supposed to work in
> host mode without taking the configured port mode into account. If
> anyone can explain to me which information I'm missing here, I can
> happily test a patch. For now, this works for me.

Hmm, nobody, really? Am I the only one who's running the musb driver in
host-only mode?


Daniel

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux