mbox series

[v2,00/10] Add support for usb on Hikey960

Message ID 20190218112310.17860-1-chenyu56@huawei.com (mailing list archive)
Headers show
Series Add support for usb on Hikey960 | expand

Message

Chen Yu Feb. 18, 2019, 11:23 a.m. UTC
The patchset adds support for usb functionality of Hikey960, includes:
- dwc3 driver for Hisilicon Kirin Soc hi3660
- usb driver for HiKey960 board
- some adjustment in dwc3, usb gadget and typec driver
- dts for support usb of HiKey960

---
v2:
* This patchset based on patchset https://lkml.org/lkml/2019/1/25/344
of Heikki Krogerus
---

Yu Chen (10):
  dt-bindings: phy: Add support for HiSilicon's hi3660 USB PHY
  dt-bindings: misc: Add bindings for HiSilicon usb hub and data role
    switch functionality on HiKey960
  usb: dwc3: dwc3-of-simple: Add support for dwc3 of Hisilicon Soc
    Platform
  usb: dwc3: Add two quirks for Hisilicon Kirin Soc Platform
  phy: Add usb phy support for hi3660 Soc of Hisilicon
  usb: roles: Add usb role switch notifier.
  usb: dwc3: Registering a role switch in the DRD code.
  hikey960: Support usb functionality of Hikey960
  usb: gadget: Add configfs attribuite for controling
    match_existing_only
  dts: hi3660: Add support for usb on Hikey960

 .../bindings/misc/hisilicon-hikey-usb.txt          |  35 ++++
 .../devicetree/bindings/phy/phy-hi3660-usb3.txt    |  21 ++
 MAINTAINERS                                        |   8 +
 arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts  |  54 +++++
 arch/arm64/boot/dts/hisilicon/hi3660.dtsi          |  73 +++++++
 drivers/misc/Kconfig                               |   6 +
 drivers/misc/Makefile                              |   1 +
 drivers/misc/hisi_hikey_usb.c                      | 181 ++++++++++++++++
 drivers/phy/hisilicon/Kconfig                      |  10 +
 drivers/phy/hisilicon/Makefile                     |   1 +
 drivers/phy/hisilicon/phy-hi3660-usb3.c            | 232 +++++++++++++++++++++
 drivers/usb/dwc3/core.c                            |  43 ++++
 drivers/usb/dwc3/core.h                            |   9 +
 drivers/usb/dwc3/drd.c                             |  45 ++++
 drivers/usb/dwc3/dwc3-of-simple.c                  |   4 +-
 drivers/usb/dwc3/gadget.c                          |   2 +-
 drivers/usb/gadget/configfs.c                      |  32 +++
 drivers/usb/roles/class.c                          |  20 +-
 include/linux/usb/role.h                           |  46 ++++
 19 files changed, 820 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/misc/hisilicon-hikey-usb.txt
 create mode 100644 Documentation/devicetree/bindings/phy/phy-hi3660-usb3.txt
 create mode 100644 drivers/misc/hisi_hikey_usb.c
 create mode 100644 drivers/phy/hisilicon/phy-hi3660-usb3.c

Comments

Valentin Schneider Feb. 18, 2019, 5:30 p.m. UTC | #1
Hi,

On 18/02/2019 11:23, Yu Chen wrote:
> The patchset adds support for usb functionality of Hikey960, includes:
> - dwc3 driver for Hisilicon Kirin Soc hi3660
> - usb driver for HiKey960 board
> - some adjustment in dwc3, usb gadget and typec driver
> - dts for support usb of HiKey960
> 

I want to try this out on my HiKey960, but I can't get the USB A ports
working (tried USB stick and USB eth adapter).

On top of the arm64 defconfig, I've enabled (with menuconfig):

	CONFIG_PHY_HI3660_USB
	CONFIG_HISI_HIKEY_USB

Am I missing something? FYI up until now I've carried over Fan Ning's old
USB patch-set and that works fine, so I think it might just be a
configuration error from my end.

Thanks,
Valentin
Chen Yu Feb. 19, 2019, 1:34 a.m. UTC | #2
Hi,

On 2019/2/19 1:30, Valentin Schneider wrote:
> Hi,
> 
> On 18/02/2019 11:23, Yu Chen wrote:
>> The patchset adds support for usb functionality of Hikey960, includes:
>> - dwc3 driver for Hisilicon Kirin Soc hi3660
>> - usb driver for HiKey960 board
>> - some adjustment in dwc3, usb gadget and typec driver
>> - dts for support usb of HiKey960
>>
> 
> I want to try this out on my HiKey960, but I can't get the USB A ports
> working (tried USB stick and USB eth adapter).
> 
> On top of the arm64 defconfig, I've enabled (with menuconfig):
> 
> 	CONFIG_PHY_HI3660_USB
> 	CONFIG_HISI_HIKEY_USB
> 
> Am I missing something? FYI up until now I've carried over Fan Ning's old
> USB patch-set and that works fine, so I think it might just be a
> configuration error from my end.

This patch set based on Heikki Krogerus's patches.
Have you applied https://do-db2.lkml.org/lkml/2019/2/13/106 first?
And these configs should be set to y:
	CONFIG_TYPEC
	CONFIG_TYPEC_TCPM
	CONFIG_TYPEC_TCPCI
	CONFIG_TYPEC_RT1711H

> 
> Thanks,
> Valentin
> 
> 
> 
> .
> 

Thanks,
Yu Chen
Valentin Schneider Feb. 19, 2019, 11:31 a.m. UTC | #3
On 19/02/2019 01:34, Chen Yu wrote:
[...]
> This patch set based on Heikki Krogerus's patches.
> Have you applied https://do-db2.lkml.org/lkml/2019/2/13/106 first?
> And these configs should be set to y:
> 	CONFIG_TYPEC
> 	CONFIG_TYPEC_TCPM
> 	CONFIG_TYPEC_TCPCI
> 	CONFIG_TYPEC_RT1711H
> 

I was based on the right stack but didn't have those configs. It seems to
be working fine now, thanks!

Tested-by: Valentin Schneider <valentin.schneider@arm.com>