From patchwork Tue Apr 2 14:33:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13614221 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2112.outbound.protection.outlook.com [40.107.7.112]) (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 8B5311272C9 for ; Tue, 2 Apr 2024 14:34:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.7.112 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712068443; cv=fail; b=ZgEdvBza7Y0+42r/sJvDUJ5oFP2E/8mLg88x4Zkk5uJmuxSjKknxRWarqNV802XIdUEvmKswQJRpRGhbm+mZdQjm2oHBydsvm9RJMGxq6vF/enpWR4AVWSfd9K5FnOPVo5zgDrPWTFhDqEv+vgGW/hq9buiJ6zgApg4kX1NvoSQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712068443; c=relaxed/simple; bh=g0TnLssf6ZO/VS4hksqxYpwW9GwlcB36cQW12l9OG0Y=; h=From:Subject:Date:Message-Id:Content-Type:To:Cc:MIME-Version; b=KC/xAooQfPaYjNEIGjNSXxmkDUOmlaQzoDXDeBAFsaGvFcuyGveVUeBdsWDnijI3RMUXWntEH+HiVk5gXNbsZDHSctKCufAQZTJ6vUkrJ40Mxnv3XAkYL8IhBt4mhgFvYUkr6DvG4MiPqI70XFBi7ku4WbpD1Kwhf9lESedmq0E= 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=rnB84iME; arc=fail smtp.client-ip=40.107.7.112 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="rnB84iME" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Uk+onZuHgkMKP24Uyt0Nrk0A4DNqgCIiitjoPfY1hSFfIWWelMNBre4Hu8JmRG4ooXRaDmnPSD5aCg+ldLsGhZ5Dbw5GFHnrjiiIidkgjo1Ck8VV31yi9e0E2ppEjtsZ6LyE8l7T6D3z2cIywzAPFATtLLwY8F8iTqDdn1sP3QKkvb+jZpMBJp3qguE1J/2kCghVTK1ZAIMuPksrKSXC+2VFAN0sQ1ywOJcgUuSfagZz12CyF6Fh6QIXpGDdSrZ0gf7rqhRvKMy3jT3RB03jG4BjBxoiOExwPccpduPJmFzyVKTja5vfJDLx6PwjRlAEftdLgjsb2QUWqoCgbrJz1Q== 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=c2xBhOE5xCX03MkkfZ7geeWDcK1LxfnKQHQchpUyzq0=; b=AkVwgkgPL9ZKKpE9Z8wyDNIXZfiRTop7fFSURaIveLNZA15IdPlP1i3lspvezQXXBXaA6ySJjFgtpZ2ltxeMv+RtQgdmsaR+xtnHAfhOUbCTgEUlSzqxbyJcMMoypiuFouMf4Jem84pyNO26lStNZN5JD/rl2IAoLfxjmuA8ZM5NQHNuu2c75kkf8BCEFgODYKvDZUcneHR0eDAPlsqOMex81PNb6QuRN+zp9DSQewboRkma+mWsF3ZksugjBkz1Jt7J7u1XkozTmKmSVeeyEf/TuYNk8E0y0jC2qBs82da4nKVxAcDqNOcLpznrwT6Zqfll09I5YeV8yAFrtVrswQ== 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=c2xBhOE5xCX03MkkfZ7geeWDcK1LxfnKQHQchpUyzq0=; b=rnB84iMEGYxNxglnAP8oISAINxxM90Jbin3GPzkt+mHPMtTUJECqp/rGqIdISXHdf1HuO0FE/P7MO2cCLq04TDA0V7b5Z40pINrefRJsshUjtTvwCd0VWf2SXqhaa3oEG6sppzjo58NnEfm/yC93qEB2fBItIM0XfC6dYsZaZDk= Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by DB9PR04MB10036.eurprd04.prod.outlook.com (2603:10a6:10:4c8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Tue, 2 Apr 2024 14:33:57 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::3168:91:27c6:edf6]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::3168:91:27c6:edf6%3]) with mapi id 15.20.7409.042; Tue, 2 Apr 2024 14:33:57 +0000 From: Frank Li Subject: [PATCH v3 00/11] PCI: imx6: Fix\rename\clean up and add lut information for imx95 Date: Tue, 02 Apr 2024 10:33:36 -0400 Message-Id: <20240402-pci2_upstream-v3-0-803414bdb430@nxp.com> X-B4-Tracking: v=1; b=H4sIAEAXDGYC/3XM0QqDIBiG4VsJj+f4/S1bO9p9jDFMbXlQijZpR Pc+6yQY7PD74HkXEk2wJpJrsZBgko3WjXnwU0FUL8eXoVbnTRCwBMSaemXx+fZxCkYOFJTWrJG sYoKTbHwwnZ333v2Rd2/j5MJnzye2vf9KiVGgbVNhd+GcCxC3cfZn5QaydRIelkP5azFbqaFWl WmFFvVh13X9Amxz9SrkAAAA To: Richard Zhu , Lucas Stach , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=C5=84ski?= , Rob Herring , Bjorn Helgaas , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Philipp Zabel , Liam Girdwood , Mark Brown , Manivannan Sadhasivam , Krzysztof Kozlowski , Conor Dooley Cc: linux-pci@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, devicetree@vger.kernel.org, Frank Li , Jason Liu X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1712068432; l=3642; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=g0TnLssf6ZO/VS4hksqxYpwW9GwlcB36cQW12l9OG0Y=; b=4df7Z1o9zd1ydMWO9SVVnPWYP7Y8vJ/5WfHNlo0BXhqBScVNh/Il6iGUN4SRbyvdHnEdcNQBa 0fp/vFc9WIrBnMwKzjIbJtZgX9JaFZLI+n2fHp3GaOQIPgp/Ca/8zjB X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: PH7PR17CA0011.namprd17.prod.outlook.com (2603:10b6:510:324::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_|DB9PR04MB10036:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Yp30ENuvDzxxqSrmv7ktovbUkmj/a8Gcfpvii4Xljfr+cdMlTdLv99KGua+bxLR4ya6XgnEkR0XO73tDwV7RJd1pyAfkQJiJTn8yaUzzl6RfhwcIKtsGtEp+lC4TtQ4yVV+Mt49PFSVOXD2VdQYISjDJZscDJenQqyEIt/6WiMEyRbkm2qfeeHLa0XOcz87tTH6iyOdttXAe4J6yw3OQ2KTL6VJVS1M4z9dX0REpDHWqCCOFoZJWbWxseD2hHrZ9PIjEXXiiP04P0Khs72oMmRVh22lNHNXBCGDwdX2rLUwbRji518FpRQrqfT+Rz813x1hFESvbR3an5jv7fFWYv78l3ZP68i28ZZVFiTrS34XMqUI7C2QWHgBxK1xL1JEGWnl0AfVUyIDqxKOfHDevKCcAjV/ZIZGJrLlQly9YODqA3Ocw+0Or1ufVY2IBwhjc9ol4qbEeSMC2UyG1F4s6F45Xd3IlpmGQ5vB8oz2Cagrxy1xIZhzqTAssdKvh/TnnWZPLRCYU6PWrOGOYjT8yT4ncMLPpJSc9zNc/vXU1J+OkTNnkf2yvZUc618O+spaPWfuZodRS2RuTmNzq7Wl3YxSywjvVaXN86loXYjRJV8qs0yPEn/P089LNwLQmRDUVNAGbi+sxwmydHJWQG9Cl/YezUS+ILalbju21k1K9/WMEgAkLwd7A/h/Zj9zEZ9lL 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:(13230031)(366007)(7416005)(376005)(52116005)(1800799015)(921011)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?aATCTjeWY90Q06apR8wDam9Cn7eQ?= =?utf-8?q?gJ5ELVRFjBj6bIFdon/UW0sfKxo1+T//GO+oqXwKkv2H81phV3nYnlm4JtnKMnVLv?= =?utf-8?q?+C1y9CNzdsrTfQy9GCE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98B2yLOWJB4umXVIXpYgKZjdIsXNCUH2Ol4x/0wiDH6DVDKGS?= =?utf-8?q?SJbtlIr+bwcOK5kpsWR1l2Oi1u5zagJujh2yr2WM2knEcDSoQRwRoIOM9fpgFYPAQ?= =?utf-8?q?UwHl3BLwxNIxz7rDdg53xMyymbHaaRX5H5hAebEmaLmnC93f3Ks8YxJUHqFW3FsAM?= =?utf-8?q?qK9yQj+qwxmuxqCzQOAQctBtKCCTCzYs5u/cQDBqROalhy6pT8xMr+NVjkzxJdKuf?= =?utf-8?q?n0fJ18qV2AlVv97a8yOIzD99aPrrB0UIu/rGy4Z7vsJw09LjqEh/ZgfDHft6ifXs2?= =?utf-8?q?klQZmow+8EpIT4ZvRzXJc1HCxi1ocb8nVFWP/D2/qU58rCIY1N1H6ly2grZJ59q6o?= =?utf-8?q?2fXiprdTsyncZFNsDNWjcIWvFoTcLmANu6ao8hl7psrmbWtIf6DPwugdqCnJi9/xS?= =?utf-8?q?2YvMJLUY3V+ctI7oxIyf+bnEDqwZuwish21oRTnq9ognmMWxQdUFizonL8ikgBzVc?= =?utf-8?q?Yz5J3Nf665fWuBOdYaRjKRtci/tjJriPYcTvAT3RNAtX0Tw8tHAUW1OpEaU356GRT?= =?utf-8?q?hxqDH1sDimAc?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6bec597d-fb01-4b2b-1d51-08dc5321ee01 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2024 14:33:57.2796 (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: /w1xinqMeR6qJ/wV/ycfHGw8ZXZY76fcGjbTTSI0rkv1rxzdu6/lysqGjU2ulVhC+hoQ4hhkURc1YwTZo+b+yg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB10036 Fixed 8mp EP mode problem. imx6 actaully for all imx chips (imx6*, imx7*, imx8*, imx9*). To avoid confuse, rename all imx6_* to imx_*, IMX6_* to IMX_*. pci-imx6.c to pci-imx.c to avoid confuse. Using callback to reduce switch case for core reset and refclk. Add imx95 iommux and its stream id information. Base on linux-pci/controller/imx To: Richard Zhu To: Lucas Stach To: Lorenzo Pieralisi To: Krzysztof WilczyƄski To: Rob Herring To: Bjorn Helgaas To: Shawn Guo To: Sascha Hauer To: Pengutronix Kernel Team To: Fabio Estevam To: NXP Linux Team To: Philipp Zabel To: Liam Girdwood To: Mark Brown To: Manivannan Sadhasivam To: Krzysztof Kozlowski To: Conor Dooley Cc: linux-pci@vger.kernel.org Cc: imx@lists.linux.dev Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: bpf@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Frank Li Changes in v3: - Add an EP fixed patch PCI: imx6: Fix PCIe link down when i.MX8MM and i.MX8MP PCIe is EP mode PCI: imx6: Fix i.MX8MP PCIe EP can not trigger MSI - Add 8qxp rc support dt-bing yaml pass binding check make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8 dt_binding_check DT_SCHEMA_FILES=fsl,imx6q-pcie.yaml LINT Documentation/devicetree/bindings DTEX Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.example.dts CHKDT Documentation/devicetree/bindings/processed-schema.json SCHEMA Documentation/devicetree/bindings/processed-schema.json DTC_CHK Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.example.dtb - Link to v2: https://lore.kernel.org/r/20240304-pci2_upstream-v2-0-ad07c5eb6d67@nxp.com Changes in v2: - remove file to 'pcie-imx.c' - keep CONFIG unchange. - Link to v1: https://lore.kernel.org/r/20240227-pci2_upstream-v1-0-b952f8333606@nxp.com --- Frank Li (7): PCI: imx6: Rename imx6_* with imx_* PCI: imx6: Rename pci-imx6.c to pcie-imx.c MAINTAINERS: pci: imx: update imx6* to imx* since rename driver file PCI: imx: Simplify switch-case logic by involve set_ref_clk callback PCI: imx: Simplify switch-case logic by involve core_reset callback PCI: imx: Config look up table(LUT) to support MSI ITS and IOMMU for i.MX95 PCI: imx: Consolidate redundant if-checks Richard Zhu (4): PCI: imx6: Fix PCIe link down when i.MX8MM and i.MX8MP PCIe is EP mode PCI: imx6: Fix i.MX8MP PCIe EP can not trigger MSI dt-bindings: imx6q-pcie: Add i.MX8Q pcie compatible string PCI: imx6: Add i.MX8Q PCIe support .../bindings/pci/fsl,imx6q-pcie-common.yaml | 5 + .../devicetree/bindings/pci/fsl,imx6q-pcie.yaml | 18 + MAINTAINERS | 4 +- drivers/pci/controller/dwc/Makefile | 2 +- .../pci/controller/dwc/{pci-imx6.c => pcie-imx.c} | 1173 ++++++++++++-------- 5 files changed, 727 insertions(+), 475 deletions(-) --- base-commit: 2e45e73eebd43365cb585c49b3a671dcfae6b5b5 change-id: 20240227-pci2_upstream-0cdd19a15163 Best regards, --- Frank Li