2022-02-26 01:46:26

by Peter Geis

[permalink] [raw]
Subject: [PATCH v1 0/8] enable usb support on rk356x

Good Morning,

This is my patch series that I have maintained out of tree until the
combophy driver landed. Note, it is dependent on this series to function
(aside from the rk3566 dwc3-otg port, which will work currently).

This series is still dependent on Patch 4 of the combophy series, which
has yet to be accepted.

Patches 1 and 2 add the dt bindings for the grf changes necessary for
this series.
Patch 3 adds support to the grf driver to set the rk3566 otg clock
source.
Patch 4 is a downstream patch ported forward to shut down the usb3 clock
when the controller is operating in usb2 mode.
Patches 5 and 6 clean up the dwc3-of-simple driver and add the
compatible for the rk3568.
Patch 7 adds the dwc3 nodes to the rk356x device tree includes.
Patch 8 enables the dwc3 nodes on the Quartz64 Model A.

Please review and apply.

Very Respectfully,
Peter Geis

Bin Yang (1):
usb: dwc3: core: do not use 3.0 clock when operating in 2.0 mode

Peter Geis (7):
dt-bindings: soc: grf: add rk3566-pipe-grf compatible
dt-bindings: usb: dwc3: add description for rk3568
soc: rockchip: set dwc3 clock for rk3566
usb: dwc3: reorder dwc-of-simple compatibles
usb: dwc3: add rk3568 dwc3 support
arm64: dts: rockchip: add the dwc3 usb3 nodes to rk356x
arm64: dts: rockchip: enable the dwc3 nodes on quartz64-a

.../devicetree/bindings/soc/rockchip/grf.yaml | 1 +
.../bindings/usb/rockchip,dwc3.yaml | 7 ++-
.../boot/dts/rockchip/rk3566-quartz64-a.dts | 37 +++++++++++++++
arch/arm64/boot/dts/rockchip/rk3566.dtsi | 12 +++++
arch/arm64/boot/dts/rockchip/rk3568.dtsi | 9 ++++
arch/arm64/boot/dts/rockchip/rk356x.dtsi | 45 ++++++++++++++++++-
drivers/soc/rockchip/grf.c | 17 +++++++
drivers/usb/dwc3/core.c | 4 ++
drivers/usb/dwc3/core.h | 1 +
drivers/usb/dwc3/dwc3-of-simple.c | 10 +++--
10 files changed, 137 insertions(+), 6 deletions(-)

--
2.25.1


2022-02-26 01:47:01

by Peter Geis

[permalink] [raw]
Subject: [PATCH v1 6/8] usb: dwc3: add rk3568 dwc3 support

The rk3568 dwc3 controller is backwards compatible with the rk3399 dwc3
controller.
Add support for it to the dwc3-of-simple driver.

Signed-off-by: Peter Geis <[email protected]>
---
drivers/usb/dwc3/dwc3-of-simple.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c
index 9dc6295df6b1..1d52a261af55 100644
--- a/drivers/usb/dwc3/dwc3-of-simple.c
+++ b/drivers/usb/dwc3/dwc3-of-simple.c
@@ -49,7 +49,8 @@ static int dwc3_of_simple_probe(struct platform_device *pdev)
* Some controllers need to toggle the usb3-otg reset before trying to
* initialize the PHY, otherwise the PHY times out.
*/
- if (of_device_is_compatible(np, "rockchip,rk3399-dwc3"))
+ if (of_device_is_compatible(np, "rockchip,rk3399-dwc3") |
+ of_device_is_compatible(np, "rockchip,rk3568-dwc3"))
simple->need_reset = true;

simple->resets = of_reset_control_array_get(np, false, true,
@@ -176,6 +177,7 @@ static const struct of_device_id of_dwc3_simple_match[] = {
{ .compatible = "hisilicon,hi3670-dwc3" },
{ .compatible = "intel,keembay-dwc3" },
{ .compatible = "rockchip,rk3399-dwc3" },
+ { .compatible = "rockchip,rk3568-dwc3" },
{ .compatible = "sprd,sc9860-dwc3" },
{ /* Sentinel */ }
};
--
2.25.1

2022-02-26 02:29:25

by Peter Geis

[permalink] [raw]
Subject: [PATCH v1 2/8] dt-bindings: usb: dwc3: add description for rk3568

The rk3568 dwc3 controllers are backwards compatible with the rk3399.
Add the device tree description for it.

Signed-off-by: Peter Geis <[email protected]>
---
Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml b/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml
index 04077f2d7faf..e3044e81cc72 100644
--- a/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml
@@ -30,6 +30,7 @@ select:
enum:
- rockchip,rk3328-dwc3
- rockchip,rk3399-dwc3
+ - rockchip,rk3568-dwc3
required:
- compatible

@@ -39,6 +40,7 @@ properties:
- enum:
- rockchip,rk3328-dwc3
- rockchip,rk3399-dwc3
+ - rockchip,rk3568-dwc3
- const: snps,dwc3

reg:
@@ -75,7 +77,10 @@ properties:
maxItems: 1

reset-names:
- const: usb3-otg
+ items:
+ - enum:
+ - usb3-otg
+ - usb3-host

unevaluatedProperties: false

--
2.25.1