From patchwork Mon Feb 26 12:26:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enric Balletbo i Serra X-Patchwork-Id: 10242155 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4F6CB602A0 for ; Mon, 26 Feb 2018 12:27:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3BB4629FBE for ; Mon, 26 Feb 2018 12:27:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3004E29FC2; Mon, 26 Feb 2018 12:27:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A5ED629FBE for ; Mon, 26 Feb 2018 12:27:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EvHB0K8Rde2Qp/AtLTOBNI4Nq1OHAdo4TS6MSf0Wayc=; b=pbteAvvm9ApBgf rAJee6df/+6ApnmczE9Qw/y6BeBZN5od7dUwag+jfT4dI4jsolBIy1L6jshylkcbhg3flS6HzdhvV nX0YxaPjIp0kK/UBqyu5GFQ//4imsi/NZmmwJF+7mf8kKlHXdanw/6E8/a1y/z3hxvY84zrnouK2d p1Zim+zo2HBSxWtHXeFqkbBzrPMb98Cf3fEVfLC0gQUlt8ShxBAN6CT1gPtcTnVT+7lJZezcPKZdN 6meJkbz7E0PtAJFiHqI59UBypOvSQhGTVEjErSEJBRawFayrjgVOMnoH74NQlCdef3S9aUPDpFZYN DRMzCS4TcJ8umvGJgJkQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eqHs9-00027k-Uf; Mon, 26 Feb 2018 12:27:13 +0000 Received: from bhuna.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e3e3]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eqHs6-000262-Np for linux-rockchip@lists.infradead.org; Mon, 26 Feb 2018 12:27:12 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 4B43F260BDF Subject: Re: USB3 regression in RK3399 To: Vicente Bergas References: <14336855.DpIqxNeK64@phil> From: Enric Balletbo i Serra Message-ID: <2e9f6efc-4ced-9bcb-0399-993208cce8d3@collabora.com> Date: Mon, 26 Feb 2018 13:26:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180226_042711_058691_5FF4E0B7 X-CRM114-Status: GOOD ( 24.45 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: William wu , Heiko Stuebner , linux-rockchip@lists.infradead.org Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 > 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 > Signed-off-by: Heiko Stuebner > --- > 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 = ; > 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 = ; > 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. 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. 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";