Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752161AbbE0Cch (ORCPT ); Tue, 26 May 2015 22:32:37 -0400 Received: from mail-bn1bon0068.outbound.protection.outlook.com ([157.56.111.68]:49696 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751472AbbE0Cce (ORCPT ); Tue, 26 May 2015 22:32:34 -0400 Authentication-Results: spf=fail (sender IP is 66.35.236.236) smtp.mailfrom=opensource.altera.com; synopsys.com; dkim=none (message not signed) header.d=none; Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=dinguyen@opensource.altera.com; From: To: CC: , , , Dinh Nguyen , Gregory Herrero , Mian Yousaf Kaukab , Felipe Balbi Subject: [PATCH] usb: dwc2: fix unnecessary USB overcurrent condition Date: Tue, 26 May 2015 21:26:05 -0500 Message-ID: <1432693565-31475-1-git-send-email-dinguyen@opensource.altera.com> X-Mailer: git-send-email 2.2.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: BY1PR0501CA0020.namprd05.prod.outlook.com (25.162.139.30) To CY1PR03MB1374.namprd03.prod.outlook.com (25.163.16.28) X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1374;2:FPrOqk7lfTBF8UJ5Zi7X0us9ZBbc1BFuRWCoHH7xMaKzlF0QzV73u+qrbYMDylk8;2:qI4MX5HDC4qBvieWAYMpj+q8G0SXFtjOVhdorI9cCcS43KGN8+AZaSY975bAd3/jXQj4xjWTClFIgHgA9X9odA9Z0jzxiDVe/zDeDE5OCYWTViocERo4FE7Vzf8UDYXbKT7yMq4jjAlcQbukfJH+AA==;6:bLNVxUZ/T89SX6F0MGeOolAjizKS13ryU0X0kY6dWU/kYgBATtrnuS3DUqy7Hc9pDhJRYoZMML/S7pMfgNgpG22ixkyaze2OrUSEDJIOB6oUtjQj67L2iR2nlwk8Ac7aRcM7n06sr5sfLedbE1ji4w==;3:HblQq9P+rW7Z/DlWPM6tF1aEUOeFBE4QhyfwTdzckddxnPP/xgIeeOiWvlfGf7yvxm7LXWcg4g5nbuwSvoXb67g7UtYNmQV1tPGt1ZJ/8GtGLzoxsgicL9UwYYILzaumUhw1TBI7cyoE7Px7wj7sVMunXT9vslBexGWpyItcM0osS6iIt4/jOBuE+9Yt5wswuHwjnPdCIcMBYwz1+qpz1pY996WT26/v0xkTg7yOxVk+xdQtgm/8Tr3BUPB3LUu4Y7AN0TVb/aJzwYUF+8ID+eK1kf3SWh65LQzSF/qwETLymvcrbHwAWsjuPvkmgXsz X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1374;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1500; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:;UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(520003)(5005006)(3002001);SRVR:CY1PR03MB1374;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1374;BCL:0;PCL:0;RULEID:(601004)(5005006)(520003)(3002001);SRVR:BY1PR03MB1500;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1500; X-Forefront-PRVS: 05891FB07F X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(6009001)(189002)(199003)(40100003)(101416001)(33646002)(106356001)(229853001)(2351001)(105586002)(97736004)(81156007)(69596002)(19580395003)(86152002)(122386002)(4001540100001)(50226001)(19580405001)(92566002)(77156002)(62966003)(189998001)(5001960100002)(110136002)(50466002)(48376002)(50986999)(77096005)(42186005)(87976001)(5001830100001)(5001860100001)(86362001)(68736005)(47776003)(64706001)(46102003)(53416004)(66066001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR03MB1374;H:linux-builds1.altera.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:0;LANG:en; X-Microsoft-Exchange-Diagnostics-unt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3ecRoP/rcLCSKmjdg2M6gFajU9yt/6CY+hD5MJ?= =?us-ascii?Q?7ccli8GLzPoszlqPjjKnhsnGkvxOkef0E30i0CGF+94Y/qpl+HsszasOdsb8?= =?us-ascii?Q?w2N1UOfOAg3LCu6KbWH2Acw8Dfeno1VMdxMGi166GBLBrHPrktowCwkgagRB?= =?us-ascii?Q?8EQsrSaDr+9KAbq4nf4bQYgkNEgtP3eXZhtAvFfBtge2UJzKpqNnyUKxfMsA?= =?us-ascii?Q?JuxGI=3D?= X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1374;3:/Cp1l7XjfaP2UouppOfxSKoFp0oGBS3hXmiSlS+yeOtDl9gzZVxaefFmhDul/BL5oFwFUQbz/Gv4sFHzZkImHmKt4USp/v6hQ2qyPEFa3OejxvB89Kufdbd4X8pgc9IqpK7WnxdC0SnSHv2QlcjGHg==;10:wAXVX6E5bvNtpuiel0QPg0y+9f+xCwAEU4LNFo0ekgQ6p/3G14N1yIIdfNS5zd9jSqdJuvhOV2pihtn3DzJieFPGTcw9Rgh5VG3T4Okn0SE=;6:goienqxhhbY4zKcDJZ6UlLzuyzPaPJkOMgHP5lTkYlRB8Fl2ZgU1P2LgCiJ2sCa/IpcJLa8SjZuNMl4cpD27uqEt2qfToHFJUFbU8kuUePysBSa66GVy6D/Nwzcf4uH3AYgTRA/vrZenTyh+NtR8bg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB1374 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN1BFFO11FD031.protection.gbl X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD031;1:uO4bjQMYShAMBxbTuJ6NTNGafAtuLWk1UMvLJTx7v36/+x5S/0UDRRjKycCE3GnqFzL3GLFYAzi1/bNSi/+TjSWeHgH6/7YiYMPkA91IcaIz0ofyxY+MYoJOEYFXd0dspyXZwAEvMv2ewPP5CzeVUmQXkKObWjAYoZe4WWWjBhsbqeabg8ZqBc4vBY6coZ1uPD0YVw3W99Wr9PVjw2K2ZuMG4NchTwddGZl3YRHz81zDC6sGrFVwpo1ho1IsNAoo8B4C/IXzPKInURE9eZ34IYQnod9eKH30ItobHPjMNgM= X-Forefront-Antispam-Report: CIP:66.35.236.236;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(339900001)(189002)(199003)(5001860100001)(5001830100001)(189998001)(66066001)(85426001)(5001960100002)(4001540100001)(81156007)(97736004)(6070500001)(110136002)(47776003)(53416004)(50466002)(86152002)(50986999)(87936001)(64706001)(19580405001)(19580395003)(92566002)(77156002)(2351001)(229853001)(122386002)(16796002)(33646002)(6806004)(105606002)(106466001)(77096005)(62966003)(68736005)(46102003)(86362001)(48376002)(50226001)(40100003)(7099028);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR03MB1500;H:sj-itexedge04.altera.priv.altera.com;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:0;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY1PR03MB1500;2:ZMbjHvXXu6ScORBUVK9Cz/oCDhiU6tTjthvm8TQr/RWrrF4E6DpEVRQAzvZdNfnb;2:xvxtMA/F+3yRKUG0h/MtPQaGoBh27Fm0YAcuxgRP38JYcXu/x5PUllUZDtq6lIIVHZ9t9chDPK3pAjh/rqo6HEhVstd+7dfNJBILL/BXGz6SiN2ZXCud9MNTGwNqhSiMIWIO+ncHOxQR5yz+Yw6MFPSOPu4h/QPqUfxQbFkW2VYyaQHxnvaJOmApsscnwBdMadP9Bn+qs2Tc5xP6XRkl7wAcFewbo62uzb8dy2jsxr4=;6:ozHWak3USjgkK3D2iH6R+R89xHb07CmwyPk5TCfV9y9C/WFKS72Igsj6UUjN994vv81SvETjDIienUtR7LpoYct8A//4qN7+kplrgO92LJV5H5gPc1kmZwS2+TTbUHOChxyZ9jbvxLN1XYxygkwAkQ==;3:uWxAEKuCG/IvA18SHghdelEoe2LGzR7nUo8xKoUNvYbvhzpGHq/aKBGKsj6zBqIXARcnlM/RAFLQxChSq1Bj8cEMu5BjyfwPLw3vd0CVjPuerISYxtb4zftWzIfJ7PCb90sWqQF7cLDbTLVTL34xydysY30EdmjaRnTP16mnLUfX3qMWKSiozVU+1ZET/TCWe8obEu3w4UADYQoxZrG030e/AmndRgJd5UQIRf1gxXI+1jNseyVQLuJS4fU8KBJ5acZQy9HkGI5jxib9dvAyPFHy7jTi6Ni1J6PK6hZwafp+U7blQ9VYwHBE4uoG4E8j X-Forefront-PRVS: 05891FB07F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR03MB1500;9:cvG0TYiHDXhyx2mKEZkeCtD/VO03gIhYQF6Pwo5+uM?= =?us-ascii?Q?j9SfavJ+N/W3gFhXj9BVbVwuoANI9g7R1DNq5JscVa/yrntHPAp6cBrLhcJ7?= =?us-ascii?Q?e90FPjxrEj51PJs/i/pZdvzx4U9UV3oT//J4e+r/6ZD0KexNZJwDsAXkK4e/?= =?us-ascii?Q?zhFBvYnP30G5z8OBo9a7AyknrMKttiitnY8v0X7wyV1FHhviiLisc/7OF3rU?= =?us-ascii?Q?ODtAHgicLxO7fT0UxiGZFKWlr2BIU7DOkcUli2Tgl63+sx+WV+D3Ae/XKQ2P?= =?us-ascii?Q?rSCs4jfTRym/8EuljbU5MwxQg/axeuEyNDNmaombKUJcI/vuQ4LU+ocyXiP2?= =?us-ascii?Q?Qls4ftA6Te+IGEvfewgzzQBAwPUgGaotreImcih8cUK49t84VDYkbhlJvK4k?= =?us-ascii?Q?4IvX/PKkF7HcgtNInmejh3qpLWIYIQR6uaarRJNwOYBLU7j3p4myHgt28zn6?= =?us-ascii?Q?eOKH2+NXbocOwZCa9SKlDvKRld3Rs7hsicGoohurR3oc6SLvn/C1On35/ofe?= =?us-ascii?Q?tyFp9QrD1YvHIEz3PZ1ZJRA9zeiFXqhmEKtbba0WRvY5Fr2LvRrKSPDZnGxB?= =?us-ascii?Q?XoQJqmbewVeO2wW3wO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fu46Lh9QSCp68C8+PzuEgbJkcaRjo1wibECy+r7v3RBNl0HQ== X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2015 02:32:31.3014 (UTC) X-MS-Exchange-CrossTenant-Id: fbd72e03-d4a5-4110-adce-614d51f2077a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fbd72e03-d4a5-4110-adce-614d51f2077a;Ip=[66.35.236.236];Helo=[sj-itexedge04.altera.priv.altera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1500 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1251 Lines: 37 From: Dinh Nguyen For platforms that use a ULPI phy, we should enable the external VbusValid signal instead. Signed-off-by: Dinh Nguyen Cc: Gregory Herrero Cc: Mian Yousaf Kaukab Cc: Felipe Balbi --- drivers/usb/dwc2/core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index e5b546f..08ffdc6 100644 --- a/drivers/usb/dwc2/core.c +++ b/drivers/usb/dwc2/core.c @@ -807,6 +807,11 @@ int dwc2_core_init(struct dwc2_hsotg *hsotg, bool select_phy, int irq) if (hsotg->core_params->ts_dline > 0) usbcfg |= GUSBCFG_TERMSELDLPULSE; + /* Set external VBUS indicator as needed. */ + if (hsotg->core_params->phy_type == DWC2_PHY_TYPE_PARAM_ULPI) + usbcfg |= (GUSBCFG_ULPI_INT_VBUS_IND | + GUSBCFG_INDICATORPASSTHROUGH); + writel(usbcfg, hsotg->regs + GUSBCFG); /* Reset the Controller */ -- 2.2.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/