From patchwork Sun Mar 19 16:31:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9632727 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 7CF1B6020B for ; Sun, 19 Mar 2017 16:33:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EB16284D1 for ; Sun, 19 Mar 2017 16:33:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63414284D6; Sun, 19 Mar 2017 16:33:26 +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 autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 82D7428307 for ; Sun, 19 Mar 2017 16:33:24 +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:References: In-Reply-To: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:List-Owner; bh=s5B9pxahJEX4J2/E3YguBSQBSwoRbSkbS//yZefd5ug=; b=cSdgo0BSTwRDLTBSPgzz0LttA7 UGUFh6vBGGRDpTlDbg2Bh5Sqd5dmr8zk9L4H/hNPsHrjFRrDTwgtB9qhMqYXF08nwmYuXAH/MmDc1 Wl1fgcLcjwaM9Wi9kdjlS/wxHS9PJv9q3GNW59owWpyw8WxUb5ZNS42Z6KMGjwSsknI92I4MEv23O inwFssfIC/3V4EofnH8TdywG/Zqm8Ov0EF2yjeZ11MhV9YHL8FlwTGwlLa9uTkvN+01hhc6IsZhaH 4mQnGjY/af29xSb/7gBvFldD7uBXEpiRhoWxDWcowPzUd50UvbbeS3Mtxpb5ZJwSNGpVuEaupck/6 0inXxomA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cpdlf-0006NP-5R; Sun, 19 Mar 2017 16:33:19 +0000 Received: from forward12h.cmail.yandex.net ([2a02:6b8:0:f35::9d]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cpdla-00063w-Pg for linux-arm-kernel@lists.infradead.org; Sun, 19 Mar 2017 16:33:17 +0000 Received: from smtp1h.mail.yandex.net (smtp1h.mail.yandex.net [84.201.187.144]) by forward12h.cmail.yandex.net (Yandex) with ESMTP id A2E8C21779; Sun, 19 Mar 2017 19:32:50 +0300 (MSK) Received: from smtp1h.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1h.mail.yandex.net (Yandex) with ESMTP id B47838C0B33; Sun, 19 Mar 2017 19:32:42 +0300 (MSK) Received: by smtp1h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 5soN56LhFL-WaGCmBb3; Sun, 19 Mar 2017 19:32:41 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aosc.xyz; s=mail; t=1489941161; bh=BZ87TiW0Ke5fbIgVDjhZ5yjIO2rRLU/s9TUPK+myuPQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=u9FBuOvoPoOe8jEp22Tx92wM64ON5Rm1wrrPc04j0ERFR2vYb10FtCXlJwxK6yLhP jLnJm+SOwiqSSuwCa+iWYtS/htFhmBkJzJFsZgLhYMPjJWF6tV2wHUXv7YAN/k5fHU arME5Me/4EOiQ2GbzBvfO+vDQG4Vc13TCnu01EEw= Authentication-Results: smtp1h.mail.yandex.net; dkim=pass header.i=@aosc.xyz X-Yandex-ForeignMX: US X-Yandex-Suid-Status: 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 1130000036118848 From: Icenowy Zheng To: Rob Herring , Maxime Ripard , Chen-Yu Tsai , Kishon Vijay Abraham I , Hans de Goede Subject: [PATCH v4 8/8] arm64: allwinner: h5: enable USB OTG on Orange Pi PC 2 board Date: Mon, 20 Mar 2017 00:31:18 +0800 Message-Id: <20170319163118.56301-4-icenowy@aosc.xyz> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170319163118.56301-1-icenowy@aosc.xyz> References: <20170319163118.56301-1-icenowy@aosc.xyz> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170319_093315_041756_45EF3654 X-CRM114-Status: UNSURE ( 9.70 ) X-CRM114-Notice: Please train this message. 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: devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Icenowy Zheng 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 Orange Pi PC 2 board features a OTG port like the one on older H3 Orange Pi's, with PG12 pin being the id det pin and PL2 being the vbus driver pin. Add support for it. Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai --- New patch in v4. .../boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 27 +++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts index 30639729920d..dfecc17dcc92 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts @@ -90,6 +90,16 @@ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; }; }; + + reg_usb0_vbus: usb0-vbus { + compatible = "regulator-fixed"; + regulator-name = "usb0-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */ + status = "okay"; + }; }; &codec { @@ -100,6 +110,10 @@ status = "okay"; }; +&ehci0 { + status = "okay"; +}; + &ehci1 { status = "okay"; }; @@ -127,6 +141,10 @@ status = "okay"; }; +&ohci0 { + status = "okay"; +}; + &ohci1 { status = "okay"; }; @@ -157,7 +175,14 @@ status = "disabled"; }; +&usb_otg { + dr_mode = "otg"; + status = "okay"; +}; + &usbphy { - /* USB VBUS is always on */ + /* USB Type-A ports' VBUS is always on */ + usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ + usb0_vbus-supply = <®_usb0_vbus>; status = "okay"; };