From patchwork Mon Nov 3 16:46:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 5218251 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 54E0A9F349 for ; Mon, 3 Nov 2014 16:47:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 795AE2015A for ; Mon, 3 Nov 2014 16:47:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A408E2013A for ; Mon, 3 Nov 2014 16:47:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753308AbaKCQrI (ORCPT ); Mon, 3 Nov 2014 11:47:08 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:59410 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751908AbaKCQrF (ORCPT ); Mon, 3 Nov 2014 11:47:05 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id sA3Gl0Hv032387; Mon, 3 Nov 2014 10:47:01 -0600 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 sA3Gl0Pq019828; Mon, 3 Nov 2014 10:47:00 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Mon, 3 Nov 2014 10:47:00 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id sA3GkxtC000906; Mon, 3 Nov 2014 10:47:00 -0600 From: Felipe Balbi To: Tony Lindgren CC: Linux OMAP Mailing List , George Cherian , Sekhar Nori , Felipe Balbi Subject: [PATCH] ARM: dts: dra7-evm: Add extcon nodes for USB Date: Mon, 3 Nov 2014 10:46:27 -0600 Message-ID: <1415033187-11192-1-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.1.0.GIT MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.5 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 From: George Cherian Add extcon nodes for USB, without which USB won't work. EXTCON is used to tell dwc3-omap.ko that a cable has been connected. It also passes the state of ID pin so that can be written to UTMI_STATUS register on dwc3-omap's address space. Signed-off-by: George Cherian Signed-off-by: Sekhar Nori Signed-off-by: Felipe Balbi --- ********************************************************** ** ** ** UNTESTED ** ********************************************************** This patch was taken from TI's v3.14 tree available at [1], the patch was tested there. I didn't test on v3.18-rc3 because my DRA7 board has broken down. Working to get a replacement. Anyway, I'd suggest Tony to wait for a Tested-by tag. Note that in order for this to work you need following extra patches: http://marc.info/?l=linux-omap&m=141503217215492&w=2 http://marc.info/?l=linux-omap&m=141503238715590&w=2 http://marc.info/?l=linux-omap&m=141503246515631&w=2 http://marc.info/?l=linux-omap&m=141503241315599&w=2 http://marc.info/?l=linux-omap&m=141503282815782&w=2 [1] http://git.ti.com/ti-linux-kernel/ti-linux-kernel/commits/ti-linux-3.14.y arch/arm/boot/dts/dra7-evm.dts | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts index c6ce625..7710f29 100644 --- a/arch/arm/boot/dts/dra7-evm.dts +++ b/arch/arm/boot/dts/dra7-evm.dts @@ -26,6 +26,18 @@ regulator-max-microvolt = <3300000>; }; + extcon1: dra7x_usbid_extcon1 { + compatible = "linux,extcon-gpio"; + gpios = <&pcf_gpio_21 1 GPIO_ACTIVE_LOW>; + cable-name = "USB-HOST"; + }; + + extcon2: dra7x_usbid_extcon2 { + compatible = "linux,extcon-gpio"; + gpios = <&pcf_gpio_21 2 GPIO_ACTIVE_LOW>; + cable-name = "USB-HOST"; + }; + vtt_fixed: fixedregulator-vtt { compatible = "regulator-fixed"; regulator-name = "vtt_fixed"; @@ -291,6 +303,19 @@ }; }; }; + + pcf_gpio_21: gpio@21 { + compatible = "ti,pcf8575"; + reg = <0x21>; + lines-initial-states = <0x1408>; + gpio-controller; + #gpio-cells = <2>; + interrupt-parent = <&gpio6>; + interrupts = <14 IRQ_TYPE_EDGE_FALLING>; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; &i2c2 { @@ -420,6 +445,14 @@ }; }; +&omap_dwc3_1 { + extcon = <&extcon1>; +}; + +&omap_dwc3_2 { + extcon = <&extcon2>; +}; + &usb1 { dr_mode = "peripheral"; pinctrl-names = "default";