USB3 regression in RK3399
Enric Balletbo i Serra
enric.balletbo at collabora.com
Mon Feb 26 04:26:54 PST 2018
Hi Vicente,
On 25/02/18 11:03, Vicente Bergas wrote:
> (cut)
>>>>>> testing on the Sapphire board, which uses the RK3399 SoC, a regression
>>>>>> has been found in v4.16-rc2 wrt v4.15.4 regarding the USB3 type-A port:
>>>>>> In v4.15.4 it works in USB2-only mode.
>>>>>> In v4.16-rc2 it does not work.
> (cut)
>>>>> Hmm, I'd guess the main issue would be a missing typec-phy driver
>>>>> in your kernel (see drivers/phy/rockchip/phy-rockchip-typec.c
> (cut)
>>> I suspect that what Heiko says is right and typec-phy fails probing. Could you
> (cut)
>
> Hello,
> this is the patch to blame for the regression:
>
> From c301b327aea898af558b2387252a2f5fc0117dee Mon Sep 17 00:00:00 2001
> From: Enric Balletbo i Serra <enric.balletbo at collabora.com>
> Date: Fri, 15 Dec 2017 12:00:03 +0100
> Subject: [PATCH] arm64: dts: rockchip: add usb3-phy otg-port support for rk3399
>
> Add the usb3 phyter for the USB3.0 OTG controller.
>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo at collabora.com>
> Signed-off-by: Heiko Stuebner <heiko at sntech.de>
> ---
> 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 b4511503878b..7aa2144e0d47 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> @@ -411,8 +411,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;
> @@ -444,8 +444,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;
>
(cut)
> An usb3 phy is not found because no usb3 phy is being registered.
> No usb3 phy is being registered because no usb3 phy is being probed at all.
> I do not know why it is not being probed.
> In the configuration file, CONFIG_PHY_ROCKCHIP_TYPEC is set to y.
>
Probably the problem here is that the phyter is disabled in the DT, if you apply
the following patch it will probably pass but then there is the problem that
Heiko pointed, we'll be missing the extcon driver telling the driver about the
cable state. I suspect that is the fusb302 who should implement the extcon
interface.
I'll try to look a bit on this.
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
index f7157c1d768b..617d362eb8af 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
@@ -569,6 +569,14 @@
status = "okay";
};
+&tcphy0 {
+ status = "okay";
+};
+
+&tcphy1 {
+ status = "okay";
+};
+
&u2phy0 {
status = "okay";
Cheers,
Enric
> So, all in all, there are two bugs:
> 1.- The regression: usb3 mode is new and does not work, BUT this
> makes the usb2 mode to be discarded.
> 2.- The new feature: usb3 mode does not work.
>
> Regards,
> Vicente.
More information about the Linux-rockchip
mailing list