From patchwork Fri Jul 12 15:40:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13731895 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012050.outbound.protection.outlook.com [52.101.66.50]) (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 8D58D174ED4 for ; Fri, 12 Jul 2024 15:40:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.50 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720798860; cv=fail; b=c1TkgoSb3lx56TMsV2dGYxOw4V8xq+T5E0oquwFOGhn5Miu1MG3BRYrdCMbZSUShaO3AB8aVsuOoJCbh2V9zUiOuJbngBuXj2GpkWBy7DfsmbMck4sNhCBQkdO/ZwkbrnePy32KbMA/yxQviCwHTYvFvNzzoF5Q32bIMoObw974= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720798860; c=relaxed/simple; bh=SaIf7opiJAmqwuDjaWgawxfzMs2af1K+IOLeH2hYimQ=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=Hhfh39HMYS5bRkvq2KVg0RJTvaWifr4MniZIgdWmICg4fJWqAWJskkreZtCgH8hJpgfkU9vmJ65cavFlNs8cs83AJo1x1mWNmP9tlyOzbSXPdNTEdKVWRAplCV/0a8Jmb+bKRPRwR47Mo/YIBLwOZa3YyuEtCHPKErmsdwc9nB4= 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 (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=lLQoJ0ji; arc=fail smtp.client-ip=52.101.66.50 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 (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="lLQoJ0ji" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=q2QKoJKzUWiUy4hV/aY59PwvLM/lYQSj4gq2n/lczz2wezQQohwVIruXXhKrvQ1fQ6/kXA4jwbzj8Lcz2Fyljcqp/NzJj296v9WHfLYMSGwH8hoycg0wcRcqA2vI9ES3O43ylmm5BuZ4ycCKP2fm9Eze608pHHYTdwe+JynXLu1fJukq5C+/t8gzBCeIk0TrYNUO3alFfgHITx+GtNINlzTBrN1kcXIciDGV9OwXJJ+RZIwZSO1hAF/Txfr21yeM7cW+3R0knN3Z92sbUmogCOg8AHsMe2Gc7reMsSAFCp7ZU6+179rViVyrDiBgG32ZN6OaxPloIZAzu3mVEJdlJA== 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=D98Q488QXdfIcWQyu4qXDVPKVoYkyj7k42xNKXurkNE=; b=n5X9Kfy2e39vpdZx/dQqF6ozYN/k8zGGE1CfA1abPweoE2K5eSFhsautzs7chYcfwHk+kVNvL9cgEw127Db1xmeBRnoRf2/Nm8ZiB0CXIZs85pM6rOFPJcXXPhsODK67jHY+SKwmCSYOqCubT2PjOXuuB5f3bYONw1Xmal5Yx3NW7IOs9vtlXnmy5Q6NzH2WXhOG3b80ZOmg4snGLOdwAi0RpHhvqqTtuoIAAaQTHNLdpiG16RIg9hQP9VgRIo/31nEM5lN0Mi+Mbycnmlb5+YiVV2Ly8FZdtJhZZWziQD8wv9eurKWwZYw46ltarbJJBNttedPbMzsWwXHSX3x8Dg== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=D98Q488QXdfIcWQyu4qXDVPKVoYkyj7k42xNKXurkNE=; b=lLQoJ0jiAw+muC+GYjENIRkkXr4rDBCZLvLOnqBSbrjDC+B+sY1jIxcQzRvUl3Qy0fI+lya0BOUCywOWSMvus2k4Rco8F7x+69aG7787tTBWMhBqdZRwczkiTDwdrSWANb7ei6UydLJYGAynp+VZpzUns5jqdgjOR6W1Mlm6hwU= 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 GVXPR04MB9803.eurprd04.prod.outlook.com (2603:10a6:150:111::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.35; Fri, 12 Jul 2024 15:40:55 +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.7762.020; Fri, 12 Jul 2024 15:40:55 +0000 From: Frank Li Date: Fri, 12 Jul 2024 11:40:28 -0400 Subject: [PATCH 2/4] usb: dwc3: imx8mp: add 2 software managed quirk properties for host mode Message-Id: <20240712-dwc-mp-v1-2-295e5c4e3ec9@nxp.com> References: <20240712-dwc-mp-v1-0-295e5c4e3ec9@nxp.com> In-Reply-To: <20240712-dwc-mp-v1-0-295e5c4e3ec9@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=1720798845; l=1434; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=SaIf7opiJAmqwuDjaWgawxfzMs2af1K+IOLeH2hYimQ=; b=XUIe+D14hdDTmZ+zis/snwDeLUqSU7Y9rxKU+o4r6ko0CpCmB/Jv6fn+yDkpUd0EblD5H6Vdk WZpzmK1905cBcYnf/lxuWHlOg5uZFQBIiPtXLrTmiUfXWQqiatFllmB X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR13CA0075.namprd13.prod.outlook.com (2603:10b6:a03:2c4::20) 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_|GVXPR04MB9803:EE_ X-MS-Office365-Filtering-Correlation-Id: b700ad6b-fc58-475d-2401-08dca28904d1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?arOZoWzxG2qo7/hrEmUdajaXupmcNrC?= =?utf-8?q?HeDfUU/PlfbZCa9SQ4b3CH3aJnYm7LV+XuKeT7s+JAbt0am6qe2tU7Y/sWiFO/2ZM?= =?utf-8?q?TFRzvYZKxznGszhGpK2U+GFVD+46o0suQAP6QNSvPYf/SgABj0hZVNpEKIMFfyE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?= =?utf-8?q?xC1nmnfWmlXCJlmUscbBqBthHD0KM2+4xkLo4TwmAo/7sIDV72lx1P1PZFlO/HQOX?= =?utf-8?q?p4bysl1gGDDEOu0xdjPT97m8dY1akxgwcIOadG03lcE83dF6XImjfCDteXFgGxtHr?= =?utf-8?q?N8OXaosf4BR5BKM0Zw1dGJ+xdz0pjykvP8HlSlvCrg+uOZyDb6smVyfj4QqRkOeC0?= =?utf-8?q?1khEvUFA5fj746L62hJXkUuAI1QBWr9Lupd9eKDKV1V/Lbb2jCcH0H+gKgTu7D+5t?= =?utf-8?q?PdW4ACvdPCXmEMIiYs8gWul3LDzUGYaXEmwx7rg/wwicxpCCV4FB4GeAc6g7/Lx37?= =?utf-8?q?BTdDfRYAHzAPKjmSxnnJgAbTx97owQPt3A=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)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?8uBWbrUv5kmCCIrz++bc/qgpZBUi?= =?utf-8?q?7fx5wj3jBywMB1hIFgbxhnbD6fbXbMGrAJdUvV+ks0a7MS9vIAKpXrmuY6WfTZ/Tj?= =?utf-8?q?irjNRsQB3Ry2d+dpFBmhw4Dunp/K6LSr38xIFWBv3OuuYCHvuTlxAj/d3zXkp1zot?= =?utf-8?q?kWd/A3F/Ag0FXbfYCerFhc/OAx0Q6pNrmtoTf8cW/IfQtQABg7n20j3jITmW7sCoU?= =?utf-8?q?P9iALWKKaGsLua7hDaxsxbwpBPsx1BAvrFpPWXczN9cBypdCUw5x4B4c/ToDRZ4gl?= =?utf-8?q?MKha25VCHdDoruLI1kt1HfiQnxlu8XuTO28FHLba+PT4RqJA4VudK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39fWDZjLl4akc?= =?utf-8?q?yxL4nVSG3t1U+QC+TosHbfjUcq3mTfwIvNnoGeF0Ru1EPvlDCDJkssHqW82XzX9pn?= =?utf-8?q?l5/58FZC7QdPyDDmL5u6rHQpfcPKQbPrIfjpvTet3sWxo3NbSKQeBw3kiMG20jepS?= =?utf-8?q?ewG1sy7rOugbYdtehNeWoLT+KFvj6nlssrQPntKDdhfHp6QX5Kod2fS4bWag/82RV?= =?utf-8?q?KlqAq7nw5EpchyaiNhvMi/cJj7s1W4syUzk9f7YJFSKOC8nH8zbsSEL6qwkE+TKYn?= =?utf-8?q?aD8IXcEDDS9RjRPf4Ht2dh5V+ImOfRQnJ8J3CRcfROlo5+fPnUzgcXyFwLI3/PEnd?= =?utf-8?q?rkpat10HsyZA?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b700ad6b-fc58-475d-2401-08dca28904d1 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 15:40:55.6164 (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: GAfXYKQp8v7KexhFTrwNBS8GJCNuYWA2gTaM6Qd17RG0zkfauT2OxGk3SOV9PfgB5wYY08iZye27QsD7kcmk6A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB9803 Add 2 software manage quirk properites (xhci-missing-cas-quirk and xhci-skip-phy-init-quirk) for xhci host. Signed-off-by: Frank Li --- 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 8ee4480685031..5794bb75f7604 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] = {}; + 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");