From: Chen-Yu Tsai <wens@csie.org>
To: Andre Przywara <andre.przywara@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
devicetree <devicetree@vger.kernel.org>,
Rob Herring <robh@kernel.org>,
Maxime Ripard <maxime.ripard@bootlin.com>,
linux-sunxi <linux-sunxi@googlegroups.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] arm64: dts: allwinner: properly connect USB PHY to port 0
Date: Mon, 24 Jun 2019 21:03:17 +0800 [thread overview]
Message-ID: <CAGb2v66vNndnXXfQfF4tnkEfqPjom7e=kuWVzWggjcTSeDPWsA@mail.gmail.com> (raw)
In-Reply-To: <20190624135806.7bc78378@donnerap.cambridge.arm.com>
On Mon, Jun 24, 2019 at 8:58 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> On Mon, 24 Jun 2019 16:25:47 +0800
> Chen-Yu Tsai <wens@csie.org> wrote:
>
> Hi,
>
> > On Thu, Jun 20, 2019 at 9:02 AM Andre Przywara <andre.przywara@arm.com> wrote:
> > >
> > > In recent Allwinner SoCs the first USB host controller (HCI0) shares
> > > the first PHY with the MUSB controller. Probably to make this sharing
> > > work, we were avoiding to declare this in the DT. This has two
> > > shortcomings:
> > > - U-Boot (which uses the same .dts) cannot use this port without a PHY
> > > linked, so we were loosing one USB port there.
> > > - It requires the MUSB driver to be enabled and loaded, although we
> > > don't actually use it.
> > >
> > > For those (64-bit) boards which use an USB-A socket for HCI0/MUSB, add
> > > a "phys" property pointing to the USB PHY 0.
> > >
> > > This makes it work in U-Boot, also improves compatiblity when no MUSB
> > > driver is loaded (for instance in distribution installers).
> > >
> > > Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> > > ---
> > > Hi,
> > >
> > > I have the feeling this belongs into the .dtsi, but cant't tell for sure
> > > how this interacts with the MUSB driver. If need be, we can always pull
> > > this up later, I guess.
> >
> > Have you tried if gadget mode and switching between gadget/host mode on
> > an otg port still works? AFAICT that would be the main thing to worry
> > about.
>
> I briefly tried gadget mode on a BPi-M64, and that still seemed to work,
> but I couldn't switch it to host mode. IIRC that didn't even work without
> this patch, but I didn't find the time to investigate yet.
>
> Is it supposed to switch automatically when the ID pin changes state? Do
> you know a board/kernel combination which is known to work?
Yes it's supposed to switch automatically when you insert or remove the
OTG host mode cable.
I think it worked during the last release cycle while I was adding support
for VBUS polling. I'll do some tests on the current sunxi-next tomorrow
and let you know.
ChenYu
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-06-24 13:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-20 1:01 [PATCH] arm64: dts: allwinner: properly connect USB PHY to port 0 Andre Przywara
2019-06-24 8:25 ` Chen-Yu Tsai
2019-06-24 12:58 ` Andre Przywara
2019-06-24 13:03 ` Chen-Yu Tsai [this message]
2019-06-27 3:34 ` Chen-Yu Tsai
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='CAGb2v66vNndnXXfQfF4tnkEfqPjom7e=kuWVzWggjcTSeDPWsA@mail.gmail.com' \
--to=wens@csie.org \
--cc=andre.przywara@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-sunxi@googlegroups.com \
--cc=mark.rutland@arm.com \
--cc=maxime.ripard@bootlin.com \
--cc=robh@kernel.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;
as well as URLs for NNTP newsgroup(s).