From patchwork Fri Nov 1 07:06:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 13858823 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2047.outbound.protection.outlook.com [40.107.20.47]) (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 B314B15853E for ; Fri, 1 Nov 2024 06:57:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.47 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730444225; cv=fail; b=WMO2Y6B7VLQMCtBneodS/Xm1fq9xJnECw+q/CtPLqVsyLTeMQtL5yEK6vFPS5Ty104QYVQmRkrSpecl8icGbAE5Z0M+YL7A2bwEaS/ErZQyslF/4WRk28/GjhAqcp9nM4bbwabOnmKO81NUtgJEKvuc3z1+4NO9fX5qkHAm8DW0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730444225; c=relaxed/simple; bh=6bjSI6ixtgJVkD26jcLzHdro2cL3jACiYO1EDB+8158=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=DgX5nmgMqWFfUdrVg5aY734lCbq7HrZ59dhD0EtRmeThK2ClcohjZMR2zA+wT5WimE6pK29FC9Qtf9U5tJxOytIot0LuGoXoo2AYq7vf8UK1jrQsR/qfnzWelH/D3IKk4olLJO7oZCi2yzJVlHdbAcMQgvfQwjpBIxMF0ABXvkc= 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=AAAGnrbU; arc=fail smtp.client-ip=40.107.20.47 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="AAAGnrbU" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TzyxhPO08+9HCSqwJ1coU+34uGfP47BfjB1EJm5P3WdGWUao/QbYq9qQUmuyXL/Zh2bEwybc9yXiVyC40WK/30BGfy0PfIs1x53HdiN7TiQjFIzDWqSOm6ac86DbEN2Dv8FQP7Bs3cTj1f6O7u1XntKBgjJx3mEmrWUKKbDmeCN+2tmdkjiKquCDy8l9ZwVOUeef0TAmNDGqAnncv9lUZILqLvN9LXxcxb9roBEttv03X+trDK5kd/cAJvUrFpSQVDauvTg2adVep1BsNNC5QQpL/8S/eb1ta/Sk9WCC/do6AKWzTeFlO6cdLvzDDkX/YhVSinYdsZdZfh9ePG0cVw== 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=PwhNL65v6k8+17D56SgrpcMwOYFeo4d2mvr3RZyVz9M=; b=sSMKdEnHBPh7r7Pgfj0wN4Si6PBcUkZttuigOBfLRLcedp1z8PB2ZO/cpDrEottBr0tZSivvL3zpQX7sWAj003jalcfxO4ZJIIziB7tL3WIzjaF/kA/3k/t53fRMZfnZgSonldt1ZTq5hcR/S+BngEp0tAI58BXg6EbjJJRXScbvqFujjczS3Hde1UemO/TnoAToj+anzPYY59WzBU9hmdcSpb1E+J3eOAC/vL4qMaZqo1jpMD+te+aj0zrtIlKraqQytuzyzQobCB1HjD5SqW3erzpxdUvVbAE3SkymucANC9ycDDqVcYgBYdQDDAsoRxwNfl9PBe2Q8RsD/HfvGw== 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=PwhNL65v6k8+17D56SgrpcMwOYFeo4d2mvr3RZyVz9M=; b=AAAGnrbUbfVh9kAGiz/Gl7TEH8rka/YO5Dmtf2d5c95kJ6rYGQImA88j4i+kalNzFZrfAyyOiSL1uR/S2tc2tevqThAnUoFjsDSaDcZIXEfupiJ8p2PxGNekcjlF7CwifmJh1t0NXx1rhCVM8T5exgE22tDp00QQ/AdIsDeKBI/JZkcZxNBMYZajliGwEj8vS4xUrs55JKfnlxICSKYnnSpF52qS+FIlFsjj7gCtlkgQHQAKNkZE/OngsYKt5X8zaLpCJPyKXvxCn2XPQS8BuWPNr3u31GERrYXqJxZ43YYP+st1ROsPvyiB/uph2rbeqRTfv6JqysA9N9XmxF/u+w== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) by PAXPR04MB8573.eurprd04.prod.outlook.com (2603:10a6:102:214::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Fri, 1 Nov 2024 06:57:01 +0000 Received: from AS8PR04MB8676.eurprd04.prod.outlook.com ([fe80::28b2:de72:ad25:5d93]) by AS8PR04MB8676.eurprd04.prod.outlook.com ([fe80::28b2:de72:ad25:5d93%6]) with mapi id 15.20.8114.015; Fri, 1 Nov 2024 06:57:01 +0000 From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, lpieralisi@kernel.org, kw@linux.com, manivannan.sadhasivam@linaro.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, frank.li@nxp.com, s.hauer@pengutronix.de, festevam@gmail.com Cc: imx@lists.linux.dev, kernel@pengutronix.de, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Zhu , Frank Li Subject: [PATCH v6 09/10] PCI: imx6: Add i.MX8MQ i.MX8Q and i.MX95 PCIe PM support Date: Fri, 1 Nov 2024 15:06:09 +0800 Message-Id: <20241101070610.1267391-10-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20241101070610.1267391-1-hongxing.zhu@nxp.com> References: <20241101070610.1267391-1-hongxing.zhu@nxp.com> X-ClientProxiedBy: SI1PR02CA0017.apcprd02.prod.outlook.com (2603:1096:4:1f4::10) To AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) 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: AS8PR04MB8676:EE_|PAXPR04MB8573:EE_ X-MS-Office365-Filtering-Correlation-Id: 23a89643-9b92-4cef-a3b3-08dcfa4262ab X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|52116014|376014|7416014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: CG/LPbDmTHrXGEECWWEzr08nodxUgIOxCxdSoSc99IkM9fJr/zpkqLtldAE2AU8Pp8KSltG9ixWBFSt6Dilh5JlsUfWBescb+MhlFfHYXix+K0EjYEH5O/dUDa41o1rqM/UZQbAfDq409oZRwxmaC6rd/WCP/3RVRS+xCZGbvke7w3TEX8ONreNzdXxFs63V9N6GL93WyfLkA+ZTgFwFYU/3keVD6aDIY2xm4we5hlrs4RRoaR1OeEFHfFpHCug5QwM9VuY3fyLn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aKQgk1ME57eaQGVSbJKWmwm83yKZ+0eSrSBo+H3IHu1AxSwWl8ISWPf8H669bsowjbPLSIL X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB8676.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(52116014)(376014)(7416014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fWCPE4y1Qjnh/RvwIwrZSW0vmAapK3tebF1cKEVNYBJu1eKqhXFd41WQKt09LnydDu0kKDSQHsKUtLa3CdQ9v+cFjm/kNeuVAzqIXKhPefL5BTEyAoML6lasYXueLMLORGcNM7l+MTmPq3tinZ3z6hSrosX6QL/+zWnwF6oCWNeUBdgHmdzfZ+p4/kcbvcAKGWKsv/IAYNOD7GMxOiCjZFxRdx1yamkYS7jHgw7cotfoxLT2L4xRwH0Xr8CHJSFwK+0cvqneFqDX5Cru1bW0VwqnbMN5LEl+7FCTdnMd93WtFOMQEKSSHD9XE4Sthf7EWK7vp3UBm5/Pr4e27+huW4At8QFL0ZHhNsF0KIfLb+/yOJaITopmvLdYUrFbSFchvH9ixI2acqCca9qjqPYZ15ab1Hm1vSGUmY5QYbtD87tAmUgSjMoGgyGgN2kc08uPOyKfVG09NYyDvVKcl6Pw2Eh9mkbehdj97Rw4hDHci+9A2Skr5nzR/Dk1f2pfbUx3M4zz0BMZWRaSpR2tPiSet9onDQGGmPqpOel2eo0O2kwA4un93bKKG8tpgTzoAxo8fDjROuHMWSId2ize+pFucTQrqWwjL9M4AiVPDr9U1QfyDb1utiG0vL9B63AyMSTi5vvz49XhzW53qxglnK7vrOuOW029ze68qa3HIsPBrfCbU2QAPHy32c8Twgmlaeh88POxPrYf0QdA62gLTXL4di9sU0kTD+BN18zdiiap9tJItuTchqXxCDvClQ3soF/LGV9cbLlSfUO51m8eSzU0SfdoS0XOJutSS1NSrjp++4AizK/VlyY1KZC5mH+HBgqEkjPHwmSSsi3xZhg7LmjeOOoMM0RBKZcCK7pPEtgVgMZfIK74lmFC/4nTZ7lP+W/mfcIVhAlRYJ+u1UmTIBdQoUoArNI2qfF+duAV25f4kX09M7bTA6Cqnw6S8tApsXquYYo6Mi7JaVBtyauDuLsSnqC30D7az7ZAXc3e305BIrY0Q/w6PVKH8yPjwIAJk8SCNETE/df5KGolItOFKu1vdIn9CS1wGT4VVtp0XlJNhmEcWdyr848Ay00rPZ5DtpLY/k8Ru9cMPtN/MJZOZK0ywOOeneStNV/4ay75854OBDucPPkJTppwmQStX+GE/RrO3ZmqZC7Eozyd+ZvEm/kwuo92wdkaAGcmY4cCmQWNDCyojQPSpG6mJpDRdqAQ9V3bgbh/vBMbMnjkK33H+Z68LeD3YN53iHgjzdpnH8rqLQlXhZGB8UU7uOoDg0Alw3gYYeQxLvlVIimdxPxzAVJ8SVahvY1/w+BqZCIuAKpMbo4GGOKzxGKchA5t5M+Jl5o4a/j/8z+XiA2ESUf8s2PooZeWA/DBGyHh2kEO74nGXR/EPS7iO106aFeUc2evZ68ByWkAmHK7AI7RFa/ANW3GUR2pESHVKSJKwfj3PSECsX5QdC39svRoYCLId5gVEsCbRm22RYDhEcyidVBp0GjTd7/sezD/odvyGjtA7oKOtGBK0UrbbdAjn/7HDTQwNnfsEPE36Z2q8kK0AQ9AECn94ytVqOJIe/xD/fYjWiiK/Cz2TFI0njK8bZ9IaZS0V4bd X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 23a89643-9b92-4cef-a3b3-08dcfa4262ab X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8676.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2024 06:57:01.3219 (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: pH/Tq1nWwPes6l8x2Na5SpyJPxX16rJJSD9tbdmD7THs3ZzOhCBPJ2eNyKNMxMd52WZ9/iJHpDFBMSgAoO+2LQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8573 Add iMX8MQ i.MX8Q and i.MX95 PCIe suspend/resume support. Signed-off-by: Richard Zhu Reviewed-by: Frank Li Reviewed-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pci-imx6.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 3c074cc2605f..cf2a9918537e 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -1498,7 +1498,8 @@ static const struct imx_pcie_drvdata drvdata[] = { [IMX8MQ] = { .variant = IMX8MQ, .flags = IMX_PCIE_FLAG_HAS_APP_RESET | - IMX_PCIE_FLAG_HAS_PHY_RESET, + IMX_PCIE_FLAG_HAS_PHY_RESET | + IMX_PCIE_FLAG_SUPPORTS_SUSPEND, .gpr = "fsl,imx8mq-iomuxc-gpr", .clk_names = imx8mq_clks, .clks_cnt = ARRAY_SIZE(imx8mq_clks), @@ -1536,7 +1537,8 @@ static const struct imx_pcie_drvdata drvdata[] = { [IMX8Q] = { .variant = IMX8Q, .flags = IMX_PCIE_FLAG_HAS_PHYDRV | - IMX_PCIE_FLAG_CPU_ADDR_FIXUP, + IMX_PCIE_FLAG_CPU_ADDR_FIXUP | + IMX_PCIE_FLAG_SUPPORTS_SUSPEND, .clk_names = imx8q_clks, .clks_cnt = ARRAY_SIZE(imx8q_clks), },