* [PATCH v3 2/5] arm64: dts: rockchip: add the aclk_usb3 clocks for USB3.
2017-12-15 11:00 [PATCH v3 1/5] arm64: dts: rockchip: add extcon nodes and enable tcphy Enric Balletbo i Serra
@ 2017-12-15 11:00 ` Enric Balletbo i Serra
2017-12-16 17:00 ` Heiko Stuebner
2017-12-15 11:00 ` [PATCH v3 3/5] arm64: dts: rockchip: add usb3-phy otg-port support for rk3399 Enric Balletbo i Serra
` (3 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Enric Balletbo i Serra @ 2017-12-15 11:00 UTC (permalink / raw)
To: linux-arm-kernel
The aclk_usb3 must be enabled to support USB3 for rk3399.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
Changes since v1:
- Split the original patch in different commits
Changes since v2:
- None
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 17e5e1a..f32e9c4 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -397,9 +397,11 @@
#size-cells = <2>;
ranges;
clocks = <&cru SCLK_USB3OTG0_REF>, <&cru SCLK_USB3OTG0_SUSPEND>,
- <&cru ACLK_USB3OTG0>, <&cru ACLK_USB3_GRF>;
+ <&cru ACLK_USB3OTG0>, <&cru ACLK_USB3_RKSOC_AXI_PERF>,
+ <&cru ACLK_USB3>, <&cru ACLK_USB3_GRF>;
clock-names = "ref_clk", "suspend_clk",
- "bus_clk", "grf_clk";
+ "bus_clk", "aclk_usb3_rksoc_axi_perf",
+ "aclk_usb3", "grf_clk";
status = "disabled";
usbdrd_dwc3_0: dwc3 {
@@ -425,9 +427,11 @@
#size-cells = <2>;
ranges;
clocks = <&cru SCLK_USB3OTG1_REF>, <&cru SCLK_USB3OTG1_SUSPEND>,
- <&cru ACLK_USB3OTG1>, <&cru ACLK_USB3_GRF>;
+ <&cru ACLK_USB3OTG1>, <&cru ACLK_USB3_RKSOC_AXI_PERF>,
+ <&cru ACLK_USB3>, <&cru ACLK_USB3_GRF>;
clock-names = "ref_clk", "suspend_clk",
- "bus_clk", "grf_clk";
+ "bus_clk", "aclk_usb3_rksoc_axi_perf",
+ "aclk_usb3", "grf_clk";
status = "disabled";
usbdrd_dwc3_1: dwc3 {
--
2.9.3
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v3 3/5] arm64: dts: rockchip: add usb3-phy otg-port support for rk3399.
2017-12-15 11:00 [PATCH v3 1/5] arm64: dts: rockchip: add extcon nodes and enable tcphy Enric Balletbo i Serra
2017-12-15 11:00 ` [PATCH v3 2/5] arm64: dts: rockchip: add the aclk_usb3 clocks for USB3 Enric Balletbo i Serra
@ 2017-12-15 11:00 ` Enric Balletbo i Serra
2017-12-16 17:06 ` Heiko Stuebner
2017-12-15 11:00 ` [PATCH v3 4/5] arm64: dts: rockchip: add pd_usb3 power-domain node " Enric Balletbo i Serra
` (2 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Enric Balletbo i Serra @ 2017-12-15 11:00 UTC (permalink / raw)
To: linux-arm-kernel
Add the usb3 phyter for the USB3.0 OTG controller.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
Changes since v1:
- Split the original patch in different commits
Changes since v2:
- None
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index f32e9c4..ea91f25 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -409,8 +409,8 @@
reg = <0x0 0xfe800000 0x0 0x100000>;
interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH 0>;
dr_mode = "otg";
- phys = <&u2phy0_otg>;
- phy-names = "usb2-phy";
+ phys = <&u2phy0_otg>, <&tcphy0_usb3>;
+ phy-names = "usb2-phy", "usb3-phy";
phy_type = "utmi_wide";
snps,dis_enblslpm_quirk;
snps,dis-u2-freeclk-exists-quirk;
@@ -439,8 +439,8 @@
reg = <0x0 0xfe900000 0x0 0x100000>;
interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH 0>;
dr_mode = "otg";
- phys = <&u2phy1_otg>;
- phy-names = "usb2-phy";
+ phys = <&u2phy1_otg>, <&tcphy1_usb3>;
+ phy-names = "usb2-phy", "usb3-phy";
phy_type = "utmi_wide";
snps,dis_enblslpm_quirk;
snps,dis-u2-freeclk-exists-quirk;
--
2.9.3
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v3 4/5] arm64: dts: rockchip: add pd_usb3 power-domain node for rk3399.
2017-12-15 11:00 [PATCH v3 1/5] arm64: dts: rockchip: add extcon nodes and enable tcphy Enric Balletbo i Serra
2017-12-15 11:00 ` [PATCH v3 2/5] arm64: dts: rockchip: add the aclk_usb3 clocks for USB3 Enric Balletbo i Serra
2017-12-15 11:00 ` [PATCH v3 3/5] arm64: dts: rockchip: add usb3-phy otg-port support for rk3399 Enric Balletbo i Serra
@ 2017-12-15 11:00 ` Enric Balletbo i Serra
2017-12-16 16:55 ` Heiko Stuebner
2017-12-15 11:00 ` [PATCH v3 5/5] arm64: dts: rockchip: add reset property for dwc3 controllers on rk3399 Enric Balletbo i Serra
2017-12-16 17:08 ` [PATCH v3 1/5] arm64: dts: rockchip: add extcon nodes and enable tcphy Heiko Stuebner
4 siblings, 1 reply; 11+ messages in thread
From: Enric Balletbo i Serra @ 2017-12-15 11:00 UTC (permalink / raw)
To: linux-arm-kernel
Add the usb3 power-domain, its qos area and assign it to the usb device
node.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
Changes since v1:
- Split the original patch in different commits
Changes since v2:
- None
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index ea91f25..c18ff88 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -417,6 +417,7 @@
snps,dis_u2_susphy_quirk;
snps,dis-del-phy-power-chg-quirk;
snps,dis-tx-ipgap-linecheck-quirk;
+ power-domains = <&power RK3399_PD_USB3>;
status = "disabled";
};
};
@@ -447,6 +448,7 @@
snps,dis_u2_susphy_quirk;
snps,dis-del-phy-power-chg-quirk;
snps,dis-tx-ipgap-linecheck-quirk;
+ power-domains = <&power RK3399_PD_USB3>;
status = "disabled";
};
};
@@ -995,6 +997,12 @@
clocks = <&cru HCLK_SDIO>;
pm_qos = <&qos_sdioaudio>;
};
+ pd_usb3 at RK3399_PD_USB3 {
+ reg = <RK3399_PD_USB3>;
+ clocks = <&cru ACLK_USB3>;
+ pm_qos = <&qos_usb_otg0>,
+ <&qos_usb_otg1>;
+ };
pd_vio at RK3399_PD_VIO {
reg = <RK3399_PD_VIO>;
#address-cells = <1>;
--
2.9.3
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v3 5/5] arm64: dts: rockchip: add reset property for dwc3 controllers on rk3399.
2017-12-15 11:00 [PATCH v3 1/5] arm64: dts: rockchip: add extcon nodes and enable tcphy Enric Balletbo i Serra
` (2 preceding siblings ...)
2017-12-15 11:00 ` [PATCH v3 4/5] arm64: dts: rockchip: add pd_usb3 power-domain node " Enric Balletbo i Serra
@ 2017-12-15 11:00 ` Enric Balletbo i Serra
2017-12-16 17:01 ` Heiko Stuebner
2017-12-16 17:08 ` [PATCH v3 1/5] arm64: dts: rockchip: add extcon nodes and enable tcphy Heiko Stuebner
4 siblings, 1 reply; 11+ messages in thread
From: Enric Balletbo i Serra @ 2017-12-15 11:00 UTC (permalink / raw)
To: linux-arm-kernel
After commit '06c47e6286d usb: dwc3: of-simple: Add support to get resets
for the device' you can add the reset property to the dwc3 node, the reset
is required for the controller to work properly, otherwise bind / unbind
stress testing of the USB controller on rk3399 we'd often end up with lots
of failures that looked like this:
phy phy-ff800000.phy.9: phy poweron failed --> -110
dwc3 fe900000.dwc3: failed to initialize core
dwc3: probe of fe900000.dwc3 failed with error -110
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
Changes since v1:
- This patch did not exists in the series.
Changes since v2:
- Introduced this patch
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index c18ff88..83f0f71 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -402,6 +402,8 @@
clock-names = "ref_clk", "suspend_clk",
"bus_clk", "aclk_usb3_rksoc_axi_perf",
"aclk_usb3", "grf_clk";
+ resets = <&cru SRST_A_USB3_OTG0>;
+ reset-names = "usb3-otg";
status = "disabled";
usbdrd_dwc3_0: dwc3 {
@@ -433,6 +435,8 @@
clock-names = "ref_clk", "suspend_clk",
"bus_clk", "aclk_usb3_rksoc_axi_perf",
"aclk_usb3", "grf_clk";
+ resets = <&cru SRST_A_USB3_OTG1>;
+ reset-names = "usb3-otg";
status = "disabled";
usbdrd_dwc3_1: dwc3 {
--
2.9.3
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v3 5/5] arm64: dts: rockchip: add reset property for dwc3 controllers on rk3399.
2017-12-15 11:00 ` [PATCH v3 5/5] arm64: dts: rockchip: add reset property for dwc3 controllers on rk3399 Enric Balletbo i Serra
@ 2017-12-16 17:01 ` Heiko Stuebner
0 siblings, 0 replies; 11+ messages in thread
From: Heiko Stuebner @ 2017-12-16 17:01 UTC (permalink / raw)
To: linux-arm-kernel
Am Freitag, 15. Dezember 2017, 12:00:05 CET schrieb Enric Balletbo i Serra:
> After commit '06c47e6286d usb: dwc3: of-simple: Add support to get resets
> for the device' you can add the reset property to the dwc3 node, the reset
> is required for the controller to work properly, otherwise bind / unbind
> stress testing of the USB controller on rk3399 we'd often end up with lots
> of failures that looked like this:
>
> phy phy-ff800000.phy.9: phy poweron failed --> -110
> dwc3 fe900000.dwc3: failed to initialize core
> dwc3: probe of fe900000.dwc3 failed with error -110
>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
applied for 4.16
Thanks
Heiko
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 1/5] arm64: dts: rockchip: add extcon nodes and enable tcphy.
2017-12-15 11:00 [PATCH v3 1/5] arm64: dts: rockchip: add extcon nodes and enable tcphy Enric Balletbo i Serra
` (3 preceding siblings ...)
2017-12-15 11:00 ` [PATCH v3 5/5] arm64: dts: rockchip: add reset property for dwc3 controllers on rk3399 Enric Balletbo i Serra
@ 2017-12-16 17:08 ` Heiko Stuebner
4 siblings, 0 replies; 11+ messages in thread
From: Heiko Stuebner @ 2017-12-16 17:08 UTC (permalink / raw)
To: linux-arm-kernel
Am Freitag, 15. Dezember 2017, 12:00:01 CET schrieb Enric Balletbo i Serra:
> Enable tcphy and create the cros-ec's extcon node for the USB Type-C port.
>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Reviewed-by: Brian Norris <briannorris@chromium.org>
applied for 4.16
Thanks
Heiko
^ permalink raw reply [flat|nested] 11+ messages in thread