From patchwork Fri Nov 1 07:06:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxing Zhu X-Patchwork-Id: 13858825 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5A822E674A8 for ; Fri, 1 Nov 2024 06:59:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+6bJ8ZdNq0jbMIzriN3qMBzZw9hotPrRliUnnqNdEcc=; b=41+DafBsn9kXtTloTR6NB6N1nv 2kvfU/oyXiq70bA8lVpZHtIzl4nGZA/LM2A0J4G7Rs8Q6DVO0YnlqqoPzxWzpzE6QLH89LzgY/75j wj1im8OXeyIZSspPQTNDotbBFRqTw0/M9w4xm8rpXn4YzUyt5vYHiKi4QiPL30QOZfL9ajNipXyEp ciSRWAZdybKSNp4zIdV4fETkhyQ0ZXoO6GyYRMkFHF6nnMO8PRUwH3dDVss860U6Ayp/S2jbm+/wR YVtsI5SgMKolK76C7r6UwL7s0h8B3iakzQVNaConAd2zd9LSlSAYt9Fp8SvrQn7fi4aYj8ONtitAZ imL2JuzQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6ldH-000000062Ft-302H; Fri, 01 Nov 2024 06:59:43 +0000 Received: from mail-vi1eur03on20608.outbound.protection.outlook.com ([2a01:111:f403:260c::608] helo=EUR03-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6la0-000000061VT-2wrA for linux-arm-kernel@lists.infradead.org; Fri, 01 Nov 2024 06:56:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qTC3qGrlvRPG+fjQcXqp1GoO9qHydp+dkl6FQPRXKceKRIxdedmhpsC9hoVFpXJurdQMbmX/OEJQcZlIUddBtEa1PdFwkp+S+A1AkfSDYyJXEAyE2Fjw7QBKghcSyhnVgatxqEVf6BGaVTgrLzkz+aHvn7HOcRSj2zk4ybhEchJwTCnSXKa2lw17B1lDdvNZjzM3urGMcz59VmF797/9R9QMkI2k4xQFrNOYJOQF1MSbe/iGtZ95mlbIOwgAiDbkLVHqHhCniUMv38MgCcpRmNdGuAjOsUEyS2jMOipWZ0ZUIXL8kB+5HxCkv0p1NjW58KWTryMwd6f/n5FzUOzbLg== 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=+6bJ8ZdNq0jbMIzriN3qMBzZw9hotPrRliUnnqNdEcc=; b=RmGSTbMh278bLNBSUzI2Qr9+/deEFD9JUWehzeXW008EvBVk7HPn/j8AqeNYbhtZZLT3V2oCn7KPsXTkKlN1Z24l6FNXAjVTB/3r+79txxuTXbDaUk76pJdZEMn/w7744PzWaMMyqyCKP1y4J8iHEXLabgYBw7qlojr/jArNuef8ru+2J3Gxr9Otvqx+RSGepHRK+w5nEeaVeSn8yZjxaxNZwWRCsO94y2/hizwHBHTag3WqaK8vTMB9Fte0SqYBw2DRjaX9or5t4zeOCzK+zTfMR49xrRJnQ2dQuUacYHS/+AGh5LvXiRtFKI9+nlSf2YCLpwBSZNkSu2L/BaWqgA== 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=+6bJ8ZdNq0jbMIzriN3qMBzZw9hotPrRliUnnqNdEcc=; b=cwhxMTLEJo+BTy+5fvVISL5rQgd0XRsuJU8tn4PSoK4k7GQd9Tk1FGbPzOrE4xLCHu/aGKvEr/M6e+JozDh7ah7Ym13gj7aoD2g6EFxbKjegK4E2upR5En2y++vAdbsHiaON/8Jy7vl1Rlz2lMGgDPsSSmZ2+1ik3nzqplP+4vTNOfMdwTsT5+QzGyv6NXXdQd/9yygDTHKE75Kl6LttBpggapBL7gLKVThulpAVA5CwsLy93ZbqLCEQXPnASpzjIDgCUb8bggplwUx18a37KhFmP8ZLXUYUzQwflqymONBv08fmKoQ57aRzPD/56JcDHd/HxZetFW+B2hf9z2YvIw== 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 PA2PR04MB10445.eurprd04.prod.outlook.com (2603:10a6:102:41f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.25; Fri, 1 Nov 2024 06:56:14 +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:56:14 +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 , Krzysztof Kozlowski Subject: [PATCH v6 01/10] dt-bindings: imx6q-pcie: Add ref clock for i.MX95 PCIe RC Date: Fri, 1 Nov 2024 15:06:01 +0800 Message-Id: <20241101070610.1267391-2-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) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|PA2PR04MB10445:EE_ X-MS-Office365-Filtering-Correlation-Id: 610259a1-14d1-4ede-9d41-08dcfa424705 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|376014|7416014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: Wpw0PMLyAl6hm2NDY82IxqVOnUst27uLy6P5G+Y1IwkqeIF9mR9Wwsqte1AeYWdYEjcx9s5HcixXdDRyRxxrhRGQ5/YVW5xHN04FHrkrdrZOGSh88OImD4WQeH7WlrczzjK3aL3k7Rrwt09gjus6F9lHJrvSe8kWMmcd+T49/wZr0i6u5CIHnqiTmK1xf90/1rpco3rOxOy9wXGWPLewb5ZSESYkwAseRhUuNMKnynZ7CJq7Gh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Cye1bxp0PVo60LOzZIuVXHrEQymgM3tesxHrXpVsL4ue2YP3/eYranUGub5hc5u/B7KVAGuwfRHtKFc/NCntmjb 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)(52116014)(366016)(376014)(7416014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Bi+mgOUX2+TFtI4mJ0x+gAK7UEqgW7Vaz2EFrDj3OyNTKtYlz51yJ4uzrhe8dfIjN2deEfkNF2fxhmQh8AbMcS+AjDgM78UDlxSOOEmGtyKnS5vChx2MYcztLqddjkTgFY9rxGQhufgiVDHRNRlEiiR4iwlvUAncMDWlAgMvRTOcrZdHDKBD1IaTzr8oUtRxv6NJQ/FVJ3vgpjysrjYbD/BJcjcj4+U0EljsRneNQJ3EZmSdAzCzzn7Vi+3xjVGsqoiWDv62V47InGMo0pSSNT2j/ueBI3nx1PlefZ1f3SResYw01xgYarHiLGGTN3ylVb2KZLwBZmG6eoFNAhSutvVRgTZxINg+YmfrKMa0JtD3tysRHud2W5znu8//WTwb0RjneaFKyOSNH/2wtIkiteIrXnjDBVxD/mCic4NLAv0tXMtu9SrncOdiIPZJbnEVcpiXPLcDll75sTaUEe2MEoQ5dJbqhqhncUaSoQdGama71uakL9KDf+akQJqdLN/8cC9iWksUQavZ2xPTUXLk7rDA8WoIlSq2lZfW7c+xdkTiUxyKrtP0HCytd1E0AH/MYa7oCLk+vuXdkDfFK9L8h/i/MAdo1i1s6VsyEHFecgNoKMhFB0mV8UabNJUNTNR9Q+LRjHZIcUjcUxVPJ+2yrhBVaYODnL6BuXMUcllIcMSULFeeOYA1dK95zRUvAVQBNT7JqCASJkgktdBH7J4Jn4TFF8wWd62yAApIqIhzv6DNcmyPeW70DRY8D9KWxgBMwJTROAbkOszEp2OpgaOpFdCah0AXMHjL1Sf224U5BlCXqPJf6xH3U4iM1FD6+AmNoqR9MbVxE+Upvj4XVsFevyunTamQuN9fYc5oUFCSbqpE8TT6KfT88tbxXLPlHW2oEit5jV9btXoTOQXtkrw7Xuw0J3+GAeFL59i80STA8JQ4TcWfqkM6lwcctR7vlWjUUq9xxlQfLBdVeiW9MTv/SWnelOaHCyJVI9i8IPzCjhTswZwVjF2T2XaxVIOJC5Cs8ZkzUiZUrPjd4Wxng/edgygNy3POfcg7y1OgWHlLPt9OaqtZnaYyHTZxaOTa0lGwV5Scz1Moo3RKBxt/mEEQc3zMIec2stPv2PSHtw684xrXewC+Ms0Q1JYpIM9+evlKRmk8fqfDdDRIilmldfC2Bt0315RQjOeQSc9kFArOkL3DGiV6Rl2mIcHgCd2TLZoV8T7EGu+57NLyPW0Q2metXD9LQ89RkbQiqrpuMHQ66MVRK4iPF7I8E7vLriRG1UO+u26KUB9Nkp84MITPFXmZTzSlWD4v+xeKuyRVURJyxnh1Yep61eaUwTzyKG03mlPuiGkKPi/I7YsCrGY/2PlXzrmocZy/tWOmXTnKEGK1KwERPJRVjojs699O5hKx5fvQYp6JcwSzWfCkdHCLueBOYbi9V0rknZPND9qRpcXK+Qgu1SayvqGT1hnf+GngMrq9Uyw6yEBZDm6LAZpUD8kI242Sdt8Boq5cB9gi1jKg/Ynpi0g4WlkocmRXZ/lBh8ur9V+MlhNmdIKRX+H0/u6wbsVxwGCM+/8zyYmMjtNIUsVpggvvWvsfiMDLQ5SemQ56 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 610259a1-14d1-4ede-9d41-08dcfa424705 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:56:14.8490 (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: ir3lbi4cd0vBsbKHE/+64M8qzMGNs6Jm8m54A0ZeWBglXtf7sS2FTv2t/hJj2QdaVftlLxJKIUMMfdRFpO4zLw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR04MB10445 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_235620_755658_3584E7C1 X-CRM114-Status: GOOD ( 11.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Previous reference clock of i.MX95 PCIe RC is on when system boot to kernel. But boot firmware change the behavor, it is off when boot. So it needs be turn on when it is used. Also it needs be turn off/on when suspend and resume. Add one ref clock for i.MX95 PCIe RC. Increase clocks' maxItems to 5 and keep the same restriction with other compatible string. Signed-off-by: Richard Zhu Reviewed-by: Krzysztof Kozlowski --- .../bindings/pci/fsl,imx6q-pcie-common.yaml | 4 +-- .../bindings/pci/fsl,imx6q-pcie-ep.yaml | 1 + .../bindings/pci/fsl,imx6q-pcie.yaml | 25 ++++++++++++++++--- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml index a8b34f58f8f4..cddbe21f99f2 100644 --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml @@ -17,11 +17,11 @@ description: properties: clocks: minItems: 3 - maxItems: 4 + maxItems: 5 clock-names: minItems: 3 - maxItems: 4 + maxItems: 5 num-lanes: const: 1 diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml index 84ca12e8b25b..f41f704c6729 100644 --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml @@ -103,6 +103,7 @@ allOf: properties: clocks: minItems: 4 + maxItems: 4 clock-names: items: - const: pcie diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml index 1e05c560d797..4c76cd3f98a9 100644 --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml @@ -40,10 +40,11 @@ properties: - description: PCIe PHY clock. - description: Additional required clock entry for imx6sx-pcie, imx6sx-pcie-ep, imx8mq-pcie, imx8mq-pcie-ep. + - description: PCIe reference clock. clock-names: minItems: 3 - maxItems: 4 + maxItems: 5 interrupts: items: @@ -127,7 +128,7 @@ allOf: then: properties: clocks: - minItems: 4 + maxItems: 4 clock-names: items: - const: pcie @@ -140,11 +141,10 @@ allOf: compatible: enum: - fsl,imx8mq-pcie - - fsl,imx95-pcie then: properties: clocks: - minItems: 4 + maxItems: 4 clock-names: items: - const: pcie @@ -200,6 +200,23 @@ allOf: - const: mstr - const: slv + - if: + properties: + compatible: + enum: + - fsl,imx95-pcie + then: + properties: + clocks: + maxItems: 5 + clock-names: + items: + - const: pcie + - const: pcie_bus + - const: pcie_phy + - const: pcie_aux + - const: ref + unevaluatedProperties: false examples: From patchwork Fri Nov 1 07:06:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxing Zhu X-Patchwork-Id: 13858826 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AD0E1E674A8 for ; Fri, 1 Nov 2024 07:01:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SjZl9+6vE1JCtXhWoF+Jzfv4ovkLxdt5VsJGIUSS1fA=; b=sQQ8OBmA/+FWHwRwh3awGETqze +oouB4QvZRI9ez8KjiXtckC3lDmg1WYuH+mMebc0VFOCkbQAylzSXxz4tRrgcEs3WZ3qZsXqNd8ww X0lPwrQI/do6s0ThC442UY9qkpNvjaDdbBEVZmYeRS8qCYbzqJytTHeHhnk7KJqbZOXP/+njrGfMS BBsDN6bLBEOdl2wY8a/PKddw1pC1Y0apHqy2fBgTKqJZ8WAbI1zYL7gkvK8UkqdVGvV6itnFmQVfH 9c4ReDd+e1uQEJCkzyb89emxRYMVK4U1UNg25ffo6Xspa8cbtCfHFU2sDTNT6cyp8Ta6BqH1sTJr3 /9XEkP8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6lev-000000062RY-2IZp; Fri, 01 Nov 2024 07:01:25 +0000 Received: from mail-vi1eur05on20616.outbound.protection.outlook.com ([2a01:111:f403:2613::616] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6la5-000000061X3-1ZHi for linux-arm-kernel@lists.infradead.org; Fri, 01 Nov 2024 06:56:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ReL77fiEU+s0RMNYqTQJhID9APwfbeoBBywQ14hyUsXSrlRaItwewZLZSRbLQvDfLTv+ftFyA5cOBKYKJPYkfZQrnhkF17bzkGsJMY51iLdkfbxS8CGB+q6m/r8hnDCaFKpiw6w1ZuT0YCLMx/Y2k0gBM2Uh6/UJ5kxrS5oytLsODx45SBXYXHPx9L0jCESA43YmgrS1QInkQUhRdKw/dROaRwxHESQRVYzbThDSIT0vqRvot9yoVNa4QsroEMtcdIcz3UXeaButySwQQwXyfXA/loAtGbegapFGYqPeRKaqyFmw1SzDJkpgfnzzE19a3OUzSDT2X2mHsPfXokYsZw== 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=SjZl9+6vE1JCtXhWoF+Jzfv4ovkLxdt5VsJGIUSS1fA=; b=qBUgnIUBflhfIm8l8t9K2Q5Bal4nYf3+8Z+px+H7gA6viVtj0n388kjoo7FdzT42uvy/G2sj4ky8u75mBhfT3J7+78FOTMC5NRqvo9fvmvhbXd2MFcRnL7vj7IHjEC7QZQITRuTOm3m2hBQivsgpQbdPqAU4FSfWzF7pBIeobo784ODasiWIXai7t/HbdGLLMOGIVn5HB1E6wyeWZzj777Y+H/PwKmk4OVbv/gBeUiRUq31/Z7e4qumTr2c55Ihip4hcf596jfR6i+7gtLkORbxiq1cq3Geu4cLvRDQl2ygdHSnWV7y1LB1ds9Asf5B7jNhKibGJqzjsReMoNEYrtA== 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=SjZl9+6vE1JCtXhWoF+Jzfv4ovkLxdt5VsJGIUSS1fA=; b=AlTmyLu/tA8FxOgD1n6ZRMpSoEKcvBNiKUg+dFnANu20V95+83ffdeQ/2Bb2dPsqVgOk8IcmahpNb4ut8oyOJGQDT55zbimmFw1qYqaBPtnXw4Olz7GgPHENNUgaZAlqCbV454AbON6+sGQbPki9oFEC+mS8aDdnzH91q9Vi2q39gNDhCpVw4uJua82OqiZ2yqQ5Ies7ISIM+DZIp5Atqw1l/E2FkNZkVwh6OlVZsRTuWIaS0mvAMvRhAXlnSAp0XgotcCZ4EdKPdXVzbe5vPJ/CxTbRkyEy95/qcZBkWJTZdx8rum/tHHp78dTuhUcpzgwAvSWjeSN5badwek2JWQ== 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:56:21 +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:56:20 +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 02/10] PCI: imx6: Add ref clock for i.MX95 PCIe Date: Fri, 1 Nov 2024 15:06:02 +0800 Message-Id: <20241101070610.1267391-3-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) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|PAXPR04MB8573:EE_ X-MS-Office365-Filtering-Correlation-Id: 46311ece-e334-4ec0-2562-08dcfa424a9f 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: Bp7GU4PkSxwU3W1qvT+1yq407fMvLtvh1weGPYgf/fxAvstOR4XPMa94Lfd1MWAj+g9tg2W+8iVhd0c3IgnT1t0EXMq/Ysl06jsz7HtVUrYDFrQ2oGbZkodSx7D6FnRSrAvasYtuVez4jEAe972ksGvMPqyjo9b1yqk78jUt1+h2XDKiQ3x7HYLtkr5WA7ALkDS3QoUQUyX4whd7gOTw/DciD5sTY92urZtAM1hSdVK/AOTb+nXivpBmwKSp05et5aRNMXpZ/Maiciw2eDVdiTObWINqzBGW3ejZhuEkFlU4GPd1eSzzxmsjW4fr/+xDDIvLF7y4Swsg6VubbiUce/ioWX28CpNojerveJLdrGRy6Qg/QgDbcGCTzFqlm33MGtuR/rt3zZB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V: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: 6rmuBE9aL0oeF+5Bv1DYJt45sicu3bFxK/eH1THi7Sv2wfh+HLeo8vKmuU0jZHeYWEWueO0qQGXBruaQrKAx8LkFNT9nrEbN77c7p9yV6Ip50NBDWwjSDlKXsBMSQPVnWxfDAAoOhPlTyVXFFbKm7dlr/tUeIK75irL25PYLhsCrb/3bTUfv2IKmCoUpKgC4oo4PrCT5uLMtC3Yncxv25jfkAPm27cJLJZku9vrIlZ4AvtXh2FRWx6HnEbB75gSuUevzrbnGa5BPcva8qoqnfy/hZ/Erlqn2LVV2TZeVGeB6IKUIFkolie4lPRBGMURLRf2PYiE/lPKxhk85mn+WV7sKYfmkDyMSFPqgw7SE+UMDjNIEM71w2+C8vAGSnr9jdToHJEebk+hG/N5kkKZlJ662cBB7WReJ/Cynzc7TpiB2kH3xqtCb5ibE/5gfmt+thK1evI58LzWS7g3cDY1Q3bhd7BPengrzQhh1FaUzhfInxWoYLQXEDu5aBT1URqPjhhK710jC+6ZN5XS5Y3zrqrtBkrxJIEaC1iTTk4rpKd1MGr1zkWE9mdPecmG2raEFAA5KlQCkqsr+F/6X8fcZMzWugKwXnf+2FHcG2c3ciiuCsJxcdLHzdk6qA/6qhrSyanq5nfD7lP4xjtaPRIMpDIeRm+qZpZMTswaQSFKzm2D3YoqypidbFYE3MHaUkn52hiRBI57VObylurHmWCgA2KPockOOO9CecRxynqjYueKRkiC06hnduvkSgACneiHa7fc95isIPlTOafb2PxgPk6ZZDrgNAFQR1KzqCp/dGsNzWIRvzOUndZopPNiicIe0IPamniNM6nl1DL+la5nX/63sew6IuVkSClyIU0V6QylUUba2cslhOw8E4DX/14IrmlWfiT+ZAKILdR20Cft3lqvFwF41fLOb3pLzeTnJxnod82/IAx08O05CoGX6EuIhcr7fPSCeAQ/GLMHSs06unM2F81MxH0iM5Lep8CzKC6r5zXtFCxE0XkNyeHOJ/vCDpj00ghfIyjr/lzTf1UglDffaATk2C4yihza9QciHYQz3PimTEYfYd+R1w0akFbLi7DcX1ISy+mFzHwEtBaYThaCdRBxlcS0czgfAn3EM4/mPHwd+Kg0Z4MQFliU0u00k9ErI3DRSzbX3VBshQFZZz2VUJ4a9HIY9p7nBzfgWjE2qcZd75MbgVqfXXkGh7k+0RUI7kR/AVsiSwPfL3XGYvk6mwX69dbYR7TOLY7UsQ/xOM77M5gTL6BJ6G9srViGQyTiAYNMEd6sYiAvXdZnFTKylOCjPIWvhJW5uVKyfNRu8O4/k9lJ3RRVmCz68Cx74Mj9uBfkTgqYpQbgaHkUEQpwzgFrruOmctU8s7UfyAnDIlvSz59dH+Z6bWQBTRfJIhU+B3sXUnzmHahbr4YZ0/DStXPzuBLJVxR0XiPcY+AkcKmbV1n5Sbpz1/8cg5GK4H4Myf8jv0eR9b6F1d6HH6I17Df2Hxr/LuDVLipdeqtQEv5OyYlVxRuSqxKgvF4SKb/X/JzL4dayAgvPi6kM5rhLGTjzgZOTBXPSkyatKTFezI+fus6CkuBEax3KhkV3/ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46311ece-e334-4ec0-2562-08dcfa424a9f 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:56:20.9262 (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: 9BjGrQu/2mMw5t3BRjrDsj3Sh8bnQP8WSWCMJl7ByIp0mjcp8G+Hbj/hjF861E+hCapn9bQ/LY/10jZbMOq7yQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8573 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_235625_454212_46BB10DF X-CRM114-Status: GOOD ( 13.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add "ref" clock to enable reference clock. To avoid the DT compatibility, i.MX95 REF clock might be optional. Replace the devm_clk_bulk_get() by devm_clk_bulk_get_optional() to fetch i.MX95 PCIe optional clocks in driver. If use external clock, ref clock should point to external reference. If use internal clock, CREF_EN in LAST_TO_REG controls reference output, which implement in drivers/clk/imx/clk-imx95-blk-ctl.c. Signed-off-by: Richard Zhu Reviewed-by: Frank Li --- drivers/pci/controller/dwc/pci-imx6.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 808d1f105417..bc8567677a67 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -82,6 +82,7 @@ enum imx_pcie_variants { #define IMX_PCIE_FLAG_HAS_SERDES BIT(6) #define IMX_PCIE_FLAG_SUPPORT_64BIT BIT(7) #define IMX_PCIE_FLAG_CPU_ADDR_FIXUP BIT(8) +#define IMX_PCIE_FLAG_CUSTOM_PME_TURNOFF BIT(9) #define imx_check_flag(pci, val) (pci->drvdata->flags & val) @@ -98,6 +99,7 @@ struct imx_pcie_drvdata { const char *gpr; const char * const *clk_names; const u32 clks_cnt; + const u32 clks_optional_cnt; const u32 ltssm_off; const u32 ltssm_mask; const u32 mode_off[IMX_PCIE_MAX_INSTANCES]; @@ -1278,9 +1280,8 @@ static int imx_pcie_probe(struct platform_device *pdev) struct device_node *np; struct resource *dbi_base; struct device_node *node = dev->of_node; - int ret; + int ret, i, req_cnt; u16 val; - int i; imx_pcie = devm_kzalloc(dev, sizeof(*imx_pcie), GFP_KERNEL); if (!imx_pcie) @@ -1330,7 +1331,10 @@ static int imx_pcie_probe(struct platform_device *pdev) imx_pcie->clks[i].id = imx_pcie->drvdata->clk_names[i]; /* Fetch clocks */ - ret = devm_clk_bulk_get(dev, imx_pcie->drvdata->clks_cnt, imx_pcie->clks); + req_cnt = imx_pcie->drvdata->clks_cnt - imx_pcie->drvdata->clks_optional_cnt; + ret = devm_clk_bulk_get(dev, req_cnt, imx_pcie->clks); + ret |= devm_clk_bulk_get_optional(dev, imx_pcie->drvdata->clks_optional_cnt, + imx_pcie->clks + req_cnt); if (ret) return ret; @@ -1480,6 +1484,7 @@ static const char * const imx8mm_clks[] = {"pcie_bus", "pcie", "pcie_aux"}; static const char * const imx8mq_clks[] = {"pcie_bus", "pcie", "pcie_phy", "pcie_aux"}; static const char * const imx6sx_clks[] = {"pcie_bus", "pcie", "pcie_phy", "pcie_inbound_axi"}; static const char * const imx8q_clks[] = {"mstr", "slv", "dbi"}; +static const char * const imx95_clks[] = {"pcie_bus", "pcie", "pcie_phy", "pcie_aux", "ref"}; static const struct imx_pcie_drvdata drvdata[] = { [IMX6Q] = { @@ -1592,9 +1597,11 @@ static const struct imx_pcie_drvdata drvdata[] = { }, [IMX95] = { .variant = IMX95, - .flags = IMX_PCIE_FLAG_HAS_SERDES, - .clk_names = imx8mq_clks, - .clks_cnt = ARRAY_SIZE(imx8mq_clks), + .flags = IMX_PCIE_FLAG_HAS_SERDES | + IMX_PCIE_FLAG_SUPPORTS_SUSPEND, + .clk_names = imx95_clks, + .clks_cnt = ARRAY_SIZE(imx95_clks), + .clks_optional_cnt = 1, .ltssm_off = IMX95_PE0_GEN_CTRL_3, .ltssm_mask = IMX95_PCIE_LTSSM_EN, .mode_off[0] = IMX95_PE0_GEN_CTRL_1, From patchwork Fri Nov 1 07:06:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxing Zhu X-Patchwork-Id: 13858828 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0BEA6E674AA for ; Fri, 1 Nov 2024 07:03:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5njFyKgXawlgZLv2mhYLuB2PUmPlGHQEDpoQ7jGDOPw=; b=yIpZH1TYexO4yn5PGBlTL3klie t3mi4kDwCKURNc8mGOZHW0TXhwAID1UocvtsuSZOzwQs3gozYfYycbmKleL6UxVbNYB9ue2scLkEn ZVP9dpSjK0IObsdpRyq4IpAhKiXLU1twrO33TqDltpGCQDx0AHlS+g527fwly9e2AMPSIDiPl6p6M ywndy+NzvlSQcdWpV3hQJRrEprb52lLpfaoUWdUkvJllto4ncaFVXk4yu9HinxefVjeqkLk1EfEm/ uSF+Pq/56tMDsfPtBs6+KA+ADexB88B9m1EfpuVpREZUvwXIHpjdlP1jdTNWg3WbBMRDm8cB/uDzi TDj9EBUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6lgX-000000062eL-0Tfc; Fri, 01 Nov 2024 07:03:05 +0000 Received: from mail-vi1eur05on20616.outbound.protection.outlook.com ([2a01:111:f403:2613::616] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6la8-000000061X3-0Pci for linux-arm-kernel@lists.infradead.org; Fri, 01 Nov 2024 06:56:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VJKxvpx+YO8mV0xZqMQIXB2gcHbE8hZpOOYYjRWS2un/bFjul3da1vQk6F5+HG1LBtVn2lQ/K26jNEb/yZ+JvlaleoxMFR3HEyNq58OTGpbr78fmLKRklN6pYUAncweNBsMUIN0fi5MM4WVnjWbyT/SlkyPM1P92ooD544ia5q90w4lMfzJHJe9QqYKEK+zqkJIdOEnefw0YVKUn8BUvgT1xuMxR2wEyBr/Y6AkQeM2Rxm4YN69nMvfHJSqx3yOai57VYTbfwTya5Rq48TNZ7DBK0SGM5pVpiT/oDI1mZU+ccqAZKPXqZj1sGo6DthdMjkpeRgpz1r2Ui7Et9IiRrw== 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=5njFyKgXawlgZLv2mhYLuB2PUmPlGHQEDpoQ7jGDOPw=; b=j0TYpWOeRHBXZdtK2gQqriNRec6J9NEahKYDYa7/ZYerx/m5h8YfnUAGwpVIDPIh+9EAQPwOwz0ExAXlzfbL6H+rbFpLojrVBTuQSoa1/YJUCUy7M8Hh7TZ19TIYAIhm/gPMpusjzhz0eyqup/uYdilzGUUVOwmBO5rQIXk3GYyH5nhhGMd3DzXeaDB4ZVz1JTZ8J03AeEcaG6VFyzWRfuWnOO8R0VYdQgvQxpNctRisow/+1MJlFBuCj13PjLYaEMj4K5TsEO26zLidwUz5G7sUSeGKrfendpT9M64LG5TyIiTYF0e30HzjdKOhvC8GZnT92GliC4C0f4qgmIicwg== 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=5njFyKgXawlgZLv2mhYLuB2PUmPlGHQEDpoQ7jGDOPw=; b=SpQAJ0exLOfMEYkL3M5KqHa2CNOhYwyYuuhRA2OKUIzTf0zJRjGhHMBsH1r3cOs+mjh4i+xKrEwPPOVzXMziH7/IkQ/HMd8U5+yZoyDnbE+l/tLCDHNBMAIz6iWGP7XFYUg6qKyxv/GoSbyfYd3zcq0qN0QWzd1/1bx5UAhjpoD9YoWXz9bB2iXeESJ0dHzBq1256yXcJtPpXxNrQWZBzYoso28mxCVqi1iSsCX+DjDTq57Nwk/knCFiTOrcfUv50vMCsyg3iTNVAKttCJdUs5dD2JzmmJE1d2PctaCQi+olasJ5Fnw+YbFJhqt6dpo3Tmo2HONf2hhW5cFroRK7Gg== 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:56:26 +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:56:26 +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 Subject: [PATCH v6 03/10] PCI: imx6: Fetch dbi2 and iATU base addesses from DT Date: Fri, 1 Nov 2024 15:06:03 +0800 Message-Id: <20241101070610.1267391-4-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) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|PAXPR04MB8573:EE_ X-MS-Office365-Filtering-Correlation-Id: c4ad2b65-6f72-4681-ba05-08dcfa424dea 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: CC0kYrHaq+g9susmKdrWdiNahqDpBTZdR1n6J68JEd45nUs3IyxMNldl/lIz1VhfWEXH1Yu3MrTu9b/UFri7LWpzwkzpG7K7AElf6ZI/tAb93KOwiadwNq0utDXxLIXwJAy+dT6j0I8wqXQkz7ohePQ+870I9n8D/gQqqhy3Bw8Xm3bzS5q/Bbgeo/wmFQM4ayuaI27S2DWXqIy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w6KdyKnKunSLn3tdk3ViiXgj/biFhtAlQMQqibCSxZ2ShIQyRVtP+4gF6R2rrVtUW/IJG3Mtyww5JDFufsf6aoVwjA938QNf/qxr0foh 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: KY/pAURqtkAbHyU8/6/QX67wCBHyCsNCiPkOjKQh+ovUEVW+Sk7NKHzdRsLS6J7e808f+gIyEAOOOeJwLGbbyUToRqv4KTKLpbz7hGj4GrP3WCGd3gO5vv567a0zxJdNNO25wiM2JeGg1KavNMY3Hhla2NwzYYz6MVXu8hKPun4KnFCzYg3GgN98ljiV8JcvN1Gr7M0hkujPg2QjdWXCS3CTgs85rJ4y5cCPT9TevYvuUrwlv267iGRcQ6Bb5rBNyeueS8TzTfLht39mMXmqby4KozHkzmYCrkQonordH1X7WEHe4Qj38KHKUAsqVbSRn70/CJEdNSlrou/goTTz4NO49W1ohjOtsiKmw24GlJjiXO83/aqX5eYcU4rD8f9BSf+gEEBskO0ad7/3UvOlO45DbOUWuD3EjrfAncLRDdEpYS0we53ugm13RA3p+msHzpigFXkHo7Axfa+2FKY02J75yut+fykPhuNk6tYaDlTDIUpT6uIFVcjxPDsip96uXiZsPrYypEqtw7iRuhqKJ7lz+SY9FLzLry3iMMMGDydilsqd8sTPffwlJdlbco4lNV2kVvR8A55TtFwucOA1ECQriBdKurgpeUAWxVS0UJdpqW+z6ChRXekIkwk7kDXS4E906r08i+QIxCPcEJ4Ur4Rm/Ow/su50IDYcaLQOsHKvtrgRB3hhRWbnrvv/IpvoqQVDN9E2DomlWo9GLnqmmw5+Vg2c9xPRRPBoDramzs8JNcXopsYlbAOC0liBy6HqHL88c0Ogj162LnK2ciBeu7XNF5abq5m5P++tQHNsCpZWaR7wr3W9nq+vE02inMS7jb3pjJhs1ggnr6CRZMPB1GCY31YBeGSnl/WNkMBcvucS+m4C3ZmN/cRjuNgoodu/RPY/4uobX6PgctxvOVe77Zcu/59lhNVkqWz/eqidlZVCD8gbK3REA7CYGfHrym1uqE9w3brQCr/CFPcuf0gqky+jp2894kyjpp4SWk/NYBspXbB+KUV7g5hC/d0raKHLh7iaTtyv8cfpJN8VOWNOkdYUOXh1hUH4hymAKMwlBDqWWaepO34FZBNV7luvMo+vGfVcMw1hODzYBAR+OISgW1YfJocn82PQQcNITvyxm0ObEaPn5ZVQsl0lneL48Y6M9GpjPidODxfn4dhR77JUo20zyRPPqZ1fIlWWj9ihjr3EAo3qkCkkpg1r8msqa+rSzMfTZqAgwfbXZw5KdsYNwc3/aEd6jJ6Ii9Eef9rRrx+0LUQCe0d8pbsnAZAd1OEqjhPR+UutovlfuggRERMTtA0Fw53k1fxKBf1kKk0iENRRZrLbRmjdXS9Ds2zb67eCDQWOLDlcKVEoFN29uGjnwq6W1MiXP9YXwR8BCbifm3Aprgoikj4muXfdpPXGlCVZAyZ86jybFGX6HZhgPDQf3P2AscfBN+umsbjy5uuY+w89F4i9wzxjuyO54l66y0phjC+JJnin/WfdgzsFSXyDRgbzZRM8ooP1K9wNxpHkXB5r42G66ZlZGZo291pZC63AeWBeqRy6jsI7gfHXPow3dieW0tTb3xN8B4Fu5cUhdChgct+dzR48QL0pDpvNx/Vv X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c4ad2b65-6f72-4681-ba05-08dcfa424dea 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:56:26.3916 (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: DDz2Z6AMQzqQ7V9HOAdaxAZuc0NKu8F2PhNxz+3x/uP4e9sWdwDLyTrSxTXqY7H/MO5RdMUpaypB70yKBkKppw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8573 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_235628_189151_0B0514DD X-CRM114-Status: GOOD ( 11.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since dbi2 and atu regs are added for i.MX8M PCIes. Fetch the dbi2 and iATU base addresses from DT directly, and remove the useless codes. Upsteam dts's have not enabled EP function. So no function broken for old upsteam's dtb. Signed-off-by: Richard Zhu Reviewed-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pci-imx6.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index bc8567677a67..462decd1d589 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -1115,7 +1115,6 @@ static int imx_add_pcie_ep(struct imx_pcie *imx_pcie, struct platform_device *pdev) { int ret; - unsigned int pcie_dbi2_offset; struct dw_pcie_ep *ep; struct dw_pcie *pci = imx_pcie->pci; struct dw_pcie_rp *pp = &pci->pp; @@ -1125,25 +1124,6 @@ static int imx_add_pcie_ep(struct imx_pcie *imx_pcie, ep = &pci->ep; ep->ops = &pcie_ep_ops; - switch (imx_pcie->drvdata->variant) { - case IMX8MQ_EP: - case IMX8MM_EP: - case IMX8MP_EP: - pcie_dbi2_offset = SZ_1M; - break; - default: - pcie_dbi2_offset = SZ_4K; - break; - } - - pci->dbi_base2 = pci->dbi_base + pcie_dbi2_offset; - - /* - * FIXME: Ideally, dbi2 base address should come from DT. But since only IMX95 is defining - * "dbi2" in DT, "dbi_base2" is set to NULL here for that platform alone so that the DWC - * core code can fetch that from DT. But once all platform DTs were fixed, this and the - * above "dbi_base2" setting should be removed. - */ if (device_property_match_string(dev, "reg-names", "dbi2") >= 0) pci->dbi_base2 = NULL; From patchwork Fri Nov 1 07:06:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxing Zhu X-Patchwork-Id: 13858829 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5DB84E674A8 for ; Fri, 1 Nov 2024 07:05:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=v3sL1r5PmjJpnf6mp1AfaQeR0TiNGX3bScEnLTP2+Uo=; b=sHCHxh48V8xLDzkIa+M9kveYJ1 Fcw26uBzLBMP8V6RKVUTK5FHBsrcY5WqGBUFNwLTEZJ61IKauKO5lpBuUb8QF+nEM5SwpPibNKCWt J8aemGVFhaRzEJD0e+b5+PEBqDBTi/cV3Ei8w0v6eiZ3WsvAMcUXR6bxiD5Yx3poThNPq2Fo4xBCu xc+XJwKyDS/Fz06s9V+lGNyeSt3VT4iElter4K/4NckTv4gpYRCV6X5QKPX6iQ4QwXaJhP9zfpkjY 8Yv2fTomdFNADwbH186Q3m+7QnM6K7YmpAQJ5DJf8djzXwMkBwOnqaQJHnG8CUyJJRmQEJ+4hSLJu wVEZb5eQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6liA-000000062uF-2ok2; Fri, 01 Nov 2024 07:04:46 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6laP-000000061eU-0qfE for linux-arm-kernel@bombadil.infradead.org; Fri, 01 Nov 2024 06:56:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=v3sL1r5PmjJpnf6mp1AfaQeR0TiNGX3bScEnLTP2+Uo=; b=WiHZw/aGYI1aoFA4xcpWMeTye1 Fj3HdG+GhN0F08Oa2zeFz4z2PLAIkSsStP+CPZsLDyl51Ys7mSTefDTBYyonvZt4v+Nfchs0Nx1Gd ESQPY/S0fkvZZdS8C6etjgaZ0BAa6p/HOGrH/tLn6owa9DEqJoGjhRi+raFUOptpo7nix0eJNyOiK GIWXuAllHwiJywIczUcgJ70QM6iGnrZvVdQFjdxFhKzjwdgNpkQ6nlo1Fi/W2H5irU7pTV+UnHfFR mtR8OfVliwoIZQoLEG6KSOv/yceia8KfKIYLFr9jUvBkjN0Q5tgBf6NjsMZ2+UZDwCs5QaEWaJfG3 LXCOx0Wg==; Received: from mail-vi1eur05on20622.outbound.protection.outlook.com ([2a01:111:f403:2613::622] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6laG-0000000AdCq-32Pz for linux-arm-kernel@lists.infradead.org; Fri, 01 Nov 2024 06:56:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qIz7ZVfqtSRpYr5XZG/vKLsYcVftZlKgJLcY1xQz9eSsW/Ifdq8prnNzzMKlC/9qWbUnrhIpbbQr911se5cYrGAsFk0JULT7HveEqbcspQBS24qFq3IXuhdkfgjaMrU5ajB0q6DueTCoe9Yn0Ts7yhCg45AVHLqKibPTnvbTW+aF39bDn8bJ6jmCKPyK7QW+90Gqhy/EgkNrDw8Nw17uSwCh7ScRcVTq3+PMPnlGNx37eMaxnfeDrS55r3yiL/Flbsg5oXPcnJuXsziL0PbPzIzYj8KVN58ZS2Z17pC8WYvi/l+0/cGW9BfvqSW2n8HdKvqd2Y3C69sn7wv7foMFxQ== 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=v3sL1r5PmjJpnf6mp1AfaQeR0TiNGX3bScEnLTP2+Uo=; b=ER+lSBF3r3aCMTgyKiAEEiEDLMTxhcArbgpKjyOK5r35dNquyg2aWJNJi9aD09/VVxy2Ku53r7jn3I8NxVve8qyrCtQw0QJin4ZdU5SESm66X6N/rM/wdkgr1ZZASX8lXF7jdtR2YQ9BhqUV1V7HxiqY6ezUx4QsAKOvN3aMFfVgdAGYVI6mEfvGVz0b0rbTF/AJogsvE9kCxrua/ZMJXNNgLXvJxFyJ3Ordafo23BY5WbVapfKvFqI1ncolY+fSNvydMqZ62FdA8kiQUIlrYQ5UelvLrCNcTyHoG147bYcusXuEWcj09WJVKk8f/INvnV79XAolsy8ZO4SU1hS+Fw== 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=v3sL1r5PmjJpnf6mp1AfaQeR0TiNGX3bScEnLTP2+Uo=; b=O2YIUVuHjNJo/dwhBnaMvXjoWLjfN6ngTIBDjeiQji2fjyJ357qgcYlqtvQzMrlEDsRV6D1YRE8lSC332z6KZa+grD27PZDN43kguNkWVXacozhjxxAsbPmwgiDXFx63AoJAfSv6Dqswt0qFyH2O605+raZY06D/HcH0BhCR01AGJdRXQ0mM779B3SCdx3FDpDPfBU/pj1HhOxs6eeEhDJeqnksjSonf3tX1a82d7S0fdCrwDJP3T9qgG6a6ByWuuK/2HwnyDj1WonfWeiQP7CFRO9neloo0/0qMqohpXkdRUBhAML9xoIgk2kcxxYV18Kt4tEtCSO4uejst3BlCww== 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:56:32 +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:56:32 +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 04/10] PCI: imx6: Correct controller_id generation logic for i.MX7D Date: Fri, 1 Nov 2024 15:06:04 +0800 Message-Id: <20241101070610.1267391-5-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) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|PAXPR04MB8573:EE_ X-MS-Office365-Filtering-Correlation-Id: 63c4728a-7d60-4744-5d19-08dcfa425157 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: WBxNbgvDm9eQHwE5xIbELQBVo52tXjXUOQQtFictzAhyMH3GCLz36us9kcywXGvVHlXS1ovANgLRVj287aYtKtNzKj5j4XdZQaxn/RA02mYv/YhH/XVFkhPeOtsYznSADY9Xg/1DuiAwJW0adiV9tkvgMaFpiWFCTgdq77Dqcdc8Zb4OtakoCecVk1y7aH+hHs62gONuxAKBG0v/SHd8dwmGMGqlPKW/qwaXeXqYNirmwDd4FNQCYI+2HSX7bCpkGz5vdWjAQ9vtWQ5Wt5m4F/zuxziMAjoRmGrd+U1I7RPjWLjoux4rqufrzOX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btuHwPjTSL 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: 2l+1viStw/9GXSeSI9WxTgyrCR/4rDOSnIDYKoEBHluRuXdTeFUNxJC9vldGPzkcK/9CLmK0MY0pO2EbHGlo8WThVJt1ha7aUmfYSEi3IDSe/P9RWoEpMi9/liny8sJve8rGYVC4eNkNRHdcZyaQ7/yw4z2QulGwAYVzQevs1SZg3WLHRouIIJGL7H9+786xGumFf5Mwz7dMkyDesXEqKD0mNTGcVwqFJwKXJw/KMrqqpr9O2a2L73GiWW1WCvTY1mvHP2lbc4OVXl5OO/OdMr/aOvSyBDjzsbhGYGzGC3hI8/3EEMTS3eUhBA6/9AmGRXX+5OK5YrKZM3gJR8hEABKT42gIxqUM/9JgOigDRJjD4dp2fuhhqRQ0sgPnWctlGG+bLz1CWriKf6QV3i8TVqyt7c1bHbaeJrRjYFKsaMOCl6dMQlNVofXgWl4Pzd08uahnpUGkT1cEBX12WqDf5I87eDA8IgEzIk5r797jRSamgDQvmvXlhYPUpQuEZXFGps8HYyJ2vVfjNoDj069JgOsCF4/w+pXHKgMgA0tctLFwk7H11A4LqcVjiljSE6NIPcrb6Roq4E88zmPeP6Uo2V1lAyiCpcL5zO6J48pgVD2FJs/lLGmYTu3+zWYoI3BN4f/f4JGXmuPJZA/OkF1/z0E9fPR/KW1MPSYtKDS5BfS3hpJyV52bH6TJCXLgJ5clkQHbZ5dqhvIbO+iHvGg9nuUBFqlaCFK2iPsOP05xcP5W2NR13OqbvyDT35V/k6ADfLFAtNmsw3F3PUrHKM/5Ncbjn1kGRs+wMzw5OdbKJh1DR6EWreCgFHnF2IGi/Up2aPvtXyAjNPVNPaV/VHkL0WmUqHEJDLam1ls1wf3w3WS/GqFgwQr0ECgmDNJqAtG3rtSkSZGgw+J0cNNJEZ9mect+eTmrbfOXDsWCmr0ksPmbuEitXPojDLzzZDh8nYQUOYc7qhggrcanUt7HyfvoGNZC9X6MiXFT2lplqrqb196WjNR5Dj8L8NpclJevy1G1OZiPIBa+447wnYsnevj0jgc07nR3pRMRdiJLmDwVearbVoVlWBaYrs5LFBj5Ha/nkRnqI4u2BxlDkV8BC5Xpjr87zjX2Du43zkko1lL1n88C4MqB4pZh+lsQ5NwViup2E7BpHNPRGRKzjzjFZIH3P608jHl1WH4Wgz0V+2CmC6J2tJECfHLeQg2XP7Qo8OwunIftXjNandd1xiGh2uJHU/bKg1oX+BfehCPCOzuQgcazo7JlhijT+2AIbUlJnMQ9gGJU7BTs1OTI6aIa9m8m4iF06hL69+hyH9SzdSlwa9QBw6CzcqfLJl5lnWE8GI41a7fC6QxQF38UxC3YoXCzK7TWuMmSUv22Twb015n5LQtPbElPOjr8DH+q+EXxct2EkaZanvQwp0irZPFcgqowO/unRjUUQGdVfMyK62t0IbaOI6O1tEBI745uSe54EAZBQepP7Tg2D67bphcR564IsYmAZmqDLAXbmnJF69o7MPC6RXSWTWKdNuaYNrh6XDy4h2wKPFRlNRLG4/x0GDSRY5p6E8QnTGP3NZGbqS3DT2Hfy9DDiVkqJ3ZID5drep7t X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 63c4728a-7d60-4744-5d19-08dcfa425157 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:56:32.2581 (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: SwLWsl2JEdKAdXBUb5tS6bNfvWcQG+JJHGekjAZA5EZKvmSsaGo2i9+v3zFk5GWfw0z6hfARCtStqNlLkJv7Xw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8573 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241101_065640_350955_D4DC8409 X-CRM114-Status: GOOD ( 14.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org i.MX7D only has one PCIe controller, so controller_id should always be 0. The previous code is incorrect although yielding the correct result. Fix by removing IMX7D from the switch case branch. Signed-off-by: Richard Zhu Reviewed-by: Frank Li Reviewed-by: Manivannan Sadhasivam --- "This is just *wrong*. You cannot hardcode the MMIO address in the driver. Even though this code is old, you should fix it instead of building on top of it. - Mani" IMX7D here is wrong athough check IMX8MQ_PCIE2_BASE_ADDR is not good method. Previously try to use 'linux,pci-domain' to replace this check logic. Need more discussion to improve it and keep old compatiblity. Let's fix this code error firstly. --- drivers/pci/controller/dwc/pci-imx6.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 462decd1d589..996333e9017d 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -1342,7 +1342,6 @@ static int imx_pcie_probe(struct platform_device *pdev) switch (imx_pcie->drvdata->variant) { case IMX8MQ: case IMX8MQ_EP: - case IMX7D: if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR) imx_pcie->controller_id = 1; break; From patchwork Fri Nov 1 07:06:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxing Zhu X-Patchwork-Id: 13858830 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3570AE674AA for ; Fri, 1 Nov 2024 07:06:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=cJ4AWKJQYx6MGwApq35FxOo1vwUb6XN2S7Q81H6cK+Q=; b=FnHw38os6f0ZDoHzbxVR3HZiqE QWb5QbII2nhEjCMp+zwtGbDNBuUqJlx8bbyBUCZlkHevSQuPEhlRswteDAA6xUuWmftFAuLaV/4R9 GIyfno6yyuHasLs8FT5Wben3LiMtfSGEVGJVrYymEKHwIodIbAcoEgKvaJC600bKNqEtNOAimYF3d kDzFgRyw1zbzYMSdPPv+0yAGyM06Z0HBIFmDlqCXYDeJjImb6sIKHYVOpvcXznFdE1zT9Dys9PGgM d9fDvfM8qRIxxy2fqp5c7joa93EqvwZ/uTKTx+Y4njjEW1fZfEQ4gSvIYf3LbfTlZEJZ1FlHaJPXO fx40ARlg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6ljq-000000063HT-2gWQ; Fri, 01 Nov 2024 07:06:30 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6laQ-000000061f3-3BI3 for linux-arm-kernel@bombadil.infradead.org; Fri, 01 Nov 2024 06:56:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=cJ4AWKJQYx6MGwApq35FxOo1vwUb6XN2S7Q81H6cK+Q=; b=qL1TYofU4RHDfG0CHhCaLHWQHm A4DpOx69cB6jVA6Zl2xfnNZIrhm3d7qPKp6+jbABA45iMzMSY+P6iZxa+aB31tri2YEjeiQZ37k3s cVcn+Lzm90oUMoy9bEiKSGAnMgfUIbRF3fzlNnuTFoySDRwtZakFvfKmrC9G0OE3+WdeP3JypnejD RYmJY1zQvNm3/yXs9XcSYEJ/RTbE8fE4HsG5HqUS50uoUm2LWAG3gfVJVM/NSmJ+Tu/aEGHL40LM/ cK73m6o+art234ViF6pXnCKeFQvjXGUVuSvqTqL9kWob6t2GNCbufRGzmf/vVJTTcvfHwXvdNyT+L xGdo3QJQ==; Received: from mail-vi1eur05on20622.outbound.protection.outlook.com ([2a01:111:f403:2613::622] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6laM-0000000AdCq-412p for linux-arm-kernel@lists.infradead.org; Fri, 01 Nov 2024 06:56:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=j8hCi/Z39s/USqlMxqMHWeIWGkSws1InpqDtVsPv91H2cDQgPLY97UShVkIGQLgM+7B6+u8TAr39FQerke22zHC+bTK1T9PNbVpO4eU0Zcr8vviye9QR8/hoivFI/BShMMyLTZSNwMWMO2DS6Ei1A0pKgtNCIofWXono6ZrKM86CeJqdNsfoSMrnS1gJOKBI62f0+O29Ih5chy10o+o5UH3MqfICQzslw1TQchGiceQAzdAP/BH7gv7741sSR8xYXYnShGJZ6ZVJTqJgkzvtdVG8GFjYrFf+T5GAAwGiYHWGBq/yaDDJ/s4MBPngICQUWkmd/ieR/0xqFsX7WhsDaw== 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=cJ4AWKJQYx6MGwApq35FxOo1vwUb6XN2S7Q81H6cK+Q=; b=OgPHvXtCUM2ncfU7WQT5kiFCqyGQ46YKm9NIcbNMDw7dJmyycIIZbeh3R6sj0w5ugBWrgKju8iD/exsUO0fZz2BUEJ7l6/Bl0CyaF1rHazFIggKhMgMc26OWSwDAd1M5RdivhUeJeYJO5pD4GkFC6q9Nri7i7XXsOSrgVUqf8WCNqrPC7suFoda1RwzMnlO4/h18TQCAjzW/Vj6f7OzhN8us+8Hb4xJsJhdAiqX2/jr7gKzF1JHgyE/nXoW86Ip2jhviKy0MdlrX0Zv1hvJ0nHXkhRkqgCtUGOq+NdCyeoFtTdC3yqaJr0L2QxNt9GnoCm9EfyIk0N2IcNXuJ4WY/Q== 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=cJ4AWKJQYx6MGwApq35FxOo1vwUb6XN2S7Q81H6cK+Q=; b=HmWYbhlV1NPq6Qslq+xPq77BYKvMPygR3m01vXnL/56ZsQvYpJrg59+8H4P18FkU0S0k0ga8BobHa6q/EROTbyRFAvQgKqS95oTK10F3eCCcxhVpZryruchqxGEQY3E0d/XgQRo3UlTm0YQr4V0xNUH/7Rvy94NLg9avtSmtoP/va6x0/xjQo+qDCd0q9gWLZsRIFVc5oJWaCuA+rF0AJYf/NIFkhUPykpo41Z00Y2nxOFMt2daRH5HuwEojkjm5vAFiuGRLhDKuT2kvxdN9xeoWN/HXVRe5cdE/dDyNq35MsdBrLLxkievDP4G+1gv7F6cRdebuFJIXrgQ9FxR5Ag== 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:56:38 +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:56:38 +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 05/10] PCI: imx6: Make core reset assertion deassertion symmetric Date: Fri, 1 Nov 2024 15:06:05 +0800 Message-Id: <20241101070610.1267391-6-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) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|PAXPR04MB8573:EE_ X-MS-Office365-Filtering-Correlation-Id: 7726b88c-4082-4a9f-9596-08dcfa4254cd 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: Rs91054BNiSEKylmK83maj5rHjWiOU6/xHh1yyffuxu3bbWa5M9O2z7cCUpozOyk/aFIi1iBBxgEN/UY7U8d/OK321hzknwYg5WW4TCQ7WKw0HGlUY+cfXs5cIcLZifLley/sQrJ7cIrlJC0oih3kkoTRWdIfBQnH2ggAdHfxfb2NRICh3QxAV100aiLJRrGXWtPb+hS6KKxaxrn1na7ONSGSqbIgxDd3f02JgPDTp9jsAldZ8Y19vCNTJRCrQMrxshyrJCIwEvq78dYyGJ40cNrsD9fz4mkcqdjerKjiL1NGRd/DW0gD9YsPjG0dNO4mAU9Gw/q2hiSjBe403KgJxCrzmcp/YD/IHdOJ5O+O1dUpcKD0A0Lruj8Sqn4vWDxaBsFEBjMbSxmqeLSaCDXWLeeRp8UI4Eeyc4RgHqFdyb6xKCWnw0qrcfxNGN2+KztV2WEiYBKkwnh69GFishbb7V6tk3MFHbfTB4Sdsz3CaR7pl6owApopmXTgMAISrBgRwNL8/x3oMoWfSOy322VUjM0FNm+OjmwLwWPAYn486IyDLskxcTnzQo2iwwQnESBWgGiZqsVa+bThaibw7wEE5OgXuUhuX0gUX2Rin0HFnFstmN6yLVByZl7gv+f87Zl1sv3PNCO1mWlLhOLMILXGmPHlFvYT4T3G4f7WJGMXF9G4i8ampwGc1f7XecwBf5l98Vy7Nfvz9Uh1xDTiWzGdk5Z+GzAieu8+d1wbhxnaTtcN4xrfCNQ3fRMl5Cc6SMGLVD8V27PEF5DkrxPOvrmTKZjUqysp25KJpQgoBF/rxV8tlwk94bV06T7HbdkRQkcpG2mZL/R3fMjUIdMZyc4Ysmn7AB8vT4S7IvjxKbKOv3m/Qdr/ALYQ2Vx9vox/ql6tEfrIwprd5VCMWG51uRd+L0FmKBF/8bSidP33tnkCtPwSHiCAwNfXI04KXihtclOuS3dU9DzT53cdRLSOtvZ5feHLbSPyadVSgHoT4iS8mFexmIJDfqhiI7StxVKyPMajAxXLRBY4I0z3CSlUwJiEAtH9HzhQm9C7r8JWWHoyiwcovIEDB0itsP1jFmPuAYefgBfUQGfbRwpdQ/e8W58MR0G0r1XcCaYr/hXIfkQASq2B22LoamsntRpAxBCjgcU184dxlMcUYC7uBKPjxV9SaHvpsSd+/FxyJG2w5qzOzyt/dlGixO1plkr9r4sdP/Y7ey0gM0Zd5Mmn0B3gj6NPU5EPBLjbodgNQ0MnICW3K/1bR3koDcT4EQEyqR7po43wm4tNzAHVFIls8HBd8Lx2HUN/X6M/ThCiwOFX3REHsyNpxll6AArJ0/6NYjyBzWAhqprHySphow9JIQFFxtZuXDN5ZhNJZ9hwjmtFLKC4LuOf3pnxXQzaFEYIF+VxtB2 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: aIELDEFEq3T7BnJArw8KS1DXbzemiX3Tb7s/FWffV0W4vXlYojcajyRA8MuJZ/sAf3CUkZhAUiVbXV8ADRQVl+AxcIc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eW9ksktlmrH2ltGd0of/jjOhWlHQsxF9d5/GHi1ufVIcR5qkxFLzsmgiQD87UlEmI8DfYPOzwdOFzPTjE5YbLpEWULuTcNydgmgabF+7jJhl7GjA8wuvzClx36sdpV3ewwclxbRau5CrvebhAuEUIQ64jpuTVZULPaqyyJtTnRm0/WMJ62YJ18eIsPMDTjOl3JhCPMzRzZ6qj+OyX17SN4pqtQec+7IaMuQFQO+aeAUPI68Ahn3OA7RfrFz6zZKKie3p8qSQkWSdCuKJEvA10MTdy/WmyxMpkd3lgmv+Tmaa7oWsT2W9c7bKN0nrD5Hn1kW1DM9h/FjW9WDJicR1CnchthYX2rqvD3hyQ+dwMZTWU76953aKHXdc6qEjXLSqKgdkvLY8Lvgy7mnAHpAjGwO4cklZLGsQrD+ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7726b88c-4082-4a9f-9596-08dcfa4254cd 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:56:38.0858 (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: 72ogwNrMVBlAgXt3Jrsdi7y5VnehakZ1OBQV6J1hIIzfiQUMZoYJ4Lrbj8YSY3RyN2XwhGp32kkiYlrQoJ+ZwQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8573 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241101_065643_703756_90FAC723 X-CRM114-Status: GOOD ( 10.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add apps_reset deassertion in the imx_pcie_deassert_core_reset(). Let it be symmetric with imx_pcie_assert_core_reset(). In the commit first introduced apps_reset, apps_reset is asserted in imx6_pcie_assert_core_reset(), but it is de-asserted in another place, in stead of the according symmetric function imx6_pcie_deassert_core_reset(). Use this patch to fix it, and make core reset assertion deasertion symmetric. Fixes: 9b3fe6796d7c ("PCI: imx6: Add code to support i.MX7D") Signed-off-by: Richard Zhu Reviewed-by: Frank Li Reviewed-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pci-imx6.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 996333e9017d..54039d2760d5 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -772,6 +772,7 @@ static void imx_pcie_assert_core_reset(struct imx_pcie *imx_pcie) static int imx_pcie_deassert_core_reset(struct imx_pcie *imx_pcie) { reset_control_deassert(imx_pcie->pciephy_reset); + reset_control_deassert(imx_pcie->apps_reset); if (imx_pcie->drvdata->core_reset) imx_pcie->drvdata->core_reset(imx_pcie, false); From patchwork Fri Nov 1 07:06:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxing Zhu X-Patchwork-Id: 13858839 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63801E674A8 for ; Fri, 1 Nov 2024 07:08:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=PhB8QtG2tC+Dal6ySXWZu5Q1GF8YJK8C0Vn2syd+1h0=; b=G5Y6XI0puGJj4rvXoFxq5C/EJw AAGNdyFNEGmmD41FApPHRUs6YiuiPc24KclrNW/1WRYNZKjdIlrD6LbIUaW2KhTengZbZGhCOIlqV 9nmkcra/gafyEYjagK8OEKCuqJ7pENNk6+tv2sshwrmfy7Q6UASDF4O3DtQ5irumrf2mj4mDR7bAH nP4Itf9o9VWvmY5B5qIkZFcifhm3pv7B0dS1wRJ89OSxXqKk+0mmf5TzyWpkyYh12rSbwhbNuREho /j+qqRWevx/e+v5YaI0nyTHvbAbnMRg7KqL0jFdy7e39aa076xrG0oYO6cuI9OfBMJ1aB6cjzUjXX eH32nn4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6llS-000000063RN-2xj5; Fri, 01 Nov 2024 07:08:10 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6laT-000000061fP-0yrT for linux-arm-kernel@bombadil.infradead.org; Fri, 01 Nov 2024 06:56:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=PhB8QtG2tC+Dal6ySXWZu5Q1GF8YJK8C0Vn2syd+1h0=; b=LBijMly8VSImuQtco9Zne93kJq UX94HgRD+tqOOPfIDuXMnMAYqAJBDUHc6TgtPxHwuJZcrfYc+jBIRFa89nFnZx3+nBmoxpxvSElR+ yUQYlfNIHQA6gm8W85wmv/vGakaVOXAuDU52ukIi84PLuJWIADdc55i0sRp6YyGbmQUhZ8LUPZybc 5UyX9UMbNxriekgY2RA1T8rNRlqZV7TsR4bD9+gbYrNU12/lj1O9T2SuWoum3Urh5NwP9VvfqmrwK KbAfZL9UA018ii20VwBrsT2AbDwMPn0l6cmSSVQU/mGn0YF1Y31dJDJD3uBhA22ub3rP03MS6ITcI OR1dja2A==; Received: from mail-vi1eur05on20622.outbound.protection.outlook.com ([2a01:111:f403:2613::622] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6laP-0000000AdCq-3sRv for linux-arm-kernel@lists.infradead.org; Fri, 01 Nov 2024 06:56:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=p5oYdfmE9DztpdFSNxMQ3ro2egByYpIAAii23fnD42eYaRdGyKGvruWCn7iz844yO4ReYXxClU2nGW7j0v4kipshUZFcOGVV+Ok6+YMIqy+dvNnL7YYunCAXVyrnOYDaI8oLb50X36ncDR4ogsZvFGEHDDvqtOWvcSnxaZZ5HePPCYN6LUt3nS/LCBx1+85ruqIGZ4sjaGT8Gj4+qY3LNWHUKNLylTSA6xEN+kbLfIfDN8tmbafI0xYpsBtMUkiBGXjPsLw9NKGeqfBZTHU1j0e041kJ4JrifJhkK8a3OnlDT2j1ortwrJqBi3+i7dbMaXel5GHWff8lvf77P7njOQ== 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=PhB8QtG2tC+Dal6ySXWZu5Q1GF8YJK8C0Vn2syd+1h0=; b=no1tIWqCuSoRycEuOQRuS/blvrr8rt8WpRQa3BEZtaVhzyTaEVWGsdG02YioXUxStei9nKIGy4a8glKJZJc2DFqdTYUys6CiBm41JAz3N1+1FlmuOvcgOB52XRVy9FBInTOfZUsRwrIT+JUIV40dXISj6hEjkHF5/KCsoHwC/9wRuVmpo9XDrZ15gh7mwVgF/oViAk/1jWFgCoxpfjruKMcn6R0Fknc0H5cUK4TW+nTFqPCIskCo4UVrJLmva1kpAq6WZlkPbZMlD8Wvnvnsanzb2L3HqdFEFHDjJD3r4RcXKoytd3Zhbf102wLdZwG+dkOARv7mrzgBhTL5b+JuHA== 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=PhB8QtG2tC+Dal6ySXWZu5Q1GF8YJK8C0Vn2syd+1h0=; b=ch9jeA1E7gn+viTvGvEdtrcpV/KVNCYiqhi5XMInzu/N8epZqwyvSTiUjN4vyhDjrYWyCTS6u0B56Z1OB5KTqkkXutjUKZgVNF5kBE7MFXCpNJ1nHDixMZyqTdtys6kqsCyg7SRk5VDnQaif/ih+8ZizC/lXhyYYIbynPH7ixLifhsr8htR9Cjj0ZhTZ3GQnn3L1853ID+rxvr3uZ0xr3PNeQnMNj0zi//TSPNmCcfbbPGgQ1yN8mkuNtml4oo29arqSeftjcJQMjD+CJGMqJVac/6OhYWWfBWeFFteGj4upsa6J7Rlm/3YWsU9LZSzWQCbY8tmh5f+fbeYT82vwSA== 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:56:43 +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:56:43 +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 06/10] PCI: imx6: Fix the missing reference clock disable logic Date: Fri, 1 Nov 2024 15:06:06 +0800 Message-Id: <20241101070610.1267391-7-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) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|PAXPR04MB8573:EE_ X-MS-Office365-Filtering-Correlation-Id: 3dbca084-b88b-40e0-8c38-08dcfa425846 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: 5TjQjVcHRadEFNxw6zcCehTWnexrtub7wvXhLqkUS9ND/D3ViDhz/F16d9LsU0bWaA6dSpwEEI4ggEvdha9RglGA6xwlXJm8PjT3MUjTer+m7zaFUBEbF16RiYmy/r037kGaiFuTrKWH72uIRZ+EUMVJMccvvCdKEmXTOV82uVxBZCW2NUO3JF5pBeVMBXjtZ/SZwnlGfoAkrdwkbU9Pgk6mEODZDu2CNBSxVlE+OVQoYlimdSGbPQRTwuS2+xU2v2TN1hEi8a0r/V28wan22/MKS78bnj+FZEec/ckmFj52+GHCWHvYjD79ZMXH38vhtZhyIooGSTdgGN8Dx/+nYdMushuqr1OxtP0vgXeENRkeVfHR8V+/gO2k8+j4MqWUnXHa2T0TWLg+DK56bHR1WpOsHQYYPcCnn410O4b/0qZScKQvNek+jcKWui6spylMkqNw5iSImKsaukPEy8GBC+l3IRJa2e/DLGgUWLeNcgnvMA+OICdTPNKnuGC4cmAtLm+E8OBC3eqghDslf5Loq+WgaJEs0cZCIbqi0vvx7kOHvEJGNvjz5caPY8hLryH71VwujeHGaTvIs+/ZYvcSpBXROwa14tQyIG8rgWVyk5zq6zqP8FTj7m+IpFBL4jsa6/+b5eK2MXjze/d9iQT8CCKzORGBG/h0JeU3SlzSD47BKSSGeqtdo2cKyDY3KzR1S5Z7piblh+wSu72Zcdl415sbJVrugyJbF1TDwy8TjNEAnbGunLJ9v9FC9/53Y42lgmn8FwkxvZHI5Bt4nveMAljQkIAhW6Wbepuou9GK568m8Fp3Td5xlp6qnLHEvqW/lAtyDI36OO5E3wy0sxzZQMysDk8RS8iqnswBDabmeF/rLcLI+BuaFbppyrJv+toe1fKcJ74yPR4axRaWw+x2BMSAK3w/jv5CnWIwk7nQ3jBkSKhInN1SaAmQErNUypY705hgeCHWkrbQXUqPoIo9Rg3cJIpwMAjSSiG/7vcquMcRVoG2+cZvcupDm7ttHZ3OI9mxnYDvxvyZ5/80TwWNmNn8qV3FS4UKdlcJk5DRp/JPzs978LM5F8hVMoGiagNgDl2Z+YG7Zhp74owVZJPbF9rNxZgy5ky0j0weRAviHa7BpxFSTT4Zb4yMVgmQwWvFnNsyuKSKU0wdSyyjqDoapWeyLAgCjNhIVLy2DL/b4Hy+iPPsdD221m+QJ3gPHmEzH/u0zVnQikNPlGXReJIV7vF7I6ORdATOylhU2jU4ClqOMk1WHvBA/mXUtbIW1xISKRK3SkfW5NFVwY7NV6l/jytGq2ZQqvdcLpaT8kanVS8QfZJxrB1vRWggv+pkkIFsZ8KjMY7nkLvz/dm2ofVtkyFpfCdg/fPfh5n80gXyuKyU/tMoRmSnu/1Dk8W+IXiv 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: li46s/iRnrx+Fb+vOb7ZKUiUbBWekt9jkoovAcPGt2f96OoO8YnbwNHmSW4Agqav3QS7f/7mJPtevbxD4RvDFjY4j/fIq4IZW7aXsHIWN/icAWu/lcNC5T166Ktf/8MfiqvEP6d7DmGb9hwu+dn/4L6Yfo6WNCub00kGwaR8enR1TO8Z5RXvtWZIwsNRKdKHYuqw6qAlsp66CmvQjsc06kXIGYJgQoZUOnjXl67lU5x9ISW/VT/d5mjl59wAWqwpaWoBm9itMeZY9xwRP1bH1zPL0tsmtR+yQRcw7K7sf0LxzgKDmXFZ3OzYegMAuzCC8Iu7BJtCZBvE0DhRc2kYiifIhqk6uFXfibSEhXb6fOBvzCiRwKm2H7y0QFdOaC0lkVez4L8sYBQNixnpktjWbGSirtJthoAGpGwkTAIm0ltVNXXZ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NuVNqOCPu7PKxstRBmgGz8TczBXx5/TnU5n7+nALnkFSCrUAdXVIdIUfRWA3zPB5L+7Ejg3KtwmvOcXXSXX1AYuHZeO3iLGDmTL X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3dbca084-b88b-40e0-8c38-08dcfa425846 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:56:43.8230 (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: SQ5DZ3ERRQ0kYePRfY3KxpH3RLmMbLWzFIkb3ay/JvY+Bzct9DzZHWjuocCjnjiPaPSXD1851vLU7aNTMcKvnQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8573 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241101_065646_328679_8C9E9444 X-CRM114-Status: GOOD ( 10.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Ensure the *_enable_ref_clk() function is symmetric by addressing missing disable parts on some platforms. Fixes: d0a75c791f98 ("PCI: imx6: Factor out ref clock disable to match enable") Signed-off-by: Richard Zhu Reviewed-by: Frank Li Reviewed-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pci-imx6.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 54039d2760d5..bb130c84c016 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -595,10 +595,9 @@ static int imx_pcie_attach_pd(struct device *dev) static int imx6sx_pcie_enable_ref_clk(struct imx_pcie *imx_pcie, bool enable) { - if (enable) - regmap_clear_bits(imx_pcie->iomuxc_gpr, IOMUXC_GPR12, - IMX6SX_GPR12_PCIE_TEST_POWERDOWN); - + regmap_update_bits(imx_pcie->iomuxc_gpr, IOMUXC_GPR12, + IMX6SX_GPR12_PCIE_TEST_POWERDOWN, + enable ? 0 : IMX6SX_GPR12_PCIE_TEST_POWERDOWN); return 0; } @@ -627,19 +626,20 @@ static int imx8mm_pcie_enable_ref_clk(struct imx_pcie *imx_pcie, bool enable) { int offset = imx_pcie_grp_offset(imx_pcie); - if (enable) { - regmap_clear_bits(imx_pcie->iomuxc_gpr, offset, IMX8MQ_GPR_PCIE_CLK_REQ_OVERRIDE); - regmap_set_bits(imx_pcie->iomuxc_gpr, offset, IMX8MQ_GPR_PCIE_CLK_REQ_OVERRIDE_EN); - } - + regmap_update_bits(imx_pcie->iomuxc_gpr, offset, + IMX8MQ_GPR_PCIE_CLK_REQ_OVERRIDE, + enable ? 0 : IMX8MQ_GPR_PCIE_CLK_REQ_OVERRIDE); + regmap_update_bits(imx_pcie->iomuxc_gpr, offset, + IMX8MQ_GPR_PCIE_CLK_REQ_OVERRIDE_EN, + enable ? IMX8MQ_GPR_PCIE_CLK_REQ_OVERRIDE_EN : 0); return 0; } static int imx7d_pcie_enable_ref_clk(struct imx_pcie *imx_pcie, bool enable) { - if (!enable) - regmap_set_bits(imx_pcie->iomuxc_gpr, IOMUXC_GPR12, - IMX7D_GPR12_PCIE_PHY_REFCLK_SEL); + regmap_update_bits(imx_pcie->iomuxc_gpr, IOMUXC_GPR12, + IMX7D_GPR12_PCIE_PHY_REFCLK_SEL, + enable ? 0 : IMX7D_GPR12_PCIE_PHY_REFCLK_SEL); return 0; } From patchwork Fri Nov 1 07:06:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxing Zhu X-Patchwork-Id: 13858840 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E5772E674AA for ; Fri, 1 Nov 2024 07:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qOQB8+lxpRTrRQGURLleiexkZvVL/ygVuQk9OtCL3Fw=; b=TP6U5Sp33yt8co6iE2fkbmKi2i p65Dc+1JZjopKCx8S3iV0GWTwp1fq1RrtiAn1rPk28EiH7YCPgao6prvab4EZfzam7i0LX+KZuxIE DlR2ULdcjsNB8ZMlWi85luv7jT223Jkgpt9UdB2/mqq/Zca8BFNHNk9Nub5omJg2zkkbnfn1ZoqGz VJvZaP108zqaCXXIO7LGJEGzG783B0S2mmdTpea6QIaZlboqpk7l2ILmQbTHCDjkxHaiv0VmcEL76 q0c6zkQx0AI/kmw5JGyz5gRQAy/RCSsyYRLVa8nUc3yYJYhJi2+4bbtLwNrhdbC0vPOMRE62mBgOn epqwGaAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6ln5-000000063bf-1Z4u; Fri, 01 Nov 2024 07:09:51 +0000 Received: from mail-db8eur05on20610.outbound.protection.outlook.com ([2a01:111:f403:2614::610] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6laY-000000061hK-375U for linux-arm-kernel@lists.infradead.org; Fri, 01 Nov 2024 06:56:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SpbgjnhMbkl92/DSzv3Hgj+LU5ufFDDIOFbFKmsO9R868V0rABftHguyFbw6pBVsR+FI0UVSd8hYBl0juCHRqi4m/ensB4Mt0vAz9UXCNHhB23Jdg/efI6hQ/IRz8WzUGBZpbbjsWGY/k0BlQTewmYo68FKdQ0CGu9Ya1ONapUMHbkQoeRnXSIIZquQMv0Fz225CoZzwPjTmuIziqT8FKFKtMIqq9TTiQ9TA92KVHE/LfcJQ5c61Q8ulxTfIPEQEbw6sOCxX9zi3eWnW0WjlHStfzr0yWDrn3DYu+Tll19nOlVJkTJBXLjZeRJiH3dVaFFm3MjxurG0Ii+gTdX0aKg== 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=qOQB8+lxpRTrRQGURLleiexkZvVL/ygVuQk9OtCL3Fw=; b=CKx57XQvYKeOWXtrdKofmRv8otuP/ULYcEu4/IA4rvxCBunRnSIw3P6x46qILB9nw93HuLJdPakuFbbUOm091Sz+YFGAunA0oqJ1MNyKH2YATf/FP2T24K2MczHtyC64KihQxkCjZghjcwVJSps3hWhF++wMeMNzbJH1jixgF8EjL0kx+wBpzOkEbTB7XGumPP+q8PGQk9MdocDYganEU0haqkTNpB+4C1wNL6R96pfqD1iPMab7HH3PfP/6SaNEB6Gu3yM1qnzgHLvwiOzvB4dUfoE6oGIUIltUN83QRU5V7iadshQb79sR4BLKj2MkJbPfZRdggbDpikOU34Zjsg== 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=qOQB8+lxpRTrRQGURLleiexkZvVL/ygVuQk9OtCL3Fw=; b=A31lf1BWd/OnYthtCz17OShE8HaQiFKSIl2m4XkBgL3XWGcZ3Rpg5Q8zqPQAsmI5yPLzYN/l0O3qh8EduY7s51NZuOLW/BDiAp4dri8nwHS8n0t9bnelDoakZQZ/goPfjrlir4xdM2xDR/EUeX3xVd2o89EiFJmXPuE+SLUAIAuXUQipa8CnngcPnDmPFOyvHcvfT5rtZljUsDinZjnztaJQnCQJtmx0QMXMbpw2UnbzOttbe1uggdhtXQ7AFkPAZORmuGKuVQgAE6svnhywK1Iy5DnDwSJEOLEklTq/afh9B/I6iglG5+5ke0MdJkFiLAaT+w/pCGlma21dVBwOSg== 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:56:49 +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:56:49 +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 07/10] PCI: imx6: Clean up codes by removing imx7d_pcie_init_phy() Date: Fri, 1 Nov 2024 15:06:07 +0800 Message-Id: <20241101070610.1267391-8-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) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|PAXPR04MB8573:EE_ X-MS-Office365-Filtering-Correlation-Id: 15ceddce-c3e6-4a91-830b-08dcfa425bb1 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: qHEJRSD/qN8SUA2XXG1ePM7MMDc0U8q9IzVNpP+ZtdERzOFRsmTSKkx4NzWvnRtu7NjVEaoCutuIamX6DbmoP1cTvOFAb2Z0U/e6O8o8ScO1bSDmMV8dX7pL0T6/SMin+5R61vWZeiplgKItCYOo+3hzS0J/YNlwNFAolsdMArNLXWjWgx89D9oJ6PJtOHZLq6vNv2Q/+jI7Q8DoDtjcOyFZokghYgzOvbljYfWiC9tWSz71+qA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67EkoiBI141T4f953+b5N0ahF2aNh8XhG2JYomMAGQMFeb8dqBcGXUOIjB5Qqq6fPzX4L4M7LS0 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: 7KdAejRPsMlA/AAAcpa/fSMznB7rdlc+9PnW/Z42sz7IMvoqg0HbALpHKjPebDpWODqCR3KZ2PiqJadIN3mYkfN23ymfno4O/gFXUvrrN+GauREEkSNcTsEfo91Ze7hNIl3gRQLbjp8XYRCy30+BHmSIAejhWhnDYZbzc2y2qlJ9JEwfvm5Nsjk6KEA9z0yricMW2OS4XZPkgK68vFHkDNDo5FTupHY08ayRZA39Iw2DCws2HDIJICOfT2oz4ks113awvdeHN2VGtJVBh9LFgJKXJFfP0aRTsBW+Px4Tbuvexy17uG88EQqacWUufoeaTPwTfdZKeN5DR4UjP08A9j0XjqTN9VaXikM7n4nzynhRGOSTifa10QL5RTmmty79N4xPU1DaD8X5+lB2ACjNfHYfpeBFSPkLoVSMYiolFlaIAizRtMHjFzshZvO1BpGpli3QbF/ROoXICV8A0UKduxzLieFBef67xQ5d5nVBAsTiZDmujXUNQNi+5GSG1ubdPjpoBGPcR3BvxleFSy/z1kk5VUZY9zBXwldc4q1kRaZUuSLwevRSVQkoq0QTP2cWH00DL7HAEM/AAgC2Jc7aDa6n7rXM3J3bfn1pzMg4fCnF9gN9sXJAE3EKKTSztBpxuXmUgyhu7JWIDELQENoID5fHdWpgZp7eqj+Toafpx1JE13Q/rsBv+V7I6uRUsNA3kH2ZZQ/EOB4NaMuhjO2u4kLnbzb972X6JgGn0N8CB2wAB6IUj9MOpj96BVfDmwXb6rAsT/M+UZKDc4EB+noiS5n4LhewPKNtWW2o4/Vb1Tu9oIVS+fQcEa0lY7cuHr4Pw1wKAvCawRPhHtJD6EtPcuz2dEzEbh831za40gvuwij6YO7swcO4IaqKlfR8TeZ5MEz+4OQ4jsCF7XNUcuAPi+QPrI40VR/Sj/LhzjL5lTdeN7DSCpFCtL99QozXQYDmMhsoQaNEmpzRUWNuXznutOa3f77mlujVaQyQ54azg2BRd9TDuJbdLEmp5gPhkg9VS1FsAGjUHLa7bcuQVGjeDci+/V7StEPPfXe+wCYvHEuIRO2XfduwPk696GFevLP2HWzBv97laO1Xl2IcXiXYU2+vJpzyjCZvSAuIRfo31iHXRdQsQFniVTW0WSlUPgMcfYOOTVuvVE57yXOuleoR+olDn3HBs3qwhXOJ8rPR2RuSZJWV/njOOacL8VESCPgeL7tRCLVMmoKXD5DXickEEMdzTiSdihpqE3ww17dSodCbNWfWBAvQb/KHXXFd1CTyBa04HsBV5WzKlFkroIfDm4nB6XBje92XqVAla3C0CVmogboE61tptC2OXdixv9tAaEdv0DCu8A+XH9FYiIRoHAG0L2oiuZD5TmNm2Se0tU3ZgD5sx34JMmYBxfRNsx1Wsv74qA6zVWHi43xiIPNCy7/cMq/jepSfKAOoI2HaGoM9g4kLJq09ktrFKpIjItEqca1HPdBm2YolOufdku8tv/I2p84EfRum9grRsQVZ1P8lnUMdLO8qDuvwrolANCqPLWhUgt3J2cvYReva7nGf7dZ08Vy28odwYHwyv7EIl394GjF8a9gZUaCydzlrAHBs X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 15ceddce-c3e6-4a91-830b-08dcfa425bb1 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:56:49.6322 (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: LVyBOwNdkaMZ1IvEiDC4OLJfelrBvMP04MElKlBQQhMvix0CsXaiMmAUzJpz4k/Nm1W9cEx1pwLP00FKUvc7nw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8573 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_235654_806996_6B205EA6 X-CRM114-Status: GOOD ( 10.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Remove the duplicate imx7d_pcie_init_phy() function as it is the same as imx7d_pcie_enable_ref_clk(). Signed-off-by: Richard Zhu Reviewed-by: Frank Li Reviewed-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pci-imx6.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index bb130c84c016..fde2f4eaf804 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -390,13 +390,6 @@ static int imx8mq_pcie_init_phy(struct imx_pcie *imx_pcie) return 0; } -static int imx7d_pcie_init_phy(struct imx_pcie *imx_pcie) -{ - regmap_update_bits(imx_pcie->iomuxc_gpr, IOMUXC_GPR12, IMX7D_GPR12_PCIE_PHY_REFCLK_SEL, 0); - - return 0; -} - static int imx_pcie_init_phy(struct imx_pcie *imx_pcie) { regmap_update_bits(imx_pcie->iomuxc_gpr, IOMUXC_GPR12, @@ -1526,7 +1519,6 @@ static const struct imx_pcie_drvdata drvdata[] = { .clks_cnt = ARRAY_SIZE(imx6q_clks), .mode_off[0] = IOMUXC_GPR12, .mode_mask[0] = IMX6Q_GPR12_DEVICE_TYPE, - .init_phy = imx7d_pcie_init_phy, .enable_ref_clk = imx7d_pcie_enable_ref_clk, .core_reset = imx7d_pcie_core_reset, }, From patchwork Fri Nov 1 07:06:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxing Zhu X-Patchwork-Id: 13858841 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3922BE674A8 for ; Fri, 1 Nov 2024 07:11:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=H0TuMiPepsNIub5jdEZmVmFcvsRa1/dMj99G+45paE8=; b=iyE6xIigk8QoIk0JLwht4KeMcZ Fc1EPzkD/WhgrcfzW9k1Q1xHtFzFRJqgr2zOmNiIU0++f3SI4zNZQSxwkcSJe9bdyznEPPnuvDANx w7ceoLb8fOWOQ6Akd9khDAj2u1XeDpFrlJkE+2y7m1HjT9/8kd+gC8uY+ouSwgQ20oM3oh49GK70r 7gAnc3te320bDcSjuQ7gTZo6zfJ+0/D7u1qE+bk7Gc/cyRfBL0bXfSLGOcbbo/iwmABUd3By6CcQD YoTHqLuikumfR81/bLLCIKG/PxpLBdHAW5wMY0u5GFKHVvX+fq8jztonExmcO/yvz8FZLVSTqaKMB 5BYjqvtg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6lok-0000000645e-1vEE; Fri, 01 Nov 2024 07:11:34 +0000 Received: from mail-db8eur05on20603.outbound.protection.outlook.com ([2a01:111:f403:2614::603] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6lac-000000061iR-3ywZ for linux-arm-kernel@lists.infradead.org; Fri, 01 Nov 2024 06:57:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AIp8BNG1zHVu1ExrJKe/2BhBtHBzWc9zDJgi/owt0yin8VFaPIz6D4Ca4J0gZ/p3dBYr70JohLxcOg7smvc8wpSwyC068xA1FbH3Br7rYcZ5YMAyeAKd7HkzOYsBlK7D/QDaDbPAhWYdb6XyhnLSFwCL7tsIoN7I0KUI4oU5Y+1TEZUYAetxDqENBd9aVPGTb+0xHBfmlY6UqLm59V7YA//cL0XyZrRaQxSNTS3diEIRl+uGlhhLS8q96m0c3e8If3wqVtxmAGnGgbBbsosXUxy5oTd9PmCH7dlkyQmh6Y0RV+2TfkbDmkoFwt0aoBanOWO4eCefA2Uc011d+dDlGQ== 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=H0TuMiPepsNIub5jdEZmVmFcvsRa1/dMj99G+45paE8=; b=k16n3CGlcN021i6hoV/nc51dJbiz5+9H2PNMJ1loGrDR849vgC7rMRdH2GPMp+nXCYlDUXbEMIR/KmkqFCzwWaEpB4T6AmjXnz0H0Pp+laBlAeEFiI0iYVIti0TTVi46vSTbYAdKSXb7MzLPbS/9FirtC3LaRLROjZsGn92P1msW8UiVCE5uvKPFMQN+rKDDLpzm5b4dALWLn65mHkB8bfJQMfWr/QixnUtRwloAjlBH4/TNO62Rd/rIRDuR2dgOnZAa88cgyJKrn2etTgOnmjxtZXFeR+naVX/SeV3GXhrIEJLXXNHsioqBZLuZe0sgNGa0C/yGSzFgL/bWBa/xIw== 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=H0TuMiPepsNIub5jdEZmVmFcvsRa1/dMj99G+45paE8=; b=W88z4nqHWUQQ0UnCcoPIdXqd5NTN7qpgRokCopehF7LsbJOLH9lyan43PIImqW2V3H6WLyhOAt94IxeVA+uYdb7KkuIg2W3fXypv2lSRq0ixcKYgmopg3N1bpfLe/7dq01U85Hw5fRx28McQQUnG4Y593AzusfJf0lHZazE6xwdHt5v2NazbwgLFPa/DIUQ3wHsbskj9QBcAPUEcEJI4bkudr3Q8MV0plkC035KCHfFlRJavhCVaps25aWavskUlMXZCjJRBgoKzwDHbZ36mhq0esEVc/eD9AVJ+rGGiZQtoVfIl8AUWYyG49kFh/hzk4v98sYQ2A6IxxbXVXSa4oQ== 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:56:55 +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:56:55 +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, Frank Li , Richard Zhu Subject: [PATCH v6 08/10] PCI: imx6: Use dwc common suspend resume method Date: Fri, 1 Nov 2024 15:06:08 +0800 Message-Id: <20241101070610.1267391-9-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) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|PAXPR04MB8573:EE_ X-MS-Office365-Filtering-Correlation-Id: 766f0b81-b6b3-4b07-e243-08dcfa425f48 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: AYwP5U1ChymxUUIyGbCmfyHYA0n5FbvN8StyY/2OO3XP2ol8isw1GKpS+l51tg8JY9/FyfKLt9T9aeJITqxkIF7WDhZURyVDKBfahpvw7D76NbHRJV80CgqdFBs1Uyv+ZNQC9Dy+i+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L6LAK4PY3nMsWfFOk97qqTpDhXMbmasIALVemApCrD2K0TiuEx6mUvcaP9m5qZn88SYnORcpZrvt5agmgEm6i/RWGPD1QOKwshDyHEIYQIkfd5pEtsvy5u4v2fYc/RaomqJeu24BfjEO/4GKll1UNBdot+hjZkrfAKp/+Dj4SlHrVjl 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: AySwCuJsUU6h2ahuGvS5jMzs6WvqkX/k56XG925iCzVTZTyBpo8ZEKGfC1msQvs7WS9esL46DuF1uuJIXrEn9I2uRw31IuRA/cgRRp94RYIggaJF08r/byNwSidTAWLBWDPuJInRoXJ8jz1+D03unKdz+EaqImtjE1FqkZJkEw3dbgZTkuKo0raftiON4GUh/iquad5OkZ1jUTNryz9VTLGyov6J7PfWo4IzK9zD0qIkCPC1PsGtP2ic9Oiw7XrB+r9IBy7D2HR144AfmHw5N3uCzFfxSif9X6NPZNkv4Upt1kuT497inLSfM6B6zlRukwSELTnPGtWPe6U0TS1HcYLXEyIb0nf+zz4fbfcMS6CkYZlrXYn+uIhZvbKvexPj1M14aSRS0xyf0DzDVAHs3sgWYKwQ/xmcc+y1pD4EBQMNfj8DnrVxwpGG5L+l+YJfHDkOm4Xyh7FaK6niTImf6444HHEyGAiGcjKNkxpuRgXNPhS8Bc9Ha986SYEkjK+th+2VmFYwAG5Fl79q9TmRrN0+CKIkSc79JFdFbjFe6D/AKl76+gIvEb/JAdkIujS9HI57tzjsi0JKy2KEvj7Sk+a3P9fHOtIHBM8BETpRP9ofVsUcNiq552PD9X7jYPc+a20CsZuJ7Da+hF5piTKQgXb9KCUHb9WkAVXDGsoh0sNCt0GWw4GSbv0gBFmnzWwK5UUizP+E/8vC7nlIGtaVUX45Gf/neMWjVp4K/tG14tmZ+YwJP/34VVDtHHFI77nWZYQuQme9d6u+njxs4ElJc0KOX9dI6YPs8otGZYazQGsN4r50stz9YMTbzzaSLAKIr5OaFnw5pRnCwNXQeTQIEzosoqEIfZgVAHtZSHRf1mSSMPa6b+9S1DAlK9HxAC7p6qS9DHBcKIUqvH8OqlW4cJqK9h788arbTtWHMM5T7cTbMnccGkAP3gC6LaiXdLcNfs9qXwfmjqc8PNrSZSgtjH6kzdm3IySTHqu41Rs/eJ50Ufbialn4D1Mq/zajYH8LW/qOalstNmN5Oymc1BWpJeVLxMm44DcVpi2iW7YWUaJvD+v6ZnL7aXQHioburnne/sCBVji09Y7tJ3R4qzY+iSHNR7CFKCyrQNkHW3v495EqFfursvRgnu0sYWp4YhZGOxo7zTGjZixrm7hj1daHBMMmTMpgsulbQtHZCNAL2QEnKKEB8urLKhIl62B0ggLf5U5D/dPbeCk3mykiLiQhhPej95eKR2Y3NJBaOZUcww0fJZD8dsz3VeSD3OKtiWizSb11PUWvt1mx6HTmtmWaKRx/AlD+IZq3pFkYVxnQCVMBpOaymCITVM2gohpLEvPsxMluzTzGEAYBrtAYBIa1Q2w2cCvb9beOMVHXcG2G6VmNBM7T79HqXwg82+2ZOHAG9kDvjDcmQoUYzUO3mjMp8VisTQR0nlYDMnFOVV8Lsg1IONBNxPdovqy7Z0y4y5Ngxhc5jnZt0LN+xzxABn7oHvO4W47Cef0nHdu40xWePK4PmkZLDAX8S9D0k+yBpu6DPQcBzfofGxPu8RxQoEL56Ja80VCqcIfiNMt0X+o9QI5EMlSfTkCsroY22KRMAOD5 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 766f0b81-b6b3-4b07-e243-08dcfa425f48 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:56:55.5081 (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: 4Pp0O0GE9N2mQChNNeKeLXgUJGkV/prFQFc3nkQa03mV1MzLu+RK2klmQep5Zr8zrTX81/M16UhTYCTpK1rF9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8573 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_235659_431318_A607D3EE X-CRM114-Status: GOOD ( 19.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Frank Li Call common dwc suspend/resume function. Use dwc common iATU method to send out PME_TURN_OFF message. In Old DWC implementations, PCIE_ATU_INHIBIT_PAYLOAD bit in iATU Ctrl2 register is reserved. So the generic DWC implementation of sending the PME_Turn_Off message using a dummy MMIO write cannot be used. Use previouse method to kick off PME_TURN_OFF MSG for these platforms. Replace the imx_pcie_stop_link() and imx_pcie_host_exit() by dw_pcie_suspend_noirq() in imx_pcie_suspend_noirq(). Since dw_pcie_suspend_noirq() already does these, see below call stack: dw_pcie_suspend_noirq() dw_pcie_stop_link(); imx_pcie_stop_link(); pci->pp.ops->deinit(); imx_pcie_host_exit(); Replace the imx_pcie_host_init(), dw_pcie_setup_rc() and imx_pcie_start_link() by dw_pcie_resume_noirq() in imx_pcie_resume_noirq(). Since dw_pcie_resume_noirq() already does these, see below call stack: dw_pcie_resume_noirq() pci->pp.ops->init(); imx_pcie_host_init(); dw_pcie_setup_rc(); dw_pcie_start_link(); imx_pcie_start_link(); Signed-off-by: Frank Li Signed-off-by: Richard Zhu --- drivers/pci/controller/dwc/pci-imx6.c | 95 ++++++++++----------------- 1 file changed, 34 insertions(+), 61 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index fde2f4eaf804..3c074cc2605f 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -33,6 +33,7 @@ #include #include +#include "../../pci.h" #include "pcie-designware.h" #define IMX8MQ_GPR_PCIE_REF_USE_PAD BIT(9) @@ -108,19 +109,18 @@ struct imx_pcie_drvdata { int (*init_phy)(struct imx_pcie *pcie); int (*enable_ref_clk)(struct imx_pcie *pcie, bool enable); int (*core_reset)(struct imx_pcie *pcie, bool assert); + const struct dw_pcie_host_ops *ops; }; struct imx_pcie { struct dw_pcie *pci; struct gpio_desc *reset_gpiod; - bool link_is_up; struct clk_bulk_data clks[IMX_PCIE_MAX_CLKS]; struct regmap *iomuxc_gpr; u16 msi_ctrl; u32 controller_id; struct reset_control *pciephy_reset; struct reset_control *apps_reset; - struct reset_control *turnoff_reset; u32 tx_deemph_gen1; u32 tx_deemph_gen2_3p5db; u32 tx_deemph_gen2_6db; @@ -899,13 +899,11 @@ static int imx_pcie_start_link(struct dw_pcie *pci) dev_info(dev, "Link: Only Gen1 is enabled\n"); } - imx_pcie->link_is_up = true; tmp = dw_pcie_readw_dbi(pci, offset + PCI_EXP_LNKSTA); dev_info(dev, "Link up, Gen%i\n", tmp & PCI_EXP_LNKSTA_CLS); return 0; err_reset_phy: - imx_pcie->link_is_up = false; dev_dbg(dev, "PHY DEBUG_R0=0x%08x DEBUG_R1=0x%08x\n", dw_pcie_readl_dbi(pci, PCIE_PORT_DEBUG0), dw_pcie_readl_dbi(pci, PCIE_PORT_DEBUG1)); @@ -1024,9 +1022,32 @@ static u64 imx_pcie_cpu_addr_fixup(struct dw_pcie *pcie, u64 cpu_addr) return cpu_addr - entry->offset; } +/* + * In Old DWC implementations, PCIE_ATU_INHIBIT_PAYLOAD bit in iATU Ctrl2 + * register is reserved. So the generic DWC implementation of sending the + * PME_Turn_Off message using a dummy MMIO write cannot be used. + */ +static void imx_pcie_pme_turn_off(struct dw_pcie_rp *pp) +{ + struct dw_pcie *pci = to_dw_pcie_from_pp(pp); + struct imx_pcie *imx_pcie = to_imx_pcie(pci); + + regmap_set_bits(imx_pcie->iomuxc_gpr, IOMUXC_GPR12, IMX6SX_GPR12_PCIE_PM_TURN_OFF); + regmap_clear_bits(imx_pcie->iomuxc_gpr, IOMUXC_GPR12, IMX6SX_GPR12_PCIE_PM_TURN_OFF); + + usleep_range(PCIE_PME_TO_L2_TIMEOUT_US/10, PCIE_PME_TO_L2_TIMEOUT_US); +} + + static const struct dw_pcie_host_ops imx_pcie_host_ops = { .init = imx_pcie_host_init, .deinit = imx_pcie_host_exit, + .pme_turn_off = imx_pcie_pme_turn_off, +}; + +static const struct dw_pcie_host_ops imx_pcie_host_dw_pme_ops = { + .init = imx_pcie_host_init, + .deinit = imx_pcie_host_exit, }; static const struct dw_pcie_ops dw_pcie_ops = { @@ -1147,43 +1168,6 @@ static int imx_add_pcie_ep(struct imx_pcie *imx_pcie, return 0; } -static void imx_pcie_pm_turnoff(struct imx_pcie *imx_pcie) -{ - struct device *dev = imx_pcie->pci->dev; - - /* Some variants have a turnoff reset in DT */ - if (imx_pcie->turnoff_reset) { - reset_control_assert(imx_pcie->turnoff_reset); - reset_control_deassert(imx_pcie->turnoff_reset); - goto pm_turnoff_sleep; - } - - /* Others poke directly at IOMUXC registers */ - switch (imx_pcie->drvdata->variant) { - case IMX6SX: - case IMX6QP: - regmap_update_bits(imx_pcie->iomuxc_gpr, IOMUXC_GPR12, - IMX6SX_GPR12_PCIE_PM_TURN_OFF, - IMX6SX_GPR12_PCIE_PM_TURN_OFF); - regmap_update_bits(imx_pcie->iomuxc_gpr, IOMUXC_GPR12, - IMX6SX_GPR12_PCIE_PM_TURN_OFF, 0); - break; - default: - dev_err(dev, "PME_Turn_Off not implemented\n"); - return; - } - - /* - * Components with an upstream port must respond to - * PME_Turn_Off with PME_TO_Ack but we can't check. - * - * The standard recommends a 1-10ms timeout after which to - * proceed anyway as if acks were received. - */ -pm_turnoff_sleep: - usleep_range(1000, 10000); -} - static void imx_pcie_msi_save_restore(struct imx_pcie *imx_pcie, bool save) { u8 offset; @@ -1207,36 +1191,26 @@ static void imx_pcie_msi_save_restore(struct imx_pcie *imx_pcie, bool save) static int imx_pcie_suspend_noirq(struct device *dev) { struct imx_pcie *imx_pcie = dev_get_drvdata(dev); - struct dw_pcie_rp *pp = &imx_pcie->pci->pp; if (!(imx_pcie->drvdata->flags & IMX_PCIE_FLAG_SUPPORTS_SUSPEND)) return 0; imx_pcie_msi_save_restore(imx_pcie, true); - imx_pcie_pm_turnoff(imx_pcie); - imx_pcie_stop_link(imx_pcie->pci); - imx_pcie_host_exit(pp); - - return 0; + return dw_pcie_suspend_noirq(imx_pcie->pci); } static int imx_pcie_resume_noirq(struct device *dev) { int ret; struct imx_pcie *imx_pcie = dev_get_drvdata(dev); - struct dw_pcie_rp *pp = &imx_pcie->pci->pp; if (!(imx_pcie->drvdata->flags & IMX_PCIE_FLAG_SUPPORTS_SUSPEND)) return 0; - ret = imx_pcie_host_init(pp); + ret = dw_pcie_resume_noirq(imx_pcie->pci); if (ret) return ret; imx_pcie_msi_save_restore(imx_pcie, false); - dw_pcie_setup_rc(pp); - - if (imx_pcie->link_is_up) - imx_pcie_start_link(imx_pcie->pci); return 0; } @@ -1267,11 +1241,14 @@ static int imx_pcie_probe(struct platform_device *pdev) pci->dev = dev; pci->ops = &dw_pcie_ops; - pci->pp.ops = &imx_pcie_host_ops; imx_pcie->pci = pci; imx_pcie->drvdata = of_device_get_match_data(dev); + pci->pp.ops = &imx_pcie_host_dw_pme_ops; + if (imx_pcie->drvdata->ops) + pci->pp.ops = imx_pcie->drvdata->ops; + /* Find the PHY if one is defined, only imx7d uses it */ np = of_parse_phandle(node, "fsl,imx7d-pcie-phy", 0); if (np) { @@ -1343,13 +1320,6 @@ static int imx_pcie_probe(struct platform_device *pdev) break; } - /* Grab turnoff reset */ - imx_pcie->turnoff_reset = devm_reset_control_get_optional_exclusive(dev, "turnoff"); - if (IS_ERR(imx_pcie->turnoff_reset)) { - dev_err(dev, "Failed to get TURNOFF reset control\n"); - return PTR_ERR(imx_pcie->turnoff_reset); - } - if (imx_pcie->drvdata->gpr) { /* Grab GPR config register range */ imx_pcie->iomuxc_gpr = @@ -1428,6 +1398,7 @@ static int imx_pcie_probe(struct platform_device *pdev) if (ret < 0) return ret; } else { + pci->pp.use_atu_msg = true; ret = dw_pcie_host_init(&pci->pp); if (ret < 0) return ret; @@ -1491,6 +1462,7 @@ static const struct imx_pcie_drvdata drvdata[] = { .init_phy = imx6sx_pcie_init_phy, .enable_ref_clk = imx6sx_pcie_enable_ref_clk, .core_reset = imx6sx_pcie_core_reset, + .ops = &imx_pcie_host_ops, }, [IMX6QP] = { .variant = IMX6QP, @@ -1508,6 +1480,7 @@ static const struct imx_pcie_drvdata drvdata[] = { .init_phy = imx_pcie_init_phy, .enable_ref_clk = imx6q_pcie_enable_ref_clk, .core_reset = imx6qp_pcie_core_reset, + .ops = &imx_pcie_host_ops, }, [IMX7D] = { .variant = IMX7D, 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: Hongxing Zhu X-Patchwork-Id: 13858843 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 25953E674A8 for ; Fri, 1 Nov 2024 07:13:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=PwhNL65v6k8+17D56SgrpcMwOYFeo4d2mvr3RZyVz9M=; b=GOImzfqcihFy9jZZvCp6HF4aE1 JuF/+Uz1sUSWLeShanDbrh/lhdYLurd274G2Ma8wASePBdPKBeKYHv/QvQavmjT8GNCRYWsZVEiWI zPAWg4mAxyWZCTO8G/xZDJ9MnD83WG1vnCrHOwA+u9drBsU7OelgvCiGoJr0AphFCCLWVezqFLqBL BcayqbAZycT+p7ypb+XBe7nPTzlgpg1FW5Whuk6YvziV+mSDSn857bmZqpa4tVad5dm4KresS2cbY h5iPHd3aglHbiOFrAlIUHpQ0oFG8tdgLblPhkAm1tN6wPcCBXRgfBMQ+0gsa3/fwkEtjjCTqXwFRZ wt3ukiOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6lqS-000000064Xn-3yAL; Fri, 01 Nov 2024 07:13:21 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6lan-000000061ld-1hED for linux-arm-kernel@bombadil.infradead.org; Fri, 01 Nov 2024 06:57:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=PwhNL65v6k8+17D56SgrpcMwOYFeo4d2mvr3RZyVz9M=; b=Vohz1EJCGFlOlyrSJwgDzs2bSA aRGyE6KgYdf4MxVlhUBjlr1Aom0i4fByovSKfu6xO1SrjVveBITTNN91LUReAOHG3/rFLxQzuYE7/ dxe7we++rjKMiX84apFTvmUP7oRN8E5TDPW30tZPTZN3nalkJvbFt8DwXVUh5Kl1M1WSTJdQB95f1 AFG1ORIrymt4hj12EvGt6RF8ynOmAjsVi6owk3iUXLuZUFuqKA9BVzUqyT1K4TD6+a5dhCJpc0EUN HAGK/VBEIV0Mw2OA4Zkk6RbzdAzk3PvjpfMEW7cEDe46gCRgA3zgYXIVoyDGAuEAy1rT5YO6feSxo QTyLg4qQ==; Received: from mail-db8eur05on20607.outbound.protection.outlook.com ([2a01:111:f403:2614::607] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6lai-0000000AdEe-1KzF for linux-arm-kernel@lists.infradead.org; Fri, 01 Nov 2024 06:57:07 +0000 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) 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/3keVD6aDIY2xm4we5hlrs4RRoaR1OeEFHfFpHCug5QwM9VuY3fyLnHPz8lQrchrZUMU0lkVwz06soe9vg/rk3gWvud/NZCHTXoQCO6ilJ6qFu17NyC/XsVSU3EBrs6B3QFy5o0aBIH1RmUs+WhFuSW7m71yIpfPh7ZrW2G7U7fhMKyshw0R0GfEOYqJ0U0VLbi0ZoeudI4fBXPB9FQ64xUTAFyDfTuCNu04LrfYzKbVJs5mo8/wCS92Erv/WRtOnc3uYmAJEFSQPHgPldlxkoUTK3SEwr2EMI1Kqp85xs7QeS3PmYJIT+tfT1TXmNMyi+FSuHWRJV3WVoG3GpfggICtPQURTaz9aukHFBJm+6hr7A9N7D1fGYzzkOxAt7rzVuqdJuLr7ITe0XStGaLHKkSjiN1ou3gkOCPUJvJLSdYF8Xll2RJbu3OTTvsmORdsuhwvvgQx1XURnc48B2XHtjagsF1eZuOTlB5SHcRvFXgLpc8of+PMVkjVmXHYhxuXAjulqeIEmnCaKReDax9vjKgWj9QjZ9qPLonjU6HLx9cq7RkCemofq1t+jMNpnaRaTVGRbc4V+totOXvOI2mv8AEu+xkynWVDNdrfcE6vziO6jVotwYxa9bcGrI1GpfHEreMc7E1EIE+ZKylbs22B/vOauFkJdN0sW+CV1xPMe8qZ+6bSoxQ4hLRKGbGJP+CFmTOuKHtP0zqwG5Dk5dTy6sytZuNpvJaFF0tLIqXGdfPqe+BN9ayZ8PYEGKVKksghV7q8SY79Z0O82gSzjXg+6J++fQHg8diJkBHaH9p+nuif9DUiNIcrQ3UPmQV2ySJWAYwZC7dLQOZGm+cHNrN3tNHP5JzzScvHURKTXWqPUHPn3k6wvsbrvppDz8fDG3aRE6/P+NTJ/djvGUO5SI7d9mLya0bC27Gbw14/+hsgfVuQUTRDoB4/XJgTRkxJERRzqMGfGkK0yVc43x8Zi02UD+yS0UgaAfxjOgvAf0KXwFulowK3QR/QkAeC8nXBpkfROf9cslJP2JQk+xCqcDnsY4WexqaqbVjuaU0zjN2bKVNJ/YlSHAGgid2ExcWcUMEfF76CqPgXJXs4q5jNR9eUYbbJoLZ4E4rNofbaKQgk1ME57eaQGVSbJKWmwm83yKZ+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+/yOJaITopmvLdYUrFbSFchvH9ixI2acqCca9qjqPYZ15ab1Hm1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yGjtA7oKOtGBK0UrbbdAjn/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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241101_065706_306125_5779B11B X-CRM114-Status: GOOD ( 10.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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), }, From patchwork Fri Nov 1 07:06:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxing Zhu X-Patchwork-Id: 13858844 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B66B8E674AB for ; Fri, 1 Nov 2024 07:15:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=tFu8k5XEfFAMWiNmTVFR3yKiKPpe/MW6NewXVId2T4o=; b=UnhWZSav4Bybh48/uVcQTZ2myO uTYVJk9zTB/pi6yKD15JEyC/XMumRbyhvgMydius1LXhxrBUmhSMHpRMRvD1LwQQhjdweGRs2DKf0 9H8XcmShjW7+a8vADWtXPlsUMtC45HgGS7QGeMG6NtlJ+UCgtKeQhnRoyu5SZFVQWgR3AGYIuMKsG BR3mSz4rXtU9xNbQY/UF6WrokXxepxlNbJ/zbkS1CUuk5fgrp2FOwgmGYT+DOn9/4UqnEHy95dEE9 r07LxrLzdhNV3RtpovX/Hv0sE7fL/XVDk0nMasKLk4UexPZtm/tb9Mk2Qn2fomZ+elIxj/Tp0EdRj zQIGwrvQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6ls5-000000064o3-2HbC; Fri, 01 Nov 2024 07:15:01 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6lat-000000061n1-04IH for linux-arm-kernel@bombadil.infradead.org; Fri, 01 Nov 2024 06:57:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=tFu8k5XEfFAMWiNmTVFR3yKiKPpe/MW6NewXVId2T4o=; b=Evm0SBxcelkgTpkQyY30MbNO80 AEbIvZ8BO92sXFR2nRRM6sB6z6QmVFMEaTxyBq0qEb3ldGtsWm+kzM0nMVe8pAcdRXPlL2/CRb2Zp PvRx8R81vRSIGIfv9lB92t8xH/uibPUddCoqhdBCHI++kyDvvP8DbCWyW3yRIjF+Y+K8Pj+dYlnOs koJMhiZYhC8rjTebOqcig0WyLnwrwCiTF9rzlJ3gpZmDpsTDvPykJpPXRVxOnTBcQNIZaHXrelCWl GtNlEWpT22p5vq4alPprbyKAORFzIa8tLtWZJn7NSx0QeHk1HZyMstGkGVT8tExQeteaT4Xcsubp0 MGiSUKHA==; Received: from mail-db8eur05on20607.outbound.protection.outlook.com ([2a01:111:f403:2614::607] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6lam-0000000AdEe-1eg8 for linux-arm-kernel@lists.infradead.org; Fri, 01 Nov 2024 06:57:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ernqjTxBEgGizre9HD9Jg3mRSGy04vsdNf1+qbTCIdt2RGlFPhry4gKSIieUBQvoVFp12xHWjpo9S9TiblhiiXVnO/6sUcSZRxHhuxpk95T61kmds9/wwDMU8k9Ritzndncprx2NNFPFeieUJDlhBe46K3OMhafBN+t5mQRuf+aQX3icdB6VlZ+rHz8Bnz1br6xCX8y8bbNJfkCjlrwIUXEi5m64DPutwLDZ7n286bMCBq7w/a3VwSup3PQBg//hG+Bfvb4W/SVdDt5bI0iTXS0gARVDjMUhu2NPnBuNBgvlTkVKWmKUgdJEF5gnLJQ597rF5hUcHaZKSRVmEiWR9w== 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=tFu8k5XEfFAMWiNmTVFR3yKiKPpe/MW6NewXVId2T4o=; b=NvroZRWwm2HrBDZip1Cg7eXVLEY0itMhH1yipM7vmkRgUBInDol6MclYFvuLC95Qou3G7m5uvmdHLI60ZYQLMEzIqFL/lllUTroVuqibT8Nb+FyurgrDyvbTr5nUxJwUfHgMieDY0JkGKxCj7Emus654+KTaDE7uxlCfs0mvY07QjF7Y7FNI/Ujbg4niX/ZgZ6kBOLMU+XjNx8bILjeDjoJCogdmR0OHbTIgnHrJLuP42/u7+4N+FpgTIiLWRgjadGcXKkM2BJ1VVMZlisUgmA5Ij7II+YTdkxykX1RFZWGu9MaNOwiGJnCfuARo44Xqemms15k8v+VdmzP/AJCgYw== 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=tFu8k5XEfFAMWiNmTVFR3yKiKPpe/MW6NewXVId2T4o=; b=Ns7Q9p7WAUxFjb95k9dJRJfS5RkGV5KzLseqI1pnaDI86+BTC3Ak3/cFR8Knl2CWqbnh5Q2iz+azccsXvjNgV1rRk1V/5W4MyUS1uxzBUHpbkT1ne2gKKdMrTGsj43dyCwxDj32RMG3Pk/H0Wxk1mXUGRUpVg/ASpOxqSH2R6wXRD/wHQjUv+Mv89Xc6yuaXgf0PVZ5suEA3X3sOdDXcpI3fthwA4vfC+gjtBCk2gWVcpsh4iqv6BAEoHOzMrBpw2d7gALo6ZH2fREUzQZE94S9RCR0wQAh+U0gATK+BzH9Czq0L9VfKaziPxYZWyYJValcq45j2J6COZOjILt5X5A== 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:07 +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:07 +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 10/10] arm64: dts: imx95: Add ref clock for i.MX95 PCIe Date: Fri, 1 Nov 2024 15:06:10 +0800 Message-Id: <20241101070610.1267391-11-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) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|PAXPR04MB8573:EE_ X-MS-Office365-Filtering-Correlation-Id: 7da5140f-cd67-42ec-168c-08dcfa426624 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: W0eUx7gMZh18g4eWi2icQKH8wQIbIiipvmlAR0Vp7O1nSqH8mj6QnlBwBnGiqlGYDgPcEmdNi7U2z+e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WCL0f7ZP2G/0D/RYKTxUBOFyue3hhd/U6+5sPasfzsXW7vslvYhXnBBorcWbuGglMziaryU1rwQZgCxMa76YVmXZ82XHaCeorsnV8Dt8yw0MuvsbJmnkfFrgYMsWEWHILZE+nOU7QYOccIF/c3Cqt/nnCvVoHWXbBaRON9vv2b0sKzJgUKVUQRXXECnJWPuAmBCQ8SaPd5QrlzGfYUlAKdFe5U/UmlAfRQK3BuSGL7bIH/a6k 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: TgLI/XVTm7PNJupASVlPmVMu//JkJQ9LrvYb3EseW1NfsLvehviGKIdOiCDYtkohs8HgzrBqplWM4ine/erVVpkuQEF5utrxY6Hql1ws0D04jeWP+PiRuk7/jJUYm/bVm0EVXDjKUM/bu+RAmTsPb6kpdG/P9STLTbRYjtQGhEoKGHj4dfG/EYbqQvc6NUB7Im4ELq6OeEOVpitLbuP+GnpscJb1gVrZMRtqa7J2MR0vYjNyNv4Guefs+gGoiWR+ooaeF+3pafw//sCm4DohBfwnSvgtOaBKvkY4uABxZGnV5nLzcjdXjiHkJ8SVotndRrjm5Um9YPWguVadA24fJ+OOpfyRuxkTYOR9ogoOYtmFzWwdmzwiJ2avsO7akS5yUc9Eqx2xlGyln4iBmAagoJoiI/dsDodtbpUuD2rkcZKUF5SrDnXWBWBQ3PVykrrT0HCkoDWhYJQGCttb1/mCRuJ6hKRa+Tx3ynIV0IAOANtXRI6Sh/b2WD5VucKX7YIR+Ppx1velyW7Q5Z3tyP7CYvgFeyHpQAk6e/GvMDxe94IMjJfbKfLcifoJ8p5ouQRMK3wTm7/86Zr3z731cKawgW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Exchange-CrossTenant-AuthSource: AS8PR04MB8676.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2024 06:57:06.9883 (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: JHeY6IjiqcYiTVGa7s/WQq3CiXFfr0ATuixw55RNiCfs8pA84rOSQpnHb71XDlGQhVt0KBq4IVliP51/CYE+FQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8573 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241101_065708_698770_2396559E X-CRM114-Status: UNSURE ( 9.73 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add ref clock for i.MX95 PCIe here, when the internal PLL is used as PCIe reference clock. Signed-off-by: Richard Zhu Reviewed-by: Frank Li --- arch/arm64/boot/dts/freescale/imx95.dtsi | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx95.dtsi b/arch/arm64/boot/dts/freescale/imx95.dtsi index 03661e76550f..5cb504b5f851 100644 --- a/arch/arm64/boot/dts/freescale/imx95.dtsi +++ b/arch/arm64/boot/dts/freescale/imx95.dtsi @@ -1473,6 +1473,14 @@ smmu: iommu@490d0000 { }; }; + hsio_blk_ctl: syscon@4c0100c0 { + compatible = "nxp,imx95-hsio-blk-ctl", "syscon"; + reg = <0x0 0x4c0100c0 0x0 0x4>; + #clock-cells = <1>; + clocks = <&dummy>; + power-domains = <&scmi_devpd IMX95_PD_HSIO_TOP>; + }; + pcie0: pcie@4c300000 { compatible = "fsl,imx95-pcie"; reg = <0 0x4c300000 0 0x10000>, @@ -1500,8 +1508,9 @@ pcie0: pcie@4c300000 { clocks = <&scmi_clk IMX95_CLK_HSIO>, <&scmi_clk IMX95_CLK_HSIOPLL>, <&scmi_clk IMX95_CLK_HSIOPLL_VCO>, - <&scmi_clk IMX95_CLK_HSIOPCIEAUX>; - clock-names = "pcie", "pcie_bus", "pcie_phy", "pcie_aux"; + <&scmi_clk IMX95_CLK_HSIOPCIEAUX>, + <&hsio_blk_ctl 0>; + clock-names = "pcie", "pcie_bus", "pcie_phy", "pcie_aux", "ref"; assigned-clocks =<&scmi_clk IMX95_CLK_HSIOPLL_VCO>, <&scmi_clk IMX95_CLK_HSIOPLL>, <&scmi_clk IMX95_CLK_HSIOPCIEAUX>; @@ -1528,8 +1537,9 @@ pcie0_ep: pcie-ep@4c300000 { clocks = <&scmi_clk IMX95_CLK_HSIO>, <&scmi_clk IMX95_CLK_HSIOPLL>, <&scmi_clk IMX95_CLK_HSIOPLL_VCO>, - <&scmi_clk IMX95_CLK_HSIOPCIEAUX>; - clock-names = "pcie", "pcie_bus", "pcie_phy", "pcie_aux"; + <&scmi_clk IMX95_CLK_HSIOPCIEAUX>, + <&hsio_blk_ctl 0>; + clock-names = "pcie", "pcie_bus", "pcie_phy", "pcie_aux", "ref"; assigned-clocks =<&scmi_clk IMX95_CLK_HSIOPLL_VCO>, <&scmi_clk IMX95_CLK_HSIOPLL>, <&scmi_clk IMX95_CLK_HSIOPCIEAUX>;