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: 13771896 Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2041.outbound.protection.outlook.com [40.107.103.41]) (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 9B19B15748B for ; Wed, 21 Aug 2024 16:19:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.103.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724257195; cv=fail; b=E9ZuV3GJam5fkNihFGa/ymaUSFNZJo9XyzrHOILusZItMOyC0e46AxZYjxPo2yXs2ywN/6mB3lpIRa0sIQs3mV5TCRrwPK2XLyVV1SsGne5ysqP4VKRcmxPF/y30B0nlkHwEKYHhh7QTOWk7igOCWpCuWQkJTgzKQDiB7raO8Uc= 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.41 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: imx@lists.linux.dev 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?t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BhfdDCUZKo4P5ziWhRr/KV5ioYD?= =?utf-8?q?TbHgPbG6desUiZcCliNoUL74PjFOeGGBtTfg4bo7buCsQpdaaY+88d8Zu0rP9R6Oc?= =?utf-8?q?D6ritXoPhzfOZdHepGbk7SBtqzQwc6CCUlaFdhBG1lc76yBKOXBEjJSP/ScR577fV?= =?utf-8?q?dt6c9li+pVQu38fBWrDb0kz1T9CyWBvfM48JAE1hct6sFNoCJAKvNWHnqJ1FpJ4bp?= =?utf-8?q?8zZvcvkGmmVpZkqe+efbHzVZ7g5W6xtio/t2/l5U4bDB9IuQaFKMpUGAVos8Q8ger?= =?utf-8?q?DZBwKZEWif2JzOor3g/9TicftkubVldkTcdw1Lkx/ri2p/Iki6VKLiadx8ZejhRTB?= =?utf-8?q?Wd5VfL5JC0ZMHGMSIKqNfCZywxN0eL52nHVpRHpfT+oFR2Jt5KePkr0KRaDgNCvHA?= =?utf-8?q?3Uvl0nOB21kfJWJGbbu19CPQTQscNgT/bgxP67kynvUVvfY7ZvxHAEfqrhBq0QeAJ?= =?utf-8?q?RF0/nRl+c52NLbKMsTdEt25FuuUuSVYvwg=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?PxMkCkfzQ82p4Qijk15DY36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EZgOt+Jc16zinhs0yAqR+O540ZCNDtf09QbD?= =?utf-8?q?vl+/J/BOltU8AH/cqvjLMbm/IAWX1u1LXsWCljmPfP+4BdhD7GzO5BII+Tc1+1FbJ?= =?utf-8?q?7BKrOgmksUs/kfUXiOReX2pD7r4WmbY8ftBczsBbh/m1xifvkWfiVbHDQszrTZN+E?= =?utf-8?q?fxooLr2DSfU7d0gkFslvDAc/PlLApstwnj2IO6DmNtU63VLXA5t85HUdtaO2ZzOIp?= =?utf-8?q?atXClv3ViOGU9f6Fv15uYduqOdx9kiMdyiZP10KF6LpbczYCn9/fZOnYbXoTM5Qnv?= =?utf-8?q?VzZs4+ePaBnncxl1EEbHqpevr6kEcQuoVFv41uZHCHNvNzXZTUK4ONuq/yixGkgSf?= =?utf-8?q?QDeE/eSIq7QraoXBjpWIrDIbDxRLeuGa0fKPYD2ZtNtj68b9qaBqTTXiCIX/pxNVb?= =?utf-8?q?/fWE5XrzraaAQndtBRj+Pysu0IfNtrdnfIEd6LpESmlLo5gzsn7KTIvxADUIf8CJO?= =?utf-8?q?qTqstHxz1tqF?= 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");