From patchwork Tue Jul 7 12:16:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Edworthy X-Patchwork-Id: 6732361 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4F9D0C05AC for ; Tue, 7 Jul 2015 12:18:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6F2B5206F1 for ; Tue, 7 Jul 2015 12:18:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 75706206FC for ; Tue, 7 Jul 2015 12:18:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753833AbbGGMSq (ORCPT ); Tue, 7 Jul 2015 08:18:46 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:18857 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752926AbbGGMSo (ORCPT ); Tue, 7 Jul 2015 08:18:44 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie1.idc.renesas.com with ESMTP; 07 Jul 2015 21:18:43 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 63E0D4F22C; Tue, 7 Jul 2015 21:18:43 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id 5EC781806F; Tue, 7 Jul 2015 21:18:43 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id 57EA51800A; Tue, 7 Jul 2015 21:18:43 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac3.idc.renesas.com with ESMTP id XAP30167; Tue, 7 Jul 2015 21:18:43 +0900 X-IronPort-AV: E=Sophos;i="5.15,422,1432566000"; d="scan'208";a="191051227" Received: from unknown (HELO relay41.aps.necel.com) ([10.29.19.9]) by relmlii2.idc.renesas.com with ESMTP; 07 Jul 2015 21:18:43 +0900 Received: from DU0NOTES13.ad.ree.renesas.com ([172.29.24.131]) by relay41.aps.necel.com (8.14.4+Sun/8.14.4) with ESMTP id t67CIbNE011590; Tue, 7 Jul 2015 21:18:38 +0900 (JST) Received: from localhost.localdomain ([172.29.43.47]) by DU0NOTES13.ad.ree.renesas.com (Lotus Domino Release 8.5.3 HF466) with ESMTP id 2015070714183692-70495 ; Tue, 7 Jul 2015 14:18:36 +0200 From: Phil Edworthy To: Simon Horman Cc: Magnus Damm , Kishon Vijay Abraham I , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Sergei Shtylyov , Yoshihiro Shimoda , , , , , Phil Edworthy X-Mailer: git-send-email 1.9.1 In-Reply-To: <20150703001430.GB20396@verge.net.au> References: <20150703001430.GB20396@verge.net.au> X-TNEFEvaluated: 1 Message-ID: <1436271394-25964-1-git-send-email-phil.edworthy@renesas.com> Date: Tue, 7 Jul 2015 13:16:34 +0100 Subject: [PATCH v4] ARM: shmobile: koelsch: make USB0 perform Host/Function switching X-MIMETrack: Itemize by SMTP Server on DU0NOTES13/SERVER/REE(Release 8.5.3 HF466|March 09, 2012) at 07.07.2015 14:18:37, Serialize by Router on DU0NOTES13/SERVER/REE(Release 8.5.3 HF466|March 09, 2012) at 07.07.2015 14:18:38, Serialize complete at 07.07.2015 14:18:38 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 Both USB Host (pci0) and Function (USBHS) drivers are enabled. The USB PHY driver determines which IP block should be connected based on vbus and id signals read via gpios. Note that switch SW5 and SW6 on Koelsch board needs to be set to position 3 for this to work. Signed-off-by: Phil Edworthy --- Not for upstream until the following patches have been accepted: "usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS" "phy: rcar-gen2 usb: Add Host/Function switching for USB0" Hence, not signed off. v4: - Changed prefix in title. v3: - Remove "pinctrl-names" as well as "pinctrl-0" props. v2: - Added -gpio to dts prop names of GPIO pins. --- arch/arm/boot/dts/r8a7791-koelsch.dts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts index cffe33f..21c2fdc 100644 --- a/arch/arm/boot/dts/r8a7791-koelsch.dts +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts @@ -615,8 +615,6 @@ &pci0 { status = "okay"; - pinctrl-0 = <&usb0_pins>; - pinctrl-names = "default"; }; &pci1 { @@ -627,13 +625,14 @@ &hsusb { status = "okay"; - pinctrl-0 = <&usb0_pins>; - pinctrl-names = "default"; - renesas,enable-gpio = <&gpio5 31 GPIO_ACTIVE_HIGH>; }; &usbphy { status = "okay"; + renesas,pwr-gpio = <&gpio2 4 GPIO_ACTIVE_HIGH>; + renesas,id-gpio = <&gpio5 31 GPIO_ACTIVE_HIGH>; + renesas,vbus-gpio = <&gpio7 24 GPIO_ACTIVE_HIGH>; + renesas,vbus-pwr-gpio = <&gpio7 23 GPIO_ACTIVE_HIGH>; }; &pcie_bus_clk {