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: 10521877 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 ED52B602B3 for ; Thu, 12 Jul 2018 16:00:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9C5129862 for ; Thu, 12 Jul 2018 16:00:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7A9E29ACE; Thu, 12 Jul 2018 16:00:35 +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=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 95D1529B8E for ; Thu, 12 Jul 2018 16:00:34 +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=XFDCoK6Jekqs/YD70W+FW6wxwm9m8CidPkHMjRIUWzw=; b=Yy9 R5LoOlNAI+m30zn8kDJiorM944NxCZOU6ZhGEtITQAg2yjqvJ7Jj+rtp3qCrzK6e3b3QJUott7Qpv XBSPTVAtN8e6UoE5PZw0uq92vZcpDlvancgoFdn+zxGfmAWInugJekNW3lud/4bWAvHWcXkD+1QUW aRa83KJLXwOvOYDP9EvX++BkZG5N79MjuJmdsU0eVigkf9t4XrVJTS1JmsrFJcLWyv6jOT08Oi6XL da7NJuc4LqnJJXl3Qh3gnnHHMtToGy8zLSY85vqCce5DIrbk3OhDrYTxlXY2eeXNlKxlePHxUbxRa z5y4iTU9YJkOkhkD3G4GVnRG1jtbk9g==; 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 1fde19-0007rm-MC; Thu, 12 Jul 2018 16:00:31 +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-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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"; };