Re: [PATCH] arm64: dts: allwinner: properly connect USB PHY to port 0

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

 



On Mon, Jun 24, 2019 at 8:58 PM Andre Przywara <andre.przywara@xxxxxxx> wrote:
>
> On Mon, 24 Jun 2019 16:25:47 +0800
> Chen-Yu Tsai <wens@xxxxxxxx> wrote:
>
> Hi,
>
> > On Thu, Jun 20, 2019 at 9:02 AM Andre Przywara <andre.przywara@xxxxxxx> 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@xxxxxxx>
> > > ---
> > > 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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux