[U-Boot] [PATCH v10 00/35] phy: sunxi: Add Allwinner sun4i USB PHY

Jagan Teki jagannadh.teki at gmail.com
Tue Jun 5 05:34:23 UTC 2018


On Tue, Jun 5, 2018 at 10:41 AM, Vasily Khoruzhick <anarsoul at gmail.com> wrote:
> On Mon, Jun 4, 2018 at 9:54 PM, Vasily Khoruzhick <anarsoul at gmail.com> wrote:
>> On Fri, Jun 1, 2018 at 9:52 AM, Jagan Teki <jagan at amarulasolutions.com> wrote:
>>> On Mon, May 28, 2018 at 4:48 PM, Jagan Teki <jagan at amarulasolutions.com> wrote:
>>>> This series rework of previous version where it removes legacy
>>>> usb phy handling and added phy driver on generic-phy framework.
>>>>
>>>> Current implementation phy driver is unable to get pinctrl, clock
>>>> and reset details from DT since the dm code on these will add it future.
>>>>
>>>> Changes for v8, v9, v10:
>>>> - rebase on master
>>>> - collect Jun Acked-by
>>>> - add Linux commit id details for dt-binding patch
>>>> - fixed few commit messages
>>>>
>>>> Changes for v7:
>>>> - rebase on master
>>>>
>>>> Changes for v6:
>>>> - Create private config for passing through driver_data instead
>>>>   directly passing musb_config. This make room for adding new
>>>>   configs in coming patches.
>>>> - memset to pdata in musb-new/sunxi.c
>>>>
>>>> Changes for v5:
>>>> - Rework of previous series
>>>> - Used driver_data on sunxi.c since dt supported
>>>> - tested on bpi-m2-plus, orangepi_pc2/prime, bananapi-m64
>>>>
>>>> Changes for v4:
>>>> - Rework of previous series
>>>> - Add Allwinner sun4i USB PHY driver
>>>> - Drop legacy arch/arm/mach-sunxi/usb_phy.c and related code
>>>>
>>>> Chen-Yu Tsai (1):
>>>>   sunxi: clock: Fix OHCI clock gating for H3/H5
>>>>
>>>> Jagan Teki (33):
>>>>   usb: sunxi: Simplify ccm reg base code
>>>>   musb: sunxi: Add proper macros instead of numericals
>>>>   musb: sunxi: Use simple way to fill musb_hdrc pdata
>>>>   musb: sunxi: Add fifo config
>>>>   sunxi: clock: Fix clock gating for H3/H5/A64
>>>>   musb: sunxi: Add OTG device clkgate and reset for H3/H5
>>>>   musb: sunxi: Use BIT instead of numerical shift
>>>>   musb: sunxi: Add support for H3/H5/A64
>>>>   phy: Add Allwinner A64 USB PHY driver
>>>>   phy: sun4i-usb: Add id_detect and vbus_detect ops
>>>>   phy: sun4i-usb: Add H3/H5 PHY config
>>>>   phy: sun4i-usb: Add V3S PHY config
>>>>   phy: sun4i-usb: Add A83T USB PHY config
>>>>   phy: sun4i-usb: Add A10/A13/A20 PHY config
>>>>   phy: sun4i-usb: Add A31 PHY config
>>>>   phy: sun4i-usb: Add A33 USB PHY config
>>>>   phy: sun4i-usb: Add A23 USB PHY config
>>>>   device-tree-bindings: phy: Sync sun4i-usb-phy bindings
>>>>   board: sunxi: Use generic-phy for board_usb_cable_connected
>>>>   phy: sun4i-usb: Add a sunxi specific function for setting
>>>>     squelch-detect
>>>>   usb: sunxi: Switch to use generic-phy
>>>>   sunxi: Drop legacy usb_phy.c
>>>>   arm64: allwinner: a64: bananapi-m64: Sync usb_otg node from Linux
>>>>   configs: bananapi-m64: Enable USB OTG peripheral mode
>>>>   ARM: dts: sun8i: a83t: Sync usbphy node from Linux
>>>>   arm64: allwinner: a64: bananapi-m64: Sync usb host nodes from Linux
>>>>   ARM: dts: sun8i-h3: bananapi-m2-plus: Sync usb otg nodes from Linux
>>>>   configs: bananapi-m2-plus: Enable USB OTG peripheral mode
>>>>   arm64: allwinner: h5: orangepi-pc2: Order nodes in alphabetic
>>>>   arm64: allwinner: h5: orangepi-pc2: Sync usb otg nodes from Linux
>>>>   configs: orangepi-pc2: Enable USB OTG peripheral mode
>>>>   arm64: allwinner: h5: orangepi-prime: Sync usb otg nodes from Linux
>>>>   configs: orangepi-prime: Enable USB OTG peripheral mode
>>>>
>>>> Jun Nie (1):
>>>>   sunxi: h3: Sync OTG and HCI nodes from Linux DT
>>>
>>> Applied to u-boot-sunxi/master
>>
>> Hi Jagan,
>>
>> Have you tested these patches on A64 boards? It doesn't work for me on
>> Pinebook anymore.
>
> Relevant logs with DEBUG enabled in drivers/phy/allwinner/phy-sun4i-usb.c:
>
> starting USB...
> USB0:   Allwinner Sun4I USB PHY driver loaded
> sun4i_usb_phy_xlate: phy_id = 1
> USB EHCI 0.00
> USB1:   sun4i_usb_phy_xlate: phy_id = 1
> USB OHCI 0.0
>
> Note that EHCI and OHCI versions are wrong. It was 1.00 for EHCI and
> 1.0 for OHCI before these changes.

This wont depend with this phy driver, better check the host driver
and dts nodes which you're using.

Here is BPI-M64, dts has [o-e]hci0 and [o-e]hci1

Allwinner Sun4I USB PHY driver loaded
sun4i_usb_phy_xlate: phy_id = 0
Allwinner mUSB OTG (Peripheral)
Net:
Warning: usb_ether using MAC address from ROM
eth0: usb_ether
starting USB...
USB0:   USB EHCI 0.00
USB1:   USB OHCI 0.0
USB2:   sun4i_usb_phy_xlate: phy_id = 1
USB EHCI 1.00
USB3:   sun4i_usb_phy_xlate: phy_id = 1
USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 2 for devices... EHCI timed out on TD - token=0x80008c80
2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
=> fastboot 0
sun4i_usb_phy_xlate: phy_id = 0
musb-hdrc: peripheral reset irq lost!


More information about the U-Boot mailing list