From patchwork Wed Dec 5 15:19:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 152920 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp9415791ljp; Wed, 5 Dec 2018 07:19:46 -0800 (PST) X-Google-Smtp-Source: AFSGD/VCpZTCOdRUVWklrWFyWFcIqFSoHU3R0zezrEvgBRTyrlkBV1MH50L8EygXY1nfm/M9t2N0 X-Received: by 2002:a62:f54f:: with SMTP id n76mr24800469pfh.59.1544023186705; Wed, 05 Dec 2018 07:19:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544023186; cv=none; d=google.com; s=arc-20160816; b=Xpydv79acQ9hf0pusuMzIS7OcfTsOejVkRW7dTgxL6ZIagz42ceLs4Kn3MoAW4DfOc 7IshAkYuEVb9PQ5YvhHC1Eo2xEGCFnGe5Losb27cF8kUt5jxpjil0Ei+V43flXMYgr5Q NANwcsE3osYWnXCyoj6r6F2dt0uqk7Xgehe8L1EV0wR8GPzLePoEIbHOcUOfR54P768W aFO9JsubA5aBe/wLPXkNgJbbEm2tKZSCa5b+YxDDuFVVacB3TvgsgAANu7Yg/vbimoWY 1gs5ZqhcjVX6AMdznoFpmlVidnlDyUkwzlzam304IKeeSii0+oIhimOOybZVru5GMdA8 tFlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=cFF0LK1rea/6jyLZlnj/kTttiYi9qVhIlwykaHOy0AU=; b=emNHU+JPgSnldkz72DF3HxjV8iPu7fchkkfQOVoRIlRGot75Q5/rEB7ib6x3Fl8ebM v7oDoWbjgxuDk2fJbbKk7EIotR+8wofqOiCpLcmJcjb85PvAEmFkXyvkpK/PKNUvIxwl zZ2AT9wsSvft0SBf5yHxG/ZEL2r5/XhKZ+ad5P+csysgQc7Oe+EQw+U50CGs36V/M8Lt VZqHKaPORwa07t/u2257BE3vg7fc6kJe0pWl83sDAuCsQbHuM/8iSB1dSJ++qWe4ZKjh 6Phs8Mv/nVkNG+2KvGV+FvUkaeo+eLNRDmVY73KR0tsLhSJaj70vtRwKjDDAdwx0xvni T9+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="n/K3mbc+"; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l33si20556858pld.142.2018.12.05.07.19.46; Wed, 05 Dec 2018 07:19:46 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="n/K3mbc+"; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728079AbeLEPTo (ORCPT + 31 others); Wed, 5 Dec 2018 10:19:44 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:51076 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727094AbeLEPTo (ORCPT ); Wed, 5 Dec 2018 10:19:44 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id wB5FJfSs086772; Wed, 5 Dec 2018 09:19:41 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1544023181; bh=cFF0LK1rea/6jyLZlnj/kTttiYi9qVhIlwykaHOy0AU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=n/K3mbc++XpGOyomx+keolYvOXdau2nbIO4ymcfJLhVqqtA98S/ylla7yE3Yrc0AY olfp5gdLPRalfRIZHz//hdjAhZgl7AAbt6Ttez4hde0InqAR987+IDjl/VPrlGAxVL LvZYCj5jf6Tj9MTd3WNfqlgITkF8cCBYCkdg7f0U= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wB5FJf8T074136 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 5 Dec 2018 09:19:41 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Wed, 5 Dec 2018 09:19:38 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Wed, 5 Dec 2018 09:19:38 -0600 Received: from dlelxv97.itg.ti.com (dlelxv97.itg.ti.com [172.17.2.193]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id wB5FJc7L001456; Wed, 5 Dec 2018 09:19:38 -0600 Received: from localhost.localdomain (vboxa0400828d.dhcp.ti.com [172.22.237.247]) by dlelxv97.itg.ti.com (8.14.3/8.13.8) with ESMTP id wB5FJWna025493; Wed, 5 Dec 2018 09:19:35 -0600 From: Roger Quadros To: CC: , , , , , , , , , Subject: [PATCH 1/3] usb: dwc3: gadget: Fix OTG events when gadget driver isn't loaded Date: Wed, 5 Dec 2018 17:19:29 +0200 Message-ID: <1544023171-5796-2-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544023171-5796-1-git-send-email-rogerq@ti.com> References: <1544023171-5796-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On v3.10a in dual-role mode, if port is in device mode and gadget driver isn't loaded, the OTG event interrupts don't come through. It seems that if the core is configured to be OTG2.0 only, then we can't leave the DCFG.DEVSPD at Super-speed (default) if we expect OTG to work properly. It must be set to High-speed. Fix this issue by configuring DCFG.DEVSPD to the supported maximum speed at gadget init. Device tree still needs to provide correct supported maximum speed for this to work. This issue wasn't present on v2.40a but is seen on v3.10a. It doesn't cause any side effects on v2.40a. Signed-off-by: Roger Quadros Signed-off-by: Sekhar Nori --- drivers/usb/dwc3/gadget.c | 2 ++ 1 file changed, 2 insertions(+) -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 679c12e..79120c0 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -3240,6 +3240,8 @@ int dwc3_gadget_init(struct dwc3 *dwc) goto err4; } + dwc3_gadget_set_speed(&dwc->gadget, dwc->maximum_speed); + return 0; err4: From patchwork Wed Dec 5 15:14:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 152917 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp9410285ljp; Wed, 5 Dec 2018 07:14:56 -0800 (PST) X-Google-Smtp-Source: AFSGD/WEd+mGII1xTWqWcTQ/aifISCO1327D+ZNT4gV94QlRyu1dq2xDLj3j1SZqCAN91J5ozCeW X-Received: by 2002:a17:902:5066:: with SMTP id f35mr24740014plh.78.1544022896445; Wed, 05 Dec 2018 07:14:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544022896; cv=none; d=google.com; s=arc-20160816; b=xHGSVQqewShObA1z+9aOIim3PXgMUIcg6rSUzhGjzWWf8sQkZ9q1CNTVeYajOAyl8N n9Is6x4fnxKohZmYeFclnGbn6bdihOMSa+wzVabteKaODtU3EPsFQ3YsAuFdfTTA2SS4 Vh8ula9pTkliTrJ4nkB9iX6LbV/84qwtZbITWlnJJ/qAERCEH9qUsIpUZXbxClB5/UAB 8vomhVRSqQZsiEcpU3RQf+mNCXaCv1tS9y5r9wVHB4FT/Jw7/CuzfOq6aJnOfepcyaBp +zvCBha5evFJVC8ghUYszjP0Xt47GteRWiDOnnNlamWzVs3tKUPVFP59wJYOyFLHcr20 vimg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=iFrr0VICgTTqdRPtbpUuJ6fdJVlGNcoVpZIma6uw7f8=; b=sE5CloWjcJc124VfZiZYZ/jwJPca+NUxnLilTgdIGYhfNA+E3J6+6NATVmYzVYQtzA sNQpCCfjtVzuTHOLAztIfDcKAbf1WGupiR2tjqRKioeiLnwnRJzs5QIVBqs0qcUZ+HvL fXq+RULYK5fW7YXvq8HJWininqvHvPCHjtsFf9o55YXU/yuOgCsL1/w0B3sLp/UTY9ra naih+qag+BpNXW79lrWhaVwiO1M5Gl9wFWaR364n+GFAc32yHY0eowgFWGM39CJYUlCF uQP9og+xzfTg6dSaOJA/f28dRzfLZ9EgwcarYloMpB40a+gZXr9f7z5dEgGGYk6pDFYw yDKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ILyHrf3c; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u22si17116576pgh.286.2018.12.05.07.14.56; Wed, 05 Dec 2018 07:14:56 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ILyHrf3c; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728090AbeLEPOy (ORCPT + 31 others); Wed, 5 Dec 2018 10:14:54 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:40208 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728036AbeLEPOv (ORCPT ); Wed, 5 Dec 2018 10:14:51 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id wB5FEn1o020514; Wed, 5 Dec 2018 09:14:49 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1544022889; bh=iFrr0VICgTTqdRPtbpUuJ6fdJVlGNcoVpZIma6uw7f8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ILyHrf3c4EZQALrT4YabNpwbOnUFYvXxPUaEmLdDtv30Qrk/a10LY0j/r3Teo1wR6 m1yTznOkWLaqcytwI3QPzMoBgxkVKdx6RVzxMpVdLyiTtyl64v8KyB17azoweqTbrL Yg67Awjgn03VILRxllamm2C25h+0Ys1K1/5xp9HQ= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wB5FEn7h040993 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 5 Dec 2018 09:14:49 -0600 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Wed, 5 Dec 2018 09:14:48 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Wed, 5 Dec 2018 09:14:48 -0600 Received: from dlelxv97.itg.ti.com (dlelxv97.itg.ti.com [172.17.2.193]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id wB5FEmDq014725; Wed, 5 Dec 2018 09:14:48 -0600 Received: from localhost.localdomain (vboxa0400828d.dhcp.ti.com [172.22.237.247]) by dlelxv97.itg.ti.com (8.14.3/8.13.8) with ESMTP id wB5FEeUh025212; Wed, 5 Dec 2018 09:14:46 -0600 From: Roger Quadros To: CC: , , , , , , , , , Subject: [PATCH 2/3] dt-bindings: usb: keystone-usb: Add ti, am654-dwc3 support Date: Wed, 5 Dec 2018 17:14:38 +0200 Message-ID: <1544022879-5704-3-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544022879-5704-1-git-send-email-rogerq@ti.com> References: <1544022879-5704-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The AM654 SoC from TI contains a DWC3 controller. Add support for it. Signed-off-by: Roger Quadros --- Documentation/devicetree/bindings/usb/keystone-usb.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/Documentation/devicetree/bindings/usb/keystone-usb.txt b/Documentation/devicetree/bindings/usb/keystone-usb.txt index f96e09f..fa29ff8 100644 --- a/Documentation/devicetree/bindings/usb/keystone-usb.txt +++ b/Documentation/devicetree/bindings/usb/keystone-usb.txt @@ -3,7 +3,7 @@ TI Keystone Soc USB Controller DWC3 GLUE Required properties: - - compatible: should be "ti,keystone-dwc3". + - compatible: should be "ti,keystone-dwc3" or "ti,am654-dwc3". - #address-cells, #size-cells : should be '1' if the device has sub-nodes with 'reg' property. - reg : Address and length of the register set for the USB subsystem on @@ -21,7 +21,7 @@ SoCs only: - clock-names: Must be "usb". -The following are mandatory properties for Keystone 2 66AK2G SoCs only: +The following are mandatory properties for 66AK2G and AM654: - power-domains: Should contain a phandle to a PM domain provider node and an args specifier containing the USB device id From patchwork Wed Dec 5 15:14:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 152918 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp9410368ljp; Wed, 5 Dec 2018 07:15:00 -0800 (PST) X-Google-Smtp-Source: AFSGD/Ubsxj7FN/rXaPubL56k/YR36A7yilP+CweT5si6M9RP6CJ8wBX1dP5MZ80kVwr5SIkuTxN X-Received: by 2002:a63:fb46:: with SMTP id w6mr20961955pgj.321.1544022900503; Wed, 05 Dec 2018 07:15:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544022900; cv=none; d=google.com; s=arc-20160816; b=ScHEkde/EA/HbWbh8yfCtAQENpLxb52OZfTfzlNGjpZ3brsd3PbiX6uG0eOgm8uhaT fjtvc/IoFLtplgqXmmRY06L//WrACCJe/D+8SAAF23xlJ4ekexVX3HMPcWKWrAahoXPl 0+aObyedd4LG0yoz9i3p32TPG68RPwqzXQAj23uII5ggv2VjKBVt1/iFrzhyZ+GvAb8Z NRvrE1IiK+t1Kiw/Ddfycic5ScowhDVMLUzSuhqASkCZBdpwH8FmKnNlWv/QHcF5Z8Dz RHCEfl83yVrOkvSDAj0InJeMfFrFq3tYWBE4IT4YshChQEl/8gGCIVw9JokMfurkXFwB fZaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=z1nWhNHQgfUtwFJxgzO+epxyHRSr7YEr+iRwu0V9p9I=; b=qYP7RuZYNSc1aVJhQ81dGHzvOdkPJ5tdgZKE9MhKZ5QgTSpWDr2LTh4v5VXhVRao9m 2bx5Ichn5xaW5Aj0oDQJk4cKOglr3Cz6lhn5nNrtdnl6gyUDL+A478Ur4Q5OuwOeNt4n RkHckJJ02RC8Yd6c/r1B8AobXa6Tw3Mw0TkNiGDFTxbiTX+b4M8bfND2d6Slh8nNQlk3 DeQVIH7us20pBinPEdRe+K7V3UADpGHekFhq7gBElDtdgFIVHmjRUDiLYocSSLADrE1x yMJWjLcF0N31ff04yVcJ/icQlqBwY56y5ChLDadr/0XNOTbMcr5YELNzfzmwgbsun/bm XDFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="tEkb/4Gt"; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u22si17116576pgh.286.2018.12.05.07.15.00; Wed, 05 Dec 2018 07:15:00 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="tEkb/4Gt"; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728105AbeLEPO7 (ORCPT + 31 others); Wed, 5 Dec 2018 10:14:59 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:53542 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727606AbeLEPO6 (ORCPT ); Wed, 5 Dec 2018 10:14:58 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id wB5FEsD0011838; Wed, 5 Dec 2018 09:14:54 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1544022895; bh=z1nWhNHQgfUtwFJxgzO+epxyHRSr7YEr+iRwu0V9p9I=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=tEkb/4Gt5ejq7U/HsuJGzE4vd4r1PZazuRNGsnPEYPSvwEtz0ZggwH4LhvtbJUyGT oB5F1iPzJ5NXObc9T86u7Fe6EV+304DxTk1wCKHJPt6xBe9f+hPwd55hCpi9iEThmq qtEh8RWiL4THAr62xSntLTc85KzbZojVOwGf5pME= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wB5FEsUM096631 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 5 Dec 2018 09:14:54 -0600 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Wed, 5 Dec 2018 09:14:51 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Wed, 5 Dec 2018 09:14:51 -0600 Received: from dlelxv97.itg.ti.com (dlelxv97.itg.ti.com [172.17.2.193]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id wB5FEpsg005667; Wed, 5 Dec 2018 09:14:51 -0600 Received: from localhost.localdomain (vboxa0400828d.dhcp.ti.com [172.22.237.247]) by dlelxv97.itg.ti.com (8.14.3/8.13.8) with ESMTP id wB5FEeUi025212; Wed, 5 Dec 2018 09:14:49 -0600 From: Roger Quadros To: CC: , , , , , , , , , Subject: [PATCH 3/3] usb: dwc3: keystone: Add support for ti,am654-dwc3 Date: Wed, 5 Dec 2018 17:14:39 +0200 Message-ID: <1544022879-5704-4-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544022879-5704-1-git-send-email-rogerq@ti.com> References: <1544022879-5704-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The AM654 SoC contains a DWC3 controller with TI specific wrapper. Add support for that. Unlike the Keystone 2 case, for AM654 We don't need to process any IRQs for basic USB operation. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/Kconfig | 6 +++--- drivers/usb/dwc3/dwc3-keystone.c | 11 ++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index 1a0404f..a83a84f 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -86,11 +86,11 @@ config USB_DWC3_HAPS platform, please say 'Y' or 'M' here. config USB_DWC3_KEYSTONE - tristate "Texas Instruments Keystone2 Platforms" - depends on ARCH_KEYSTONE || COMPILE_TEST + tristate "Texas Instruments Keystone2/3 Platforms" + depends on ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST default USB_DWC3 help - Support of USB2/3 functionality in TI Keystone2 platforms. + Support of USB2/3 functionality in TI Keystone2/3 platforms. Say 'Y' or 'M' here if you have one such device config USB_DWC3_OF_SIMPLE diff --git a/drivers/usb/dwc3/dwc3-keystone.c b/drivers/usb/dwc3/dwc3-keystone.c index 193a9a8..cbee5fb 100644 --- a/drivers/usb/dwc3/dwc3-keystone.c +++ b/drivers/usb/dwc3/dwc3-keystone.c @@ -106,6 +106,10 @@ static int kdwc3_probe(struct platform_device *pdev) goto err_irq; } + /* IRQ processing not required currently for AM65 */ + if (of_device_is_compatible(node, "ti,am654-dwc3")) + goto skip_irq; + irq = platform_get_irq(pdev, 0); if (irq < 0) { dev_err(&pdev->dev, "missing irq\n"); @@ -123,6 +127,7 @@ static int kdwc3_probe(struct platform_device *pdev) kdwc3_enable_irqs(kdwc); +skip_irq: error = of_platform_populate(node, NULL, NULL, dev); if (error) { dev_err(&pdev->dev, "failed to create dwc3 core\n"); @@ -152,8 +157,11 @@ static int kdwc3_remove_core(struct device *dev, void *c) static int kdwc3_remove(struct platform_device *pdev) { struct dwc3_keystone *kdwc = platform_get_drvdata(pdev); + struct device_node *node = pdev->dev.of_node; + + if (!of_device_is_compatible(node, "ti,am654-dwc3")) + kdwc3_disable_irqs(kdwc); - kdwc3_disable_irqs(kdwc); device_for_each_child(&pdev->dev, NULL, kdwc3_remove_core); pm_runtime_put_sync(kdwc->dev); pm_runtime_disable(kdwc->dev); @@ -165,6 +173,7 @@ static int kdwc3_remove(struct platform_device *pdev) static const struct of_device_id kdwc3_of_match[] = { { .compatible = "ti,keystone-dwc3", }, + { .compatible = "ti,am654-dwc3" }, {}, }; MODULE_DEVICE_TABLE(of, kdwc3_of_match);