From patchwork Tue Nov 17 16:12:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Kuske X-Patchwork-Id: 7638841 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A95C89F1D3 for ; Tue, 17 Nov 2015 16:14:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD6492051C for ; Tue, 17 Nov 2015 16:14:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EE26E20131 for ; Tue, 17 Nov 2015 16:14:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zyirz-0003XJ-Gx; Tue, 17 Nov 2015 16:12:35 +0000 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zyirw-0003GJ-L2 for linux-arm-kernel@lists.infradead.org; Tue, 17 Nov 2015 16:12:33 +0000 Received: by wmdw130 with SMTP id w130so161851219wmd.0 for ; Tue, 17 Nov 2015 08:12:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=w9eQiTQ32PhxzTWkfm4remZPCRSmsBFX+IadfdG+Zm4=; b=Ez7YejYLUK4Zar22XvLTu+KLqpGi8jxQrRLuq8uozq/xXheApRN/lBqLLpldmpYTDO Q96lj+ZouIS3zk9ZPoyTDnEfhGZRA7ZH5EiKMyzrOMgE0a3hIJqZPmrnu7G57VeenRlx aNNAJ4Pxx9ce8Np1wbmELZPFE2tOKFnIScCdNZcUIP3NGTsf1ijJ2t8kpmKNfW59wBp+ Jo2FtYbY5yVrNbA9hoZlynU1Fc3ZWj0Tf4wvX8DfJ7Qsx5edQCWebXan5uHdMnf6ROP5 ImlYCYw0u5OT7tPK8bLx7FmpfR69eFp5E8hwHeHTzUA9KG1fZKLUX2t1qY2eNEkxP/R0 DSDA== X-Received: by 10.194.47.244 with SMTP id g20mr50520950wjn.124.1447776729734; Tue, 17 Nov 2015 08:12:09 -0800 (PST) Received: from [192.168.25.20] (p5B2E9BBE.dip0.t-ipconnect.de. [91.46.155.190]) by smtp.googlemail.com with ESMTPSA id q3sm40628299wjr.34.2015.11.17.08.12.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Nov 2015 08:12:09 -0800 (PST) Subject: [PATCH] ARM: dts: sun8i-h3-orangepi-plus: Enable USB host controllers To: Hans de Goede References: <1447616777-24660-1-git-send-email-hdegoede@redhat.com> <1447616777-24660-5-git-send-email-hdegoede@redhat.com> <56498FA8.3050908@redhat.com> From: Jens Kuske Message-ID: <564B51D7.7090500@gmail.com> Date: Tue, 17 Nov 2015 17:12:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56498FA8.3050908@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151117_081232_847166_9EA63ABC X-CRM114-Status: GOOD ( 11.67 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree , linux-usb , Mike Turquette , Greg Kroah-Hartman , Reinder de Haan , linux-sunxi , Kishon Vijay Abraham I , Tony Prisk , Chen-Yu Tsai , Alan Stern , Maxime Ripard , linux-arm-kernel Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Enable the 2 USB host controllers used on the Orange Pi Plus and add the necessary regulators. Signed-off-by: Reinder de Haan Signed-off-by: Hans de Goede Signed-off-by: Jens Kuske --- Hi Hans, with these regulators USB works on the Orange Pi Plus too. I don't know if adding the regulators in the dts is okay, since most regulators are defined in the sunxi-common-regulators.dtsi, but we use different pins. Jens arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts index e67df59..1cb6c66 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts @@ -58,6 +58,35 @@ chosen { stdout-path = "serial0:115200n8"; }; + + reg_usb3_vbus: usb3-vbus { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&usb3_vbus_pin_a>; + regulator-name = "usb3-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-boot-on; + enable-active-high; + gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; + }; +}; + +&ehci1 { + status = "okay"; +}; + +&ehci3 { + status = "okay"; +}; + +&pio { + usb3_vbus_pin_a: usb3_vbus_pin@0 { + allwinner,pins = "PG11"; + allwinner,function = "gpio_out"; + allwinner,drive = ; + allwinner,pull = ; + }; }; &mmc0 { @@ -70,8 +99,23 @@ status = "okay"; }; +®_usb1_vbus { + gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>; + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_a>; status = "okay"; }; + +&usb1_vbus_pin_a { + allwinner,pins = "PG13"; +}; + +&usbphy { + usb1_vbus-supply = <®_usb1_vbus>; + usb3_vbus-supply = <®_usb3_vbus>; + status = "okay"; +};