Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4265671rdb; Mon, 11 Dec 2023 13:59:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IHHQzkZ2qxC0lBVrpLRpbJadn8gHu1NkTWE0shZGSaEnKSDwhMMerWuiY0EMF1R2/4UOWIC X-Received: by 2002:a17:902:d4d2:b0:1ce:5dd8:2f31 with SMTP id o18-20020a170902d4d200b001ce5dd82f31mr2640448plg.39.1702331985967; Mon, 11 Dec 2023 13:59:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702331985; cv=pass; d=google.com; s=arc-20160816; b=UDxLQvPbtLSgB0oSWh5G0XxoL4idM45c4s5klrUv4+Vy9ujdQd+pFoNYVCaFjMJHqe ZHROpDKDXQQ8Y0l7HrTMQ+bxauQCVxSSygTxhjzD6xO5VXFoaBk96XcaIykH6LhNtdkS iGx+ITe+GAbRkCAsIuZV1QhTbIEIKkw8icG0COUspRckHVS2NAVyXJ7rvNYYuad1hA/H jk5/OipNGPouHPPpnvnSbICKgr1oO9QdQQ4ZXbW9TP3QU0dSvP8kdMCdhXbEf6U59oml Q8wR8c/t/VP/J2cxX17npfgS7/WPt4Za4GbLsdYvLqdPBuG7WtAup6T284V+q+sP+k7r PpJg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=nkPmbDvnpjyM31CpLAYNJzBvlFlaahKGd2OBOlmTQMM=; fh=OXs80AbofzOAJ8/C1czTmpWqHLzJWxQApbYGN1XYMR4=; b=PyayWPXH1eSjUYbsg3iYCshOF3yWo/FjTCPaRnCFo/qGMPbvdzkAenlrOQ4IiRqRsm k+IycDw0b85zmxcQ5pEKk7ebpbRtQ4so0RkUi/Py3IjodF/MUpRa5xu5zXSUL/OXe014 2SUF5Dw6QgB9XFVwIprwuLUl8OcR9Y+BsFpKngBI2LF+7YXqt8NlRFX/n8aHbN+Do1xD 7eSWbrYyPYyk+xxF230/YVjQy7L6w1SYR1UvypnTIg9F83//yox8MDUquek5VRgN6YFD F2TqE9Y2r34yqxHwH6hPDGb0z/zLSPJcuNJ3qoIWAg9K1WT1ij1kesgqRiqOeCUrbbn4 mddw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Qo4c+GTa; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id je1-20020a170903264100b001d06e8a15desi6623689plb.322.2023.12.11.13.59.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 13:59:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Qo4c+GTa; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 9BC4780BE7C4; Mon, 11 Dec 2023 13:59:43 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230125AbjLKV7W (ORCPT + 99 others); Mon, 11 Dec 2023 16:59:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229540AbjLKV7V (ORCPT ); Mon, 11 Dec 2023 16:59:21 -0500 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2075.outbound.protection.outlook.com [40.107.241.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 964DBA1; Mon, 11 Dec 2023 13:59:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L1SFcMxq5kj0fLeqW1j0+PviXvg/qrw7S7N66Zv6X/G8sYLU5Cwax8vA83lwJNbUHaAFEe1Cwl6KUO9i2mBUHrPrSrF/Lk3G0vUoZhfeqJaZ79FstzVTd6Fm8cwEg50fPNr6NxWNDgiXCxHGs29hXDf/s9SjgMXynC9JsqdVURScG/Efg8BxXrF7EPVnwBURhNiyNNvGwPgMih9Unk2/bZQ71bUz251oVtY6uDeTWW3bbaN4Zyuid+MkrFdJnbwduby5AqAzz/37C9enYYRCyn6/sN4Ay9r9O+iGq1sNjJlq+ueEB7hGBRTU8Q50sZ1vZNFVEc6pSt0jRODE9Y9syA== 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=nkPmbDvnpjyM31CpLAYNJzBvlFlaahKGd2OBOlmTQMM=; b=H3cTEWSRffUVgxW6rdGSzXcPiRYimWnAW2OG9ZE8qbUYwl2IcLE0xha28McNSgFnqV/DV8BYzY8Lf+ASrDwTmh2vizrZbi6OukLcoeG96MTpn4Sf0SBdKXLy8EhduN8xe1bdNCEIg6qHb2HE6k0aeZiUwvpl/3yRA95fABsYPnv3quXYobnU1/bHGhsR5owDp1mN4xjqeQ8I/xfEATQUCqiA/cJW3CHwdSkK8xvRewIf+VvcmO+ok/BT0eXkZMfMfh0Cy8O25/XwCY7U8jHGqx7OV65XDLVVB6R7q4reXGONxXoHBbYabpCPD/VAvGWuCUwKbJ/3zRU2ZmFkaAgBwQ== 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=nkPmbDvnpjyM31CpLAYNJzBvlFlaahKGd2OBOlmTQMM=; b=Qo4c+GTac0R/M8iI221I+gPbKDswFzxfgGJZEhZ78VfWo8CIuJurpKpa859+L+seBO04Fe7b5OSIdACAomlsDHmzwJiCjKlRTZSUl/wU6AWkfRcZV1j2LWjNHfrjuHoZc9boUCrqwguwSd0/K4KWpDrqYU/B/VSP2726Ptppdgk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB4845.eurprd04.prod.outlook.com (2603:10a6:803:51::30) by AM9PR04MB7569.eurprd04.prod.outlook.com (2603:10a6:20b:2d8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.33; Mon, 11 Dec 2023 21:59:24 +0000 Received: from VI1PR04MB4845.eurprd04.prod.outlook.com ([fe80::dfaa:e869:45eb:76e5]) by VI1PR04MB4845.eurprd04.prod.outlook.com ([fe80::dfaa:e869:45eb:76e5%6]) with mapi id 15.20.7068.031; Mon, 11 Dec 2023 21:59:18 +0000 From: Frank Li To: frank.li@nxp.com Cc: bhelgaas@google.com, conor+dt@kernel.org, devicetree@vger.kernel.org, festevam@gmail.com, helgaas@kernel.org, hongxing.zhu@nxp.com, imx@lists.linux.dev, kernel@pengutronix.de, krzysztof.kozlowski+dt@linaro.org, kw@linux.com, l.stach@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, lpieralisi@kernel.org, manivannan.sadhasivam@linaro.org, robh@kernel.org, s.hauer@pengutronix.de, shawnguo@kernel.org Subject: [PATCH v3 00/13] PCI: imx6: Clean up and add imx95 pci support Date: Mon, 11 Dec 2023 16:58:29 -0500 Message-Id: <20231211215842.134823-1-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR03CA0009.namprd03.prod.outlook.com (2603:10b6:a03:33a::14) To VI1PR04MB4845.eurprd04.prod.outlook.com (2603:10a6:803:51::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB4845:EE_|AM9PR04MB7569:EE_ X-MS-Office365-Filtering-Correlation-Id: c449b642-dff6-4887-c91f-08dbfa946c71 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /VVlY993bQ0H1PmMgx7rCWLih4YYbUAe1j+ZGjV8zE8s2jbmrBVPTpAF+qmRRHsjhiwMiMV0BtjG9wsVkfhLNDX9NkairKxuKsI13+99v35hLWb+SF2ZnzFY3rI69e1lhcWvxWpvassj4adCyBc8rZFnSul0+x2KxC4yu17yfqiKmREU/0PUTFOw6gwIjErBMHEplWvBkjOZ8MO9ofaqCqDN7kZTp5TW0I59ca4Rp0b8BaX+TE1P0vKle3ER+LUfSBwc/sumgMDtN+Yc03jPpsHuWYMiyl8DjlJdMLzcNw2X0ot7Ool4/jCxB/cD7HRJ+hfObzXRewFmqGZ69Wo8nw9IFy1mAiV4dIT4hUNhBITJKwI+K2T4zlNTgqMQUoxRfLqEZzdAbNVBRdJrcoptTYXClR1AH49fKyatlPx0v6K0iQgg1mPzepg2CM8akQGUH71jrUo3dUzFE3VIsNuE++Lw7gH3cpKbySeHLZPqObCZonumS3G9fXJ44Ja71OgBPP1MrR+yD/6s0tNqR0wtPNQUcyEuh07TCT5VhP0uJRdkCeR45wcSHeYS7XFXeI7Ru/u/LzAi+sxHn2IxE2FEeq+8HXiEPhGw2U11gGnnyk4v6xjxhSx5KFGCalLI/xdQ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB4845.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(136003)(396003)(346002)(366004)(376002)(230922051799003)(451199024)(1800799012)(186009)(64100799003)(1076003)(26005)(2616005)(6666004)(6506007)(6512007)(52116002)(83380400001)(5660300002)(7416002)(41300700001)(2906002)(478600001)(6486002)(8676002)(8936002)(4326008)(66946007)(66556008)(316002)(34206002)(37006003)(66476007)(86362001)(38100700002)(36756003)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?6d//fEzbyXFM0MnTcyNYJuP2PbTNk0FzTO2bCwBszHymvrVwODqvTyj/5V8X?= =?us-ascii?Q?CrgqAASfIGkI38Mo//P9vlHW1M7BGHApeQTCVjwB+Wm/60q1BY+g5hU3rukZ?= =?us-ascii?Q?VEHxSFSCfOJVjj6x+gvSr5EMoAhSt7DvMZm7MzsppsDInHO7DJdtI6jLnysj?= =?us-ascii?Q?ND9EkqtLgta93nv80C+ZVp5yzl5BnMmwrUv4ZHJCJp3WblUQXbvRtjnIdYNm?= =?us-ascii?Q?HsFbSdxt/Kz6GrVDziCHZ3MD2JgnJnRRheOefOWRrvoZcNVSvyaaCswaG1dG?= =?us-ascii?Q?PQ1mh4iVZ5iucEI7fEiQhNo56CXqx+5ZXfLjp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R+D7ErXDW6+xv8jOOOz+gnjN7VwR9dQzjE9OqpFsZE7gUutR/VaI?= =?us-ascii?Q?/wh5V5LqxVO6XxS1UY+OxJ+XHvuQIRyHqyKILyKA/B45lHMZWmaXKJLT47xU?= =?us-ascii?Q?cnPy/ejwduvSdkvxgKPC5gsEsIKgLv57z+d/KE1GMmi2WY9lr4T1UgUORuoL?= =?us-ascii?Q?Rv8nFPtnd3MrvLQUm97WPDxxC3oDT/RcOv5DCcNgGZVtJGddHvYFVjpSxTBA?= =?us-ascii?Q?0nS/MF6NQJY1Gdp7QqKfgsm+yceMHN6zpjxY1d6SpwXmkndOLeaPiJUikO4n?= =?us-ascii?Q?r9UqWOGBdESkarU4G6v4LfdpF6rTroR0++aSsphGaAYqpXvdxpTncBeyzJtr?= =?us-ascii?Q?h0ZqmdIg8DwFVK/7ClYejbbnPAegszSn034FSjNT?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c449b642-dff6-4887-c91f-08dbfa946c71 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB4845.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2023 21:59:18.7923 (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: /XkAIXc9S8UwBQTM9rXAnYMf/zFYDobdvsmM5broeoSFe/ClWmGZq+CK2fa374qEsvWKrIFKn1N0QXCdwGPLhw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB7569 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 11 Dec 2023 13:59:43 -0800 (PST) first 6 patches use drvdata: flags to simplify some switch-case code. Improve maintaince and easy to read code. Then add imx95 basic pci host function. follow two patch do endpoint code clean up. Then add imx95 basic endpont function. Compared with v2, added EP function support and some fixes, please change notes at each patches. Frank Li (12): PCI: imx6: Simplify clock handling by using HAS_CLK_* bitmask PCI: imx6: Simplify phy handling by using by using IMX6_PCIE_FLAG_HAS_PHY PCI: imx6: Simplify reset handling by using by using *_FLAG_HAS_*_RESET PCI: imx6: Using "linux,pci-domain" as slot ID PCI: imx6: Simplify ltssm_enable() by using ltssm_off and ltssm_mask PCI: imx6: Simplify configure_type() by using mode_off and mode_mask PCI: imx6: Simplify switch-case logic by involve init_phy callback PCI: imx6: Add iMX95 PCIe support PCI: imx6: Clean up get addr_space code PCI: imx6: Add epc_features in imx6_pcie_drvdata dt-bindings: imx6q-pcie: Add iMX95 pcie endpoint compatible string PCI: imx6: Add iMX95 Endpoint (EP) function support Richard Zhu (1): dt-bindings: imx6q-pcie: Add imx95 pcie compatible string .../bindings/pci/fsl,imx6q-pcie-ep.yaml | 20 + .../bindings/pci/fsl,imx6q-pcie.yaml | 18 + drivers/pci/controller/dwc/pci-imx6.c | 578 +++++++++++------- 3 files changed, 393 insertions(+), 223 deletions(-) -- 2.34.1