* [PATCH 1/4] dt-bindings: usb: dwc2: Document quirk to reset PHY upon wakeup
2019-04-12 22:41 [PATCH 0/4] usb: dwc2: Another attempt handling rk3288's remote wake quirk Douglas Anderson
@ 2019-04-12 22:41 ` Douglas Anderson
2019-04-12 23:42 ` Matthias Kaehlcke
2019-04-12 22:41 ` [PATCH 3/4] ARM: dts: rockchip: Hook resets up to USB PHYs on rk3288 Douglas Anderson
2019-04-12 22:41 ` [PATCH 4/4] ARM: dts: rockchip: Add quirk for resetting rk3288's dwc2 host on wakeup Douglas Anderson
2 siblings, 1 reply; 7+ messages in thread
From: Douglas Anderson @ 2019-04-12 22:41 UTC (permalink / raw)
To: Rob Herring, Minas Harutyunyan, Heiko Stuebner, Felipe Balbi
Cc: amstan, linux-rockchip, linux-usb, Randy Li, mka, ryandcase,
jwerner, Elaine Zhang, Douglas Anderson, devicetree, linux-kernel,
Greg Kroah-Hartman, Mark Rutland
On Rockchip rk3288 there's a hardware quirk where we need to assert
the reset signal to the PHY when we get a remote wakeup on one of the
two ports. Document this quirk in the bindings.
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
Documentation/devicetree/bindings/usb/dwc2.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt
index 6dc3c4a34483..f70f3aee4bfc 100644
--- a/Documentation/devicetree/bindings/usb/dwc2.txt
+++ b/Documentation/devicetree/bindings/usb/dwc2.txt
@@ -37,6 +37,8 @@ Refer to phy/phy-bindings.txt for generic phy consumer properties
- g-rx-fifo-size: size of rx fifo size in gadget mode.
- g-np-tx-fifo-size: size of non-periodic tx fifo size in gadget mode.
- g-tx-fifo-size: size of periodic tx fifo per endpoint (except ep0) in gadget mode.
+- snps,reset-phy-on-wake: If present indicates that we need to reset the PHY when
+ we detect a wakeup. This is due to a hardware errata.
Deprecated properties:
- g-use-dma: gadget DMA mode is automatically detected
--
2.21.0.392.gf8f6787159e-goog
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/4] dt-bindings: usb: dwc2: Document quirk to reset PHY upon wakeup
2019-04-12 22:41 ` [PATCH 1/4] dt-bindings: usb: dwc2: Document quirk to reset PHY upon wakeup Douglas Anderson
@ 2019-04-12 23:42 ` Matthias Kaehlcke
0 siblings, 0 replies; 7+ messages in thread
From: Matthias Kaehlcke @ 2019-04-12 23:42 UTC (permalink / raw)
To: Douglas Anderson
Cc: Rob Herring, Minas Harutyunyan, Heiko Stuebner, Felipe Balbi,
amstan, linux-rockchip, linux-usb, Randy Li, ryandcase, jwerner,
Elaine Zhang, devicetree, linux-kernel, Greg Kroah-Hartman,
Mark Rutland
On Fri, Apr 12, 2019 at 03:41:46PM -0700, Douglas Anderson wrote:
> On Rockchip rk3288 there's a hardware quirk where we need to assert
> the reset signal to the PHY when we get a remote wakeup on one of the
> two ports. Document this quirk in the bindings.
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
>
> Documentation/devicetree/bindings/usb/dwc2.txt | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt
> index 6dc3c4a34483..f70f3aee4bfc 100644
> --- a/Documentation/devicetree/bindings/usb/dwc2.txt
> +++ b/Documentation/devicetree/bindings/usb/dwc2.txt
> @@ -37,6 +37,8 @@ Refer to phy/phy-bindings.txt for generic phy consumer properties
> - g-rx-fifo-size: size of rx fifo size in gadget mode.
> - g-np-tx-fifo-size: size of non-periodic tx fifo size in gadget mode.
> - g-tx-fifo-size: size of periodic tx fifo per endpoint (except ep0) in gadget mode.
> +- snps,reset-phy-on-wake: If present indicates that we need to reset the PHY when
> + we detect a wakeup. This is due to a hardware errata.
>
> Deprecated properties:
> - g-use-dma: gadget DMA mode is automatically detected
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/4] ARM: dts: rockchip: Hook resets up to USB PHYs on rk3288.
2019-04-12 22:41 [PATCH 0/4] usb: dwc2: Another attempt handling rk3288's remote wake quirk Douglas Anderson
2019-04-12 22:41 ` [PATCH 1/4] dt-bindings: usb: dwc2: Document quirk to reset PHY upon wakeup Douglas Anderson
@ 2019-04-12 22:41 ` Douglas Anderson
2019-04-13 0:00 ` Matthias Kaehlcke
2019-04-12 22:41 ` [PATCH 4/4] ARM: dts: rockchip: Add quirk for resetting rk3288's dwc2 host on wakeup Douglas Anderson
2 siblings, 1 reply; 7+ messages in thread
From: Douglas Anderson @ 2019-04-12 22:41 UTC (permalink / raw)
To: Rob Herring, Minas Harutyunyan, Heiko Stuebner, Felipe Balbi
Cc: amstan, linux-rockchip, linux-usb, Randy Li, mka, ryandcase,
jwerner, Elaine Zhang, Douglas Anderson, devicetree, linux-kernel,
Mark Rutland, linux-arm-kernel
Let's hook up the resets to the three USB PHYs on rk3288 as per the
bindings. This is in preparation for a future patch that will set the
"snps,reset-phy-on-wake" on the host port.
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
arch/arm/boot/dts/rk3288.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 2e604f0afa98..92e0600595f8 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -905,6 +905,8 @@
clocks = <&cru SCLK_OTGPHY0>;
clock-names = "phyclk";
#clock-cells = <0>;
+ resets = <&cru SRST_USBOTG_PHY>;
+ reset-names = "phy-reset";
};
usbphy1: usb-phy@334 {
@@ -913,6 +915,8 @@
clocks = <&cru SCLK_OTGPHY1>;
clock-names = "phyclk";
#clock-cells = <0>;
+ resets = <&cru SRST_USBHOST0_PHY>;
+ reset-names = "phy-reset";
};
usbphy2: usb-phy@348 {
@@ -921,6 +925,8 @@
clocks = <&cru SCLK_OTGPHY2>;
clock-names = "phyclk";
#clock-cells = <0>;
+ resets = <&cru SRST_USBHOST1_PHY>;
+ reset-names = "phy-reset";
};
};
};
--
2.21.0.392.gf8f6787159e-goog
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 3/4] ARM: dts: rockchip: Hook resets up to USB PHYs on rk3288.
2019-04-12 22:41 ` [PATCH 3/4] ARM: dts: rockchip: Hook resets up to USB PHYs on rk3288 Douglas Anderson
@ 2019-04-13 0:00 ` Matthias Kaehlcke
0 siblings, 0 replies; 7+ messages in thread
From: Matthias Kaehlcke @ 2019-04-13 0:00 UTC (permalink / raw)
To: Douglas Anderson
Cc: Rob Herring, Minas Harutyunyan, Heiko Stuebner, Felipe Balbi,
amstan, linux-rockchip, linux-usb, Randy Li, ryandcase, jwerner,
Elaine Zhang, devicetree, linux-kernel, Mark Rutland,
linux-arm-kernel
On Fri, Apr 12, 2019 at 03:41:48PM -0700, Douglas Anderson wrote:
> Let's hook up the resets to the three USB PHYs on rk3288 as per the
> bindings. This is in preparation for a future patch that will set the
> "snps,reset-phy-on-wake" on the host port.
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
>
> arch/arm/boot/dts/rk3288.dtsi | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
> index 2e604f0afa98..92e0600595f8 100644
> --- a/arch/arm/boot/dts/rk3288.dtsi
> +++ b/arch/arm/boot/dts/rk3288.dtsi
> @@ -905,6 +905,8 @@
> clocks = <&cru SCLK_OTGPHY0>;
> clock-names = "phyclk";
> #clock-cells = <0>;
> + resets = <&cru SRST_USBOTG_PHY>;
> + reset-names = "phy-reset";
> };
>
> usbphy1: usb-phy@334 {
> @@ -913,6 +915,8 @@
> clocks = <&cru SCLK_OTGPHY1>;
> clock-names = "phyclk";
> #clock-cells = <0>;
> + resets = <&cru SRST_USBHOST0_PHY>;
> + reset-names = "phy-reset";
> };
>
> usbphy2: usb-phy@348 {
> @@ -921,6 +925,8 @@
> clocks = <&cru SCLK_OTGPHY2>;
> clock-names = "phyclk";
> #clock-cells = <0>;
> + resets = <&cru SRST_USBHOST1_PHY>;
> + reset-names = "phy-reset";
> };
> };
> };
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 4/4] ARM: dts: rockchip: Add quirk for resetting rk3288's dwc2 host on wakeup
2019-04-12 22:41 [PATCH 0/4] usb: dwc2: Another attempt handling rk3288's remote wake quirk Douglas Anderson
2019-04-12 22:41 ` [PATCH 1/4] dt-bindings: usb: dwc2: Document quirk to reset PHY upon wakeup Douglas Anderson
2019-04-12 22:41 ` [PATCH 3/4] ARM: dts: rockchip: Hook resets up to USB PHYs on rk3288 Douglas Anderson
@ 2019-04-12 22:41 ` Douglas Anderson
2019-04-12 23:57 ` Matthias Kaehlcke
2 siblings, 1 reply; 7+ messages in thread
From: Douglas Anderson @ 2019-04-12 22:41 UTC (permalink / raw)
To: Rob Herring, Minas Harutyunyan, Heiko Stuebner, Felipe Balbi
Cc: amstan, linux-rockchip, linux-usb, Randy Li, mka, ryandcase,
jwerner, Elaine Zhang, Douglas Anderson, devicetree, linux-kernel,
Mark Rutland, linux-arm-kernel
The "host" USB port on rk3288 has a hardware errata where we've got to
assert a PHY reset whenever we see a remote wakeup. Add that quirk
property to the device tree.
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
arch/arm/boot/dts/rk3288.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 92e0600595f8..6367c1b50fd7 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -617,6 +617,7 @@
dr_mode = "host";
phys = <&usbphy2>;
phy-names = "usb2-phy";
+ snps,reset-phy-on-wake;
status = "disabled";
};
--
2.21.0.392.gf8f6787159e-goog
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 4/4] ARM: dts: rockchip: Add quirk for resetting rk3288's dwc2 host on wakeup
2019-04-12 22:41 ` [PATCH 4/4] ARM: dts: rockchip: Add quirk for resetting rk3288's dwc2 host on wakeup Douglas Anderson
@ 2019-04-12 23:57 ` Matthias Kaehlcke
0 siblings, 0 replies; 7+ messages in thread
From: Matthias Kaehlcke @ 2019-04-12 23:57 UTC (permalink / raw)
To: Douglas Anderson
Cc: Rob Herring, Minas Harutyunyan, Heiko Stuebner, Felipe Balbi,
amstan, linux-rockchip, linux-usb, Randy Li, ryandcase, jwerner,
Elaine Zhang, devicetree, linux-kernel, Mark Rutland,
linux-arm-kernel
On Fri, Apr 12, 2019 at 03:41:49PM -0700, Douglas Anderson wrote:
> The "host" USB port on rk3288 has a hardware errata where we've got to
> assert a PHY reset whenever we see a remote wakeup. Add that quirk
> property to the device tree.
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
>
> arch/arm/boot/dts/rk3288.dtsi | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
> index 92e0600595f8..6367c1b50fd7 100644
> --- a/arch/arm/boot/dts/rk3288.dtsi
> +++ b/arch/arm/boot/dts/rk3288.dtsi
> @@ -617,6 +617,7 @@
> dr_mode = "host";
> phys = <&usbphy2>;
> phy-names = "usb2-phy";
> + snps,reset-phy-on-wake;
> status = "disabled";
> };
>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
^ permalink raw reply [flat|nested] 7+ messages in thread