From patchwork Sat Mar 25 14:50:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9644655 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 2426F60327 for ; Sat, 25 Mar 2017 14:54:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1187D25D9E for ; Sat, 25 Mar 2017 14:54:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 05A5C27165; Sat, 25 Mar 2017 14:54:34 +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 A642A25D9E for ; Sat, 25 Mar 2017 14:54:33 +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=Rl0kUWgh+J/1NqFXALUqAPI1oQbHJy4la1P4M8ZP5es=; b=grjPclCr+mbg88LB3SgCDkKpzK 4vy0x3c4yFBIWLPM5JMCNvW9il4C4li02gxgLDn03bftl8EZ/k7AlCg2vnV/MSdS0kh7mEMxTZRVw kwefObbNIvhIUrGouJiHrGNlbQiJB5CnoSVUJU31qXILRxDGRYHPQk+RpIfNscqIzFqRZdH6YkExK uIROvybPue9Mxif5eZZO8bXLQeWhBMSWvo1ywvgbwzXVJhiz+imkRa7uWyq4ohtkAMCpfoD6PCydh ITJ07EMtV30QoLBNoK4yef0iXm8ShvTK5hvdgv4RCifoj0KsuNkjI+BEvxesDBdOUx73RU9OR2zUk D51WL/KQ==; 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 1crn5M-00056B-S3; Sat, 25 Mar 2017 14:54:32 +0000 Received: from forward12o.cmail.yandex.net ([37.9.109.179]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1crn50-0004gt-20 for linux-arm-kernel@lists.infradead.org; Sat, 25 Mar 2017 14:54:18 +0000 Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b6:6]) by forward12o.cmail.yandex.net (Yandex) with ESMTP id 3268E219D7; Sat, 25 Mar 2017 17:53:47 +0300 (MSK) Received: from smtp1p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1p.mail.yandex.net (Yandex) with ESMTP id A9ABB1780A68; Sat, 25 Mar 2017 17:53:40 +0300 (MSK) Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id FLDdwlGmvF-rY9ae0WN; Sat, 25 Mar 2017 17:53:39 +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=1490453620; bh=YTliu2hGZnmYJlmkcTex30UYTXKXrRbeXSRMVVIC+p4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=BUDltmHr2H3qU8owUXrUuK5yHWdtPRH0CEu34VSnZUdECzE/iF7nECDZ0qI6nejon T3y/cg195StJHVaN0gmsygw/dvgpmXbzCU22TNbckd5vK2FmeWDGfUYZqvZbFZceLu vKAqoFDxqkG3GeU/V0q7jMa2xP6iH1ZGnPOJCrj4= Authentication-Results: smtp1p.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 1130000036118848 From: Icenowy Zheng To: Kishon Vijay Abraham I , Rob Herring , Maxime Ripard , Chen-Yu Tsai Subject: [PATCH v5 8/8] arm64: allwinner: h5: enable USB OTG on Orange Pi PC 2 board Date: Sat, 25 Mar 2017 22:50:15 +0800 Message-Id: <20170325145015.22076-9-icenowy@aosc.xyz> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170325145015.22076-1-icenowy@aosc.xyz> References: <20170325145015.22076-1-icenowy@aosc.xyz> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170325_075410_604390_0758AFD7 X-CRM114-Status: UNSURE ( 9.69 ) 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 --- Changes in v5: - Add Chen-Yu's ACK. .../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"; };