From: hdegoede@redhat.com (Hans de Goede)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] dt: bindings: add allwinner,otg-routed property for phy-sun4i-usb
Date: Wed, 21 Sep 2016 10:30:24 +0300 [thread overview]
Message-ID: <43caf5c6-0198-9178-de93-90dc25e8b72b@redhat.com> (raw)
In-Reply-To: <6718551474442396@web16h.yandex.ru>
Hi,
On 09/21/2016 10:19 AM, Icenowy Zheng wrote:
>
>
> 21.09.2016, 15:10, "Hans de Goede" <hdegoede@redhat.com>:
>> Hi,
>>
>> On 09/21/2016 10:04 AM, Icenowy Zheng wrote:
>>> On some newer Allwinner SoCs (H3 or A64), the PHY0 can be either routed to
>>> the MUSB controller (which is an OTG controller) or the OHCI/EHCI pair
>>> (which is a Host-only controller, but more stable and easy to implement).
>>>
>>> This property marks whether on a certain board which controller should be
>>> attached to the PHY.
>>>
>>> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
>>
>> Erm, I think that the idea here is to dynamically switch the routing
>> based on the id-pin of the otg connector. IOW use the musb controller
>> for device mode, and the ehci/ohci proper for proper host support
>> when in host mode.
>
> At least on some boards this implementation works...
>
> (I mean Pine64, which has two USB-A connectors)
Right and I think it is great that you're working on this.
But even with an A connector on the board, we can still use the device
mode (e.g. the SoC's native FEL mode will be used this way).
Notice that you can fake id-pin changes by echoing a mode to:
/sys/devices/platform/soc at 01c00000/1c13000.usb/musb-hdrc.1.auto/mode
Valid values to echo are: host, peripheral and otg.
If you combine this with using either an USB A<->A cable, or using
the port normally as a host you should be able to develop and test
full otg support.
Eventually we will need a full otg support rather then your current solution
and I'm afraid that your solution may get in the way of full otg support.
Regards,
Hans
prev parent reply other threads:[~2016-09-21 7:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 7:04 [PATCH 1/2] dt: bindings: add allwinner, otg-routed property for phy-sun4i-usb Icenowy Zheng
2016-09-21 7:04 ` [PATCH 2/2] phy-sun4i-usb: add support for host mode of phy0 on A64 SoC Icenowy Zheng
2016-09-21 7:10 ` [PATCH 1/2] dt: bindings: add allwinner,otg-routed property for phy-sun4i-usb Hans de Goede
2016-09-21 7:19 ` [PATCH 1/2] dt: bindings: add allwinner, otg-routed " Icenowy Zheng
2016-09-21 7:30 ` Hans de Goede [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43caf5c6-0198-9178-de93-90dc25e8b72b@redhat.com \
--to=hdegoede@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox