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); }