From patchwork Mon Mar 6 22:34:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9607805 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 5FE04602B4 for ; Mon, 6 Mar 2017 22:43:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87B4128472 for ; Mon, 6 Mar 2017 22:43:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7AA2528484; Mon, 6 Mar 2017 22:43:47 +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 F2D0E28472 for ; Mon, 6 Mar 2017 22:43:46 +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=dO6QtDNUP2Ugyv7k3shKxl60NwV8igw3s+LznQZejo8=; b=gUidWClwz9glTzqWccfsQg0FKo goMvBpWMstzNim4e3TfYqcmHCGgBs8Zjg+0CNdodfHv9motrtl7VCfAASYYHk8UHjMTMF845+cCkW dBDxmdghxeYkHhYAUZcpmnj2YR8FCOuGTO1mf3hzgxLe/xGbLHRHrea24yCRGnOccKUagO21BoXI7 GYayKjqrfPkc2VKcCP6EvdADbU8XZdklAwxuzpyKumwy/trQa5An+217Br1goMU4VYPkb+kh2eaYa wE4hfs4Sy8nez1+W1ASxX1Y0tA2Xvd9fyJ6Hv5sFnLClVLycdbOTRUfg7y4QG2fzTR7N0RYeZLhoL EIHnyS8A==; 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 1cl1M0-0003Rj-G1; Mon, 06 Mar 2017 22:43:44 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cl1Ly-0003Qg-Lx for linux-arm-kernel@bombadil.infradead.org; Mon, 06 Mar 2017 22:43:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=mKlZsv4f7uXvIagActCwka4hqLa6Z0e3tL+WSAWmz5s=; b=XglPgMo5RIjpoiePN3D9UetnW 38CZSI5YDBIr5MwNFululeguu+YAtyPC54ScfSGJE7mMsuM9SpBokcY5P4dnpZ0oGJEIvxUvbxzOH rcsqBTBNxwXC1tNdxDZbbYlr8Bea1hMDfdG3zII1Z/3INsWy4pwPgJQrkmCEsy4l5zkZCSXBmH8T5 sSDfvCM/fviWeuaOpPXnd/fiGyj6JB9sUiAW6fliD+17KyyiXAFwZNv8nvq6ItCTitpB1mw/28pOa SbFE5mzLS19+ZCh7+I706FuE1nC8ak+7RZ8mDMCdMPWCEYFtqHGeGyU40RqHw9zSZVjKtb1uZib+p fo9vsm7vA==; Received: from forward7m.cmail.yandex.net ([2a02:6b8:b030::f]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cl1Hk-0001Ji-V5 for linux-arm-kernel@lists.infradead.org; Mon, 06 Mar 2017 22:39:26 +0000 Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [77.88.29.85]) by forward7m.cmail.yandex.net (Yandex) with ESMTP id 372C221000; Tue, 7 Mar 2017 01:38:56 +0300 (MSK) Received: from smtp2p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2p.mail.yandex.net (Yandex) with ESMTP id 13B281A80001; Tue, 7 Mar 2017 01:38:48 +0300 (MSK) Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id iKpshfZaVm-chUKgX5B; Tue, 07 Mar 2017 01:38:47 +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=1488839928; bh=mKlZsv4f7uXvIagActCwka4hqLa6Z0e3tL+WSAWmz5s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=qPxQLPYlYnJNv1CBZiGZDTNfurvkkGucRQ6kmxpfmlPM27bSKS/T3DcRf6pBzqytL UeFeIeAfAfj+DwOrZpdXog0LOk5mI7G+dkkKjlb4ddYBkwWPFYMDmRmMmkbbG9Qy5f 9k+xIt2+o03LO2PvLQwolnJA2sQdKbVglZeNXKYA= 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 5/5] ARM: dts: sun8i: h2+: enable USB OTG for Orange Pi Zero board Date: Tue, 7 Mar 2017 06:34:49 +0800 Message-Id: <20170306223449.21404-6-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_223921_294866_5C0B2CAE X-CRM114-Status: GOOD ( 13.15 ) 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 Zero board features a USB OTG port, which has a ID pin, and can be used to power up the board. However, even if the board is powered via +5V pin in GPIO/expansion headers, the VBUS in the OTG port cannot be powered up, thus it's impossible to use it in host mode with simple OTG cables. Add support for it in peripheral mode. If someone really want to use it in host mode, the mode of PHY can be switch via sysfs, then use a powered USB OTG cable or powered USB HUB to power up external USB devices. Signed-off-by: Icenowy Zheng --- New patch in v3. arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts index b7ca916d871d..63f819394b98 100644 --- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts @@ -96,6 +96,10 @@ }; }; +&ehci0 { + status = "okay"; +}; + &ehci1 { status = "okay"; }; @@ -132,6 +136,10 @@ bias-pull-up; }; +&ohci0 { + status = "okay"; +}; + &ohci1 { status = "okay"; }; @@ -154,7 +162,13 @@ status = "disabled"; }; +&usb_otg { + dr_mode = "peripheral"; + status = "okay"; +}; + &usbphy { /* USB VBUS is always on */ status = "okay"; + usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ };