From patchwork Thu Feb 16 13:06:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 94070 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp2496081qgi; Thu, 16 Feb 2017 05:07:41 -0800 (PST) X-Received: by 10.99.95.151 with SMTP id t145mr2654807pgb.75.1487250461273; Thu, 16 Feb 2017 05:07:41 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1si6918548pli.197.2017.02.16.05.07.41; Thu, 16 Feb 2017 05:07:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754934AbdBPNHj (ORCPT + 25 others); Thu, 16 Feb 2017 08:07:39 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:63123 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754616AbdBPNG1 (ORCPT ); Thu, 16 Feb 2017 08:06:27 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id v1GD6LXP021849; Thu, 16 Feb 2017 07:06:21 -0600 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v1GD6Ln3019583; Thu, 16 Feb 2017 07:06:21 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Thu, 16 Feb 2017 07:06:21 -0600 Received: from lta0400828d.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v1GD6JN5006214; Thu, 16 Feb 2017 07:06:19 -0600 From: Roger Quadros To: CC: , , , Roger Quadros Subject: [PATCH v2 0/4] usb: dwc3: dual-role support Date: Thu, 16 Feb 2017 15:06:13 +0200 Message-ID: <1487250377-13653-1-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, We rely on the OTG controller block or Extcon to provide us with VBUS and ID line status via an interrupt. This is then used to switch the controller between host, peripheral and idle roles based on the following table. ID VBUS dual-role state -- ---- --------------- 0 x A_HOST - Host controller active 1 0 B_IDLE - Both Host and Gadget controllers inactive 1 1 B_PERIPHERAL - Gadget controller active Series depends on [1] dwc3 trivial fixes - https://lkml.org/lkml/2017/2/15/204 Changelog: v2: - Use extcon device for VBUS/ID events if extcon phandle is present. - Fix bugs during system suspend/resume. cheers, -roger Roger Quadros (4): usb: dwc3: core.h: add some register definitions usb: dwc3: omap: don't miss events during suspend/resume usb: dwc3: add dual-role support usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode Documentation/devicetree/bindings/usb/dwc3.txt | 2 + drivers/usb/dwc3/core.c | 752 ++++++++++++++++++++++++- drivers/usb/dwc3/core.h | 131 ++++- drivers/usb/dwc3/dwc3-omap.c | 16 + drivers/usb/dwc3/gadget.c | 18 +- 5 files changed, 895 insertions(+), 24 deletions(-) -- 2.7.4