From patchwork Mon Mar 6 22:34:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9607803 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 5319D602B4 for ; Mon, 6 Mar 2017 22:38:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A9EE28472 for ; Mon, 6 Mar 2017 22:38:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F3C628484; Mon, 6 Mar 2017 22:38:52 +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 00EE728472 for ; Mon, 6 Mar 2017 22:38:52 +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=BHClTocTRAi1sNigKWcYqftmBmAHhCYeDfBF4spx274=; b=LAZpiFgFV/Lv6K78cTlLExNKgh 5kW9smg3y9P4B0VfogJG7tBlVT5lRjS2KPNuqvaJqXOfa6N0cQlXxblEiqy9qIVAIcZQ47r6Llvho bHl4tPNgzSTEfrFdM+3dUafWMw3NlBnjcro55szShCYt8z9FGcLWtkjLgcLGT96St7gQ6oAQjJsoD m4F6q01osan2xg2TG1RUaizjdzCcKM4TNFnWE7+fCZx5XB3J98wzE8apArWw0qOUIGhEFkMpgXcKB mBnsstXxucTvuFpe2irPFQNAJhxovd3DPal+Qn5MI8Rd7hjYNZKru/Wrlygy1QCowujO9ZYPioHIA PXG1IddQ==; 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 1cl1H9-0001h5-AE; Mon, 06 Mar 2017 22:38:43 +0000 Received: from forward20j.cmail.yandex.net ([2a02:6b8:0:1630::f7]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cl1Gj-0001OU-GH for linux-arm-kernel@lists.infradead.org; Mon, 06 Mar 2017 22:38:20 +0000 Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [77.88.29.85]) by forward20j.cmail.yandex.net (Yandex) with ESMTP id 26D9E22841; Tue, 7 Mar 2017 01:37:51 +0300 (MSK) Received: from smtp2p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2p.mail.yandex.net (Yandex) with ESMTP id 238911A80001; Tue, 7 Mar 2017 01:37:45 +0300 (MSK) Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id iKpshfZaVm-beUWge3q; Tue, 07 Mar 2017 01:37:44 +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=1488839865; bh=CWl1orN4fEIxgV7oKN2YeFsoQZLWFUTVlAv8cCU9/28=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=WqGJCyaV2fPL9PfxCELH+pmoBTmPbwhYfvFS+dHFTOUZjxsi8WKylnM56MkoRncJc 3JJaOE8D12KFBGO1sYSm425xAXwiWMioKPlc8hpyrz0h0z2Mx/NIH2OzpefkQn5+y/ kw6Inh2tj8L2DccCA3y6qnSxmLRj8PVQ4OPbXZjk= Authentication-Results: smtp2p.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 v3 4/5] ARM: dts: sun8i: h3: enable USB OTG on Orange Pi One Date: Tue, 7 Mar 2017 06:34:48 +0800 Message-Id: <20170306223449.21404-5-icenowy@aosc.xyz> X-Mailer: git-send-email 2.11.1 In-Reply-To: <20170306223449.21404-1-icenowy@aosc.xyz> References: <20170306223449.21404-1-icenowy@aosc.xyz> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170306_143817_733709_23ADA221 X-CRM114-Status: GOOD ( 11.12 ) 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 One features a MicroUSB port that can work in both host mode and peripheral mode. When in host mode, its VBUS is controlled via a GPIO; when in peripheral mode, its VBUS cannot be used to power up the board. Add support for this port. Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai --- Changes in v3: - Add "h3:" in commit message. arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts index 34da853ee037..b87778d74239 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts @@ -90,6 +90,10 @@ }; }; +&ehci0 { + status = "okay"; +}; + &ehci1 { status = "okay"; }; @@ -104,6 +108,10 @@ status = "okay"; }; +&ohci0 { + status = "okay"; +}; + &ohci1 { status = "okay"; }; @@ -127,6 +135,11 @@ }; }; +®_usb0_vbus { + gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */ + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_a>; @@ -151,7 +164,14 @@ status = "disabled"; }; +&usb_otg { + dr_mode = "otg"; + status = "okay"; +}; + &usbphy { - /* USB VBUS is always on */ + /* USB Type-A port's VBUS is always on */ + usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ + usb0_vbus-supply = <®_usb0_vbus>; status = "okay"; };