From patchwork Thu Jul 12 16:00:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 10521879 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 22EB9602C8 for ; Thu, 12 Jul 2018 16:00:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DD4B29AB9 for ; Thu, 12 Jul 2018 16:00:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BB2529B28; Thu, 12 Jul 2018 16:00:42 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI, UNPARSEABLE_RELAY autolearn=unavailable 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 9F55C29B9B for ; Thu, 12 Jul 2018 16:00:41 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=o6IIqfNAaDoyk3MZUC58wyn3afGY77VooRHxd9gdLxw=; b=enj glwAQG3H1xlhZm/VO4PwrvkM8SPmav2aip6UdiFe+uvel/nuOv5HkYmfBBX/TK9xnVAuTT1RqbKDI Y5s/3ysXomaf6Ii5QVmRGRG4He/YrOsdP0H7KLLX3LHJh9spXKMWoBjTvW8dBJQ3T52n7fqaaKiz9 uth37/MxSGVWme32HGOG9vFvBE8N98DDV+U7jAtA77fnElO/F6/ZXVTtNXsbJ02GZfqd9+ZI0oIkb BxYv/6J3gYwDTWAgxEaF60FVhi4SkLUcpBvK70qS94Z/IlbB++8jG9BsOuorFiCaOpJr2oMOrmlxB V+KjQAQmdtdLkLfEDWGVU1Z2bsFBOTQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fde1G-00080m-Jd; Thu, 12 Jul 2018 16:00:38 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fde17-0007q3-2z; Thu, 12 Jul 2018 16:00:30 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id A3B5027C477 From: Ezequiel Garcia To: linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Heiko Stuebner , devicetree@vger.kernel.org Subject: [PATCH] arm64: dts: rockchip: add USB 2.0 and 3.0 support on Ficus board Date: Thu, 12 Jul 2018 13:00:08 -0300 Message-Id: <20180712160008.30972-1-ezequiel@collabora.com> X-Mailer: git-send-email 2.18.0.rc2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180712_090029_263390_EA36CFCC X-CRM114-Status: GOOD ( 10.91 ) 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: Mark Rutland , Enric Balletbo i Serra , kernel@collabora.com, Ezequiel Garcia , Rob Herring MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Enric Balletbo i Serra The board exposes two types A ports, one is USB 3.0, up to 5.0Gbps and another one is USB 2.0 up to 480Mbps. Enable the USB PHYs and the USB controllers to enable theses devices. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Ezequiel Garcia --- Heiko, Enric finally had some time to take a look at the schematics, and help with the USB stuff. Thanks to him, USB host is working now! \o/ USB Type-C will have to wait until we have some spare time to debug the fusb302 driver. arch/arm64/boot/dts/rockchip/rk3399-ficus.dts | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts b/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts index 0d14183dd4a9..d0631c02749c 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts @@ -61,6 +61,16 @@ vin-supply = <&vcc3v3_sys>; }; + vcc5v0_host: vcc5v0-host-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio4 27 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&host_vbus_drv>; + regulator-name = "vcc5v0_host"; + regulator-always-on; + }; + vdd_log: vdd-log { compatible = "pwm-regulator"; pwms = <&pwm2 0 25000 0>; @@ -454,6 +464,13 @@ <1 14 RK_FUNC_GPIO &pcfg_pull_down>; }; }; + + usb2 { + host_vbus_drv: host-vbus-drv { + rockchip,pins = + <4 27 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; &pwm2 { @@ -487,6 +504,40 @@ status = "okay"; }; +&tcphy0 { + status = "okay"; +}; + +&tcphy1 { + status = "okay"; +}; + +&u2phy0 { + status = "okay"; +}; + +&u2phy1 { + status = "okay"; +}; + +&u2phy0_host { + phy-supply = <&vcc5v0_host>; + status = "okay"; +}; + +&u2phy1_host { + phy-supply = <&vcc5v0_host>; + status = "okay"; +}; + +&u2phy0_otg { + status = "okay"; +}; + +&u2phy1_otg { + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_xfer &uart0_cts>; @@ -497,6 +548,40 @@ status = "okay"; }; +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; + +&usb_host1_ehci { + status = "okay"; +}; + +&usb_host1_ohci { + status = "okay"; +}; + +&usbdrd3_0 { + status = "okay"; +}; + +&usbdrd_dwc3_0 { + status = "okay"; + dr_mode = "host"; +}; + +&usbdrd3_1 { + status = "okay"; +}; + +&usbdrd_dwc3_1 { + status = "okay"; + dr_mode = "host"; +}; + &vopb { status = "okay"; };