From patchwork Wed Sep 4 15:49:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13791154 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2059.outbound.protection.outlook.com [40.107.21.59]) (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 C48761DA608; Wed, 4 Sep 2024 15:49:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725464973; cv=fail; b=vBIkU5iEfHonvb6YbCcGwyMZlYv8kmMAkUyKymwj2NA+DAOCI9Nfbhc2GqOZcAgC+A21NQhnVm+0WithTmlbu+Oqci9GaFGSOsPe2OLQVm5xXKDaKmcjQT6cIWZxSr+qzoCDC0x0H+1jSdEjoaA1UFa33YLhHhtPn9JPJhJbXbs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725464973; c=relaxed/simple; bh=OPMEgo/PPVAH3sDsMsvf6tFyCZJh0Wh9SpXjFlyjVQQ=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=BKBR8apWEMpN91acl9+IXn0/xBqJ397xTLxO1D6UXs8uqZIIQu1cuhQo/W4aSfETv4I+PtxRPSlzw0t1ppdPLdKwljbUymnXevH+5RqazFzEPcIWLgVGL5BkgpgWmpTpU5m8JEcJtBKZO0n6fRGW9iEivKcKxarYmbyEvqXApuM= 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=YG8v9D4D; arc=fail smtp.client-ip=40.107.21.59 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="YG8v9D4D" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Dy1RoP8N1Jjz5oTPYfLoS/KyuBt8zI+851CVNzeiIDKJNdBykj1eHmvgCa04gf3PSYwNxQ4sU+JUuvccOMkh69dQ9GBi61Lal2ZeJduIBB+wIKSL8Pa5zME7zp791F9sBgNZaF5wLJZSio41HeR6n91n4MKrCEQr1q+xSSEma7YIu5JxB1KDoh7GtyrM1OK+IXcW/xLKjpakGeMe1SYkUtWxSXr8Dx7/jR5eo33DDfvrUeH/AAfAeqRYVJEDpuhazSkuPqTW6EbSemTET6jw9U1wltghuOZCsmCg0+BRjHbQVuGoXkZLu4Az16I3xdoOc5mevT0NQ6lHAdQ1j1p7qA== 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=iv4JTg7FOu/RdGihKeFakwyLWiWLsttiQ47nmgynIiH0rOdg258eNFFPrDIgV21+4rWxaCsJmAwmqnTFtEWETzBGT0kC1AsQm2gth3snXPTOBB0ZHw6rMPyEwndfRhYToDTTJFIS49+RDuZnpT9nk3TgpPox07VJx4f8WwqljBwoqBn5/PvFHsdOq9YGovNlILM17NHyOM21doFUdL4xOyc5EsQH6eNtVqZx4aTmdQ6bPitYAyrcIj0ydwV0txIILJY09/oSrWd87r7TwDzJq1sGeDxNmxDvyDgLzTebARMZzzKWcif+OHsaO4j4MexiQT8ykFOBgAbP2RsubQv8iA== 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=YG8v9D4Dldd7wErik2VtBC/vv0xfI7iEWBVn72DS9jkxmr8NUaQkKaaZrmxxCExQ+EZkW7LjqY7StwZu15XaKfDSd60FUU9bjwfVxDQDjKsqlME1IBEbE+WzEeGiRaXa0xNSrLaMT3h7XRlS9/TUIqhHSDs+KlYy3DqFTTaSP2hSmUT4gw1YOf2tbSqNwOKsh4vnm+oIkKLiyahvbgHpFibsWcCftSh+FKXCoRrpbOIq8wGOXX+TVWAJD4m+blATugCZLyRIMKZJEbDpOiJgyHgTcrzmnQG8aDzX3DS4hUw5AJlAxgfGYTUvF3udtWLCprEQ4MJ3A2LmYozik/WQFA== 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 VI1PR04MB9859.eurprd04.prod.outlook.com (2603:10a6:800:1d9::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.25; Wed, 4 Sep 2024 15:49:29 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.7918.024; Wed, 4 Sep 2024 15:49:28 +0000 From: Frank Li Date: Wed, 04 Sep 2024 11:49:02 -0400 Subject: [PATCH v3 1/3] usb: host: xhci-plat: Parse xhci-missing_cas_quirk and apply quirk Message-Id: <20240904-dwc-mp-v3-1-319947736ec0@nxp.com> References: <20240904-dwc-mp-v3-0-319947736ec0@nxp.com> In-Reply-To: <20240904-dwc-mp-v3-0-319947736ec0@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=1725464962; l=1035; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=OPMEgo/PPVAH3sDsMsvf6tFyCZJh0Wh9SpXjFlyjVQQ=; b=qw9gic8gN6R4qA5UgOfoKE83zy6veieKUzUqWclSB6QDNiN7WmzFitlDVNmX6wCCLYB/YRnxs pdwrLJMgwHYBJXqMU9UuQ8wIVTSCYE96oi9oEobiQANj4xGWkfyGBEO X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR05CA0008.namprd05.prod.outlook.com (2603:10b6:a03:33b::13) 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_|VI1PR04MB9859:EE_ X-MS-Office365-Filtering-Correlation-Id: 1bc1af90-193c-428c-f120-08dcccf92913 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|7416014|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?3NjLfQy/34/SqJ3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jtPmnciiq3yc1pft8bFGoA1Vtj?= =?utf-8?q?Jexy390AloMhkFlCSG1zE/ZUn+NXTLMPh37Nn4jGtSirChDfSQnwMBzJ76HlBM4nX?= =?utf-8?q?L+YNOf4ElsD2yaomNA9U1PChW4/aDno7DfE5ltldN2GcPUvnJSURO2/XSfG5UUf4q?= =?utf-8?q?l5Hxda31n9/PeMyRk81ikacEhj6dwGqlBxSIr9E7k4418tZg5/bzwWSkrazoRBcND?= =?utf-8?q?gN+gyGzAFZ0d77+k2Pcnwu+jLCWBIz+r5DqwRW1qov9EugGSPVXNq7RXhSo989WXm?= =?utf-8?q?pzSgoZiOvLLUwjz1qj1lk/kXzY5G7n0K+WDRtddRvypH/MXuNjeu5LnpUHKuIQHd1?= =?utf-8?q?Fi/mWl2laF0vwQEF/d4qbr8dKyMkJ1MRGa9HzPtmAv2fb8UryYeXaPazNjEavpzPL?= =?utf-8?q?xmWlqW053IKqB8XbEW5vvYka7djRzCz/67V2eMbOgfIXze8kxiMaTaq9cAwGh3JoH?= =?utf-8?q?ow1uBjBSQZEWZdQumCfRpqL9fmIJlPULQA=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)(1800799024)(7416014)(376014)(52116014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?jUKQUcti7jsYAt36KpnxoU/qJdP9?= =?utf-8?q?T/j650D/rVH5KcWi+UHccnkY+V+tImnjo6jWyN0stk9jWDesX3UjC4jC65XYKFoQ9?= =?utf-8?q?NB4D+vuiRYZ1/yZxYJTVOBE1LuufIDuKbg3DZEWxR0PdZkdTB5SDYJeI7JbbNNCkC?= =?utf-8?q?251MTu4/ZrFADi2ZktxdAOP+acwcgtTZKNVlZZ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sKZM2y+Drt8xumAj8DnEKkLBL?= =?utf-8?q?/6uNkxKRm0/upIRuZkjM6i7OmdJdgV3aoR2lKe5Rj4b23IDcJX2SUH91n/hdE6Stm?= =?utf-8?q?nCkrXYyws7cRhsC88ug/K8qUJq/RUb6QtaMfkX6T/PadiCJGVELNcYvItVcaQSUde?= =?utf-8?q?otLtz49ZTBC9N75vJwjISKGhD3I8wrgFw0NML/+QmvwpjYvw+9ZPdF7obgXtC5Wqe?= =?utf-8?q?28jBxFJ8CkEUZ5VVhPI/JroqOANaeVueAjGbKPKmc9/LpZPywkzvhpWjGx0AIZKab?= =?utf-8?q?/H9xiU2zhS3+DaMdTkAZkfpyzNxN6Ggg71VHBtxkveDu9jz5u/mvnog841OA/E6hG?= =?utf-8?q?tlyusxtVb6GFGLNs3RlcVGTDFmnVt3Yd8G1jIAHTjNL07PhgaGnsbU5m+05ypr8Tw?= =?utf-8?q?h/GOP3cbMnyChvK6XIUswj4tgxSRJpkJ9NBK51w6gEesyQ/GA4avKzHci6WjyuxuY?= =?utf-8?q?f6tKlnu2ThiE?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1bc1af90-193c-428c-f120-08dcccf92913 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Sep 2024 15:49:28.8934 (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: ylQP6n4ruqtx0NQTDBBMMxY2wmAXc7EneCeQMYEEwyIMRRuEl8YKrTg6g8dSgjM3VqLG/VEMUrWi3bzHpLb9zw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB9859 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); }