From patchwork Thu Sep 5 20:06:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13792959 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011061.outbound.protection.outlook.com [52.101.65.61]) (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 3962F192599 for ; Thu, 5 Sep 2024 20:06:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.61 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725566801; cv=fail; b=H+/6WZqkzYa/6SLdvT6MapGl762MYrho48NLCktVDWEZ/UuLP5bpbFs6QZMwzLYKV6FS5eu7wAN0nitKZDxBMLwVx/ZmlSN85pEd+E6Ovr3yRa/eSBNFROVLhtU6wvRO9wPeAv6GBjZmjHjH5wdIKqwGKg2dLBtG84nOs6WqtKc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725566801; c=relaxed/simple; bh=OPMEgo/PPVAH3sDsMsvf6tFyCZJh0Wh9SpXjFlyjVQQ=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=bULBiR9pCqDIbP9lexKczOJ8sTWhBCLO8k+rJHtpWEnTHHigV6VY0tEltYQGCb7fW/gooArnKP84Zo9YIZ76oESFNLx2w3XH8eGIAnAfo9JPurfgNMq/blHdJlsIC4aAC/RKvOVn7q1tXtdMkibxxCFcx43K+Y5GgS7aOwp0Auo= 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=ZkBVqt5/; arc=fail smtp.client-ip=52.101.65.61 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="ZkBVqt5/" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MguGzlIH86OqN6O21ArpzAMR0hPTdHf14Knm35InYv9pTw+eye1xoU5zY1XHuIyySbQgAFrYv77knOm1T6V+VPpgX7cMTG3fnDJPrau8fWiTVh9PovUnNPgJmCyNxMLUlXw//Fw1S5FciidE3GK/DNwMMOAmr0plCgh1D2n0Mca7qOmf5VA4NMGEremlBZgzY+7YuVXJQTtbdZllFoFrWClmtF4vW8JHu6Upvoty09sh2EHBukv19G2egEakAvJdYIX2yaf7623L5dzjtXiajvjPSeIfKYrtVdk4I0HqdGyvWEa1viJp2GdRjLzD8n+DTrg9Bvon7D8ky7+906xv8g== 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=UTq41jIH5diF7JiyOFeDKZ6B5YhY6tyz0ONblJzQns0WoCNXbPCThcg3eAB+PQWs4aSLYNw8QeEt4r5YqLcTDUtVKJVprcWTmFdVQ5Mw+Vy+2Zcud9Y8jfSTDxyMzX64m4d3c2WhlqQ2ERCtEkZBv8rAc7N14zakxIVB8sORYeDzw0ABhlhmfgd3sUPeBbDILaTUgnv1iYk3Uduz9WfidY1+Pd0wtcjtYaE/LlA8qDYGbv/5iYaQxMhTC6RT/kdXgCR66t6qGhzPSse6FDfF2NQjzneNfLQdlOpA71FBgMl13/3lKEhGyO0383EGFh7Zjt8OzuIc/ielCmxdbeNb/A== 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=ZkBVqt5/88M/ebaPJ60Vkq1EU0FmCfwgtICUNj4M/7v0wLgtVjTbrRsPtc0gm84opcaHP7MSCq8xEWCUX8BZtKZLy1IkXOlHkIvalUMB5Ya3ksa69YF9ya9zV/h8aLTLXNPe5GSGrU7I80Z8YA9s0ysWn4xU97i4e/bpexLRKLvi9IACH/iW60baEELtKhT7OtOUpM3U13KWTCx1+cbhui7LYCGx69nOhEyqXmzv8+eAs0SHs7xBABOj0OnLav0sqx8wDZ2NacfX6WjLXFTGjM0zdiL6HYcu/MsncSkfOv5OofzckDVOnRwAWx1VE7CbOq9RMwqG6Hg/oCIy95zaiA== 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 AM9PR04MB8423.eurprd04.prod.outlook.com (2603:10a6:20b:3e3::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.28; Thu, 5 Sep 2024 20:06:36 +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; Thu, 5 Sep 2024 20:06:36 +0000 From: Frank Li Date: Thu, 05 Sep 2024 16:06:19 -0400 Subject: [PATCH v4 1/3] usb: host: xhci-plat: Parse xhci-missing_cas_quirk and apply quirk Message-Id: <20240905-dwc-mp-v4-1-aedaeacf0556@nxp.com> References: <20240905-dwc-mp-v4-0-aedaeacf0556@nxp.com> In-Reply-To: <20240905-dwc-mp-v4-0-aedaeacf0556@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=1725566789; l=1035; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=OPMEgo/PPVAH3sDsMsvf6tFyCZJh0Wh9SpXjFlyjVQQ=; b=xqSq/7oG089GSJzbz5BztXFenx0U4E7yMdF0beO8t0Quo3K6tigT/LvbOMFZxI7hoNaB+7jjL kbrakPLS7kEDkwM12xMwlDXekar3PP6WxUiwu807jgT87zowT9Lke1Q X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR05CA0105.namprd05.prod.outlook.com (2603:10b6:a03:e0::46) 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_|AM9PR04MB8423:EE_ X-MS-Office365-Filtering-Correlation-Id: 31a3f851-bea2-45fc-7566-08dccde63f3e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|7416014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?R63ZQiitdVbiP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NVWh8C74dU6g?= =?utf-8?q?kQGsmF3CcN9HaBZ+2k2gDCCCRiJXjWExJcv8SViJNUjTE0A3lxYZRI9a+NyC35pH2?= =?utf-8?q?z9AGpAmzBwvg4v3tNypIqybQ4Gp1+tQ3r8DiR2Riho9eKhMIt9AUYf/s+wg0mcsDC?= =?utf-8?q?4RoMVcAmtWT8SfhtHK/bTdFMANqXxUx166cNfk94clY1ZOfeiHu8OtLAJH2i29El3?= =?utf-8?q?ts4AIikAzeRNE+eIOCrjNiNgYxfvD74drAPVkARyREE0N7F6DwpoKu1Vel4tFRF6G?= =?utf-8?q?yH2a+hGH3S3ssjS4T1sX4z6uhIm0bcGzX93oFgzz7aWX6IG+4hAWq0RTf23rJk6u+?= =?utf-8?q?TFEOdtEhB6d1h7Kcaeh2cKBB9f2t8qj3h5yngWLJYs12WOzQCCF9lQZaYSIt1anBG?= =?utf-8?q?+bH+FHuugiKgRs27ixuYyUYRDK1ZIvIwnv4afhIQ9am4u/dQoyXlxOGir2sMM9PCj?= =?utf-8?q?yfUfCues9zdbLkfQRlWjTdbHuJytKmcNRQ=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)(52116014)(376014)(366016)(7416014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?LaA7wAD56RUY7QND7PPMMxhxh4jO?= =?utf-8?q?AlHm/mxhBnZhU1mXQn1y67BibClAdUTuKKfMhpyhL4Ia/El33hFA2VYDtUxUo6gIn?= =?utf-8?q?/926NOilWQKOJ7PGh0cKpaAJ1a9+aKxbi5aoEJSYLLabD9/KZPGH4x31N/PeUQzYu?= =?utf-8?q?VMjEWsvUkV1/5Ux5ix2kBzodAw4NZZ3eUxzdK7D0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4fBMu/9E8mOxnUYJSd5P1n?= =?utf-8?q?sMbpHAxOAn9APdEBsyLkGwRCecfn8CihwjEU+0K3r4Kprq/9wwFsq7rEbGQKvWKXX?= =?utf-8?q?NN6YxyASTYXhDj717YMAG1kmKw+p/I+3apU4R5u4dLHb3qf4rgGBGMZAhEirH8A44?= =?utf-8?q?DiNeLXd+sKEjo39MxCPJB2/kCegr1BtMl0KoICh6zW+W9WfvIAw289Jlk/H3R3SRH?= =?utf-8?q?o4nXD/bXx6mRXJ0Nz11VfACl3dz4EOGQYzhi9JR08p7GwMzi8Dbd9hKyl2hNp+rct?= =?utf-8?q?eS2eQWLWOSEvn3VNiXwMHz6h4C7XbVsVpWIs3fZMfVIBWCjg04vL1PiuxB2UxpKYQ?= =?utf-8?q?FchK8ddefXrKa2St5HUVHUl0yURU7oIbdk00jXBjpG/O5T++qWtlfES7mceJ/8oJo?= =?utf-8?q?LRSipfgDwzozNiomAXWuWQ/KH5vNwu43OMYOFGSsfdDRtq5xjtTobRLvt20P4WF8V?= =?utf-8?q?0i71Fn0tFG8e?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31a3f851-bea2-45fc-7566-08dccde63f3e X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2024 20:06:36.7937 (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: MAgqeMukva8U7CZ0atgeM3R8L4R32vjp2oxlG3N3tl6OfLgCtZiLPgSJ5M3JxQebQbci3cbEOO0X/goCI09ESA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8423 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); }