From patchwork Fri Dec 22 22:11:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thinh Nguyen X-Patchwork-Id: 758206 Received: from mx0b-00230701.pphosted.com (mx0b-00230701.pphosted.com [148.163.158.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37B792EB14; Fri, 22 Dec 2023 22:11:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=synopsys.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=synopsys.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=synopsys.com header.i=@synopsys.com header.b="J0JtDF75"; dkim=pass (2048-bit key) header.d=synopsys.com header.i=@synopsys.com header.b="d3McN1nz"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=synopsys.com header.i=@synopsys.com header.b="gAXp2XKP" Received: from pps.filterd (m0098572.ppops.net [127.0.0.1]) by mx0b-00230701.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BMK4jsk032659; Fri, 22 Dec 2023 14:11:33 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=synopsys.com; h= from:to:cc:subject:date:message-id:references:in-reply-to :content-type:content-id:content-transfer-encoding:mime-version; s=pfptdkimsnps; bh=EeYVhC+5avoKmOCAWnWlk9nAmDFba9xx6c/2Cnoqkcw=; b= J0JtDF75Lk0TcqLPnLtjL+skKwvBW7sZurVM8ncjZvNKZYk/u2eC7qsSIbtXWgga RW18Qy7YbNlTyRXdjLbWFzLaEe1cKnzOiOalkemofFgOvdooSOPF4oYtaTHD8BwQ 8xWmzF3hyExcCiMEtuDY/R8AraLUp12xY4CAndLh9mY1dG4I+ck3wvRhvD2zCsjv 7TcvxUXbxn9ErRONltldi5CPy8WFWxMC7pT1sBwRBAFjaE1fM7hwMrrQ6tt2/LDj +PwRU7Sr6PAB6ebhKxPSPAAnG12aOy5ymF8ayDPWg/lRNuEkFJdCtbJYociVEE2V nUSpi/Qaf4YE1HlkRiFqEQ== Received: from smtprelay-out1.synopsys.com (smtprelay-out1.synopsys.com [149.117.73.133]) by mx0b-00230701.pphosted.com (PPS) with ESMTPS id 3v5gpw0dus-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Dec 2023 14:11:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1703283091; bh=EeYVhC+5avoKmOCAWnWlk9nAmDFba9xx6c/2Cnoqkcw=; h=From:To:CC:Subject:Date:References:In-Reply-To:From; b=d3McN1nzSCKBI4vZwDryZMbBMSIms5R04NavIThGp3DKx0dEUTlaLn2/FF3+tkBqv gech659ghcdXjoRlxls2g8+faM7PV337j/EWYDBXPpTq2mZGmBx/+hKb/7pg0Dg4O/ 8HYbqatG1MgQMpGSss7BPR9NKl+8l33pIwMY0qbprY/Gd/cv8tOu3p+S2WWMRtMPFn 7Hzl0v0165ZMvzsC7X+PxESaQPolb/ZtAjUAPl7wVxsxgBCTF1pRHdidShAQXVc1HV x1XQwhzDpUgCnirXJFjX6ZxXxirDknAh4bB76Lg0mr40LLS3w5Avf07/wkubET2vIf F5VMNLOF9YphA== Received: from mailhost.synopsys.com (sv1-mailhost2.synopsys.com [10.205.2.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mailhost.synopsys.com", Issuer "SNPSica2" (verified OK)) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 61AC140542; Fri, 22 Dec 2023 22:11:31 +0000 (UTC) Received: from o365relay-in.synopsys.com (sv2-o365relay1.synopsys.com [10.202.1.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "o365relay-in.synopsys.com", Issuer "Entrust Certification Authority - L1K" (verified OK)) by mailhost.synopsys.com (Postfix) with ESMTPS id 2B9C7A0073; Fri, 22 Dec 2023 22:11:31 +0000 (UTC) Authentication-Results: o365relay-in.synopsys.com; dmarc=pass (p=reject dis=none) header.from=synopsys.com Authentication-Results: o365relay-in.synopsys.com; spf=pass smtp.mailfrom=synopsys.com Authentication-Results: o365relay-in.synopsys.com; dkim=pass (1024-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.a=rsa-sha256 header.s=selector1 header.b=gAXp2XKP; dkim-atps=neutral Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11lp2169.outbound.protection.outlook.com [104.47.56.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by o365relay-in.synopsys.com (Postfix) with ESMTPS id 0426E40363; Fri, 22 Dec 2023 22:11:31 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cSeFyVyZzEWz6yAehVBP7F08dtLx/3DbyUfNrqslMS0XCiXRdnYmfA74KAkJDMtMUJzKCFjhe9kFI55DzGIENYUggt6fCUAPZBUaBrDuM0FvI9+vfA/NoEgK4yQ5FfPdJxHpgc74Vcht/rLZCIixfyMJl7q+8lWZE6WkQfQaM+ja6ikOvKXMTi3CLcxS6GI2UzBHMBxkSfE2BNnnKCoqwje4b0Sp6ZzZF9OtE/pZvZBI0h/VBhhiegA+d5Vw22HvJ7xXZAOk8lhVs4FFS6edUv9hf1HHdT6M/ExiVzfnEiYb5gy2A8+e8NK0HvDYQj3LJcA4q5WKMPG69CPbF7ajnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=EeYVhC+5avoKmOCAWnWlk9nAmDFba9xx6c/2Cnoqkcw=; b=J9x7L7mQVMW/Qf18Q6/kt5Mh1KHCOGvSeLM/0w0yUMO4mwbnhE+6x9wsipcjyd0EIqwm23S4HuTLLEv4V1MQsOR+r1MTBOGAn+Pf7nu0nT9WPYS8dUbObjqcyN3Gj4FXXinyvDiFCdOf4jMAWbN0FM1NaDUz/Vcl7jfGJ2wf3QpdhilTOdenpQUd+MIPb5Lk/QmpyG9EWwsQGtYGcxDLdlPzGnuZkdUzyd/r8T1tkZ7YT9ufec05qeccuVBIo6NhnDugD4f6auw87Hw0bfGR5F+ClzMaeWqF3EkI1wi/DPx0mQt7tvo1JbKDmWkscW7+d0inYyFBTsKPNtmqeDsUoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=synopsys.com; dmarc=pass action=none header.from=synopsys.com; dkim=pass header.d=synopsys.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=synopsys.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EeYVhC+5avoKmOCAWnWlk9nAmDFba9xx6c/2Cnoqkcw=; b=gAXp2XKPIbrq6DraMGw75iv8NvNMoYiifrnTHFGDusejYh/liTSe/fJ1Tag2EWR63OLZnU5P63mplS/nXNlirIi5E9mIJ43uG905aHhvgIkymKeN5hLeQ+VF1x04+ipnuNOahN5hw7QjuaeNVu6jvk1etJSSnESL48A27FamDhc= Received: from BYAPR12MB4791.namprd12.prod.outlook.com (2603:10b6:a03:10a::12) by DS7PR12MB5982.namprd12.prod.outlook.com (2603:10b6:8:7d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.21; Fri, 22 Dec 2023 22:11:27 +0000 Received: from BYAPR12MB4791.namprd12.prod.outlook.com ([fe80::d931:a262:ec3b:3e56]) by BYAPR12MB4791.namprd12.prod.outlook.com ([fe80::d931:a262:ec3b:3e56%4]) with mapi id 15.20.7113.019; Fri, 22 Dec 2023 22:11:27 +0000 X-SNPS-Relay: synopsys.com From: Thinh Nguyen To: Greg Kroah-Hartman , Thinh Nguyen CC: John Youn , =?utf-8?q?K=C3=B6ry_Maincent?= , "stable@vger.kernel.org" , Kenta Sato , Jisheng Zhang , "linux-usb@vger.kernel.org" Subject: [PATCH 1/2] Revert "usb: dwc3: Soft reset phy on probe for host" Thread-Topic: [PATCH 1/2] Revert "usb: dwc3: Soft reset phy on probe for host" Thread-Index: AQHaNSPPlaq423qkj0iUa62ZUsn8ow== Date: Fri, 22 Dec 2023 22:11:27 +0000 Message-ID: <29a26593a60eba727de872a3e580a674807b3339.1703282469.git.Thinh.Nguyen@synopsys.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BYAPR12MB4791:EE_|DS7PR12MB5982:EE_ x-ms-office365-filtering-correlation-id: 451f5c3a-00d8-461a-10df-08dc033af183 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: JOv4t6Y+Eh+wI3LZ1+lOw+CtEDCHZBRHYMCQZQainld/bKFBWlqeO9wlvHUduJBBJ+cagdElIhulnZ4lsdEaD0uePuYpPzNdc8fC0qZJxKsWhzmsgPGFCZDlr2dRhFtm9ZVxSYPD4dd9IQ0PfxLkweOyfSxOwbq9b2llHJ11Fm8SClBESGOz5AbtZYy+cnP8C9UY2kj3CsYxB9vWnwco7y43I6yiML+9e0qpyXBbIslWBTWEDtzkzVgr8FI9la5xzB6pqOcp52PwypXRtLxUIYcaLOEMWJDjVtAIajXapKsZVv5fIlw5+GZNIooh09eHKwnJgw/sXekkFMrp57+p4qqndfpliUTeSY/YJ6aIs6OEOq3f+X5X2Xqc+aVFo4QeSZoMlwXXqIKuviq5WnYuYuqtkPBVLN0E791Vkd5CFgciAv6EpAv8NlcsKDxqwwBNctjm53kXJNT20kB+JWpUhVqCS65xFj8RwDrG7PP5f3AnGcK1LBcZPhqElJ8s57ib4JgBtFcJdaClHD6W+dkkxsUAoOvL7wKNhwXFegpZZmWCzPujtUjhp9ETcG4gU/E3w54hxzTDCdsslYZ1VfMtdOY60sJcwsTMN9qK0LYpNUY= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR12MB4791.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(39860400002)(376002)(346002)(366004)(396003)(230922051799003)(186009)(1800799012)(64100799003)(451199024)(86362001)(2906002)(5660300002)(4326008)(8936002)(54906003)(8676002)(41300700001)(38070700009)(66574015)(83380400001)(26005)(2616005)(36756003)(122000001)(71200400001)(6486002)(38100700002)(316002)(76116006)(66556008)(66946007)(66476007)(110136005)(66446008)(64756008)(6506007)(966005)(6512007)(478600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?4Xd92lIN73RLjrpKO7UpuZOuKaKs?= =?utf-8?q?h//CFlnAeU/6ZBchif2g4urm+3I0JUeXMD1TPr9pgvnhy91W1hfAijh/rnuJyGCEc?= =?utf-8?q?hKeGTA2dsDlc/uR6V8bbQcoog6+aLRiebN1wcqrAdjbWPSpwuuo3O7l9ec5Ijrz0O?= =?utf-8?q?O6P2MkbXj6y1vv0Enuxj9HBw1GcdnPN7qRMEz3CpOKQ8bruRwkUWNHPp2An3vZyDw?= =?utf-8?q?MoFGgR/H8rRfZZucQD13ZiysDWdASTU3+wJGA4ln+1D4slmAspVKLfdV5Pz8727DI?= =?utf-8?q?IslOE8ZZmX8/Z/7ryPxV5PaJpvq3NbGcty0JW0AYcBqSXrLYOJNIsOpt1SVWnhy9r?= =?utf-8?q?dXdWQfn9VeJMpt6Vfgbgq1nI7c+RGmGaZ1SK4jMqbjdoo4pD8ZMs0CHugliy/HLdU?= =?utf-8?q?up67mp38F3QJjRCM66SDJiDlSrCBJJApraMhOotYf1+i7DNldLrwulOhgQSDQbV44?= =?utf-8?q?ba+T8/pU6dS6Oqe07SDImfeCN04EeluX9OdXhSJaBAXclBBdR6cnxlOxY29D27sak?= =?utf-8?q?4f8Us1IaG6Vxz8/8nGJk14VCGthZsKO6rZLoU9d7/REnQfhoHPVdJyZhZExzmhWfS?= =?utf-8?q?3AHfIsS2rvqCHg4VNKVRQrbyo6EHxa7FxOMDzg4+SwpmZBWeFwqKk3hpmVnoDvv70?= =?utf-8?q?25uvJ9DCJiITXuRxurWB3CAmjqHn8V1CtmHVSYB6S42BKnvOYWrwd4ifRgOiFvQMR?= =?utf-8?q?cyjZO6keC0c9XINuzPZMrP+yM9SQ/2XUjzR4b8lhxjQGbLc5weq/dFd0Ug+0h9tjx?= =?utf-8?q?gvjhqOuRNqMLI3WRsneW9H+Fd1rnuDGyjZoy4CietCZqR/kfrnC/3dApptQL53ok8?= =?utf-8?q?Q0sjPJqSx9XhoacvLSns1Yap4wtlfhoXZdcXkwRkL5fQhDNj/WDrVDWC9Xuq1CegP?= =?utf-8?q?QQfhiNpVngHFnZGXTOgRSbsgh0J1xKmiUBG33B7T8YT0i+lad7GAq/hvXWsQlhUxX?= =?utf-8?q?oPrgBOY0Ml7jNcXeY/WtBIGhc8GP6FFEvMyAqBIfbD/MIUItk7f4rGsKwja9fL7PB?= =?utf-8?q?oBRFY690obo0LvuKFIp+TWmrG0iZIIMs3XygpwsNyT3A400hTG4OvX35dnPYDjTCM?= =?utf-8?q?WEZPd0HM+GbQ6Z43vpFJLXDF8WQcPmW4Gr3YKC2GbOgeQq2tdmlxh6iVOqK9+HURB?= =?utf-8?q?YN7+KeCZcJzfIpxtPtH4VLn7JgN99kqQNKCA+t3NyJUo33Amuov1J28abMv7nYYhL?= =?utf-8?q?TrIrpxOn+pVBCApO7wrQspaQRts3AGovfJqEdtk9bdE8eV/Rj9gDHI/ZSsfB3gq8N?= =?utf-8?q?bOzaCyOfMIkzVSZNaqkyGwN4zn32ZhowYkGuk/w1rXPnCtymfdyjFlYtS+o1zUH5N?= =?utf-8?q?/CTDCWOMkmXBn9B+sBpGcdeei2XJGEy2Dds+oQ2oI79epaVfzq3ZaYd2NC3vLsWbZ?= =?utf-8?q?Qlv7BuNmHGLJ+exUi6vIce4hAynZMoibcNjZ3IGSTrM87/hqyAcTgaeScftnLYE+i?= =?utf-8?q?qXOKpy0x8wdxndLDob7IXjyn8TW2wXwvfociwzSG/qFAyIWDBtFyF2fVFC4SKGLER?= =?utf-8?q?kdGBjYXA4cSj?= Content-ID: <600D4DC898775743A93CE96EA2B57B4C@namprd12.prod.outlook.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: qOR/WdgIszmuB2ORdn9Xu7MD39iBNKp8m+CZcX4irxg+0bCe4uxGAprPbogDRXQVnKoWvjzmTWV2JBbMpyBXfPqJxQb2ySzfDv6WZNLlKumRdSqnklZ4cx+nBzbwqt2bm4H3uqMsRIFAXTpxrj3Vv6Vl/ciJOsD77ascQCqL3wctqoxYHa0awnCVSTXM9Ud67F2QzaZZKPt1rmabujIDtPhhC6a6CSmkXqdT2r5tgOchE4hCW6/Uw+wiAthcD5C3G1rgN2gD46I6R40i3iTAbGo6POFf9mez9b9iPbSG7W2q1Jvtj/J7bSXvV4JgtKYnlbuOrkWY+0kf9Dkx22JM4Wp4lH+Nog0kCdJJuEtOmBOcwGGBy7jc47Y77YqP9Cl2fmVe2f7E9qFI9r9eOrZ2rONpcEtY0UmASA+5JAgHL1tHvbZZeyBwakmJ6ew1Ds6RHC8zapaa8dJGJ1xnE3xeUlw2yroCaE/CXWyK7nERY3pQvcv9BNTGNMu0U335t9GMvrMRzQU49g7hZATBVnG2OezEMxYcbirDhNnPh/KIr81gt9xCjUeXupbHVF4SxAXjhC9uKFGkHFYilLicTQeOdYi1YcwKzQ9hndbKzkxrElBqY5W9savw6zcGrbgvd2tMhxeclRvXX7mrGfIsU3VdPQ== X-OriginatorOrg: synopsys.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR12MB4791.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 451f5c3a-00d8-461a-10df-08dc033af183 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Dec 2023 22:11:27.4459 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: c33c9f88-1eb7-4099-9700-16013fd9e8aa X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: juqvwN+MBL2bRS8NUNlvBrW2044omgT/s3rOOgIfDBOHcjW/ZZW9nmJw6gyRojIxeZGQdsJY4Z05ofrp22u9oA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5982 X-Proofpoint-GUID: BV7LyiMkQ93BuKqahkyRsrJOMt5aarK6 X-Proofpoint-ORIG-GUID: BV7LyiMkQ93BuKqahkyRsrJOMt5aarK6 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_active_cloned_notspam policy=outbound_active_cloned score=0 mlxscore=0 clxscore=1015 phishscore=0 spamscore=0 impostorscore=0 malwarescore=0 adultscore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312220163 This reverts commit 8bea147dfdf823eaa8d3baeccc7aeb041b41944b. The phy soft reset GUSB2PHYCFG.PHYSOFTRST only applies to UTMI phy, not ULPI. This fix is incomplete. Cc: stable@vger.kernel.org Fixes: 8bea147dfdf8 ("usb: dwc3: Soft reset phy on probe for host") Reported-by: Köry Maincent Closes: https://lore.kernel.org/linux-usb/20231205151959.5236c231@kmaincent-XPS-13-7390 Signed-off-by: Thinh Nguyen --- drivers/usb/dwc3/core.c | 39 +-------------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index b101dbf8c5dc..832c41fec4f7 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -279,46 +279,9 @@ int dwc3_core_soft_reset(struct dwc3 *dwc) * XHCI driver will reset the host block. If dwc3 was configured for * host-only mode or current role is host, then we can return early. */ - if (dwc->current_dr_role == DWC3_GCTL_PRTCAP_HOST) + if (dwc->dr_mode == USB_DR_MODE_HOST || dwc->current_dr_role == DWC3_GCTL_PRTCAP_HOST) return 0; - /* - * If the dr_mode is host and the dwc->current_dr_role is not the - * corresponding DWC3_GCTL_PRTCAP_HOST, then the dwc3_core_init_mode - * isn't executed yet. Ensure the phy is ready before the controller - * updates the GCTL.PRTCAPDIR or other settings by soft-resetting - * the phy. - * - * Note: GUSB3PIPECTL[n] and GUSB2PHYCFG[n] are port settings where n - * is port index. If this is a multiport host, then we need to reset - * all active ports. - */ - if (dwc->dr_mode == USB_DR_MODE_HOST) { - u32 usb3_port; - u32 usb2_port; - - usb3_port = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)); - usb3_port |= DWC3_GUSB3PIPECTL_PHYSOFTRST; - dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), usb3_port); - - usb2_port = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); - usb2_port |= DWC3_GUSB2PHYCFG_PHYSOFTRST; - dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), usb2_port); - - /* Small delay for phy reset assertion */ - usleep_range(1000, 2000); - - usb3_port &= ~DWC3_GUSB3PIPECTL_PHYSOFTRST; - dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), usb3_port); - - usb2_port &= ~DWC3_GUSB2PHYCFG_PHYSOFTRST; - dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), usb2_port); - - /* Wait for clock synchronization */ - msleep(50); - return 0; - } - reg = dwc3_readl(dwc->regs, DWC3_DCTL); reg |= DWC3_DCTL_CSFTRST; reg &= ~DWC3_DCTL_RUN_STOP;