From patchwork Tue Dec 5 22:03:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Adamski X-Patchwork-Id: 10093843 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 931CF60348 for ; Tue, 5 Dec 2017 22:05:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 848DD29A0D for ; Tue, 5 Dec 2017 22:05:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7917529A21; Tue, 5 Dec 2017 22:05:00 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED 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 8B1CF29A13 for ; Tue, 5 Dec 2017 22:04:58 +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-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7VzQyS3hh5+IwPFbIx+aljpP2aQRh8YsLBXiR6kiVhE=; b=uGaULWonDG88rDPa/EI9F4I8F 1UT5Q+iLH80W58kNW8Vfm8FXqa557Vok0g1Q46Rf/im/ePcCn6pzeQzuk+wiTlm3VrSXFlnlmgynZ adEwDJ2kUOYu1ZHVVJHSkvZYBoobPKRpdVZT+bdxAMNUHupqImGoMmYQoEEzUZNkufuGZCFrGew9P hO/MWVDMcY180k65im2DTSssq78J6DGbCiJ9XraVuv7o0PvF/XkIdh+bv8DTYkgqWubuIVrvMQw4j tt2XCLhM/fYfEcUnJwFwz5ujXIeTc6KH4+VPWo/i7QquVbDfD5twGgeXIlGmK/4U92ZTntBhaHe18 ciaVYqqUQ==; 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 1eMLKS-0008Sl-BJ; Tue, 05 Dec 2017 22:04:40 +0000 Received: from box2.japko.eu ([91.121.152.53]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eMLKJ-0007Ak-DH for linux-arm-kernel@lists.infradead.org; Tue, 05 Dec 2017 22:04:38 +0000 Received: from t440.localdomain (bobine.static.korbank.pl [193.239.58.166]) by box2.japko.eu (Postfix) with ESMTPSA id 2270263BAE; Tue, 5 Dec 2017 23:03:56 +0100 (CET) Date: Tue, 5 Dec 2017 23:03:58 +0100 From: Krzysztof Adamski To: Maxime Ripard Subject: [PATCH v2] ARM: dts: sun8i: h3: enable USB OTG for NanoPi Neo board Message-ID: <20171205220358.GA28161@t440.localdomain> References: <20171205090706.et5a7dizkhn6auje@flea.lan> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20171205090706.et5a7dizkhn6auje@flea.lan> User-Agent: Mutt/1.9.1 (2017-09-22) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171205_140431_636198_40E47AAA X-CRM114-Status: UNSURE ( 8.93 ) 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: Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Russell King , Chen-Yu Tsai , Rob Herring , linux-arm-kernel@lists.infradead.org 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 Similarly to Orange Pi Zero, NanoPi Neo board has an USB OTG port with an ID pin but with unpowered VBUS. This patch enables this port in forced peripheral mode. ohci/ehci nodes are still enabled since the host mode may work if external power source is used. In that case, the mode can be switched for example via sysfs. The same strategy is used for Orange Pi Zero board DTS. Signed-off-by: Krzysztof Adamski --- Changes since version 1: - nodes sorted alphabetically - added explanation why enabling ohci/ehci still makes sense arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts index 78f6c24952dd..9f33f6fae595 100644 --- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts +++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts @@ -47,9 +47,26 @@ compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3"; }; +&ehci0 { + status = "okay"; +}; + &emac { phy-handle = <&int_mii_phy>; phy-mode = "mii"; allwinner,leds-active-low; status = "okay"; }; + +&ohci0 { + status = "okay"; +}; + +&usb_otg { + status = "okay"; + dr_mode = "peripheral"; +}; + +&usbphy { + usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ +};