From patchwork Fri Sep 6 16:30:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 826897 Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013045.outbound.protection.outlook.com [52.101.67.45]) (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 8898E1D3638; Fri, 6 Sep 2024 16:30:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.67.45 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725640258; cv=fail; b=A7oZfs1/7sLQO3HqQLJyCwp05XLmEOWusq/U7tL+VFalSqdUc0v2uQBw2N8h6ALvgt2NLropDyDcC53stlnzDosEACe0w+ExocT2E5NJmgDdC8N6mGXt3F41XdGWaprexAB/lTvfx1Wu5s1plB0rAcvxMs3K+q/GYDHUB1Uebas= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725640258; c=relaxed/simple; bh=NubeVKC2JY+Edf4txeZQvlzij+Dl1DAys0Z7etoxmSs=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=QrJEe5VPd3Z2DH7ngQ6Fsgl5Rfu1TyIsrVAlLjmvhX1teLBefNA8zgPhGDkbyEU27TH3UgGztdAsJ4SVUdE/K3mzg/wxbDTtqLTft1Kv+WRXeTzJSehyDGkOSTKch0OBODs9QRcf5w0z4Qk1w+3CdBrohD/qtbs6uTaDP6BXSc8= 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=OTQlKcYZ; arc=fail smtp.client-ip=52.101.67.45 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="OTQlKcYZ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fzIVIhGaMio4iGzqAK890uQ2E6gQgRzKvTBcuo3CyvywsWIQsIYQILEnGJGoFu8RDXaXiixxWdN8WH0eIr34/grEdnSaawfGSsKABEKdn0vhJLLJr6Hml3HVL131HmkeXlMcRgZNA1K/8CD8aO7q/5ArDvlxy+OZZXfzXtpXWSuzanT9alMw2WLRaeAqjaZNCSr4ZkQYAg3PgN4j2GbXFEM2pizcmdWnnV6hqJwdajqewi/osbFkWYF2dqZDwAq40+vJXT9blTwgrFYNUeU8VXhDCYRDJkXd8yPtqYl3V7+DaTEbb6qsEnThPUuroaqUp2RQpTJWPuG7zJWDi5eB6g== 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=rzoMalRqkFItVzURXs+rS2zgBOQ+B6Nns8zGt7uifXA=; b=I8e8TXOr8YzsRXlpt5xJ3quRphnWOhveXz0nncq2kqLK1HMpzqnoYYfbV7v+vCtNSiW6zXnRK6YejbCLc2mfjuERlaW67t7RZVXsb43abkvOvXmW9OQFyl+wkAXw1wHq1t4kV4njzN3zanBIezu6cKCPFvcVF7d9MrbP5pUA+8n6x/QjRNMZh/boD9ZtOMN+GboI2fEJfLFssb/3tg/T4XOffm9YweNK0LV89+Sc/iflYYQ8sQdRvm+mciqiDqAZctodRSq4cyI54xN7KDyDJpwvGGn8dltSxmw1XYNH4vfbbeF38/6kz6R84VVd+tfqYgDmnwxBSd6J/Kq6Gk87Yg== 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=rzoMalRqkFItVzURXs+rS2zgBOQ+B6Nns8zGt7uifXA=; b=OTQlKcYZ0Ur9imHV2U+Vzh8vLVG3F9UwZ0BYITLxbHEUExyyHBnZ9gsAs2o+4hE00p7qpd3SxrRmrxLUHHzNC97O2xE+W+MGFHWOgmWV3q9Qwo8xasaDOG9pKiXh3pzwGskwbtjLgPhMxoQ+IpDIDMfpMSwvqmLU/Q1DVqKKp4m6WyLqRuFaojaMlWapYlEwyUgdIw0GTwIy07s63YmYPEODwPgL/7jgOPUXvzPh79ojPPHu7DVcIpncKRNwNjp7PVI6Q27VzR3Y2YtUAnR6zl2Zyoi/0ofQ7EKWEZ+g4W6JeLFnppfNhc095lm3d9pgVFI/UH5Ratj7Kp5t2HSG3Q== 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 PAXPR04MB8405.eurprd04.prod.outlook.com (2603:10a6:102:1c2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.17; Fri, 6 Sep 2024 16:30: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%4]) with mapi id 15.20.7939.017; Fri, 6 Sep 2024 16:30:54 +0000 From: Frank Li Date: Fri, 06 Sep 2024 12:30:37 -0400 Subject: [PATCH v5 1/3] usb: host: xhci-plat: Parse xhci-missing_cas_quirk and apply quirk Message-Id: <20240906-dwc-mp-v5-1-ea8ec6774e7b@nxp.com> References: <20240906-dwc-mp-v5-0-ea8ec6774e7b@nxp.com> In-Reply-To: <20240906-dwc-mp-v5-0-ea8ec6774e7b@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=1725640246; l=1070; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=NubeVKC2JY+Edf4txeZQvlzij+Dl1DAys0Z7etoxmSs=; b=qN/04TfyCco+wt8mwN+joQFtEjr37HCYbV15R/2lrou0j8Y9CzA7CphWiZSyPQC2rrukGiVXO 49LePCHk6RSBEDN7TdPaRNyk40UzL3nsrurimTazol/I/ACJiB7620u X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BY3PR10CA0016.namprd10.prod.outlook.com (2603:10b6:a03:255::21) 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_|PAXPR04MB8405:EE_ X-MS-Office365-Filtering-Correlation-Id: 9d37fc07-287c-45c5-3eb2-08dcce914777 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|376014|7416014|1800799024|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?bsHxZWl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Q0lGNkKod6WllW?= =?utf-8?q?OkRD9mtNnUKffEh5FZhBFvV2rx4J8ofJtbGYGLGAG+q/B26F50k3+kO5bIazBbGAr?= =?utf-8?q?cDvFUWogzVncR5foQgQHPYFbAJaYwbhqFatma+Rq/LUhVqpurSHEcTgzFqYUrzDpu?= =?utf-8?q?57P3iwGCj4Kv0Ql2OpX/qlUaKBEsbqYa2KQHWf1wZqvrMqr4KbIEJpL8Q4tz2e+hj?= =?utf-8?q?NYoFbRjYsqAavWRlFnTioB/PxwkTn8jPJvGqUSDnsm4/yW91jEebBZ4pO+ugbcxza?= =?utf-8?q?ASPTashH5QxHDtd07yJLvyugACtAyd9jMwqoh5E7EHaO67ZAjFjkOoMAEl475ixcr?= =?utf-8?q?WjpSd8dLIyXHy4DCZk0muJMyOwzlhxRmLPrc49kT3uDgkEmrmJwz6JN0ov6ILrCO+?= =?utf-8?q?wUTORwNRG2c8IUxcOqeDrWXaM/Meg0pAl4+6pZd4MSR3HtBJP9WM3lfiiFqudnLAY?= =?utf-8?q?PxXpMCeJrtt21mQIaEHDbsbUDzP6O4utDg=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)(376014)(7416014)(1800799024)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?es6ySRXmBupNaaeQuOrCi6T2r+ce?= =?utf-8?q?9wVfQehQ8rNnpCWz+LnGmcMWwbzBZeNJ1kJzCd8+IRssYWZVaGrH+5ef+o1sV+LfS?= =?utf-8?q?yH8fbYdJzW+1DC1akDVmuiazPjFwsZQon2cm4FTYvojYjSRArzHOYMOmTHD0bT4lY?= =?utf-8?q?Dvy8jSudGxVzHWQL/UTkpxsi5zBwe4X9zw+q/fF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3ZWQX2AuOmAvbpqr?= =?utf-8?q?RPQUwmNX4ZsJZi/NXMia3VGV0sk85wHJsnTCBkvEHtMs1hH12syYP91hHSQqPJ/fA?= =?utf-8?q?vIISN38k1PNmxC+kM6EMi11cBjHCIpRxvOmJxIfZcxDFvOqmyfbV6BMi8bADCJOVo?= =?utf-8?q?25jK20a7gGBkU2nP3boPxdh/hpndjD4snnxI9OTvnh/0UITGfGk3HqsSbc7YeCMvJ?= =?utf-8?q?anZcaD1pYcNvhpGWP+Ey3Kz7vp7Y+PFV1/ZVpQFaOVfOGMyJ5VW/CVDQ2RoVR7HO/?= =?utf-8?q?K1/NIPYyXMXri2u1i1eJz3PaMzDoFH1oexYldMKTFkuGuVBGnV5iMDTRGoR1aOxRt?= =?utf-8?q?j1IZvadpN03JlsxV3oQzhVgo2zHY4LBJPitH0Ggsbscy9FEUu1keOW+MgcI11cOWw?= =?utf-8?q?NpqnJ1yEhdXJxllmlkC+KS/KVHIhQJBBwMKHX9OLP5dHkJ1dcREocS1Pv2erqO+Qo?= =?utf-8?q?/7n93PRZYHGO?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d37fc07-287c-45c5-3eb2-08dcce914777 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2024 16:30:54.5499 (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: C5AWNFP6sm/kK8Zz6SBcPDECS8GhTb7iHCoDWyT9TeJwofK4zqLRp4YYrOWCqKhDDe5DHb3K5o1163jTwBegrg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8405 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 --- change from v1 to v5 - none --- 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); }