From patchwork Tue Mar 15 08:38:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sanchayan X-Patchwork-Id: 8586331 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 A53159F54C for ; Tue, 15 Mar 2016 08:54:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CF07B201F5 for ; Tue, 15 Mar 2016 08:54:50 +0000 (UTC) Received: from bombadil.infradead.org (unknown [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 EE035201EF for ; Tue, 15 Mar 2016 08:54:49 +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 1afkbN-0000rf-QE; Tue, 15 Mar 2016 08:45:17 +0000 Received: from mail-pf0-x22e.google.com ([2607:f8b0:400e:c00::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1afkav-00006k-2S for linux-arm-kernel@lists.infradead.org; Tue, 15 Mar 2016 08:44:50 +0000 Received: by mail-pf0-x22e.google.com with SMTP id n5so19927185pfn.2 for ; Tue, 15 Mar 2016 01:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=cdIuj9JKhsns+rp9ZSwlVBuKLVlTMrFwOPudUu8YGiM=; b=DrmHnz9c86PGuriOm+lULzK9IiwdyIGINET4a9KrxKhZ9qlaLqvmEhHZIFpDUkhOBJ fgjdnFvZz4a5PIqKNtZzmAuHrGAYoJAb97AtiG6M62+K84xLDA8LO+nRq65vcbLVgFir l35UNYYTzIFURxS4A53On5rsH755saeIYSexKjyj7Z+QPW0suc5OW+VOFFiggf8E/4jr +5NENJ2F8fxbuaAZa/gKVkrDsZjhTmT36iL/tf+zsU39VedjbM1OzptutdA335EfKygb 5eqfcgGGtnxG4xcDOd0wvCn0k1uk/v4sEgUtPfWUUD2gPbUkdzoSfbM0fZxUuCYOs/y0 +XYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=cdIuj9JKhsns+rp9ZSwlVBuKLVlTMrFwOPudUu8YGiM=; b=BDi5wdZ7pB7NsB5SSEC7rdvYKqr1Gfwy0+C3pBgf9dQ5DXeZrHdojLudjQgcuJsOez n0eFaGoUFxHVI6ynFPoXr9u0oJoaen7y4/Przgkou41sODMB/6d6JZzAPwBySDvzwy4F /IuYMH/tT55jQmVAq79UDTiYgoskUqrq4GIj3eDVmmC6OLxChmuIhpcfYHySGmvX0hfF dGxD/O5PxHmgW8oeNw6sdKZa9utq+DNBT7e2WIBYjKtDuzCy5tzjd7ububw43a704dTV uvTAqfZrI3938eQ9jt4S2FFaCcE7CQHEDHafvx8AEfUMxqsKnyaZ1Nsb2fRhFbaf5wNB zLIQ== X-Gm-Message-State: AD7BkJKM9Io90YxXKaNtYujf2eHDPdNYcaZzVgfPpJvPf7o6R5LAn8qruRZyKGs0PmTvuQ== X-Received: by 10.98.72.213 with SMTP id q82mr36869316pfi.164.1458031468325; Tue, 15 Mar 2016 01:44:28 -0700 (PDT) Received: from localhost ([115.115.225.206]) by smtp.gmail.com with ESMTPSA id f8sm37680088pfj.49.2016.03.15.01.44.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Mar 2016 01:44:27 -0700 (PDT) From: Sanchayan Maity To: Peter.Chen@nxp.com Subject: [RFC PATCH 4/4] ARM: dts: vf-colibri: USB device/host switch using extcon gpio Date: Tue, 15 Mar 2016 14:08:30 +0530 Message-Id: X-Mailer: git-send-email 2.7.3 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160315_014449_433333_AD6ECD89 X-CRM114-Status: UNSURE ( 9.30 ) X-CRM114-Notice: Please train this message. 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@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, stefan@agner.ch, Sanchayan Maity , ivan.ivanov@linaro.org, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org, marcel@ziswiler.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RDNS_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 Use USBC_DET feature of standard Colibri SODIMM pin 137 for USB device/host switching using the generic extcon USB gpio implementation. Signed-off-by: Sanchayan Maity --- arch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 12 ++++++++++++ arch/arm/boot/dts/vf-colibri.dtsi | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi index 4d8b7f6..794c02e 100644 --- a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi +++ b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi @@ -50,6 +50,14 @@ clock-frequency = <16000000>; }; + extcon_usbc_det: usbc_det { + compatible = "linux,extcon-usb-gpio"; + debounce = <25>; + id-gpio = <&gpio3 6 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbc_det>; + }; + reg_3v3: regulator-3v3 { compatible = "regulator-fixed"; regulator-name = "3.3V"; @@ -146,6 +154,10 @@ status = "okay"; }; +&usbdev0 { + extcon = <&extcon_usbc_det>, <&extcon_usbc_det>; +}; + &usbh1 { vbus-supply = <®_usbh_vbus>; }; diff --git a/arch/arm/boot/dts/vf-colibri.dtsi b/arch/arm/boot/dts/vf-colibri.dtsi index fda7f28..551b6a1 100644 --- a/arch/arm/boot/dts/vf-colibri.dtsi +++ b/arch/arm/boot/dts/vf-colibri.dtsi @@ -171,6 +171,7 @@ &usbdev0 { disable-over-current; + dr_mode = "otg"; status = "okay"; }; @@ -326,6 +327,12 @@ >; }; + pinctrl_usbc_det: gpio_usbc_det { + fsl,pins = < + VF610_PAD_PTC29__GPIO_102 0x22ed + >; + }; + pinctrl_usbh1_reg: gpio_usb_vbus { fsl,pins = < VF610_PAD_PTD4__GPIO_83 0x22ed