2dd6e40ebf921cbb01f534e272688298de5fb475
[openwrt/staging/ldir.git] / target / linux / rockchip / patches-5.10 / 101-dts-rockchip-add-usb3-controller-node-for-RK3328-SoCs.patch
1 From: William Wu <william.wu@rock-chips.com>
2
3 RK3328 has one USB 3.0 OTG controller which uses DWC_USB3
4 core's general architecture. It can act as static xHCI host
5 controller, static device controller, USB 3.0/2.0 OTG basing
6 on ID of USB3.0 PHY.
7
8 Signed-off-by: William Wu <william.wu@rock-chips.com>
9 Signed-off-by: Leonidas P. Papadakos <papadakospan@gmail.com>
10
11 ---
12
13 NOTE: This binding still has issues. From the original thread:
14
15 the rk3328 usb3-phy has an issue with detecting any plugin events
16 after a previous device got removed - see the inno-usb3-phy driver
17 in the vendor kernel.
18
19 The current state is good-enough for enabling the USB3 attached LAN
20 port of the NanoPi R2S. However, it might explode depending on your
21 use-case. You've been warned.
22
23 ---
24 arch/arm64/boot/dts/rockchip/rk3328.dtsi | 27 ++++++++++++++++++++++++
25 1 file changed, 27 insertions(+)
26
27 --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
28 +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
29 @@ -985,22 +985,30 @@
30 };
31
32 usbdrd3: usb@ff600000 {
33 - compatible = "rockchip,rk3328-dwc3", "snps,dwc3";
34 - reg = <0x0 0xff600000 0x0 0x100000>;
35 - interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
36 + compatible = "rockchip,rk3328-dwc3", "rockchip,rk3399-dwc3";
37 clocks = <&cru SCLK_USB3OTG_REF>, <&cru SCLK_USB3OTG_SUSPEND>,
38 <&cru ACLK_USB3OTG>;
39 clock-names = "ref_clk", "suspend_clk",
40 "bus_clk";
41 - dr_mode = "otg";
42 - phy_type = "utmi_wide";
43 - snps,dis-del-phy-power-chg-quirk;
44 - snps,dis_enblslpm_quirk;
45 - snps,dis-tx-ipgap-linecheck-quirk;
46 - snps,dis-u2-freeclk-exists-quirk;
47 - snps,dis_u2_susphy_quirk;
48 - snps,dis_u3_susphy_quirk;
49 + #address-cells = <2>;
50 + #size-cells = <2>;
51 + ranges;
52 status = "disabled";
53 +
54 + usbdrd_dwc3: dwc3@ff600000 {
55 + compatible = "snps,dwc3";
56 + reg = <0x0 0xff600000 0x0 0x100000>;
57 + interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
58 + dr_mode = "otg";
59 + phy_type = "utmi_wide";
60 + snps,dis_enblslpm_quirk;
61 + snps,dis-u2-freeclk-exists-quirk;
62 + snps,dis_u2_susphy_quirk;
63 + snps,dis_u3_susphy_quirk;
64 + snps,dis-del-phy-power-chg-quirk;
65 + snps,dis-tx-ipgap-linecheck-quirk;
66 + status = "disabled";
67 + };
68 };
69
70 gic: interrupt-controller@ff811000 {