Revert "rockchip: backport upstream usbdrd3 patches"
This reverts commit fb82562e4568094a221d62784016c23a1171f301. This is not stable yet, and has some issues when detects USB devices. Signed-off-by: Tianling Shen <cnsztl@gmail.com>
This commit is contained in:
parent
ff784cc33f
commit
a165d67e64
@ -22,7 +22,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/if_vlan.h>
|
||||
#include <linux/uaccess.h>
|
||||
@@ -4335,6 +4336,22 @@ static void rtl_tally_reset(struct r8152
|
||||
@@ -4363,6 +4364,22 @@ static void rtl_tally_reset(struct r8152
|
||||
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY, ocp_data);
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
static void r8152b_init(struct r8152 *tp)
|
||||
{
|
||||
u32 ocp_data;
|
||||
@@ -4376,6 +4393,8 @@ static void r8152b_init(struct r8152 *tp
|
||||
@@ -4404,6 +4421,8 @@ static void r8152b_init(struct r8152 *tp
|
||||
ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL);
|
||||
ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN);
|
||||
ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data);
|
||||
@ -54,7 +54,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
}
|
||||
|
||||
static void r8153_init(struct r8152 *tp)
|
||||
@@ -4510,6 +4529,8 @@ static void r8153_init(struct r8152 *tp)
|
||||
@@ -4533,6 +4552,8 @@ static void r8153_init(struct r8152 *tp)
|
||||
tp->coalesce = COALESCE_SLOW;
|
||||
break;
|
||||
}
|
||||
@ -63,7 +63,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
}
|
||||
|
||||
static void r8153b_init(struct r8152 *tp)
|
||||
@@ -4586,6 +4607,8 @@ static void r8153b_init(struct r8152 *tp
|
||||
@@ -4609,6 +4630,8 @@ static void r8153b_init(struct r8152 *tp
|
||||
rtl_tally_reset(tp);
|
||||
|
||||
tp->coalesce = 15000; /* 15 us */
|
||||
|
@ -25,7 +25,7 @@ Link: https://lore.kernel.org/r/20210319051627.814-2-cnsztl@gmail.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/Makefile | 1 +
|
||||
.../boot/dts/rockchip/rk3399-nanopi-r4s.dts | 133 ++++++++++++++++++
|
||||
.../boot/dts/rockchip/rk3399-nanopi-r4s.dts | 133 +++++++++++++++++++++
|
||||
2 files changed, 134 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
|
||||
|
@ -1,48 +0,0 @@
|
||||
From 44dd5e2106dc2fd01697b539085818d1d1c58df0 Mon Sep 17 00:00:00 2001
|
||||
From: Cameron Nemo <cnemo@tutanota.com>
|
||||
Date: Tue, 9 Feb 2021 20:23:49 +0100
|
||||
Subject: arm64: dts: rockchip: add rk3328 dwc3 usb controller node
|
||||
|
||||
RK3328 SoCs have one USB 3.0 OTG controller which uses DWC_USB3
|
||||
core's general architecture. It can act as static xHCI host
|
||||
controller, static device controller, USB 3.0/2.0 OTG basing
|
||||
on ID of USB3.0 PHY.
|
||||
|
||||
Signed-off-by: William Wu <william.wu@rock-chips.com>
|
||||
Signed-off-by: Cameron Nemo <cnemo@tutanota.com>
|
||||
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
Link: https://lore.kernel.org/r/20210209192350.7130-7-jbx6244@gmail.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
@@ -955,6 +955,25 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ usbdrd3: usb@ff600000 {
|
||||
+ compatible = "rockchip,rk3328-dwc3", "snps,dwc3";
|
||||
+ reg = <0x0 0xff600000 0x0 0x100000>;
|
||||
+ interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&cru SCLK_USB3OTG_REF>, <&cru SCLK_USB3OTG_SUSPEND>,
|
||||
+ <&cru ACLK_USB3OTG>;
|
||||
+ clock-names = "ref_clk", "suspend_clk",
|
||||
+ "bus_clk";
|
||||
+ dr_mode = "otg";
|
||||
+ phy_type = "utmi_wide";
|
||||
+ snps,dis-del-phy-power-chg-quirk;
|
||||
+ snps,dis_enblslpm_quirk;
|
||||
+ snps,dis-tx-ipgap-linecheck-quirk;
|
||||
+ snps,dis-u2-freeclk-exists-quirk;
|
||||
+ snps,dis_u2_susphy_quirk;
|
||||
+ snps,dis_u3_susphy_quirk;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
gic: interrupt-controller@ff811000 {
|
||||
compatible = "arm,gic-400";
|
||||
#interrupt-cells = <3>;
|
@ -0,0 +1,62 @@
|
||||
From: William Wu <william.wu@rock-chips.com>
|
||||
|
||||
RK3328 has one USB 3.0 OTG controller which uses DWC_USB3
|
||||
core's general architecture. It can act as static xHCI host
|
||||
controller, static device controller, USB 3.0/2.0 OTG basing
|
||||
on ID of USB3.0 PHY.
|
||||
|
||||
Signed-off-by: William Wu <william.wu@rock-chips.com>
|
||||
Signed-off-by: Leonidas P. Papadakos <papadakospan@gmail.com>
|
||||
|
||||
---
|
||||
|
||||
NOTE: This binding still has issues. From the original thread:
|
||||
|
||||
the rk3328 usb3-phy has an issue with detecting any plugin events
|
||||
after a previous device got removed - see the inno-usb3-phy driver
|
||||
in the vendor kernel.
|
||||
|
||||
The current state is good-enough for enabling the USB3 attached LAN
|
||||
port of the NanoPi R2S. However, it might explode depending on your
|
||||
use-case. You've been warned.
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 27 ++++++++++++++++++++++++
|
||||
1 file changed, 27 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
@@ -955,6 +955,33 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ usbdrd3: usb@ff600000 {
|
||||
+ compatible = "rockchip,rk3328-dwc3", "rockchip,rk3399-dwc3";
|
||||
+ clocks = <&cru SCLK_USB3OTG_REF>, <&cru SCLK_USB3OTG_SUSPEND>,
|
||||
+ <&cru ACLK_USB3OTG>;
|
||||
+ clock-names = "ref_clk", "suspend_clk",
|
||||
+ "bus_clk";
|
||||
+ #address-cells = <2>;
|
||||
+ #size-cells = <2>;
|
||||
+ ranges;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ usbdrd_dwc3: dwc3@ff600000 {
|
||||
+ compatible = "snps,dwc3";
|
||||
+ reg = <0x0 0xff600000 0x0 0x100000>;
|
||||
+ interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ dr_mode = "otg";
|
||||
+ phy_type = "utmi_wide";
|
||||
+ snps,dis_enblslpm_quirk;
|
||||
+ snps,dis-u2-freeclk-exists-quirk;
|
||||
+ snps,dis_u2_susphy_quirk;
|
||||
+ snps,dis_u3_susphy_quirk;
|
||||
+ snps,dis-del-phy-power-chg-quirk;
|
||||
+ snps,dis-tx-ipgap-linecheck-quirk;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
gic: interrupt-controller@ff811000 {
|
||||
compatible = "arm,gic-400";
|
||||
#interrupt-cells = <3>;
|
@ -45,12 +45,16 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
};
|
||||
|
||||
&pwm2 {
|
||||
@@ -375,3 +393,8 @@
|
||||
@@ -375,3 +393,12 @@
|
||||
&usb_host0_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usbdrd3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd_dwc3 {
|
||||
+ dr_mode = "host";
|
||||
+ status = "okay";
|
||||
+};
|
||||
|
@ -14,8 +14,8 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
@@ -397,4 +397,11 @@
|
||||
&usbdrd3 {
|
||||
@@ -401,4 +401,11 @@
|
||||
&usbdrd_dwc3 {
|
||||
dr_mode = "host";
|
||||
status = "okay";
|
||||
+
|
||||
|
@ -1,35 +0,0 @@
|
||||
From: Johan Jonker <jbx6244@gmail.com>
|
||||
To: heiko@sntech.de
|
||||
Cc: devicetree@vger.kernel.org, balbi@kernel.org,
|
||||
gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
|
||||
robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org
|
||||
Subject: [PATCH v3 6/8] usb: dwc3: of-simple: add compatible for rk3328
|
||||
Date: Fri, 5 Feb 2021 12:40:09 +0100
|
||||
Message-ID: <20210205114011.10381-6-jbx6244@gmail.com> (raw)
|
||||
In-Reply-To: <20210205114011.10381-1-jbx6244@gmail.com>
|
||||
|
||||
From: Cameron Nemo <cnemo@tutanota.com>
|
||||
|
||||
Add a compatible to be hooked into by the Rockchip rk3328 device tree.
|
||||
|
||||
The rk3399 compatible cannot be reused because the rk3328 SoCs may
|
||||
require a specialized driver in the future and old device trees must
|
||||
remain compatible with newer kernels.
|
||||
|
||||
Signed-off-by: Cameron Nemo <cnemo@tutanota.com>
|
||||
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
|
||||
---
|
||||
drivers/usb/dwc3/dwc3-of-simple.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/drivers/usb/dwc3/dwc3-of-simple.c
|
||||
+++ b/drivers/usb/dwc3/dwc3-of-simple.c
|
||||
@@ -176,6 +176,7 @@ static const struct dev_pm_ops dwc3_of_s
|
||||
};
|
||||
|
||||
static const struct of_device_id of_dwc3_simple_match[] = {
|
||||
+ { .compatible = "rockchip,rk3328-dwc3" },
|
||||
{ .compatible = "rockchip,rk3399-dwc3" },
|
||||
{ .compatible = "xlnx,zynqmp-dwc3" },
|
||||
{ .compatible = "cavium,octeon-7130-usb-uctl" },
|
@ -1,36 +0,0 @@
|
||||
From: Johan Jonker <jbx6244@gmail.com>
|
||||
To: heiko@sntech.de
|
||||
Cc: devicetree@vger.kernel.org, balbi@kernel.org,
|
||||
gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
|
||||
robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org
|
||||
Subject: [PATCH v5 2/8] usb: dwc3: of-simple: bail probe if no dwc3 child node
|
||||
Date: Tue, 9 Feb 2021 20:23:44 +0100
|
||||
Message-ID: <20210209192350.7130-2-jbx6244@gmail.com> (raw)
|
||||
In-Reply-To: <20210209192350.7130-1-jbx6244@gmail.com>
|
||||
|
||||
For some of the dwc3-of-simple compatible SoCs we
|
||||
don't want to bind this driver to a dwc3 node,
|
||||
but bind that node to the 'snps,dwc3' driver instead.
|
||||
The kernel has no logic to decide which driver to bind
|
||||
to if there are 2 matching drivers, so bail probe if no
|
||||
dwc3 child node.
|
||||
|
||||
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
|
||||
---
|
||||
drivers/usb/dwc3/dwc3-of-simple.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/drivers/usb/dwc3/dwc3-of-simple.c
|
||||
+++ b/drivers/usb/dwc3/dwc3-of-simple.c
|
||||
@@ -40,6 +40,10 @@ static int dwc3_of_simple_probe(struct p
|
||||
int ret;
|
||||
bool shared_resets = false;
|
||||
|
||||
+ /* Bail probe if no dwc3 child node. */
|
||||
+ if (!of_get_compatible_child(dev->of_node, "snps,dwc3"))
|
||||
+ return -ENODEV;
|
||||
+
|
||||
simple = devm_kzalloc(dev, sizeof(*simple), GFP_KERNEL);
|
||||
if (!simple)
|
||||
return -ENOMEM;
|
@ -11,8 +11,8 @@ Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
@@ -985,6 +985,13 @@
|
||||
status = "disabled";
|
||||
@@ -993,6 +993,13 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ dfi: dfi@ff790000 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user