[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170117200658.gcrcxeanthdtwg26@lukather>
Date: Tue, 17 Jan 2017 21:06:58 +0100
From: Maxime Ripard <maxime.ripard@...e-electrons.com>
To: Icenowy Zheng <icenowy@...c.xyz>
Cc: Rob Herring <robh+dt@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
Kishon Vijay Abraham I <kishon@...com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Bin Liu <b-liu@...com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-sunxi@...glegroups.com" <linux-sunxi@...glegroups.com>
Subject: Re: [PATCH 1/4] phy: sun4i-usb: support PHY0 on H3 in MUSB mode
On Wed, Jan 18, 2017 at 12:57:08AM +0800, Icenowy Zheng wrote:
>
>
> 17.01.2017, 16:06, "Maxime Ripard" <maxime.ripard@...e-electrons.com>:
> > On Tue, Jan 17, 2017 at 03:14:46AM +0800, Icenowy Zheng wrote:
> >> The PHY0 on H3 can be wired either to MUSB controller or OHCI/EHCI
> >> controller.
> >>
> >> The original driver wired it to OHCI/EHCI controller; however, as the
> >> code to use PHY0 as OHCI/EHCI is missing, it makes the PHY fully
> >> unusable.
> >>
> >> Rename the register (according to its function and the name in BSP
> >> driver), and remove the code which wires the PHY0 to OHCI/EHCI, as MUSB
> >> can support both peripheral and host mode (although the host mode of
> >> MUSB is buggy).
> >
> > Can you elaborate on that? What's wrong with it?
>
> The configuration is at bit 0 of register 0x20 in PHY.
>
> When the PHY is reseted, it defaults as MUSB mode.
>
> However, the original author of the H3 PHY code seems to be lack of
> this knowledge (He named it PHY_UNK_H3), and changed the PHY to HCI
> mode.
>
> I just removed the code that wires it to HCI mode, thus it will work
> in MUSB mode, with my sun8i-h3-musb patch.
I have no idea what you mean by MUSB mode.
Do you mean that the previous code was only working in host mode, and
now it only works in peripheral?
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)
Powered by blists - more mailing lists