From patchwork Wed Jul 10 23:02:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13729823 Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010051.outbound.protection.outlook.com [52.101.69.51]) (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 194101527AA; Wed, 10 Jul 2024 23:02:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.51 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720652573; cv=fail; b=UK+Q2xjXysW2K6zZbFernSBCQCS/FlpMnemDjjfLt/809eEbEZf2G7MP/cAHDSb6pCroy4yDPf4+qopwk6DzfhMbvdX2b3PhSBOPTPFeFvtu8kPM6S9exkuhXmeeYcFsQzntkjsMu5qo3LRpWN10NJlaU65POK9lMovIrTH74PM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720652573; c=relaxed/simple; bh=P1y28FrMwhzY+EU28qrhKcw7mczE/TQPAFCv7KbwcGE=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=HP0ixcgnRGI9iqzdgjsXFDxBWpWZ2OMFv8J3moq+GGV6NXljNtbo+3uz6vz98EsqulL+V4jqJ1VUBuyW76/gzBLqfH/9IyQlqI56R+EtVRd1RYSJSYBZpFWk1r2UIcOhEwM2ehnEMoaPeOGJdZ7bUVU3ZkIbBCGVbspFCxIYRfI= 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=OEGRCNFW; arc=fail smtp.client-ip=52.101.69.51 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="OEGRCNFW" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YRCeuywN++BY2q33hrSNDvfqAleDutZiYfBDlLQSlZ3bZwVJ5nvb6Fj5COnxSLfRdB+pX5FkHyLy8jeQMSh+UFbu7EbOX3rZEhFNk2h2YW1efZ4lStpxqT3CrjoVzU3c1bg3u5BhzqoKtgFkey8Od4cQkRBnxxnDxvq3+kEzq1c/zCo6uhyZT2BtUgbe3R56sATje4LsV9R9bhLyGG9zx8Lvty7b38K5wa3ZTsDJtaB1/Ymsa8CrkkBFBS5Nf/LYZfLOcw3OKIZBldjngv9GTainlUI1M5gChOW0es0GDNZ2TQ7ttSAkM8FnvyanufxOLqOdMuB9sjXhYEpCaZpljw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=RCTO9n6odMfygt46otuWdURYJdub1uDc7jpoPRQ2DJU=; b=ioAPzBpoI+hr4u77lqdM0yCO9dn28SQxXG1NCN8dVA1LRQZEZdqIvvpcY4U02J7HWKskVGd3srvw8ioZcOmDvInS5sgev7s9UvE4OeuE6mzscB8kwxHt+UJXYG1dxc9FPaNuI5oMyCs9bQYpWG9bZSOEpZHFel0Us6WRJiNbM3y83dj6oPgdxPXKfCWixz3vG/naQ3lxy3ljkwuNdaelg5s6rpkAUGe3JsWd1A05H3YqX8OXWh0XymEdXHuy8YurXipU9TRJpLNZEfpKUwou/kEi2l95iUe2IyXHULTu1j3OGwigUga54rD8XaZ0Z2vJ2dFHV0Xp7JFwnIcc3Z1vSA== 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=RCTO9n6odMfygt46otuWdURYJdub1uDc7jpoPRQ2DJU=; b=OEGRCNFWRl8OMwwtgpuQW0cq74ovAW5UoVHKMMNKKusw/NVGbGuhZos4SZyIah1Zp34JEVmTqSPgGN+BYI/m/ZQ4ieaEvaLuYY4arLzRFjT3kaFHAfXqFMR2BA2uTuqdJdZaaf0UO5+Oo/bPMuJUl/3mzoU6ZPr21MHdEJqFTCI= 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 GV1PR04MB10751.eurprd04.prod.outlook.com (2603:10a6:150:20d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.35; Wed, 10 Jul 2024 23:02:49 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%2]) with mapi id 15.20.7741.033; Wed, 10 Jul 2024 23:02:49 +0000 From: Frank Li Date: Wed, 10 Jul 2024 19:02:23 -0400 Subject: [PATCH 2/3] usb: dwc3: of-simple: Add compatible string fsl,ls1028a-dwc3 Message-Id: <20240710-ls-dwc-v1-2-62f8cbed31d7@nxp.com> References: <20240710-ls-dwc-v1-0-62f8cbed31d7@nxp.com> In-Reply-To: <20240710-ls-dwc-v1-0-62f8cbed31d7@nxp.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thinh Nguyen , Shawn Guo Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1720652559; l=2030; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=P1y28FrMwhzY+EU28qrhKcw7mczE/TQPAFCv7KbwcGE=; b=n+8X4ca1EDlIOrcGGE1ySXB4yG2sEJkjZDw+UxW9zPNh8CLqHpVwN9TwpneygMwlyWbJ9TbKR 7rjYoi7b8knDOZ+Xe2lqe5Qf4AOYccn5UZmcI1KUyGykLvWguHiF1xd X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR05CA0092.namprd05.prod.outlook.com (2603:10b6:a03:e0::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_|GV1PR04MB10751:EE_ X-MS-Office365-Filtering-Correlation-Id: 0f7421ec-00da-43a3-a2a2-08dca1346b7f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|376014|1800799024|7416014|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?39iaN3xQVfOU+VFDAAHPUo9BVDvjLWX?= =?utf-8?q?GDNvjGF/780yNUit9+BHJYaHCj17WRVuc0i6s44TnZqeYXWsZbYwyhznVjHR2a+Cw?= =?utf-8?q?lEOrkIArcr9O8iPWrX/eD+qyUiWLVqOPrumH2ZnzrHOvxjHdf8KpOhBM2rnDXf7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e2pDba?= =?utf-8?q?Qz9tnrVQ0bvuUA/lI9OFKAMAL1W7nXVT7cNqXWDQMXJe0HEEB73HQ0lBZdfl5xYtq?= =?utf-8?q?k1JslMV9bXbhYf5dheHIXtkRJaUjnLAK1kKeyxwCUsSOoF/E0FERXz1nbhBaWzpRc?= =?utf-8?q?zoBNIV8q5MU9AfsULbIQMnUy2XQaAorkINe3YwvQpILnIvRVq0lmzyyvIkt8OKyvc?= =?utf-8?q?hl6xcVVOeqiOn41i/AqgUIID1Khg6nLnPuJuCw6QOUZNIrxWrIj/VduUp6vmFOLOf?= =?utf-8?q?4wseR6f/lwdjWixLzoBWHTmL00hurWN5KBcgXrIPILFZa7U2cKTzDt9STcXigTnmu?= =?utf-8?q?BqlB60OxQ3BTQgjklkPGLag5DlZewcQmew=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)(52116014)(376014)(1800799024)(7416014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?mmGC+8dI9WWyW0c8Jag+eeZmHeas?= =?utf-8?q?/nfc0jIjyf6bVCviFrKQ5zZ4Q/8KfAW8ceONetfwQA2WWHh7U+5vipIDivSEgeJnI?= =?utf-8?q?4OxNQazv5dXzPdyvEk2P04SEICqhbTNq5M2gv/POe+aSnDDzNo2gNYAhu2IyRc39Y?= =?utf-8?q?C8ws9vIwmnitchwOOFbf1Z0xo9r6OSS0ql4OlPlYZ7mTeKwhk78Rnw/Adm4W1NRhS?= =?utf-8?q?VxgUnh9vMvLPLeDBXVLFnf2rt2r5q0Oc9zHQOGksGxuqaXRLaIABwn6Ua9Jmn4umF?= =?utf-8?q?vC9/PKYVmyVDPTDbvZ5Ecd8faUpedf/2DaWTvKtBGW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kIXKvDnQjWqBgq4S?= =?utf-8?q?DLjtUzlqaFdOoE2tJa74udXFdgYpLAu+PpGZXkTnWpUmU7ItDl3xuHW7EAp5Ej8J+?= =?utf-8?q?VH9kMMaeTiUtqsOZzbEunq0EVsIgvoFp6bI9ITjdxC7duZM6IR/CI6rOEBZPbhzjY?= =?utf-8?q?xrEn6ASv1eTmvks5rNFIWW1rbuUZw+5vbwsPVXc8eCMmPwWbMBfRTycawrwLIWcU1?= =?utf-8?q?IUe5U9Hb1QcKpvp/Dnl5E91f4hUKji6JQidbPHFj2iqVldcHy/aoEz6RuE7dMBFVB?= =?utf-8?q?y7n+IfH1qpGLKJshVFkwiHAakhXQJ4hcUi0sN50Zsah6Rep9UPmFGVY0i5N33Xhc0?= =?utf-8?q?Q4xeXsvbf28G?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0f7421ec-00da-43a3-a2a2-08dca1346b7f X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2024 23:02:49.4762 (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: jtp4HiakJ9BK3zxD//nMcJpTjShWB5G67IuMVQoyb2C/wFJ8ROD4BdzZsYfDgQz4L0OHL2Vh3HqlyA/KSfX7kw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10751 Add compatible string fsl,ls1028a-dwc3 and create a software managed node property 'snps,gsbuscfg0-reqinfo' to enable cache snoop if dma is coherent. Signed-off-by: Frank Li --- drivers/usb/dwc3/dwc3-of-simple.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c index be7be00ecb349..0aa21ddd93cda 100644 --- a/drivers/usb/dwc3/dwc3-of-simple.c +++ b/drivers/usb/dwc3/dwc3-of-simple.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -52,6 +53,26 @@ static int dwc3_of_simple_probe(struct platform_device *pdev) if (of_device_is_compatible(np, "rockchip,rk3399-dwc3")) simple->need_reset = true; + if (of_device_is_compatible(np, "fsl,ls1028a-dwc3")) { + struct device_node *np = dev->of_node; + struct property_entry props[2] = {}; + int prop_idx = 0, ret = 0; + struct device_node *dwc3_np __free(device_node) + = of_get_compatible_child(np, "snps,dwc3"); + + if (!dwc3_np) + return dev_err_probe(dev, -ENODEV, "failed to find dwc3 core child\n"); + + if (of_dma_is_coherent(dwc3_np)) + props[prop_idx++] = PROPERTY_ENTRY_U16("snps,gsbuscfg0-reqinfo", 0x2222); + + if (prop_idx) + ret = device_create_managed_software_node(dev, props, NULL); + + if (ret) + return ret; + } + simple->resets = of_reset_control_array_get_optional_exclusive(np); if (IS_ERR(simple->resets)) { ret = PTR_ERR(simple->resets); @@ -174,6 +195,7 @@ static const struct of_device_id of_dwc3_simple_match[] = { { .compatible = "hisilicon,hi3670-dwc3" }, { .compatible = "hisilicon,hi3798mv200-dwc3" }, { .compatible = "intel,keembay-dwc3" }, + { .compatible = "fsl,ls1028a-dwc3" }, { /* Sentinel */ } }; MODULE_DEVICE_TABLE(of, of_dwc3_simple_match);