From patchwork Tue May 7 18:45:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13657567 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on2045.outbound.protection.outlook.com [40.107.15.45]) (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 B3EF34C8A; Tue, 7 May 2024 18:46:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.15.45 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715107587; cv=fail; b=SgGNcgAT/mgF46jHxhsfqjcZOJzDQmuayOztJGWBpWPsUyj5kxOFRr/sqXwTt6S/R7yJxX0grm9mb2bHUWL9n/792ZTldueJcmJnh2jOgXGzYNB/0TwESUJWDkvDM4syJpBshpQzUGu12EiZlyvTCUc+mJXgkj6vooiZOW6tbIM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715107587; c=relaxed/simple; bh=I2hxRxV57L44y/Ar8CfZiNebGYImVGD//kpc45Axens=; h=From:Subject:Date:Message-Id:Content-Type:To:Cc:MIME-Version; b=GTPEUziUxdD2MCIVDDWnMNnoPOtVJxdvklfx33wUkgvkTdUZXa+FYkJrqCTiqx7G6UrUiU63bV3+GNrjfKfRTLsYtnDndLExeHeoEQ3J7luOG3u2VDpkPb/4kEw7vgMYetDPJ9vijw0CcxfH9WoJWycrRst6L6bm6JS2VKAB8KI= 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=qmg+j20y; arc=fail smtp.client-ip=40.107.15.45 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="qmg+j20y" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mD+L+ZL/0nRk4Bmnp7VZoKoCVBbRlzBSoC4lL7m9TuK23cIIC4td0K2IUbM/rEAZrZz26uEMJsXz0hJs5A8sif9WFvYQ78LGn6Ia4sohqRQmSg08iKxceesJBY4XV7YSN6kHChrlSu8KnP2nGkzK9KhkbAnT7oAoPfd9vvuBG9mpkMxlwl4rlzbj3QTCNGTEaOKXZU9n5PQSHaZF2sSFu04Pa2j99nHTzDjN/OGRKoZHbSIdLsnraOKDDqTAESFxWMTEIsTVeXrhOZKOA0dID+72ABQilFD0ZIPkKHCQIGzuiAzkxibnOXnuTjVxqgqKWLhYEsyZlwlIkpFs7FWFFw== 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=ZhnLvYBHJxxqQ1rLgIAXVA9l/t8FfB9pCt3CyrpMmAk=; b=fFzq/CeAN2bpiRkscAYHeb/n3I9S1k0TAq0V3jcYAItQpw/H02ynGn4ukedAA+gcYxQTseL1Fkg/LGd20ZdR1ZGmsGj4aaOUsA2RAIrVohssKbnFKsgoCsfdSuTXtN9YmfbOhgabkCvrcGFbctr7gKLPLOFstO3cF1Zo6jbzXxuq5F7ob1bpCFcPOou7d1VHLlteGTpHy1CNuVfSjb1Qu4xs6+SlAiOnSOltWutCtm3+ICB04JUd/AqGvrLBWNZiYU92PP/yNLLXzZg3TuweZUMT7WdxEQy0nq/2WQACilyn7CT77jmHjG9wAYYlrvNbdFM58RTDu6Jv6XfjpTjB7w== 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=ZhnLvYBHJxxqQ1rLgIAXVA9l/t8FfB9pCt3CyrpMmAk=; b=qmg+j20yGjoq7KDQXaIh7rrldCQc2OLEkTbSiXLXmOn6QhXr4KKi7/6y6ais9Qwvxty0AB8JHSElPFFZBFcktv/R+lqNfy8NBsXNgLX0+u19VCquxY211MVktwIeAGZxKoS1ZJPOJN6MdEcvX5jGqWVJvpRpaz6T1U4NNuPisrs= 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 DB9PR04MB8204.eurprd04.prod.outlook.com (2603:10a6:10:240::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.39; Tue, 7 May 2024 18:46:20 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::1e67:dfc9:d0c1:fe58]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::1e67:dfc9:d0c1:fe58%7]) with mapi id 15.20.7544.041; Tue, 7 May 2024 18:46:20 +0000 From: Frank Li Subject: [PATCH v4 00/12] PCI: imx6: Fix\rename\clean up and add lut information for imx95 Date: Tue, 07 May 2024 14:45:38 -0400 Message-Id: <20240507-pci2_upstream-v4-0-e8c80d874057@nxp.com> X-B4-Tracking: v=1; b=H4sIANJ2OmYC/3XNTQ6DIBCG4asY1qUZGETbVe/RNA0CVhb+BCyxM d696MbUpMtvkuedmQTrnQ3kms3E2+iC67s0xCkjulHdy1Jn0iYcuADOCzpox5/vIYzeqpaCNoZ dFMuZRJLM4G3tpq13f6TduDD2/rPlI1uv/0qRUaDVJed1iYgS5K2bhrPuW7J2It8tgjhanqwyU OjcVtLI4tfibtPno8VkS0DBRGUqgbDbZVm+hyEVpCABAAA= 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=1715107574; l=4795; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=I2hxRxV57L44y/Ar8CfZiNebGYImVGD//kpc45Axens=; b=+XE+jiu1fT1jxHtUOK4RuWcPWUUlv7jngL/fKOthIjRuDVf1I6TXQ+EYykCZaUKHHSOyQcT1p FW4+bksL7WCDdSIJwcbZWP9aIQYeagQwng5p+zMjOonN6VVNl1AdGVl X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BY5PR17CA0026.namprd17.prod.outlook.com (2603:10b6:a03:1b8::39) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DB9PR04MB8204:EE_ X-MS-Office365-Filtering-Correlation-Id: ae20b9ad-e65b-4f56-9a7f-08dc6ec5fc68 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|1800799015|52116005|376005|366007|38350700005|921011; X-Microsoft-Antispam-Message-Info: =?utf-8?q?Xq3aPopP+JD+j7qBd3FNzqq5n2UsKGb?= =?utf-8?q?mh1q9FXiNH0/maxygNzMmx3k1PLH0hs2kU/QsSjSi6K3SSjKLDhZJXymoy0E1YItD?= =?utf-8?q?VhOaiETVmsbPF7aPSO5mTMFHROLcsO6nDMN5An8nfUrruN1kXJFWl2iYMsXM8N+YR?= =?utf-8?q?vBmkekrN19I/nhyFVZB31sUahRQWum3oL3Zj+9hK792fZRbwL/7t39hsRuYiuCyL8?= =?utf-8?q?nlFyI5LjMBzb1iTWq/jojaLZ9IR5V7PCKFfq65oeVw3bAaQKx2S/Zi5CjIRT3Wjkx?= =?utf-8?q?dT1BAV0yEGyXwQ7sQ6C9f6SJJKVXuCIexkaNHzN854B7o4pJiUi7lGQ+AKyRstybt?= =?utf-8?q?9zcWruVfh27GTFzmIMGGDwUe2Mior68dLJgDs9jsEO3Ho+AEovdkm1/HNlG4JpuoL?= =?utf-8?q?N9Ygw3Rp7I2pYNkG+FFT0GXqzLhd+kXMlnFUabpSxc5XtKICszBKf5HjRWC9fm8YB?= =?utf-8?q?txFqb8Ins5YrkiTNdEsHkuUyQ4gQ+ONDPunQK/8l94I8TLHJn/dPxtfYellcXklTG?= =?utf-8?q?fUTBcCaOLUstUwYiZyAvOsHnnKz3rIA0+eKbg4OvwAhfj40ZZdZIBkOX9Ay3L3XvL?= =?utf-8?q?8ffRI/kCmNB4Bpd5DCjoVii4lsHI73ofoJR923gEdoJA5wTbc6AuyeYMnrrjDbQOa?= =?utf-8?q?IsiqQv9jrHZOsIf7U15AIJqsoPalD4ID2H7oqOtPtdH8X47jYHuya5Bw1/MRHGnvK?= =?utf-8?q?qWsssZP+E8tHtIKU1PKDhQ4i7388mj7EdjtI1EL875FOU7+u3hMhP0/zhe+fsebO4?= =?utf-8?q?7p5ensrd+aT8VVWEdUPB0QvC1iGtNTVKCOs/E0eMZCY6adhEDnNP206+9aGYa/uNH?= =?utf-8?q?w+S7bE5pBwqPxg0+ZYQga5Is6C7NpAFwqM+yjJozq+kLaAJkEyvkLcJKvx3QO1j4q?= =?utf-8?q?jEgjwVuz/ChNSCGWEQcUatb84alagZPs2LodlYf7VvB6QH1cGlr3ckuJ3V6vhiqRX?= =?utf-8?q?Ug9pWnM82KF9ZwVe0KVQ/jyE8KS/Mj6MoVh6yidQoeAaND68aOjV/mtGJaSkyEY/W?= =?utf-8?q?9JGux/id+S60/KM3/5lcecO+pWECZnt9mpRIFYYCRiDkxfIIQ4yF+rwygm/tFngif?= =?utf-8?q?OpMQMFyV5308yEfuQUS0cXVDEmCPO/Th4NDr6wEpcjLZYcHmPP4m95GzYEJV54JH1?= =?utf-8?q?TiWCUnv5qqgaz1BzyBYNxXmBwyym28X8nL2KPHLpcpj/vvH3LfqzPN8xwAi+vuTjH?= =?utf-8?q?RRdTE8MWtHbGl0gDLxkWQ0kOHg3rMCNyCoeH4qMiPgVum1obAXuz2uLHqZDVbJKhA?= =?utf-8?q?JVLPJ8SSl0drpSMy0/1InYVv6xsCc8VDMxB6r2Hr4Wf9sGVWUFmM37bY=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:(13230031)(7416005)(1800799015)(52116005)(376005)(366007)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?UlAXbFp22PTy0n6uzLraYJRreoCC?= =?utf-8?q?n0GXtiqmvciXTuyIej0ft6LiiBBWiJdmAw9/iN2Vf7a05sZ53AD/ye2CDWeWroaOQ?= =?utf-8?q?bmPiZYP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PwxkPILoHaiV4TGgKOVWmaYvYqUYwMgjCs53F2U159yD8GZnl++?= =?utf-8?q?pRcDJsukH3muRlwq4ovNibFyX1jj6seFx5OBgH9h63qVcNd4LOtlVDe+0nL43wes/?= =?utf-8?q?/sqdpt7Ne3AxQshtKleyp7RLt39qn8QRLFWuqoTauhfOwXP+JOPc20oq1/ScnK6TV?= =?utf-8?q?vWERbS8SgoIEb+1ApFynpM1OMa9Dch7gixvyHdiIHjMoiWysaAaC9olo8TR+Z/e8J?= =?utf-8?q?fMbIsraerra69Kc2BfTzBFc2r7lO/z5zonMF0CzCUKRQOUG/7yM9xIR1AZ5T2KhbQ?= =?utf-8?q?Pe3Vcycj43pPKcCbexsj6/BsbHvCCTonjxXF2XQdP1eT2ru50VvTy28txFKzbS0P2?= =?utf-8?q?xFI9Fpc65Ikv0wyX6ti75tRWRpB3PH5tKABsdBdYAxLdlLhBukRZMqZPNZOBoAC2T?= =?utf-8?q?ZK3MDXn5OtAJLRQAy4k1Mhzagek/26N+1q+Q/Qgur9yrROr8PvCVfm55TqGO127A7?= =?utf-8?q?hN0G0lpU9BeFmMSINWQ677qr20H0Hcp3Mjko/8Ri8uJEgTgvvHVjgehipZUDrEcDB?= =?utf-8?q?H8L+//cbG5ze?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ae20b9ad-e65b-4f56-9a7f-08dc6ec5fc68 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2024 18:46:20.3344 (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: Gc12jDa0RzCNXDx3L1pCLXKovSdEriEhiM9fOOl0yYFtkyFxW37XAsDfP+Fl+FRlYVO7zYgmpvo1OXI186WKBg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8204 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 v4: - Improve comment message for patch 1 and 2. - Rework commit message for patch 3 and add mani's review tag - Remove file rename patch and update maintainer patch - [PATCH v3 06/11] PCI: imx: Simplify switch-case logic by involve set_ref_clk callback remove extra space. keep original comments format (wrap at 80 column width) update error message "'Failed to enable PCIe REFCLK'" - PATCH v3 07/11] PCI: imx: Simplify switch-case logic by involve core_reset callback keep exact the logic as original code - Add patch to update comment about workaround ERR010728 - Add patch about help function imx_pcie_match_device() - Using bus device notify to update LUT information for imx95 to avoid parse iommu-map and msi-map in driver code. Bus notify will better and only update lut when device added. - split patch call PHY interface function. - Improve commit message for imx8q. remove local-address dts proptery. and use standard "range" to convert cpu address to bus address. - Check entry in cpu_fix function is too late. Check it at probe - Link to v3: https://lore.kernel.org/r/20240402-pci2_upstream-v3-0-803414bdb430@nxp.com 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 (8): PCI: imx6: Rename imx6_* with imx_* PCI: imx6: Introduce SoC specific callbacks for controlling REFCLK PCI: imx6: Simplify switch-case logic by involve core_reset callback PCI: imx6: Improve comment for workaround ERR010728 PCI: imx6: Add help function imx_pcie_match_device() PCI: imx6: Config look up table(LUT) to support MSI ITS and IOMMU for i.MX95 PCI: imx6: Consolidate redundant if-checks PCI: imx6: Call: Common PHY API to set mode, speed, and submode Richard Zhu (4): PCI: imx6: Fix establish link failure in EP mode for iMX8MM and iMX8MP PCI: imx6: Fix i.MX8MP PCIe EP's occasional failure to trigger MSI dt-bindings: imx6q-pcie: Add i.MX8Q pcie compatible string PCI: imx6: Add i.MX8Q PCIe root complex (RC) support .../devicetree/bindings/pci/fsl,imx6q-pcie.yaml | 16 + drivers/pci/controller/dwc/pci-imx6.c | 1193 ++++++++++++-------- 2 files changed, 736 insertions(+), 473 deletions(-) --- base-commit: 9d8b196fd12e52820a40c21297a97ea6186aa87e change-id: 20240227-pci2_upstream-0cdd19a15163 Best regards, --- Frank Li