From patchwork Wed Aug 21 16:19:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 821654 Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2064.outbound.protection.outlook.com [40.107.103.64]) (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 45B57154448; Wed, 21 Aug 2024 16:19:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.103.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724257193; cv=fail; b=rQgyMl7VDeOo05buuU6T1m73v3ewapSXw5/TnZUxIvKYOwI+bkPz+VhOokRxfEvRGf2827L2Kzi26xYAG4tnG7HtTL8UJSyK7/fi0BvsH2ZvIkiz/pH4s6hY9bXkvkYvGc9ciFdhMrFPYQacQF2dt8FmYYnvcMXGFO8Y4B9/tmM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724257193; c=relaxed/simple; bh=OPMEgo/PPVAH3sDsMsvf6tFyCZJh0Wh9SpXjFlyjVQQ=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=F2oA1F+LBf4yIUEZZzm6FpRNiPBIGwMmDdBRF3q/8S9DuH7Wlj8akOXHLg6oghUzhYY3W/DmXZkriaXUPiOl27HVTMkXhCo84VfhyByGmoXBUFYS39MRhIxKFmQ4uJZux3OPmpMHnEiWGU/SLjWQS9iKWwWbKbozp2rNU5ajwZY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=ggEKUW9r; arc=fail smtp.client-ip=40.107.103.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="ggEKUW9r" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=u/bSyYjQOw3F7ugv2fsB3Je9vHKckd3wuOnEpvGEYZvwVO9P+R78G3QCo7pthx0BBa5oY6KAk/rT/ZuAbWeAMXCUyacRRhfLUfIHFKJfKxfwaK/NHwbG98Wkl/HJIGtimgkevIpb5vLUCOS8Xwu8NccxbFyXwysLK431eQIg3ZzEE3urxLtkKPM6xAzYZG9FBZgpcFa4n5peVdt4h0+QaFOQHs7toudEeyqHq2jS1m1DHcwYgkDXrleIa4K3/yEzZwoMFsZakAoESESSQh27zvFOa6XXuGjacc7wFc/6Hj80K2qfsAH7clSQPFtDQq5xyQKNnADrfeRoxk4ra0+zkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=5FGgaU9IlyBHq49XF9k5+aS5ZI1cv/6PvMPvqC36+xQ=; b=gF0b9ki8rogLA0yFdITLTV+hrAhOchtJq4A10IVIo3aRh9o15BNb3PosKQUVrJZ3AvMKR0Lo7TD9Y+jmRuQp+Toh14C2B/UoXbMxmhSkyOND3jczOIVm6OhWM5XwiA61VZ3JIyjbE13yyyIaucvLWUmgtYcDD4wQWSfa+iclL8YJiTJFVgaUvlFZa+9uwnXXxNTxL3iO9LVzwJAuIR7iKoZzryqBMjf9kf+/SDrIrxe+yqcFCc9mPFfVFUKxZKs9F99Ntotd2NosRQGo3RH93Sv/GPqK/wsRmhRzPlUb1ciY6Hon8qGu/oqpFJcVwrFb8Avo55lKJ2qhq3r+wvZXeg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5FGgaU9IlyBHq49XF9k5+aS5ZI1cv/6PvMPvqC36+xQ=; b=ggEKUW9r+7eWYa5uMZ7ICKPgiiw+ehLIDVo8v9AbDejz7x0zytmBd+X43mJWT9zPRIIC7cKPlDPs8YRVQJPZToTYni2Qk+7EnsgB3P0NeC6dYtL1sgVIRGgrTSqO6DsiivkcPedXzGZ0aTRQXZyeYr+3BHhZ9iiraObJYowvUt0voziM5hVZTzFNxSfwU6X6LomEA4pUjj/bKqkqW9XgIqNEqTDB+W20J1/rwbwnetJFJ5iGy6we7Zmso1WurYsBhMGZClmDMKZxqGps+NAn3HgF6+beT9UaqtDnOsQw86mG5DT16Djn7CFScegmQbW/LqDWeSU6IQajgGvXE89Zxg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by DBBPR04MB7817.eurprd04.prod.outlook.com (2603:10a6:10:1ef::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.18; Wed, 21 Aug 2024 16:19:47 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%3]) with mapi id 15.20.7875.019; Wed, 21 Aug 2024 16:19:47 +0000 From: Frank Li Date: Wed, 21 Aug 2024 12:19:06 -0400 Subject: [PATCH v2 1/3] usb: host: xhci-plat: Parse xhci-missing_cas_quirk and apply quirk Message-Id: <20240821-dwc-mp-v2-1-2a29b6a5c2f4@nxp.com> References: <20240821-dwc-mp-v2-0-2a29b6a5c2f4@nxp.com> In-Reply-To: <20240821-dwc-mp-v2-0-2a29b6a5c2f4@nxp.com> To: Mathias Nyman , Greg Kroah-Hartman , Thinh Nguyen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, jun.li@nxp.com, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1724257180; l=1035; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=OPMEgo/PPVAH3sDsMsvf6tFyCZJh0Wh9SpXjFlyjVQQ=; b=U/RIjK5IEkCCwOPuwn+ywxACeFcbVon65zQ/AxPGLsaRlOI7Jut9qdCMlbq5o573ig88TaACv nL7p5+lOWoEBxhzo8709ijoD8uGS9TVKhtjc9ZvafBwEB0JJZ4meQsa X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR08CA0056.namprd08.prod.outlook.com (2603:10b6:a03:117::33) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DBBPR04MB7817:EE_ X-MS-Office365-Filtering-Correlation-Id: 83c643d6-c646-4ba1-9c97-08dcc1fd1337 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message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UzhvBTTLxbaGAoWc5zB51Zqhu7z/CLI+kCGreu?= =?utf-8?q?F8iZQJd1CXkUzcEN8txLxbHcpGWC8Xr4qmfu3VogqQZ0zvpmwHrgagE5TJbrP4dNW?= =?utf-8?q?RtNGROvHpQZtkV8kDRuuT1z6Goqnd/9Ow/m8afjFWkZvkg4sY+k376l3wNbKV642q?= =?utf-8?q?p5PuPwf6RuNgraQIEgHYhYwgEnPPSAaa0XEgXJlb0XxA0AYQKPpcSus8zCs0SCMg4?= =?utf-8?q?GP4awFb1Vgzf8ksafRIl4eZyRpGZhXUnVRaIebHfUUjmbnC68IUXOmjzXW70C4o3Z?= =?utf-8?q?6T/B1sX2n9QO4MN9p5RxBoQHjztrqtdnbB3E9VJkaV0rYLwvyo8g2eTAEwwpKvwkA?= =?utf-8?q?1NmtUwtP3Od5kHKef6nH/ael9yK9rewUW5rNUEoH3/2FUcf1MpaqSZ9pysZzf4Qk+?= =?utf-8?q?V4D5GE2Ex1svl5kededZY7YWbA2VntV8hi9AC0NYcRVU9BShLCV6vDFG4JkJHGmOp?= =?utf-8?q?+OKLe4kMimNoV2XDg5NT8JdRziRGN9CEDQ=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9642.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(7416014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?QN8uHgt9wA09lf2LAxDwM3TQG6XB?= =?utf-8?q?UgR8YDECWzKp30bfvAUJMWmaFSpRLgLTCJgu6NkzO35g5QiF6ufLPQFS0gK2G+ayX?= =?utf-8?q?+mI51cf0ibvE9KpiSeUGmHprwpxRmQBqKWUQn+yhPvZsqi2cYXz1ji8KWkKlYe7lx?= =?utf-8?q?wLNfB/S0Inf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E2IfzuwPAlWywAzDl2ANlPLcv9PYiKTY?= =?utf-8?q?PqVCk3wJ9rpgalFQIu3xmDZV1qVvDdXEh5VLmAG6n5qFzwSKPraNH5amgoM0ojjEv?= =?utf-8?q?Prg57KbgGNvfoTOsazM00ktgF3fmtev01jbLrviscOYcSLPnMHQ/sGobpiDCTYZ5W?= =?utf-8?q?IsKzOOJQsqvpoV7yf3rk+K2F6JR4sEm7TuBFTOlFl/LQaacyv7jZ2udruOo6PPNuJ?= =?utf-8?q?IX66WNSCIL7AP3W3h2nYJeeRbp/KeJGxF1+o92pd0NAjO0133b/rGkIMOHAS6hgIi?= =?utf-8?q?46JBfiHVOyaZS+/h38scbvWYMp866Gb7DO2B1xrtD4zXDleCe9Uoge43FovdgV4N1?= =?utf-8?q?IEKq7bSXftjjtJlfwoR9dNsHTJim+HI2lWxjKYyUJC2BVHmUZy6Ki2DjreKsEnCpX?= =?utf-8?q?9L55SlQuuieVasMX/Q6p7mbOldqdhS/iGH4uSuXLqwLO3G+nsfm2rtPI=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 83c643d6-c646-4ba1-9c97-08dcc1fd1337 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2024 16:19:47.4290 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZUQ0kosiwZva2MEJqOg7gcmiwT10WT1Rd6W3zGin/LBy+k1Tf050z6juugbIX10cZVuqH2V/MnAIiUcTn0qkEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7817 Parse software managed property 'xhci-skip-phy-init-quirk' and 'xhci-skip-phy-init-quirk' to apply related quirk. It allows usb glue layer driver apply these quirk. Signed-off-by: Frank Li --- drivers/usb/host/xhci-plat.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 31bdfa52eeb25..ecaa75718e592 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -259,6 +259,12 @@ int xhci_plat_probe(struct platform_device *pdev, struct device *sysdev, const s if (device_property_read_bool(tmpdev, "write-64-hi-lo-quirk")) xhci->quirks |= XHCI_WRITE_64_HI_LO; + if (device_property_read_bool(tmpdev, "xhci-missing-cas-quirk")) + xhci->quirks |= XHCI_MISSING_CAS; + + if (device_property_read_bool(tmpdev, "xhci-skip-phy-init-quirk")) + xhci->quirks |= XHCI_SKIP_PHY_INIT; + device_property_read_u32(tmpdev, "imod-interval-ns", &xhci->imod_interval); } From patchwork Wed Aug 21 16:19:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 821266 Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2064.outbound.protection.outlook.com [40.107.103.64]) (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 917121547F6; Wed, 21 Aug 2024 16:19:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.103.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724257195; cv=fail; b=Dlll0Ft3+EXmS8RWv5H84FpQ8e5Kk19oyZrNUxnO5j0BTRdB0pAd3NsjK42cYJNcv74SYpy9a03kScOCvF82DaladsOmA01C0TH7LuEZE3mG+qGA6qjZRK+B5vBPQj2X+qcSzYRMAJQF8FCO5lfM72OxCNkn10tb16fDnmJQWBI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724257195; c=relaxed/simple; bh=EXCQ2yHg5GsraSbI5hSEprSk//rI7vkb56MC0YIBq3s=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=dZeZXKQtPYJbjaUAsf1P+ppC7rmE9M7Ig3YzU23oLbR1TnDHKs0TjFiLHq+GYC8X95fIoecMW3ZQdnxdDw6BeeW5S2ZSRvv7dBDseFcCZkGNq2g36dKqGjNFW4/5pGlf2fc1Xku0nI4/FvKBsgms3C2nbeP/qW95nkr2hqQ3kxY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=PWB5vJLO; arc=fail smtp.client-ip=40.107.103.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="PWB5vJLO" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XAstBK6woEJG1+8KgpRqxGI1yaD38L3018Luv93T1dEtb7FDqYHVtBy+3rGHJ7wLklU9jfY5fOyeJ85PjuEo7DZYc/jG+nkZmuxnOdtWW4XhUHkONVx66eyliPIgvsC24a6DWjXg8n3O4g82YfaPG9TxhJqf0DbwMj99Lgnb4TlPIF25TULcbhEC0hidfjDAkJGtzTb+LjVc9KSUTEeQDME/WYPDk3G/JKGvbcTRhwMGRSWCcH/L3FJ8xnRaLuVy9eb0TbwEYw2eEe/dENxLNfoI5taf+Z48/mjNX8rC7cH+4erWIDD2JHuKfE7Rc8MoQysWxj/XbypS9lLvovB7mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=jdrCIBO/TZyt4l7MWJRsQaIAmL6xsDKfq9X4Mftx/o0=; b=WaoV8SlMU75m9qJ6YKD/AWcrld6XorDze3IMjLsw+c79K2w1TOISdKB/aoUbcTxpr/szzyZnf0gUkUxz9oXHBXIWLeQxyQ60p9TKRnWz8bdy3HmTNI19DMatG2Cp1DgmXn1W313K/BrpybEDTZ8EvbAysA0aVnPX0XgFCpgMNJlc65BL1muwwFzkX5EIF82Y5S0ltkJr/PZU2udqVGJbyhFLyYiEyEJ66/V+rC22ME6+U84631DwBHl9N1MLiAEyiwrGZuIOinUG3b4hrdqXtyZ2E1F+9qR03vKQBa6HcF7ih7pQsIy8XZnz+BS/InrKp/zrswGhaaq9fqLvbbXxfA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jdrCIBO/TZyt4l7MWJRsQaIAmL6xsDKfq9X4Mftx/o0=; b=PWB5vJLOgDUKCxwjtrYbFIiKqtZg6bYlbYry+IJQ/l0KWgtCl1gn7FRfdc4GR98XJ6nDHj6OyGdjq3Ok8A6XiXoDKKGi+QAl1XWY20TsRIs3j0PWHxGHneYJrJ/XNHTL8nncrM+IAShfL3FtFC6tNIettUCLOAO96UX7xdPLgd6ws7cfqmq32HC8Dpqk4KaJTjGoezy7XSc0wQBlEMgv+qOBTVLJmq9hbeAVLdUxPm/MfxmVAVNxtEIEkUescypY/vdnO6c9asZD4iV9m/TMDvnPUXNY5WKhyoWEdL7lK0UMTsbZq9mynjqCLNSeF+usTTulscEEUQBtGPRivRpr0g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by DBBPR04MB7817.eurprd04.prod.outlook.com (2603:10a6:10:1ef::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.18; Wed, 21 Aug 2024 16:19:51 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%3]) with mapi id 15.20.7875.019; Wed, 21 Aug 2024 16:19:51 +0000 From: Frank Li Date: Wed, 21 Aug 2024 12:19:07 -0400 Subject: [PATCH v2 2/3] usb: dwc3: imx8mp: add 2 software managed quirk properties for host mode Message-Id: <20240821-dwc-mp-v2-2-2a29b6a5c2f4@nxp.com> References: <20240821-dwc-mp-v2-0-2a29b6a5c2f4@nxp.com> In-Reply-To: <20240821-dwc-mp-v2-0-2a29b6a5c2f4@nxp.com> To: Mathias Nyman , Greg Kroah-Hartman , Thinh Nguyen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, jun.li@nxp.com, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1724257180; l=1475; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=EXCQ2yHg5GsraSbI5hSEprSk//rI7vkb56MC0YIBq3s=; b=4DeK1iLrhkfcT5U0l7VdnjEUUpj5XNyQUUrRr9jFUbuFX0vt2MycHtg+gA5/wfhs/QaO5QFR6 u8BoXirNvixB70/FKbCkzBFVWNuhj4JnupcY+lulcQbr48/B9IaMhTc X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR08CA0056.namprd08.prod.outlook.com (2603:10b6:a03:117::33) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DBBPR04MB7817:EE_ X-MS-Office365-Filtering-Correlation-Id: 7df93d16-533a-4034-0f32-08dcc1fd154d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?t2ui8jtExCyu4pTiPPQV2cco4rX/uD2?= =?utf-8?q?7fk37Ubb0DTjxY7zpZ1H36Mf1kSaddmcgWAAXozKG2LrWeRrE6ls01B1LRaWXMOEu?= =?utf-8?q?urFTCT0P9gd+KMStswWgea/Hcl2wmLD0BUEcmPlWnExVXGZLC0GQJjUiUvoHn3gzb?= =?utf-8?q?5zeVEfqyZWZyk/DiuXR0Gqrbs1x4FoNBquPN/FMDkotqZPAU9CtVBFZRLt3ADq9e/?= =?utf-8?q?5+ZzjkwvHGRYQ/aYe5ffz3m6UNDs4cwsUZhWDofFzbJBnIP0uk113vugOcmctH5/2?= =?utf-8?q?Owp8JACsp8zpkT2Rz5HcKZevuOCVIYWwshJpgzq8n97eN9uLhp2ZARLZcPzoCoG5u?= =?utf-8?q?TFew52M9fil0VlBW8+jamqY2v5Rn2d/L98ZMRdyN2oXQHFqkCeITxFkZSguzIIJMM?= =?utf-8?q?tjoV0GEtpgKSBkOStEJw3NE1O6D1hBOYI38AbSjre+pWMEbONqSy+WvAeTf7Z7hnf?= =?utf-8?q?9R+Rj4L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NLbKMsTdEt25FuuUuSVYvwg=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9642.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(7416014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?7YGNvWD31QN3rPpEl3DBhZ7MA2Qt?= =?utf-8?q?ddtVh5rJVYuAFI8hg0D71uG+S6DCe4AYeFLBAIiJh1D089MQG64jPBF9fGAb3vg2o?= =?utf-8?q?SHk/LH7UUEBVmQ9NF7RzoKpXDdarKDHFJpywkTuDfOAu5KjqHfmxjBr4+qTkEiQcT?= =?utf-8?q?PxMkCkfzQ82p4Qijk15DY36db0UnbUAojCBXPzCBrrXJilps4Meh1GC2umFyiWLWC?= =?utf-8?q?6nYcmfbuQmr8OOZaiv0uOpV4sZqbtmf+CJABx0y4HiGGqfZJVrUPVF7JeYJM6E2rM?= =?utf-8?q?scfIXF09MLDBX0tsvsmGab6ujBz+Q4SJ6weaN0F+RYUNRu1THS3ECY4v8lJUfdOuG?= =?utf-8?q?oPobfvj8Of+viTWn/1hgyeZJASFJ0S2GTM6MZZg3iu5PN/vkj7yheQyZljp+vgugk?= =?utf-8?q?HE+bOz2gipn4GXAJQZ1/Ecn5ilVvKNJxEZMeCyI81Ip2WWJRVbL+8BRqYMYpLHz35?= =?utf-8?q?BISq8oOTo+9x6ZEY9xSF51h4rnxcMr3Lo7x/fZvsB4UE+0XqhE/9z6CMTtYjlpoYM?= =?utf-8?q?Sbya6pYMYe9w/FLzFkCYZ08Jk2VpDmMg1vyoEHoP74Sv1v0yaXoIKE1rnXb0gwGVj?= =?utf-8?q?+5CJTBe6rMigFyZVMMP+Y64JEigc5YOZjALCenIcx1hBfkZ849zejflYj96d8MvqD?= =?utf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1tqF?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7df93d16-533a-4034-0f32-08dcc1fd154d X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2024 16:19:50.9095 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LwN/8adcRtHGkV0M58Zd//7LiLrXLyzC2UpS6uH9sK72l0aCAfetjs4Wz8jU2LDu0qZM2kUGMxXZWPPX6YPxSw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7817 Add 2 software manage quirk properites (xhci-missing-cas-quirk and xhci-skip-phy-init-quirk) for xhci host. Signed-off-by: Frank Li --- Change from v1 to v2 - use {0} --- drivers/usb/dwc3/dwc3-imx8mp.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c index 392fa1232788c..bd6953246f42e 100644 --- a/drivers/usb/dwc3/dwc3-imx8mp.c +++ b/drivers/usb/dwc3/dwc3-imx8mp.c @@ -144,6 +144,17 @@ static irqreturn_t dwc3_imx8mp_interrupt(int irq, void *_dwc3_imx) return IRQ_HANDLED; } +static int dwc3_imx8mp_set_software_node(struct device *dev) +{ + struct property_entry props[3] = { 0 }; + int prop_idx = 0; + + props[prop_idx++] = PROPERTY_ENTRY_BOOL("xhci-missing-cas-quirk"); + props[prop_idx++] = PROPERTY_ENTRY_BOOL("xhci-skip-phy-init-quirk"); + + return device_create_managed_software_node(dev, props, NULL); +} + static int dwc3_imx8mp_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -226,6 +237,13 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev) goto disable_rpm; } + err = dwc3_imx8mp_set_software_node(dev); + if (err) { + err = -ENODEV; + dev_err(dev, "failed to create software node\n"); + goto disable_rpm; + } + err = of_platform_populate(node, NULL, NULL, dev); if (err) { dev_err(&pdev->dev, "failed to create dwc3 core\n"); From patchwork Wed Aug 21 16:19:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 821653 Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2064.outbound.protection.outlook.com [40.107.103.64]) (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 BFEA015748B; Wed, 21 Aug 2024 16:19:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.103.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724257198; cv=fail; b=VvQSfJrouXQNIhyNSKDd490PHemDfnqeS7E4kB3Lrx+p85ipiMzuy8a9+MV7/ToeK91fQegi5o/AVhgo4r36IqExRA8bj1YsfBGwW3zc/j13lO1o1PH+0dVTmjR0gIQlm9zjRKe34DAVPwZIeAP7vRRk8dqfr4em25SSSNiyPr4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724257198; c=relaxed/simple; bh=nEj/K1ERPksvYT9CUWSWEh7L//sN6UL3ybiMuxZKiIg=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=sU/0449ke7juEYeSEVUVsMOaoHVirokba2V7vhRT/v8sBeN9EAQK26uWBUST95E/TyyenlDCtQb8e6wt70R4GxgHmEPWO8DaHExvVYB4BAuMFJOJNnt7g3Mu3gR6gG8svME98oERectOCR62q+7KRCiWFMu/eTGzZPI/Y9x+5rs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=HPNMwVW5; arc=fail smtp.client-ip=40.107.103.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="HPNMwVW5" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SIN7F9pwGsXwVjVMCtMPHaWRPU+Pddo6Wp+Mhr+g0Zcj8CXi9cB8yQBGVHIYbRmeaAxZzK+zh4XFTruzshdIFbbucDH4nMQXYHt5QCtmUxnUMhcPSmOiLRXb+mRIlmrfw4bnNF5AaFycNfMkaJrQIbz7JQSqMlBZg82kAVHzHJZddIOaUh9ACNBK8wi4qgB2b5okZiS1ppiJdwSyNsQu3ddWSVONawjPNm9c3NC3xS5lJsabaoa0QNjtJ/+BUOLXNUg2NsI8a77vNLzw4iHG5yxUyO6TUN4pEJWpLAc9M+EglltE3P6B6j9AbUpRTzFp6TdRypKRS0g/McN6YL1ViA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=tgm4R5uH4tZ7nv2R+bN4sepTZE/cef+kW8N7+irfSno=; b=SoGRIZnN8Ep8LJypMgeZrN5LQ0QsK4PgjvqXTgpGsizi0BztjzJteKC9f1IQt85sQRTLC8dxDCb2A0I8z2ovtodxZEUWDXI9q6AkrWyynFd4Rou5ZwDYvdT5ZkoQ/obCMyCr/rTr3SevK72VR6JvqTm2navycJEJhCfsPviCFlveoBDluuK8GquZ7eb+XcN/jGfI7uAVJUQPu9BLcKVAZeUIo6vA9pqBnRy96NkZ8RmEpxFohGYsqzMND7yd9FT9ma0AxuRFRPAAOhazUf/lAZ0lGDHJiVDyhg5Zhi/WR7WFcXrxTgVlIhDshdqMbtJaEuJl62WcwN7cHZ0NGToi5A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tgm4R5uH4tZ7nv2R+bN4sepTZE/cef+kW8N7+irfSno=; b=HPNMwVW5PfbPkZbCMpASH+eWpLSLP0RB12JBw0GA6DcK9X0zNa7iTMlA97Q9AXXvo4Hw74r8I5a9OMG9GCXRco6vjeA3YJDBzq7P3B/mIzrbyTtwNfw56oVLqIRtMhr1I9kPwQyqkgGrvFLKXdGQxzgtC4wLZj7COXl7CfrNrqPEC3fjK1YLMJtqH/Ivr/MD4zgjrEeK1BKZal6iXjFrIJD+A92+mp6/mV5wVJcIJ5RKGl5o5Q3A81+9EzXhb+jWONFguPuPl9my+m6xg1BpkvNDexgT7Q0SuHDJ5r7x00fpSB8UjabDjtOofQLiyrt7MqzVHpQWkALlfZrMYA4QKg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by DBBPR04MB7817.eurprd04.prod.outlook.com (2603:10a6:10:1ef::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.18; Wed, 21 Aug 2024 16:19:54 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%3]) with mapi id 15.20.7875.019; Wed, 21 Aug 2024 16:19:54 +0000 From: Frank Li Date: Wed, 21 Aug 2024 12:19:08 -0400 Subject: [PATCH v2 3/3] usb: dwc3: imx8mp: disable SS_CON and U3 wakeup for system sleep Message-Id: <20240821-dwc-mp-v2-3-2a29b6a5c2f4@nxp.com> References: <20240821-dwc-mp-v2-0-2a29b6a5c2f4@nxp.com> In-Reply-To: <20240821-dwc-mp-v2-0-2a29b6a5c2f4@nxp.com> To: Mathias Nyman , Greg Kroah-Hartman , Thinh Nguyen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, jun.li@nxp.com, Frank Li , Xu Yang X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1724257180; l=2128; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=5+IVkwBerM0rBDtlaz9W/KvOLIbVp8/vpBPWsSyKKOE=; b=P1kcUcvTcUNH7zx+WBhqy7hSd3LltbRirQhmDI7Ocvl8hfzpPGrshn6IyLVnLGV3CUFoaqXK/ H9cL2g+JFEABuHydmCBTko0cwLgaQCsZFjH2naK9t98gvyM1/9A34Cn X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR08CA0056.namprd08.prod.outlook.com (2603:10b6:a03:117::33) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DBBPR04MB7817:EE_ X-MS-Office365-Filtering-Correlation-Id: 8bd0510e-7b33-4b79-2412-08dcc1fd1771 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?wh8Rqt5iwMj1sGEkC8DsGaaUo43Ydug?= =?utf-8?q?OLvACmo5cA/lZi9cBhtcXla5xIjCzOOsfg52eKx5F1a5F4d2zndNNWKuBD+p1bSt2?= =?utf-8?q?0NRhJrejWf/uOEAxLiLGDnz4XhCda6MqEAtIY4DAW0MkKsn8YHXdHFsf+1rxO0bIA?= =?utf-8?q?6GJCb8UNb6t1yXiHcykAJ23ZbVPQhJqZWo4Fl4NsNi4u+nMGAbNAAS9y2iUXOIEqw?= =?utf-8?q?3JLWNvSI0C73C8iY2x3/6/1rzCG10qtOhb2Dbbc8vJe4KESoIwz4AAHToXEreMcbV?= =?utf-8?q?8N/xvZ6wwh5uRHEred17OlifW7+tq4fkBqy+GfKvh/TLG08gmEcEkttvXa6zCElej?= =?utf-8?q?WzhDD8yK0Pb2HpkIfDb8/Ga2A/SZfQU35FtOJZQRVHnQP6L8c4i4dfKFBZs+fTwhJ?= =?utf-8?q?8CySnc0DIHXv5XN1tIEGljl2MEt24ZOK6PyS3Cpxdi1qjN12dC8YOQa5zA0VY/SmP?= =?utf-8?q?bM4xuq3PHwwWKr5Ncsv8/fjY6WNv78O1GelIUJJtUuHvyAAnQ0v1YjluahNq4ug8n?= =?utf-8?q?M9eHOlDq+6yaevtvoueo4TcDQPlBPx8/nJTA2LwJkU52gzcbbCoC2YPqmJRmNz7g1?= =?utf-8?q?2sXA+cLUn5YQhrmcnD9d9U1D/WZRLi/jb3gyTUTbxscZxtRPn+3I9S7aojTQZEFaF?= =?utf-8?q?tf9wY7y3R0IzTz3KJFO6jHypu5EZxjPjM9EMXqnSLF6dmVNXV8fNhSwdTNx0p2rAA?= =?utf-8?q?ak6mOAkoLHs4QGk4S4j/YJtaLmjYxmqRt3T8nYfWTpmAVV+g9H/aEG33fPC1g4h0c?= =?utf-8?q?WQHaSwVetaocEocNJwTyA69NrtM1O+DLS/ZplLbn5f58u0mbPBy929M+p02yeCs3D?= =?utf-8?q?6JOkEIFIE7vAjVjgV3bcBa1NugE9lGdN5u7ggpYIuj6/P+a1lRSWWGyU1R3gL4Z+p?= =?utf-8?q?klOHhlMXDFLbbynd5EKYf0wZwhah23U4SMIxSgtLltrPDFlYjNit9htG/l3skGjIp?= =?utf-8?q?ueCLPaYMCgts9S4outNSAh8gO0BdocwdsMitXr9vDfg/qxvpTzwMSSSa+sEhnQpmi?= =?utf-8?q?0AXF+pTEMq4ZQMLCo4dcPlEIYpFMeaSvqv1Zc4KCdaxdQ9eJZSKChY94YUcwttWtN?= =?utf-8?q?1SJj8i6SUN+Mwif+bDwmfMAPfzGUSZOCnJv4Voj9Q11t09JsZitGwk61cpEjB5Ngb?= =?utf-8?q?V3TTJI3LrEUZgiS8vqreLGurRzLRurqg6FvP9eqWqwkK5Z00uTDTQlWH3sV0xNvlc?= =?utf-8?q?teOfrpBdUNGBzn3dTYD1hkDf5Vo3LGDm4FQ5emSAsefx0IqcXljrAjyBatJAAQi5o?= =?utf-8?q?VLpXfi35Hs+Mxm99VMwgJNBLQ7SEXvHCT204rhsdWYnqVkmslWRaq/dn2/1tVe9sH?= =?utf-8?q?abZbGBYY+MZ/Xy9Xuukd4K3A/S5iXcL5Dg=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9642.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(7416014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?HmJCSdTIZEt/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G7GbC14xsxI?= =?utf-8?q?yn48Uq4/3xUt0VRDvj/UZC9n+t8o63MOBRtPtGXj5VjNM8PVIClULD8P4w4IgrUQy?= =?utf-8?q?q1RAODXp91u242FaucUMq/t9sTeDo0hZk8cI8d2rznnqlM/yHmEYvX6m+8CbcWMpZ?= =?utf-8?q?pS9ZupusWSGVrfG8hNsndrs+LSfW69FYzwVgJ0hjLN6xu2xaxHATyNAZ5WH8d7n1l?= =?utf-8?q?cZZJANPgeEvSOin0Y7p84tpokdxQOSmZtTsUvuPrbKtod1zK2fz4HSTbVUFH0qS4e?= =?utf-8?q?Cs5OjUTuashEkR++n3MXaoFwQpm4D6gU4KQ+4L3290fsyH8Y2SC9LGREvIwekFfrd?= =?utf-8?q?Mn+NkQxxv8VY1a9F67YK6zcg6PpdSWo9oehziPQDGIDRQ3A0PYQJq0KBAZQMYu0MO?= =?utf-8?q?wcnIgHksRwZIo8HQhGCX3Sl7ojS9GKKAUtKIUJqMw4+By6wepOttP0XpAduM/KHRq?= =?utf-8?q?RpdaLeVHSDVhz8+CS0Wx4KDgIHQQExb9oxy7loPaNBvvaDnMinNFRHR+djJ4DoNT9?= =?utf-8?q?zWScDn5tuIMMPiOmYJ9jts6rcnQEsN0wIxttZ0ZvhLfJeibxnzVnxNMBuE3zg3gL1?= =?utf-8?q?fyWt9/k0JLQQ8DXA73+fJkaGThPkE8VE+uJ7FnW3Sg3CsrHW6HYak0sdzsF0cyinS?= =?utf-8?q?I1Xozkneoagv?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8bd0510e-7b33-4b79-2412-08dcc1fd1771 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2024 16:19:54.5024 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: u06oO0KvO2Ku56fBQ9es2BtRe2kCnMwR1YnETRAPradlKiTSSOHF5BZCQNxRpnJlr7z/dzFp653wh61BhUEIew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7817 From: Li Jun SS_CON and U3 wakeup need 'ref_clk' on. iMX8MP turn off it while system sleep, So disable these wakeup source and only enable DP/DM wakeup source for host mode. Reviewed-by: Xu Yang Signed-off-by: Li Jun Acked-by: Thinh Nguyen Signed-off-by: Frank Li --- drivers/usb/dwc3/dwc3-imx8mp.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c index bd6953246f42e..02159cd820a10 100644 --- a/drivers/usb/dwc3/dwc3-imx8mp.c +++ b/drivers/usb/dwc3/dwc3-imx8mp.c @@ -96,7 +96,8 @@ static void imx8mp_configure_glue(struct dwc3_imx8mp *dwc3_imx) writel(value, dwc3_imx->glue_base + USB_CTRL1); } -static void dwc3_imx8mp_wakeup_enable(struct dwc3_imx8mp *dwc3_imx) +static void dwc3_imx8mp_wakeup_enable(struct dwc3_imx8mp *dwc3_imx, + pm_message_t msg) { struct dwc3 *dwc3 = platform_get_drvdata(dwc3_imx->dwc3); u32 val; @@ -106,12 +107,14 @@ static void dwc3_imx8mp_wakeup_enable(struct dwc3_imx8mp *dwc3_imx) val = readl(dwc3_imx->hsio_blk_base + USB_WAKEUP_CTRL); - if ((dwc3->current_dr_role == DWC3_GCTL_PRTCAP_HOST) && dwc3->xhci) - val |= USB_WAKEUP_EN | USB_WAKEUP_SS_CONN | - USB_WAKEUP_U3_EN | USB_WAKEUP_DPDM_EN; - else if (dwc3->current_dr_role == DWC3_GCTL_PRTCAP_DEVICE) + if ((dwc3->current_dr_role == DWC3_GCTL_PRTCAP_HOST) && dwc3->xhci) { + val |= USB_WAKEUP_EN | USB_WAKEUP_DPDM_EN; + if (PMSG_IS_AUTO(msg)) + val |= USB_WAKEUP_SS_CONN | USB_WAKEUP_U3_EN; + } else { val |= USB_WAKEUP_EN | USB_WAKEUP_VBUS_EN | USB_WAKEUP_VBUS_SRC_SESS_VAL; + } writel(val, dwc3_imx->hsio_blk_base + USB_WAKEUP_CTRL); } @@ -307,7 +310,7 @@ static int dwc3_imx8mp_suspend(struct dwc3_imx8mp *dwc3_imx, pm_message_t msg) /* Wakeup enable */ if (PMSG_IS_AUTO(msg) || device_may_wakeup(dwc3_imx->dev)) - dwc3_imx8mp_wakeup_enable(dwc3_imx); + dwc3_imx8mp_wakeup_enable(dwc3_imx, msg); dwc3_imx->pm_suspended = true;