[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <351fa51d-9772-13a5-8b44-538a61a19c88@baylibre.com>
Date: Tue, 31 Mar 2020 10:40:25 +0200
From: Neil Armstrong <narmstrong@...libre.com>
To: Felipe Balbi <balbi@...nel.org>, kishon@...com,
khilman@...libre.com, martin.blumenstingl@...glemail.com
Cc: linux-amlogic@...ts.infradead.org, linux-usb@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 00/14] usb: dwc3: meson: add OTG support for GXL/GXM
On 29/03/2020 12:36, Felipe Balbi wrote:
>
> Hi,
>
> Neil Armstrong <narmstrong@...libre.com> writes:
>> The USB support was initialy done with a set of PHYs and dwc3-of-simple
>> because the architecture of the USB complex was not understood correctly
>> at the time (and proper documentation was missing...).
>>
>> But with the G12A family, the USB complex was correctly understood and
>> implemented correctly.
>> But seems the G12A architecture was derived for the GXL USB architecture,
>> with minor differences and looks we can share most of the USB DWC3 glue
>> driver.
>>
>> This patchset refactors and adds callbacks to handle the architecture
>> difference while keeping the main code shared.
>>
>> The main difference is that on GXL/GXM the USB2 PHY control registers
>> are mixed with the PHY registers (we already handle correctly), and
>> the GLUE registers are allmost (99%) the same as G12A.
>>
>> But, the GXL/GXM HW is buggy, here are the quirks :
>> - for the DWC2 controller to reset correctly, the GLUE mux must be switched
>> to peripheral when the DWC2 controller probes. For now it's handled by simply
>> switching to device when probing the subnodes, but it may be not enough
>> - when manually switching from Host to Device when the USB port is not
>> populated (should not happen with proper Micro-USB/USB-C OTG switch), it
>> makes the DWC3 to crash. The only way to avoid that is to use the Host
>> Disconnect bit to disconnect the DWC3 controller from the port, but we can't
>> recover the Host functionnality unless resetting the DWC3 controller.
>> This bit is set when only manual switch is done, and a warning is printed
>> on manual switching.
>>
>> The patches 1-9 should be applied first, then either waiting the next release
>> or if the usb maintainer can provide us a stable tag, we can use it to merge
>> the DT and bindings.
>>
>> Changes since v1 at [1]:
>> - Fixed DT bindings to take in account usb2-phy2 on GXM
>> - Added comment in patch2
>> - Fixed patch 5 and moved fix out
>> - Collected tags
>> - Lower DT patch changes, switch p20x-q20x port B as OTG by default
>
> patches 1-6 are applied to my testing/next
>
Thanks !
Neil
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists