All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Geis <pgwipeout@gmail.com>
To: Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Heiko Stuebner <heiko@sntech.de>
Cc: linux-usb@vger.kernel.org, linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, wulf@rock-chips.com,
	frank.wang@rock-chips.com, william.wu@rock-chips.com,
	zyw@rock-chips.com, kever.yang@rock-chips.com,
	Peter Geis <pgwipeout@gmail.com>
Subject: [PATCH 0/4] [RFC] rk3328 usb3 phy driver
Date: Mon, 16 Nov 2020 15:17:32 +0000	[thread overview]
Message-ID: <20201116151735.178737-1-pgwipeout@gmail.com> (raw)

Good Day,

This is an RFC requesting feedback on a driver for the bugged usb3 phy used in the rk3328 soc.

The innosilicon based usb3 phy used in rockchip devices such as the rk3328 is bugged, requiring special handling.
The following erata have been observed:
 - usb3 device disconnect events are not detected by the controller
 - usb2 hubs with no devices attached do not trigger disconnect events when removed
 - interrupts are not reliable

To work around these issues we implement polling of the usb2 and usb3 status.
On usb3 disconnection we reset the usb3 phy which triggers the disconnect event.
On usb2 disconnection we have to force reset the whole controller.
This requires a handoff to a special dwc3 device driver.

I wanted to be able to implement the usb2 fix completely in the phy driver.
Unfortunately I was unable to find a fix for it.
I also was unable to find a method for the phy driver to trigger a controller reset without the special glue.
If anyone has any suggestions for this, please let me know.

This has been tested on the rk3328-roc-cc board with the following devices:
 - usb2 only device
 - usb3 only device
 - usb2 only hub without devices
 - usb3 hub without devices
 - usb2 hub with devices
 - usb3 hub with devices

Peter Geis (4):
  phy: rockchip: add rockchip usb3 innosilicon phy driver
  usb: dwc3: add rockchip innosilicon usb3 glue layer
  arm64: dts: rockchip: add rk3328 usb3 and usb3phy nodes
  arm64: dts: rockchip: enable usb3 on rk3328-roc-cc board

 .../arm64/boot/dts/rockchip/rk3328-roc-cc.dts |  21 +
 arch/arm64/boot/dts/rockchip/rk3328.dtsi      |  65 +++
 drivers/phy/rockchip/Kconfig                  |   9 +
 drivers/phy/rockchip/Makefile                 |   1 +
 drivers/phy/rockchip/phy-rockchip-inno-usb3.c | 425 ++++++++++++++++++
 drivers/usb/dwc3/Kconfig                      |  10 +
 drivers/usb/dwc3/Makefile                     |   1 +
 drivers/usb/dwc3/dwc3-rockchip-inno.c         | 271 +++++++++++
 8 files changed, 803 insertions(+)
 create mode 100644 drivers/phy/rockchip/phy-rockchip-inno-usb3.c
 create mode 100644 drivers/usb/dwc3/dwc3-rockchip-inno.c

-- 
2.25.1


WARNING: multiple messages have this Message-ID (diff)
From: Peter Geis <pgwipeout@gmail.com>
To: Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Heiko Stuebner <heiko@sntech.de>
Cc: frank.wang@rock-chips.com, zyw@rock-chips.com,
	linux-usb@vger.kernel.org, kever.yang@rock-chips.com,
	linux-rockchip@lists.infradead.org,
	Peter Geis <pgwipeout@gmail.com>,
	william.wu@rock-chips.com, wulf@rock-chips.com,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/4] [RFC] rk3328 usb3 phy driver
Date: Mon, 16 Nov 2020 15:17:32 +0000	[thread overview]
Message-ID: <20201116151735.178737-1-pgwipeout@gmail.com> (raw)

Good Day,

This is an RFC requesting feedback on a driver for the bugged usb3 phy used in the rk3328 soc.

The innosilicon based usb3 phy used in rockchip devices such as the rk3328 is bugged, requiring special handling.
The following erata have been observed:
 - usb3 device disconnect events are not detected by the controller
 - usb2 hubs with no devices attached do not trigger disconnect events when removed
 - interrupts are not reliable

To work around these issues we implement polling of the usb2 and usb3 status.
On usb3 disconnection we reset the usb3 phy which triggers the disconnect event.
On usb2 disconnection we have to force reset the whole controller.
This requires a handoff to a special dwc3 device driver.

I wanted to be able to implement the usb2 fix completely in the phy driver.
Unfortunately I was unable to find a fix for it.
I also was unable to find a method for the phy driver to trigger a controller reset without the special glue.
If anyone has any suggestions for this, please let me know.

This has been tested on the rk3328-roc-cc board with the following devices:
 - usb2 only device
 - usb3 only device
 - usb2 only hub without devices
 - usb3 hub without devices
 - usb2 hub with devices
 - usb3 hub with devices

Peter Geis (4):
  phy: rockchip: add rockchip usb3 innosilicon phy driver
  usb: dwc3: add rockchip innosilicon usb3 glue layer
  arm64: dts: rockchip: add rk3328 usb3 and usb3phy nodes
  arm64: dts: rockchip: enable usb3 on rk3328-roc-cc board

 .../arm64/boot/dts/rockchip/rk3328-roc-cc.dts |  21 +
 arch/arm64/boot/dts/rockchip/rk3328.dtsi      |  65 +++
 drivers/phy/rockchip/Kconfig                  |   9 +
 drivers/phy/rockchip/Makefile                 |   1 +
 drivers/phy/rockchip/phy-rockchip-inno-usb3.c | 425 ++++++++++++++++++
 drivers/usb/dwc3/Kconfig                      |  10 +
 drivers/usb/dwc3/Makefile                     |   1 +
 drivers/usb/dwc3/dwc3-rockchip-inno.c         | 271 +++++++++++
 8 files changed, 803 insertions(+)
 create mode 100644 drivers/phy/rockchip/phy-rockchip-inno-usb3.c
 create mode 100644 drivers/usb/dwc3/dwc3-rockchip-inno.c

-- 
2.25.1


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

WARNING: multiple messages have this Message-ID (diff)
From: Peter Geis <pgwipeout@gmail.com>
To: Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Heiko Stuebner <heiko@sntech.de>
Cc: frank.wang@rock-chips.com, zyw@rock-chips.com,
	linux-usb@vger.kernel.org, kever.yang@rock-chips.com,
	linux-rockchip@lists.infradead.org,
	Peter Geis <pgwipeout@gmail.com>,
	william.wu@rock-chips.com, wulf@rock-chips.com,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/4] [RFC] rk3328 usb3 phy driver
Date: Mon, 16 Nov 2020 15:17:32 +0000	[thread overview]
Message-ID: <20201116151735.178737-1-pgwipeout@gmail.com> (raw)

Good Day,

This is an RFC requesting feedback on a driver for the bugged usb3 phy used in the rk3328 soc.

The innosilicon based usb3 phy used in rockchip devices such as the rk3328 is bugged, requiring special handling.
The following erata have been observed:
 - usb3 device disconnect events are not detected by the controller
 - usb2 hubs with no devices attached do not trigger disconnect events when removed
 - interrupts are not reliable

To work around these issues we implement polling of the usb2 and usb3 status.
On usb3 disconnection we reset the usb3 phy which triggers the disconnect event.
On usb2 disconnection we have to force reset the whole controller.
This requires a handoff to a special dwc3 device driver.

I wanted to be able to implement the usb2 fix completely in the phy driver.
Unfortunately I was unable to find a fix for it.
I also was unable to find a method for the phy driver to trigger a controller reset without the special glue.
If anyone has any suggestions for this, please let me know.

This has been tested on the rk3328-roc-cc board with the following devices:
 - usb2 only device
 - usb3 only device
 - usb2 only hub without devices
 - usb3 hub without devices
 - usb2 hub with devices
 - usb3 hub with devices

Peter Geis (4):
  phy: rockchip: add rockchip usb3 innosilicon phy driver
  usb: dwc3: add rockchip innosilicon usb3 glue layer
  arm64: dts: rockchip: add rk3328 usb3 and usb3phy nodes
  arm64: dts: rockchip: enable usb3 on rk3328-roc-cc board

 .../arm64/boot/dts/rockchip/rk3328-roc-cc.dts |  21 +
 arch/arm64/boot/dts/rockchip/rk3328.dtsi      |  65 +++
 drivers/phy/rockchip/Kconfig                  |   9 +
 drivers/phy/rockchip/Makefile                 |   1 +
 drivers/phy/rockchip/phy-rockchip-inno-usb3.c | 425 ++++++++++++++++++
 drivers/usb/dwc3/Kconfig                      |  10 +
 drivers/usb/dwc3/Makefile                     |   1 +
 drivers/usb/dwc3/dwc3-rockchip-inno.c         | 271 +++++++++++
 8 files changed, 803 insertions(+)
 create mode 100644 drivers/phy/rockchip/phy-rockchip-inno-usb3.c
 create mode 100644 drivers/usb/dwc3/dwc3-rockchip-inno.c

-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2020-11-16 15:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 15:17 Peter Geis [this message]
2020-11-16 15:17 ` [PATCH 0/4] [RFC] rk3328 usb3 phy driver Peter Geis
2020-11-16 15:17 ` Peter Geis
2020-11-16 15:17 ` [PATCH 1/4] phy: rockchip: add rockchip usb3 innosilicon " Peter Geis
2020-11-16 15:17   ` Peter Geis
2020-11-16 15:17   ` Peter Geis
2021-07-19 14:29   ` Alex Bee
2021-07-19 14:29     ` Alex Bee
2021-07-19 14:29     ` Alex Bee
2021-07-19 23:19     ` Peter Geis
2021-07-19 23:19       ` Peter Geis
2021-07-19 23:19       ` Peter Geis
2020-11-16 15:17 ` [PATCH 2/4] usb: dwc3: add rockchip innosilicon usb3 glue layer Peter Geis
2020-11-16 15:17   ` Peter Geis
2020-11-16 15:17   ` Peter Geis
2020-11-16 15:17 ` [PATCH 3/4] arm64: dts: rockchip: add rk3328 usb3 and usb3phy nodes Peter Geis
2020-11-16 15:17   ` Peter Geis
2020-11-16 15:17   ` Peter Geis
2020-11-16 16:07   ` Johan Jonker
2020-11-16 16:07     ` Johan Jonker
2020-11-16 16:07     ` Johan Jonker
2020-11-16 16:25     ` Peter Geis
2020-11-16 16:25       ` Peter Geis
2020-11-16 16:25       ` Peter Geis
2020-11-16 15:17 ` [PATCH 4/4] arm64: dts: rockchip: enable usb3 on rk3328-roc-cc board Peter Geis
2020-11-16 15:17   ` Peter Geis
2020-11-16 15:17   ` Peter Geis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201116151735.178737-1-pgwipeout@gmail.com \
    --to=pgwipeout@gmail.com \
    --cc=balbi@kernel.org \
    --cc=frank.wang@rock-chips.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko@sntech.de \
    --cc=kever.yang@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=william.wu@rock-chips.com \
    --cc=wulf@rock-chips.com \
    --cc=zyw@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.