From patchwork Tue Jun 28 09:42:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 9202415 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 9275860757 for ; Tue, 28 Jun 2016 09:44:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 814BD28593 for ; Tue, 28 Jun 2016 09:44:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7600E28600; Tue, 28 Jun 2016 09:44:36 +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, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 1403628593 for ; Tue, 28 Jun 2016 09:44:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bHpY3-0006jH-K0; Tue, 28 Jun 2016 09:43:15 +0000 Received: from bear.ext.ti.com ([198.47.19.11]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bHpY0-0006cA-Oc for linux-arm-kernel@lists.infradead.org; Tue, 28 Jun 2016 09:43:13 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id u5S9gnPH027816; Tue, 28 Jun 2016 04:42:49 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id u5S9gnCk020779; Tue, 28 Jun 2016 04:42:49 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.294.0; Tue, 28 Jun 2016 04:42:49 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u5S9gmIP008337; Tue, 28 Jun 2016 04:42:48 -0500 From: Grygorii Strashko To: Santosh Shilimkar Subject: [PATCH] ARM: dts: keystone: specify usb mode explicitly Date: Tue, 28 Jun 2016 12:42:45 +0300 Message-ID: <20160628094245.9521-1-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.9.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160628_024312_920715_471B90EE X-CRM114-Status: UNSURE ( 8.80 ) X-CRM114-Notice: Please train this message. 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@vger.kernel.org, Grygorii Strashko , Sekhar Nori , Rob Herring , linux-arm-kernel@lists.infradead.org, Roger Quadros 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 The USB OTG mode is not supported by Kestone 2 devices, as result, the USB devices enumeration and detection will not work properly when kernel is built with CONFIG_USB_DWC3_DUAL_ROLE=y (default for multi platform build): - it's required to load gadget drivers manually to make host mode work and this confuses current Keystone 2 users - device mode is not working, because port can't detect and switch to peripheral/host mode dynamically. Hence, specify usb mode explicitly in DT: usb0 = "host" for all KS2 devices and usb1 = "peripheral" for K2E. Cc: Sekhar Nori Cc: Roger Quadros Signed-off-by: Grygorii Strashko --- arch/arm/boot/dts/keystone-k2e-evm.dts | 12 ++++++++++-- arch/arm/boot/dts/keystone-k2e.dtsi | 4 ++-- arch/arm/boot/dts/keystone-k2hk-evm.dts | 6 +++++- arch/arm/boot/dts/keystone-k2l-evm.dts | 6 +++++- arch/arm/boot/dts/keystone.dtsi | 4 ++-- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/keystone-k2e-evm.dts b/arch/arm/boot/dts/keystone-k2e-evm.dts index 4c32ebc..ae1ebe7 100644 --- a/arch/arm/boot/dts/keystone-k2e-evm.dts +++ b/arch/arm/boot/dts/keystone-k2e-evm.dts @@ -47,18 +47,26 @@ status = "okay"; }; -&usb { +&keystone_usb0 { status = "okay"; }; +&usb0 { + dr_mode = "host"; +}; + &usb1_phy { status = "okay"; }; -&usb1 { +&keystone_usb1 { status = "okay"; }; +&usb1 { + dr_mode = "peripheral"; +}; + &i2c0 { dtt@50 { compatible = "at,24c1024"; diff --git a/arch/arm/boot/dts/keystone-k2e.dtsi b/arch/arm/boot/dts/keystone-k2e.dtsi index 96b349f..3540a1d 100644 --- a/arch/arm/boot/dts/keystone-k2e.dtsi +++ b/arch/arm/boot/dts/keystone-k2e.dtsi @@ -61,7 +61,7 @@ status = "disabled"; }; - usb1: usb@25000000 { + keystone_usb1: usb@25000000 { compatible = "ti,keystone-dwc3"; #address-cells = <1>; #size-cells = <1>; @@ -74,7 +74,7 @@ dma-ranges; status = "disabled"; - dwc3@25010000 { + usb1: dwc3@25010000 { compatible = "synopsys,dwc3"; reg = <0x25010000 0x70000>; interrupts = ; diff --git a/arch/arm/boot/dts/keystone-k2hk-evm.dts b/arch/arm/boot/dts/keystone-k2hk-evm.dts index b38b344..2156ff9 100644 --- a/arch/arm/boot/dts/keystone-k2hk-evm.dts +++ b/arch/arm/boot/dts/keystone-k2hk-evm.dts @@ -83,10 +83,14 @@ status = "okay"; }; -&usb { +&keystone_usb0 { status = "okay"; }; +&usb0 { + dr_mode = "host"; +}; + &aemif { cs0 { #address-cells = <2>; diff --git a/arch/arm/boot/dts/keystone-k2l-evm.dts b/arch/arm/boot/dts/keystone-k2l-evm.dts index 7f9c2e9..056b42f 100644 --- a/arch/arm/boot/dts/keystone-k2l-evm.dts +++ b/arch/arm/boot/dts/keystone-k2l-evm.dts @@ -32,10 +32,14 @@ status = "okay"; }; -&usb { +&keystone_usb0 { status = "okay"; }; +&usb0 { + dr_mode = "host"; +}; + &i2c0 { dtt@50 { compatible = "at,24c1024"; diff --git a/arch/arm/boot/dts/keystone.dtsi b/arch/arm/boot/dts/keystone.dtsi index e34b226..96c9943 100644 --- a/arch/arm/boot/dts/keystone.dtsi +++ b/arch/arm/boot/dts/keystone.dtsi @@ -188,7 +188,7 @@ status = "disabled"; }; - usb: usb@2680000 { + keystone_usb0: usb@2680000 { compatible = "ti,keystone-dwc3"; #address-cells = <1>; #size-cells = <1>; @@ -201,7 +201,7 @@ dma-ranges; status = "disabled"; - dwc3@2690000 { + usb0: dwc3@2690000 { compatible = "synopsys,dwc3"; reg = <0x2690000 0x70000>; interrupts = ;