From nobody Sat Dec 14 19:09:49 2024 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2073.outbound.protection.outlook.com [40.107.21.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E53615443F; Thu, 31 Oct 2024 07:57:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.73 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361429; cv=fail; b=dvGarZn7MEBlFfuxJzIuScToHTso57U8t5Oe/Y0O1OF6R7X2VdZ+E9Vg+4a+DFG5VhZQn/uPBbel1gPoBOTrC+mWXLYJ60gD/jF9P3qY4uhmyQb/92tLlS6OWbnV3UOpXZof1ZOpIbi0XgtvD7ESxmYRzbRBKt1vGBmojzeEsCo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361429; c=relaxed/simple; bh=Mmo1xscLTlVQkjVIAV9EfjQZxTeKpeEgRQ6ZOQA/96Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=WJ8wdjhM//Y9Ews2ttPuGNjf+olD6D47qtnVPhEVlSsB2seJ+4wrnD3NGpSDoUWjZkGf3uB0rJEKVPy66mcfT8ednGh511siZ4cEl9HSluS1c9y8NR3PYHfg6Jx/cIbV7IJhCdDgQqllDtYMmzyYDfRpNg7/aBQTu1T/ThIL0ig= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Ffq+yGO/; arc=fail smtp.client-ip=40.107.21.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Ffq+yGO/" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Oa0zHIgyEKcswg4Xle2CVg74Zp8EYf7lga58zzNzKUIIrQcM1RZxNmLSEUEjXge3dH8lSGyNzfJ4jKZ746y2VjhtpwPEpT9OVFDrxTGcNC4yPg5+A8GeaLQY+WCYvsrziWEvo74NL56HWRCoK5LUY4hUK5TwjdP5Rdkaf8UYXPEa4EMa5M/IzaIF94UOOl/YXS9Eb4L6iMLgWLDsFk6SNi/duJzLkjJowHY5Nv0mMn3fnXC3G1uK8vdFV3AfyY/l6HiKAv2s/jUUBWGKG2K99hqUuqTtPyIv4uTPvnERSPo4ymHGw+qjggTYDDmIopx53LpsTXVRRWr4K5SqRngG3Q== 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=Y05Luh3LjPzlJuayVUlGlYWHcFLILYmCRfsoOYZ0KeVJ2GWO207T50wiNW1tNPX2ecUrguOUrn8J+pdszA0R8/FK/NtOBQnyK1cNnIq3KRD1qiYj3GIxn8zI3Xw4SQUOiFe5TZtYZnb2AAgHKwt+J70pC3IE9wl/uIifaxAPvvBwvzgxRzeIDyGv64GPYRFI+BUio2hWK1Eqhs4RcEaIYYdtTJgblZrKQLmhbEQHwpf1AWDNmGm+DbxTArvlm17gSZb+MalRX/YjmwKc2cDByN9KjTtHtq55wohuN93SewZlX5yI7HVfuqr0FZeCBgMaBxkdw1zwo2hZRC18Jl664Q== 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=Ffq+yGO/oDwIrN6SsUJCsvyDwrhwt8Xk0C1GmfmDn1h0fnlx48OaH2xAhhcW/dHgQN91givYWUh1ENOBI1s1HCtj4leMf6Cynz/AIjvTjTjq9lRmzHeG48Vqr5GZwDKBxIf/rdoslpHt667YYLhrB17C5V3hYgayIbKzzG649Pycj5XsRwZVxeLWIZZ3Ns6VU73TsceMVon9pg4yote/bEi6YqVIrJBEBRT9uJdkclKTmpsIdwNHJPYN0sMVVi23L/RlFNLX+tg7g3aul9yiKjjyXo50ev5hOmpBCEA7iCGlTAerODsetORCk1PR3+zXeDy1oLyom1nlQebnlzApRw== 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 DB9PR04MB8139.eurprd04.prod.outlook.com (2603:10a6:10:248::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20; Thu, 31 Oct 2024 07:57:02 +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; Thu, 31 Oct 2024 07:57:00 +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 v5 01/10] dt-bindings: imx6q-pcie: Add ref clock for i.MX95 PCIe RC Date: Thu, 31 Oct 2024 16:06:46 +0800 Message-Id: <20241031080655.3879139-2-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20241031080655.3879139-1-hongxing.zhu@nxp.com> References: <20241031080655.3879139-1-hongxing.zhu@nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SG2PR04CA0184.apcprd04.prod.outlook.com (2603:1096:4:14::22) To AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|DB9PR04MB8139:EE_ X-MS-Office365-Filtering-Correlation-Id: 65bfc6e2-c5a2-4c0f-645f-08dcf981998d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|52116014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?KgtJyVRA/uGEfu5GyBNf1kO6yILWYkZLmqMzfn1I/6dEgTFXkU0sgVvdjbOM?= =?us-ascii?Q?CQvP/CRGDSOv+NmBWHNPX4L1a/nF/z/d3SVcP3UIvN0OkwsKpe2/PU1ftbfa?= =?us-ascii?Q?H6Ih92qIiuviX2XkC0cjXwXQVXCtre8csZpMEBjxj2Ie6s55w0A/JJ8yk0fy?= =?us-ascii?Q?HrGjK5l6T69mxdN7VC7yZk9TnFq8AyaJ7c28gZE5Yni3BbAm1k1DIBrs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X1JvpB+jGC3zJ/F+jydjyj?= =?us-ascii?Q?vbnI+Aj9CCy3Q7piXc5nC3Te2imVgWFfLWRBZsXhREbPEXWscM8D/Rzjn2nk?= =?us-ascii?Q?sg+kBOKQ685pSnHanaasUz+9n3SAX/UEbIOZTliRLAMD3xLHlubwamjlM/B6?= =?us-ascii?Q?UZamss8abr6XYf/X/gl3bBV/KsU9ZCPL5yerVOfaxjCS5rcZ9P/kOoKoZBRO?= =?us-ascii?Q?KhoquQ/RvHF5bMzjBO6Qz+WjgEh7+qeKFcbGtzb2TQb8pkVelpQMN9QdkyIV?= =?us-ascii?Q?RL2RFocbfsh3YhrvRdDQhinhEzIO?= 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)(7416014)(52116014)(376014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?xN11qvhyOjHTjLp4i5o2ytvo/RUFex7UrOUZ2ucQQP5LbLRu3AB0SW+YKWud?= =?us-ascii?Q?bTwIZg+mRJwqUwC5bN/n4WXDjrMW+W8D8HjPnj7Gu7Qk8HrdI6sgudzzLpGn?= =?us-ascii?Q?mJsRBh/oIT+V4CsGk3MHOxzagauf+GayMXZsBGj5xRZItMR5RlOHuyFD8+nn?= =?us-ascii?Q?mpSjXIBkG6PLRGyQWZiV4DHTw++ObDWgtTddgn+5PAlxqOQ93o8zHDjCnZSn?= =?us-ascii?Q?Lyeo8eKFwHhm+bbFzkE5y0yjLpE6ITqFZ6MXEO0ek4kk1U1EarEofGZUV0Ui?= =?us-ascii?Q?5sXMsuz8fNBSPlWsPbKaeyU+txMY8MRxx0bW/WSRe14FjjVOnG/MVW1jTXkJ?= =?us-ascii?Q?upDvoX4Vlek3o/K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Aie0a?= =?us-ascii?Q?wu28JFtO0OuF5i9mtB7aem/grdk3TMqu/UBcdYkUiK/LLFB/01IrBy0/NKLg?= =?us-ascii?Q?yQrC5iCpHQVb+Iwlv/Wves+Amz5Mw7Rn5uOW0HE6ZeviI802wv5uX7SYLV4U?= =?us-ascii?Q?s1FmE5tGjPlJ7BTYHQ4GXc+05d0xNpS6jDKVjuwqj1kNqRhR/maCQuInMNzl?= =?us-ascii?Q?uRJE0Rq8RJbGI99tTUNRgQSPt3Va+8OsD3N1rqUMkScYqM34F6fRXrkHrzPh?= =?us-ascii?Q?3BRAzCQG+wVEFgX83awmnZLZc0sMZINM9AGlO20UWAAUM5LPUWafV9j9BkoJ?= =?us-ascii?Q?Hx2LVnlivHQ/607sALOhURxU9h0DTChf+okhP8XR?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65bfc6e2-c5a2-4c0f-645f-08dcf981998d X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8676.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2024 07:57:00.4118 (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: V4TRK1L/w4MzD1YCLT7TuFYlYUxAIKhi2xtTB0ORR4jFjqpy6SBj5k0J0FK0X55YW2Ep4oDT3fQoBTkeA6cOwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8139 Content-Type: text/plain; charset="utf-8" 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.ya= ml 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 =20 clock-names: minItems: 3 - maxItems: 4 + maxItems: 5 =20 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/Do= cumentation/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. =20 clock-names: minItems: 3 - maxItems: 4 + maxItems: 5 =20 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 =20 + - 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 =20 examples: --=20 2.37.1 From nobody Sat Dec 14 19:09:50 2024 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2056.outbound.protection.outlook.com [40.107.241.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D46031547EB; Thu, 31 Oct 2024 07:57:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361434; cv=fail; b=qI3siHLBr17ofEwAyLlyyxLNTvCFvW9E7fwrddbRjo1m3M643ej6wtVn2pIU2QiBYRxuafY0d6+2ELOC+bMmYsbm5UXDeoJFCd5IMDmepMSQT/e/RqpnU3Mio/puUs80krkcFl/k2ZVaW+zgP5OS+7HGTcpqVMfxpzX70HxR/Dg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361434; c=relaxed/simple; bh=6w8RYn1ibG5NVnncYNGrFsHIkIhj3Kb90A79geEGLdI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Lv3QO9N5Lq4/oAzmKhDas5oHIjmKSmMde+8QyWatVD5heSjUk+Ih/Xf6VDSkEFYKVv21EhKq8muWrzmEeNeIJ6tBRKgHO/SfZA3zuMDfE6mlGvauBJurpdw5umGg4znnnqHVouSPyp+D1v4RSmQhHKL5hdOfWkA+8REbrl4a7do= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=bQnFVW3f; arc=fail smtp.client-ip=40.107.241.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="bQnFVW3f" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Yy2A2Epom73rVMPrjmYQxSX/9hU/Rg+oyhuu0h2WsM6iGcj5VdubKho512SKCp2490kXI7z4rC/V4qGJffsZ6ehZH9mhv6FOhLA2S0BSZDNJftr/sXPTIx1uaNnd9aWj86CzzvX6t14oAwWu7nuw+9gqFEZVTaUxvPuXDQqFSXjqYi07yWha77+ErhVRIEBKvvsLon42EJ1X6sNjNi3lDwioC2ij7Y7nVcHGhmyvHb+ayzvyU5/eD2me8pe/UtSXdPteF1tGPq7b8adBSNjjxug369bWrMFDfNIRF+7imfHvQU2njciyY4Fx/zauLm7pPWthuQHM1GBMuBc1eWfMMQ== 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=HkWozaYB6c4gmku3Xai3zp9D5hIcsNaCS/eKBvHqTEM=; b=BUkZvmBCAe22K+OpbTEWSx1e9RwGzG//UwBVEC62A2IcW82S4QARDZx9fM5DaU6gTh/pSgkUvLPHfPJlW/S6LI5ocaUDL9Bl0apHggdiis+bidSytRSshgbUqAxExuMGmO3UEbMJFUpN554prsPJyIIsmLhSglGYBU//HCLrJnRt1b+fl9sc1nh3sl/N1t5G1avfpJWAYvdJb+tpZw2VRxPYKzzf03KPAoz/8L7jp9XG4ajQzB61rJ0pN7Be9oU6oqWX//hRqjC2cIXaYxcZJM2xtNrdK42BQZng2ngJVJetXc3D4ccK+D+X5bH4qSn5uNVRk31Plvrbgk7+zwgaYg== 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=HkWozaYB6c4gmku3Xai3zp9D5hIcsNaCS/eKBvHqTEM=; b=bQnFVW3f6h+tO33EIIIqunYI48MP2RorkbMjUQIOPKJ2vxdJVD68KheN9drY/fNW/RcDOv0UtM3HHgPNq0twDsp+FYKYrHp6F8ZgyLD9qhlS/mVrBhDJzaN0XNOQCS2nGHORJ7ZLqVGy9ysr+5Q+zW/OupcB8VwWm4+uwVY+x5/HGM3XkSrWhl1pwTpMFCJo6A5YitLkLGiBUSQ2jBE85cCgY9AY10bkFGobZxgelsQMZknCTmS14ylVF7z6ZBRMvboKzHC2oO++MuaEMyzX/j3OP3sEFAVOmMRZzYXR8aJvtGvyP8giOftBeRSqHBM1/fSFKsPr8xcGxu0LvkSIcQ== 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 DB9PR04MB8139.eurprd04.prod.outlook.com (2603:10a6:10:248::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20; Thu, 31 Oct 2024 07:57:06 +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; Thu, 31 Oct 2024 07:57:06 +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 v5 02/10] PCI: imx6: Add ref clock for i.MX95 PCIe Date: Thu, 31 Oct 2024 16:06:47 +0800 Message-Id: <20241031080655.3879139-3-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20241031080655.3879139-1-hongxing.zhu@nxp.com> References: <20241031080655.3879139-1-hongxing.zhu@nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SG2PR04CA0184.apcprd04.prod.outlook.com (2603:1096:4:14::22) To AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|DB9PR04MB8139:EE_ X-MS-Office365-Filtering-Correlation-Id: b2fd7a23-eb07-4190-c2d0-08dcf9819cf8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|52116014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?csOaY+bnHa6W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=?us-ascii?Q?qxUFuoBBgvE87xs6+nAg+bv4PZyMJ+8bsPvgb3EnUhJNgHORpwz/tlYaMjT3?= =?us-ascii?Q?geLkXMLvRgSEc7NbAMVwyoD1PT32Pq/Ywn3jA0dPnlzp4RQOOIJsUvzPsX4s?= =?us-ascii?Q?0McQExuW+6OPUhC/AY3NnqhisebAGwUV6ecDWsnm/71fG7FEMiENL+xeXEmp?= =?us-ascii?Q?ytckEeXip8F71tfXGRhOEmo1+hFJiAcyFHn9lF8OJRZ/6yBu+qxT5pQWp410?= =?us-ascii?Q?vpOJfr6i/vRTzzMp9PKST0z6NbXznKVx7NgvnQabfcK2NQw8s2Y2C57Uguxm?= =?us-ascii?Q?4xktP67KDhFbYq8WZFFj+TSegCba08levLeXoOAiepqTwIm6kvbRZ9mvu1MI?= =?us-ascii?Q?AK98YSQr1dKS1ApFdBxnchpp0gJ+yEuIkj26nIih0D4Du3tYgeerSc54JsYS?= =?us-ascii?Q?Qk5oT14sRYLk++Qn9gqc3adRxGcBk3DpmGc/0FIPsN8ASUdpEhcdcGwL9ONT?= =?us-ascii?Q?3VRt3FIHFqUpirN7c1dJ0J2nI+2k?= 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)(7416014)(52116014)(376014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?gubltHupomvLCQc9jZ5v7iL2McudcAkTu07T7dx7MGNgOG72XJaAAK7zcDfI?= =?us-ascii?Q?+oQTQqztJtS5cdxZPQtoh2JJZ1ldrAH4vGJfZjtEkl4ZqN90/q1KWbgOPy57?= =?us-ascii?Q?4VYLUKP9w6bQajXatKXdCQ3Vg1jeKVP0YI7hwlrg60liBqoxc7st713huXM4?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STm3nrYkomo5AP7uQPh27+fzJzY9SoZ?= =?us-ascii?Q?unCzBuJwNummH31rZuSnW0ndvXY9M8iavuM3GaDUj/vwLZcly2iLxFP5Ezsu?= =?us-ascii?Q?LGcm+xrNHm3pLo+JM827igc+LubacItdjHEz776/iO71PJlYoL4ErYWsSp/G?= =?us-ascii?Q?XRcnFOFXoSsE7ju1bHE1CijHf2/EhJ2zJ6E4id1XRtGgKp/28aT7hum7BcDh?= =?us-ascii?Q?RlP/SaNTJXyPJlA6MMVe8CUDN7jbByR/8e3hwu70SJOJo8wHOpCEl7iwCP4R?= =?us-ascii?Q?ikusvd9kTsza0OkJ+QdrYjbOBupaciOExTa4/49P6lnGNEvRjREsZ2v8zxtN?= =?us-ascii?Q?AelqCPxMwRgBbJ1Wi25DJqcoyKRUpUoNXFaImbox5dT1ecds6sp89eSgYHx7?= =?us-ascii?Q?exsUEBH7rC/ruyNKI8NTor77jw2yOjLw0nfuledJQH0LvnC7227clNPIDNYH?= =?us-ascii?Q?T76lkNdnKrUw53mqVGUnE9WnznNBEPFqAtxdGY7eqmTEtGlHhbgv8czPPkUf?= =?us-ascii?Q?riF2Y215kE4bY/ZTPFg+Weooi7Nta16g4sRJvXnF?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b2fd7a23-eb07-4190-c2d0-08dcf9819cf8 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8676.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2024 07:57:06.2352 (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: rzMD5tupll80yODrMMz9F4aSzBiIfc877Jv2qOSYatXFi/9sv80cnJoCAZmnJMVbrE53qdkqvrwDhcCTym0SFw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8139 Content-Type: text/plain; charset="utf-8" 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 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 | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller= /dwc/pci-imx6.c index 808d1f105417..73cb69ba8933 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_CLOCKS_OPTIONAL BIT(9) =20 #define imx_check_flag(pci, val) (pci->drvdata->flags & val) =20 @@ -1330,7 +1331,12 @@ static int imx_pcie_probe(struct platform_device *pd= ev) imx_pcie->clks[i].id =3D imx_pcie->drvdata->clk_names[i]; =20 /* Fetch clocks */ - ret =3D devm_clk_bulk_get(dev, imx_pcie->drvdata->clks_cnt, imx_pcie->clk= s); + if (imx_check_flag(imx_pcie, IMX_PCIE_FLAG_CLOCKS_OPTIONAL)) + ret =3D devm_clk_bulk_get_optional(dev, imx_pcie->drvdata->clks_cnt, + imx_pcie->clks); + else + ret =3D devm_clk_bulk_get(dev, imx_pcie->drvdata->clks_cnt, + imx_pcie->clks); if (ret) return ret; =20 @@ -1480,6 +1486,8 @@ static const char * const imx8mm_clks[] =3D {"pcie_bu= s", "pcie", "pcie_aux"}; static const char * const imx8mq_clks[] =3D {"pcie_bus", "pcie", "pcie_phy= ", "pcie_aux"}; static const char * const imx6sx_clks[] =3D {"pcie_bus", "pcie", "pcie_phy= ", "pcie_inbound_axi"}; static const char * const imx8q_clks[] =3D {"mstr", "slv", "dbi"}; +static const char * const imx95_clks[] =3D {"pcie_bus", "pcie", "pcie_phy"= , "pcie_aux", "ref"}; +static const char * const imx95_ext_osc_clks[] =3D {"pcie_bus", "pcie", "p= cie_phy", "pcie_aux"}; =20 static const struct imx_pcie_drvdata drvdata[] =3D { [IMX6Q] =3D { @@ -1592,9 +1600,10 @@ static const struct imx_pcie_drvdata drvdata[] =3D { }, [IMX95] =3D { .variant =3D IMX95, - .flags =3D IMX_PCIE_FLAG_HAS_SERDES, - .clk_names =3D imx8mq_clks, - .clks_cnt =3D ARRAY_SIZE(imx8mq_clks), + .flags =3D IMX_PCIE_FLAG_HAS_SERDES | + IMX_PCIE_FLAG_CLOCKS_OPTIONAL, + .clk_names =3D imx95_clks, + .clks_cnt =3D ARRAY_SIZE(imx95_clks), .ltssm_off =3D IMX95_PE0_GEN_CTRL_3, .ltssm_mask =3D IMX95_PCIE_LTSSM_EN, .mode_off[0] =3D IMX95_PE0_GEN_CTRL_1, --=20 2.37.1 From nobody Sat Dec 14 19:09:50 2024 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2056.outbound.protection.outlook.com [40.107.241.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99F3B1552E7; Thu, 31 Oct 2024 07:57:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361436; cv=fail; b=AYKIfinDgQImpYOKzHQNZkwSzPmK2MGyQ54fp80uuBn12htIWtAb/BUnKDDCr7sw5rwgNNcNZjLf98uc83dvcGR5Zi6prvuaSLLzmYEl//bQ3asrnSVbpj7lGyr87Jll/RNSOu1fMvMpZTLQ5LIUbqkQm7Fo9ieb2A7jQMm3Z5o= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361436; c=relaxed/simple; bh=4OK51XffZrd9YSPk9saIAMj8E+QQlTlRpzj5H2SyVyw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=FJAVlw/3oLCdG0CQqUKLlNE753VEUIWD9qQ/6lUQmQT3eyV3IyQ3bSAEZV76+ndrXwqAhV40YQnEUZwrYYkbVB8UReYgmfixpu4JqQlC4knHkN7HR2zJsoCsO4Bua43rswWSqYC0lc9IPGYYgFmmqUNDstT6XdgiFTxUAVO/WhA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=A8opTlpR; arc=fail smtp.client-ip=40.107.241.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="A8opTlpR" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GbIp7cPvNkd1p+y6O8AET669nGLujN9HQulKNyXddxoUvmx7fYkjcm1Ds884No99HzJOBh5an8jNVA6VsDDAi2SwFtom6KgHcw+Bn0RfQvGkkAi5nP2ImA76R3opNwzPNm+QTWBAI5gzst/WbpLILcBHLPjBxIhC3RlegdTlZXJONfzLBQqLDmZgWLVo8hA3Y1yhW43wfQdTrwYbUbzhK3OVsST3wyi1V15o3yraBP5XeMBVBgG9sBpsf8Ofla+xgfmde/GjzrJLNTsKQZnlWr6XuaRSztLTB41/xHUaNo+fn/0tNmlYXcOblgddzNQ6AP1gzDwuo7BhbDSG8oHmQw== 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=Gz9UKRtTNRCDO2SlwBfibjbgb6pWyEkAXpbyXezHnpY=; b=pTA2WdGuCV/R+vKD/I77umzhGn1V5iT34TcK81ZMs71uBnq6DaJBTkxs4OatBVWb6nqtwTfidbJroWYriSGPIM1p0R0jFKlSh+88lCiyiSlf2DS3a2tK5pkYEeSFTbhlK4h/uwr/NgyQhMB04XHXEd+JCXm2QhN59foXfpgFTc4XljaMWGAyD1br6V/JxyZ+Wuc8oDk3toTX5uYhSUBYP4U3mc8W5Hfj+Yn7DOhCIe00TMZ67z5c9vKhOVx0uzF525db6wyF9P5/x3ODZ/68QajQsU8ev/7LPmV3UrdkU5WIjA6sjRXUrRAjiuqSTwa9g7waJKjOJwJz5aEEsJXc/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=Gz9UKRtTNRCDO2SlwBfibjbgb6pWyEkAXpbyXezHnpY=; b=A8opTlpRZyUcqPjgV0HC25K3hZanonMsfO/YiHy0kZjm5ikF1MjaTkhRh+79sdCwRLehLl6kbOD4RFAHDe4I8Ee4SPxdFP67Au56QJrv16wPDKFmntD2/H/O4YF3y/tRov/ZX8Of3jXeetgHMUQgaktdeYZiZCAiA4SHE15dp8GUoLeKQ7zbKRLkf2gVgDyL3UsbuesFzqd3kWeqifpKUg4YCM+hiCYlO/e8WENkdy7Kt4XivRRsr9mvSklphvt79NHbztF1AoUa5qj/fE+RpV7HlTiG2ZOtpoUuC1zNqhc2W/uDoZwB5lNZu1OTwJzjbe7qQqiZSnSvxklPhr2Fdg== 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 DB9PR04MB8139.eurprd04.prod.outlook.com (2603:10a6:10:248::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20; Thu, 31 Oct 2024 07:57:12 +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; Thu, 31 Oct 2024 07:57:11 +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 v5 03/10] PCI: imx6: Fetch dbi2 and iATU base addesses from DT Date: Thu, 31 Oct 2024 16:06:48 +0800 Message-Id: <20241031080655.3879139-4-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20241031080655.3879139-1-hongxing.zhu@nxp.com> References: <20241031080655.3879139-1-hongxing.zhu@nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SG2PR04CA0184.apcprd04.prod.outlook.com (2603:1096:4:14::22) To AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|DB9PR04MB8139:EE_ X-MS-Office365-Filtering-Correlation-Id: e560d1e8-bd83-4cf1-fcf0-08dcf981a05f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|52116014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?IwhnpRSLKOACGygO6QkpNBW/GDPW/QGXfsJF0+qtoLPcmzvAO1I+0wR6y0CM?= =?us-ascii?Q?wbOFP5tPuHi8gdN6KMkFtTCGDFofYbjWjB7fJzaTqKHSWatn+oovCYY3M7w5?= =?us-ascii?Q?+lGn5GQI92lbE02xwlI0y7KsvhGo99Ns/Ew6v7hhvliMrKO18GuNuOiIFpVJ?= =?us-ascii?Q?uSlDJA6cZeWdUF/TunIN5sHRofgIt/rGeOOijXHd+YycWYr6nUFaEgqQBQ0G?= =?us-ascii?Q?sT2+5wDyKEsrsR0pQP7IlnbimJXeyd2qnDK7zaLYDIMj04/IzPXb6z3SRt0e?= =?us-ascii?Q?G/1/TojJdDlP25wEDXUalJ/vqT7xY3Vd9rESJyE/S1IQGafihzKcslnYlqoq?= =?us-ascii?Q?Jn7n5kKJVeAvIidFydgQZU2hQH0gtJbofjT62ovfE2EhsQ9vMfrQB6nnZSEI?= =?us-ascii?Q?XIXhEORArT3eg+vFoYRsIb8sH/ZhiMGsDFzaTVRPyPuNgIIragbKWaIosr5B?= =?us-ascii?Q?brFZwOelc+sCd895bYF3NgPe2+CNmair7t6RFNp6PsqGNNuIcwlt9AI8VF/h?= =?us-ascii?Q?YhkBPC9afSmSKI/1uO5HLW+tgkrCDEI0S+SOZ5oQPb9GO7I0vEloZopghkOg?= =?us-ascii?Q?rMfruEu0cMMgYhDzGS/OWDxljcenkygmUi/VcKm4kDwE/Jlj6f1j3sjo9WpH?= =?us-ascii?Q?PT7LkWFAJSbURa2GEzsBjLVam0dDRxLle3ECMokYb5wy/rUz7klatFcnbjsr?= =?us-ascii?Q?tp97VZAjCRd5MeKKjXVBsEbNbB2+yUcUcLLw7+fytCozAtMbXkVXoKlpoYBy?= =?us-ascii?Q?b9lk6bcXzPwIMPD9o/5hlFifijD+1iVsr6wS8KeLuQYNy6ZvB+eV4NvVws2z?= =?us-ascii?Q?78i6RPRPAr22LSOrXGLEHXjIWBOVCGBkE3L+CudAatjUQku4Qxhj/yYl0kbX?= =?us-ascii?Q?pDxxDH0OcETSjrHSPUqG9kSVO5WQhh3j21eVwYgDutan/4382BWcDe3U731E?= =?us-ascii?Q?ozmOujOA+VJi6ZzGQ1vkPHzl/yN3QNf+yBUj6kqa2EExCrghgLwQoNXoWMgq?= =?us-ascii?Q?B9mXTyqDHal/RdK5PJTy+kVvu3pzMJd2oDC4c5aCpq4V7Qyfwi7VnxdjA/6X?= =?us-ascii?Q?+Dziu6iqCtbFwHgk2lvgAW6QKswWZz6HtgCRW85Ix6z29JH3Io177+LGV0om?= =?us-ascii?Q?6DtE047qJaGK6/ca4FEI/4nWVT9iRUbbmCuLofH0JYBxihdU3RoW660Tvwn5?= =?us-ascii?Q?9VmnJMkE460vsqkLZ4l5n5qcECnJUBbI98CCRnRyB69Ojd75op0t6dc/siff?= =?us-ascii?Q?ZUYUZwPM2/pqt7wcJjmW6mcPvfh9bXz9SAtv6comR9Wtjui0EG+15eau5FC+?= =?us-ascii?Q?LpP3lkv0mGyfVDuc4BqJGx2Gq3gBsA6f8X2Ljr9rINj7UwA1407ABJDnwJO7?= =?us-ascii?Q?g6a5ZvQeP/UK3TrtazAb0NCWeOGv?= 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)(7416014)(52116014)(376014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?TNk1FuE1eqexW2/UDFYU+qHSLKdkr86fXlu4Ct39MoEsju41HTW0deRviqx1?= =?us-ascii?Q?/EWEYQ0KZoDlD9RA+gWG6+HCNY7vQgTPCCyTLSbIMcTlRbGRW4Jc6U9j/8QX?= =?us-ascii?Q?Z86LPXd9fFn2TkFbvKYeklmD6BqwP6TjhD46mJY46R2TDK7mHpeWbIMcVuv+?= =?us-ascii?Q?N+d1TqQ70oRlvLYSaDLosaQCuZoXcWTW6gsMoWD/cirtggmidDVNQF2tQOto?= =?us-ascii?Q?Lj7nDJIpHCx21t9xXM43aYXmpoGOynfnDg7f/yNtBAdNkD4SDQGKvdEduYpi?= =?us-ascii?Q?EPuwXiR2YZk2i6Jb0ODLGdrUVrGqz/lGI/tokDZwW6bzEiskhnWTHaWLnYJG?= =?us-ascii?Q?5gp+Zcj+WqJPQD4kL14/p0JYxbjP4nmMMAKAgGJAgPGO+3lFpghq8D+OSGRD?= =?us-ascii?Q?94r9TdeWdevlvrs2006+flDWXAlkczEFnTJwBdMxG0rZu9oAKHyGmiLJzm+5?= =?us-ascii?Q?dy1g0vFyfBT5dFghQT/yxieyhsRbH7CeZg9tjaaVubLz+x9jDQESQtCA3SZi?= =?us-ascii?Q?44iSBy66H0PzHFBfJuKb8JX2S8U+qCp6gnprHuJbr0yCg51GrozPNbXhnGJx?= =?us-ascii?Q?i7JS1LjZrp0aR7xs2Z1fI038M/JsrnZJB9+UM3NCiFntnHtVr0D+s426/K36?= =?us-ascii?Q?s1GQ9J3dj7UtObtKE5XocZPhgaH000r3PNp7XrEcVaaMsJ6HG1hcet1hu2zT?= =?us-ascii?Q?DqJvQMTLzz/Ll7amolcWdQCAmofL3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-CrossTenant-Network-Message-Id: e560d1e8-bd83-4cf1-fcf0-08dcf981a05f X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8676.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2024 07:57:11.9120 (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: 5G6FG1752Ciutz78HW4C5OphHcF0/oukxNT6b9JzSYQI8xmBtQpkSB5LW7Y8znoyENijjeI5xNNTd6qgultZ7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8139 Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Richard Zhu --- 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 73cb69ba8933..d21f7d2e79dc 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -1114,7 +1114,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 =3D imx_pcie->pci; struct dw_pcie_rp *pp =3D &pci->pp; @@ -1124,25 +1123,6 @@ static int imx_add_pcie_ep(struct imx_pcie *imx_pcie, ep =3D &pci->ep; ep->ops =3D &pcie_ep_ops; =20 - switch (imx_pcie->drvdata->variant) { - case IMX8MQ_EP: - case IMX8MM_EP: - case IMX8MP_EP: - pcie_dbi2_offset =3D SZ_1M; - break; - default: - pcie_dbi2_offset =3D SZ_4K; - break; - } - - pci->dbi_base2 =3D 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") >=3D 0) pci->dbi_base2 =3D NULL; =20 --=20 2.37.1 From nobody Sat Dec 14 19:09:50 2024 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2055.outbound.protection.outlook.com [40.107.249.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62DAF16A92E; Thu, 31 Oct 2024 07:57:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361442; cv=fail; b=Jj/bKxFPsOYdWbSEBJtrBDEQsH3aDJJ0CuJxmJyojRQUTsMmHcv4GepVL9NUpaZEY7xYGbU9m5R5zQyA3klvbXX/fXtMm6NZ2OLhalMf0upSkJPTWR/7XLH47F5jhsVHaCE3C94/hbUkW6h5o7WTsz7V0k/X3I4SG9t0sqIRPnI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361442; c=relaxed/simple; bh=Lywi4pVRf6RPgUcGteQFVbPR3c+UAZ6EQsPmZyaXHBY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=aSuxJ9fUfwLtihRaD8+fQMcDe04jPbTdkSp7SN1i4Vk+//V8BsfyIAPKTZrXa3ewb+tY5hDknnoC0BxT+0pVDI8xeKUiuGgFTtMwKDVu9IqQmShHOjLFtfQL4KLQc0Js4VO290ISs6UBWdJyBqQecV9Vm99j3USFlXm698cMa/M= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=gPTM4lE3; arc=fail smtp.client-ip=40.107.249.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="gPTM4lE3" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bNr9qi1Pkfz7uJpM1bS71dqcUjkJNUJmssEJ0Po/7/BFRdhc1l2uo+tp/6IXMpPAVjAEeTGQqlUXzPg6yjMw4yg0j5+yTfbfFmovOSQMiNZEh5KlJppXW6QXs4RfOw7wwUArBUxOCUWg2rs4h0BmEj5yaLzCfNASu+wjyStXWcvH6XjXoUNrD+C+7YU2BQeuGyX7cEXsF3TyMy8pN8n1F8YDbYYfTD1IbN09iRLfG5vukzfBBqSmJAcX+/NzIHFhfE4DuMU3dMefw9tprCa6EwZBTHjgqoom11EFZc+Fc0mKemUfBjzhQDV7DZG3Vc+XB7ptQ/TDgQBBPT3SVgxWLw== 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=n/foMJLXbrz0qbnxNQ57gS/EpLf9dk983dskH5fpV0w=; b=hYk3BCpz/QycFgaXKbWe4a+XDTVxeagaS+RWIXHECN0gkTRwa+xq+ejpAH/an5e8Duti/Q04LeKGLQ6yyplvtQL4ghvG9RSJNcrDS2huIsI/F7bYKWpfD1tOjHOoI4TWdmnXLFSR9ouYazRNsI7WVIwjPaIjgolRpl22nWdm79lcjEOTNxAn08eKAPiFcM745tv8OON1fbWcLV49iNJGAoWawQA7gkHyv2EM50LCpg3c1ZLETuLJAIIwdKarfz0zSHzUxMRjkVLkqEYVx3yPbWlVpSp5f4y3sC81X0qLJIQhXlIPja4+ZIL6oyZ13JoNeqTGoFyDS2meWWHK+02PCQ== 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=n/foMJLXbrz0qbnxNQ57gS/EpLf9dk983dskH5fpV0w=; b=gPTM4lE33rv7qriY0jiI/4w1BKgXtV8UdiBFPghTJ63U8utzNd5lEVnSTSSrpgqUMfEG9Wn3AfNFzEEAZ2xISAdxwazBEcZM8OorFXiUevbpozvmlJ3SH5Rq2otBqkh4IZXPcEInI6lDWZZ2Gi90CDfUriDyaS0A1tbBbsNGDJWpjTjl8kV0QWgtWOfvUC1CmwS+ilyLDR1NDK4AldnIoj9Z+6I2X4nx8EcV7bVhGa3vg1KeE/pbPYJWlodhnsTV3cCI25mdpZL2s3JtTWY2vkc/HvJiJm31UpPLtvvIrvGPEUZgFxoXulKHywutA7z+VN6iqJIkvrNTxXTvL2tYnw== 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 DB9PR04MB8139.eurprd04.prod.outlook.com (2603:10a6:10:248::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20; Thu, 31 Oct 2024 07:57:17 +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; Thu, 31 Oct 2024 07:57:17 +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 v5 04/10] PCI: imx6: Correct controller_id generation logic for i.MX7D Date: Thu, 31 Oct 2024 16:06:49 +0800 Message-Id: <20241031080655.3879139-5-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20241031080655.3879139-1-hongxing.zhu@nxp.com> References: <20241031080655.3879139-1-hongxing.zhu@nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SG2PR04CA0184.apcprd04.prod.outlook.com (2603:1096:4:14::22) To AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|DB9PR04MB8139:EE_ X-MS-Office365-Filtering-Correlation-Id: d9cfbcf3-d6ec-41b8-f257-08dcf981a3d3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|52116014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?d4CMnpC6izbMfSo3TsK15okcFcMoq1KOpf2z/zZMdOWPQG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SXaF90cdHwSfORl9GwxW2smk9RslZ?= =?us-ascii?Q?nUEiJP0ouQ53XvfZMwkxH4GxwvetcWlY0tQDnpC8hMsBMkrSxlQhnmoCiz/r?= =?us-ascii?Q?/AIbDomHjkmx0XwqtnhIMTjtIC6oNUs2mrDIhqOmN5b6dR/OSkf88jF6GKoL?= =?us-ascii?Q?tONg+OOUkYVCUuQEawiodymazIbZKIW2bndWSBVJ12i6fjdTphHvu9D4myi1?= =?us-ascii?Q?MAIrIrZqXdH1B4xb5hIvI5hMQpJtif36pVORro+38u7ahZJb310lf1qOGqYK?= =?us-ascii?Q?FeD+9bvCrSj5XDnvuEOwYlmTL5r+pztcHf/zTyNe3YqCGe0Fs+dVzoBx8dPK?= =?us-ascii?Q?qqLD2OQmqQ8EiUHd+njU7tqji9HEMZ/0LW2U6DIeTvfYErnBR/AjZvxwMeA2?= =?us-ascii?Q?84BqViuZ3TBaLWbHplBJkp1XK/FO/DMvcC8Xi/WFlj/8hK6M6Rfdqh2YE6ne?= =?us-ascii?Q?VSEEEdFUPF0x13nVfoB+2KGQRgAj?= 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)(7416014)(52116014)(376014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?mSiEmeNe2fDiwLyXILcwqsBWwSV8/8R9sbekQeMcUZCw5u22nB4ibW6o40jn?= =?us-ascii?Q?KL3ci4sk2RlWiKivtcPZZwe63HQEzot8XoSfk3t2+Zr3PaKGYD76VlMTWlEu?= =?us-ascii?Q?MeoxG0Fmqiwccjv7MTkg6P7lMuFL5IKHjeK6fGc6aVUGe7DqbH1E2yldJk/t?= =?us-ascii?Q?mCxjW3NQOWZBR6eiLabw0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-ascii?Q?cDBQEwF3iEO3HzggEYd9iJ8gpavmmhdETfoS6XNBiL8ftaXA0IiA/tpvQPo6?= =?us-ascii?Q?iupK+v2ubzD7OeNTEK0oZCFSIoo1nSDHY7OdWuije2pNKanaf11MRPXZdxCU?= =?us-ascii?Q?Dgd+bsU0qmOGF0Q2dUVqShnONg8sDfJS/rgvPAC4DzXai00ELr8DalzmZUdf?= =?us-ascii?Q?+uZtFJsOA+bnLE+Y5jDMbPvFEUCr6vtJFbfNFO1IBDvUSVHAQyhGXEeXxcRS?= =?us-ascii?Q?/DoFUTDdfGyUe0gIFXbiD20gFS/Aimsn6UsiqKr0/Bu1rn1EKEokvTP38Rmv?= =?us-ascii?Q?m7/xn3BbRWdFJ6E3QnWdmnI6KuBWKvEL++qrRKQX7d5WZb/+OAMwQu3BCQdr?= =?us-ascii?Q?jlKjWD8i5kMzCcgSIo9GQnih/5uN9StTMZ3ZfEQtJ3FFcLygv95/6DpO9OwZ?= =?us-ascii?Q?ygqe/w78eA/Z+sey7gViOdAhij8O/Zvd+BTGmYvQxoIGd8Y2mZB4qb8WAty7?= =?us-ascii?Q?q8QW32RA21cmrCL5Xn2rRDXuCvT8wDPzHFcbIn+8?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9cfbcf3-d6ec-41b8-f257-08dcf981a3d3 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8676.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2024 07:57:17.7557 (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: 9XCQMS2KmhpDXyEt6+5jhee3PuB6/NReMTmvSLjQkHTEzYX6qXa21jIRXeoHeIcgmXqBCRPMSd0q/kDMBFyBvw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8139 Content-Type: text/plain; charset="utf-8" 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 --- 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 d21f7d2e79dc..7479d3253f20 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -1344,7 +1344,6 @@ static int imx_pcie_probe(struct platform_device *pde= v) switch (imx_pcie->drvdata->variant) { case IMX8MQ: case IMX8MQ_EP: - case IMX7D: if (dbi_base->start =3D=3D IMX8MQ_PCIE2_BASE_ADDR) imx_pcie->controller_id =3D 1; break; --=20 2.37.1 From nobody Sat Dec 14 19:09:50 2024 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2069.outbound.protection.outlook.com [40.107.241.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B556717B50F; Thu, 31 Oct 2024 07:57:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.69 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361449; cv=fail; b=o9uYrM98fMlvs1vGrjgz08TqbLtChYKxTOLsqgweBZohKwEHs/awiDsbV86jKG/EE7MphJjuVcb2LYSxgLaCYxK7b/gSiUIAXtfJGybaETxyPjdA6cNyhankyQ1xZzKyZ9Ho2HqoEePAiMnwdnh8OjEr9+tK8sq1brARDIr+0Ks= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361449; c=relaxed/simple; bh=DEdS9qEOvhNDr49j+j3KKYQoOAFdeAB5ICcC3TsyrE4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=DuL9qAu2fyoOs9IxAVBMH+q5gC04ofmxhpqgLCHQ8lI2KVWQNCjoAKeApahgOoY454tkylbH031juD0uycsVYlaCI/10/l1SwkJ/62DAn9NzN73CEk+cj2Hp1Wrg4oCHEGy0xyqRBwmP88MitA5nohLF5ynG2spVttNdXo972ag= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=de9UF1f9; arc=fail smtp.client-ip=40.107.241.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="de9UF1f9" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rUO1A+sTIzFVcyjY52OvUypIqcLFk6ZlXWe3seYIyODQSs2Yxgp6EGYVV3kMnKyk+XaMwKGlR4kJKoAQ9nJGQElXaDTFmxYXqym96m6lJriz78J69ewBLAJKmjPPMOARhpSpImLdpEgSSswsKF16TbbQJoBMx4RP9EP7SRTaiG9XBKw9tTS+o69l7YTkCqVotKmT0ytUHHc0xF0hJqDeZykm5pAulHPQScpUYVbb0m+lNK1+GeRO4+rPpbZk7iJ+mlqTN+MJ3Jm9TSm/Sxm5Ksq1K9gPgsuAYiG7UJEpPfGeSElIRtqKyUYkfmSEk6NzU4wI0urMSz3CzNhWS5Iu3g== 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=8cJuVE5Oe+ZUPDPWv61QsRWeGGpZuNOJWUAEqPFt9ig=; b=R+XIO3BhpFfy/J2h4m71q1xHHiOJUkDUZHVQVtKYWpLMoyYGTGzexhUISrIRM66WJlW4oqCH67dK94VVGSaDY0kfPJhOoUM7yNUCuDWIHM50QEJQfWwEMAfQLpX/vyLtuiH6yoKpJqyFVoFGv759pSRIrWzfCioZ86yV9KUqF+AIJaMEdVQ2ryjyNn3oyjCbeoucAccrTC2bSyPd3c4AUkimCpWtdRFs2NogOCcTvW6XbG94DQIYHpRl0NVYnGJBOG/aTK4JYp7lIIRwZUNZ3dEHY1xqb0Pezl3vO9pndJYua28MMzK60iDaU/vtkO+t4T2lHpsIQLBCBrd13EA5ng== 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=8cJuVE5Oe+ZUPDPWv61QsRWeGGpZuNOJWUAEqPFt9ig=; b=de9UF1f91dsrJJ8zbR4Hm2NBIWyeiyNsGZIiNN55bgRHeVo0cNkAxz6A46F4wa4QrrUEvpES4sV63jksI1GsI9PTKLYwqpDgdTpO/AydloOJHOS6A7EBb+iHQlGOFhg9KkSmv3xQDxbQe0+BBE5ojFRr6hC+xBy4rtzRiROblPF+7M52iYfJhuGJZqeLrJSi03nmXF/5646vmtb38sv608Kacjmc7LlFcWLqCx01yFCuhW0318nIgTDg/T7jPfgTOzjhlc8+2GPQk68a09OQVumalH1HQRZMSEkM5eNTBoF3gDOAacK5SborwfrR6EvyPUDLgZF+X9TSIOlh/0gdkg== 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 DB9PR04MB8139.eurprd04.prod.outlook.com (2603:10a6:10:248::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20; Thu, 31 Oct 2024 07:57:23 +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; Thu, 31 Oct 2024 07:57:23 +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 v5 05/10] PCI: imx6: Make core reset assertion deassertion symmetric Date: Thu, 31 Oct 2024 16:06:50 +0800 Message-Id: <20241031080655.3879139-6-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20241031080655.3879139-1-hongxing.zhu@nxp.com> References: <20241031080655.3879139-1-hongxing.zhu@nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SG2PR04CA0184.apcprd04.prod.outlook.com (2603:1096:4:14::22) To AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|DB9PR04MB8139:EE_ X-MS-Office365-Filtering-Correlation-Id: 386763df-00ac-40e6-76e0-08dcf981a748 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|52116014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?wpNjrIKRQdRVRuVpOTFDeR1Sm4YYI6jijwd9W0D7rIGsnfgsAiLDOYUbJjHu?= =?us-ascii?Q?UisOuzTej2x1IFth1hP1jtSkc89e/uT1vBeEdA98YCJIvNSYbdtlbcDI7xTj?= =?us-ascii?Q?nA/5iTC0KmYYsZyw8P1NcqK4fNjgy/3Kq64geUr69F9zrcxuBPWfm9OPSuKd?= =?us-ascii?Q?ISicEVrpH95gBgnt9uEeaKAYGG7cHjOVT7OxZFzuXDezntVh/7/PVvTKUlb6?= =?us-ascii?Q?WhL/jzPQCykNVbBHez3xGhG772jyhnPzA44kdjnj3Z64pBX1ZtgcfYbsGztu?= =?us-ascii?Q?Joeb0dfYw3Yb9/AfCTZEZQPHkbGh4XoXfsEdfBy5UAPJ9aqoAjl8ulE8kZMn?= =?us-ascii?Q?BWWZqFYrrLM/CzkI8AsgfpWeyKH7gHaX7qoZILGgXylI5r3gELp4UV4ebHpl?= =?us-ascii?Q?6/Dvnb0/UvUkXsL/HTqtqNS18zOOsFELKjiA2yy6vA9TYZvA3+0FxSlsMX+p?= =?us-ascii?Q?Em7QGjU+Qd5yJ8UJd/2XwRZzILjJYjiiAjAa/RS5fqIkZ7xgIW+CVQzBK0r7?= =?us-ascii?Q?ocvsSxV3FwlqCaQ6qneyRG4iMoR9+8VOouflNvb2ALBkkkXQ1HLxN/jqduNZ?= =?us-ascii?Q?02e8dKx4EY0lM4U1rKZqw34hItNOsUMBLyCMp2lOzhy4RWEFDUbjRdILONLl?= =?us-ascii?Q?TrS3tkK3M+DdnFCCDND09JGpzrwDeTyCCfOoKWvhUIPyLM3Ge8AyTl3ewTW2?= =?us-ascii?Q?V8Bqh3IpIISm6Qlm31MvKa/j9mTVJvqyI6nCwkFzotOIzdJdhRQc3gBn8km/?= =?us-ascii?Q?aoi5gtHV3IUzWFX/qG9/wDNPRMCSfL2N3u3GRTZ4MPAzer3pUWg6hwbMGzdu?= =?us-ascii?Q?hKCp1Fx5a5BHxtuolyLbKmR+BgJVgm3gp1SwCMdZIy6ryxfCaWPcqbVGohhI?= =?us-ascii?Q?+dlJwPGn5Hw0U1F2jozAd4pmD5yC0JO7Q3SDCb4okoO/NhoDxUKq8lltNMfE?= =?us-ascii?Q?ujXUN+SXHDTJuqIsUEWk+CPqs2Pf2xMPhpdCpB4gwUqmlKftMYU7IdJu0X/u?= =?us-ascii?Q?hg3rU5/8kuZP5U7ut2U70FH9HEtjaQr/6emrCF7qIudRdzYmrMd+bpBkOf7k?= =?us-ascii?Q?EPQnQ8bb0zNGWuZp9VlrlqrBde4RrnicBZXOnUIJmSQnLKfoRY20YNugizrZ?= =?us-ascii?Q?j7JCFy2MK/q04h1vB08G4aqP5Vo4vhg4c1R56Ir2ehTjlua7jFJEIHO6gqNM?= =?us-ascii?Q?Li4UaZA3YPf4njUzn8R6Jmg2zOju65MerTMDOV7YTbBeXZBGYKtydu8DgjSV?= =?us-ascii?Q?psOMgeWoSDt6vQ/ms2s+ivev1iBHJr8F2oCpwKYyuWlala+Qg/ZHXeya/wcB?= =?us-ascii?Q?V4Vh3V+k9y1SQqK0+1jVCwvI/Q2PD/ckUSEJV9uAnZ88GlyJNTtBuq+k2faX?= =?us-ascii?Q?oEPfT5ex3lkiOcahRwVWC6UdefID?= 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)(7416014)(52116014)(376014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?P9C629F2pPWTO91wfggqjM56IcqPlppp6VCByDQA5Hk8usI7mmVMfwDBPb6M?= =?us-ascii?Q?/2OTN1qAFDBaFwn8WMZ7P8q75glDykROOvNMSHke83d3eIz//h7Uac1DwR44?= =?us-ascii?Q?v26Im7UxysPMPsN1gQ3wKM1rrK2T5YOBDBAIAsphdyEpcRAl96MqrRzQ9ITT?= =?us-ascii?Q?9xjWhD3Yhn3S4vAo9cSMYR2YXkUIxSolnl1Hy2fZKmVLQyu9ya4VM3eaWN1Z?= =?us-ascii?Q?JUPwDtsPCHSoKE14ByEhyqKpeoYTsRXLNh9PFftGydNgyHXvaAjK1Ok63Voj?= =?us-ascii?Q?vMApoDKGG5k+VRvPFZBXWX3j6q7k+N41ebEzcoRXGvPQAebgHZwHxOx2s+GT?= =?us-ascii?Q?h7l4ohISyvUJaSNhHDgTKpLuABmYUotkfm9AZYXt7xXW/aENT3cuxzkN4FGN?= =?us-ascii?Q?elcUK0PXpcxsZpDU9UbmiJzU6HCu+YQWEx5BqKzAccSpHGcg2FDI8nGS5pK6?= =?us-ascii?Q?VlMNbrc5hBZNzHuU8ITRfrsryN/x0hxLLwhpYm/aN65KZK8af2Rlkdn4Wh3y?= =?us-ascii?Q?yBb5F88nyVt9WBvJb3jM+e0W3A24uu8nUSowil3FVpBuCAha5sWvbWJB/2Bw?= =?us-ascii?Q?xvUmsSqCN0wwhVatgLWCr2/zpIUH6keu0Ch1TcPSNY+C3x/HxVeLFIlq42/P?= =?us-ascii?Q?fFwZWHdTC8JaYSBs1svuI2W87HYZYcpg59OLw8ni5sRLCeh50t3lKoLVryLE?= =?us-ascii?Q?RoQiAw7J2BSp1ctuon2Gy+lbaAvbdzWC87yC1rp3lkWBVz2mIcTTJx+79452?= =?us-ascii?Q?juEZriJUqNY/Q+bHGwqFYjhn34T6eIMuGr1zDG2MoG/IdMfxCbS62bUidZ/L?= =?us-ascii?Q?5RHiEqPP9t3t+OJOeQpbkyyTkAGpgCRFwOFiAEFOcn6CM38WcMRLW7jRefXN?= =?us-ascii?Q?7PH8aWyeyebPodvO76etx5gGQzAUATw6xHl6uZmSbAmSwTRHVyIfnoCWlMyS?= =?us-ascii?Q?muHiSEssgzmIdYNx3dmy6OZzad3wxOOfET5zB+dw7x+SjlMx9hpJng2SSXYR?= =?us-ascii?Q?pNxC8lOJI7ezDS9+GFmGVIsFf5I8gXLb0yuledLlImZjVwqP1tXQ+k3qwgFE?= =?us-ascii?Q?BV3pMC3ICly1AZgbshh7qCmhoYJqqxzzLeLivkG9en/mQnm5BT9HzAY5lK8R?= =?us-ascii?Q?DJ3naME2fB/DoYczfP6q+kQ8R22A4e/J+13XqUNjY00MyiCGQIWcfkUYLsRN?= =?us-ascii?Q?cMalFI8B7ibOzH02FA4qQjAMfVFL9punlPvvzkqJhftc8/xvAY7o12indDVC?= =?us-ascii?Q?cTKKFNJA2BPJzc21PjlH6eKyJ+v4UwrFZgLLGpfc+M/EI/UCQeeAL9LofAmh?= =?us-ascii?Q?JNVTwoWUb3TC5ngOyeeCUKi8mvoozdPQqlo8gxPZJNS5du3kb8UPoVNVA4vn?= =?us-ascii?Q?uQ7VRiSivAqO0lLr8foeIvX2T9vFM6EISyE8lRWqhk1PXkRcPUPO9F67wn89?= =?us-ascii?Q?Fcqz/Gle8TWS4P2liJKkhL06u0BlcL2O/H20F8CJCI8+Wknt+kEKX9SMkUkH?= =?us-ascii?Q?T8naNH+Au1M9bXojiygLV6feBFCeJa7YTNt1TBqr5nZVxmPyMJ9u5DOHbuGL?= =?us-ascii?Q?kb2nTq/ZKbeDRUz6mVcojGTOFdSfMv3Tbz4SrtBA?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 386763df-00ac-40e6-76e0-08dcf981a748 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8676.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2024 07:57:23.5763 (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: JYVtaSf6C6h8vEjdk7juLdS//FcFxpOki8A3wQMI27kSKgBjCXTFZ+VEVhGQbCpbuMtcSJSzoQqpu75vzjvOEw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8139 Content-Type: text/plain; charset="utf-8" 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 --- 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 7479d3253f20..92f2d2536ffc 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -771,6 +771,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); =20 if (imx_pcie->drvdata->core_reset) imx_pcie->drvdata->core_reset(imx_pcie, false); --=20 2.37.1 From nobody Sat Dec 14 19:09:50 2024 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2047.outbound.protection.outlook.com [40.107.241.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA037186615; Thu, 31 Oct 2024 07:57:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.47 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361455; cv=fail; b=aPmIL6qTk65tlbPQHJpfjG8zmoiVUz8CnL28tO/a5GLZGAuByqIybRNv4I14iQfvbYF7HWq4I11BUP+l7e0aTd+FcxdB0jXLup7j53eBaZdURpyn9uyNepIBoJvY7NG/6lKE011zwQESBc/vYFJwe8x0yytHc7gSB/42BU4D4A4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361455; c=relaxed/simple; bh=wgh8MWnQ5WiLKbTXhZ0tm2fvsa1yO/xAJIzWe+B2o2U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=ZnNwsOKcgmG4xergSlJdDmLA9N2SsPoFKMy6jhGUO0UGVDc5F5Gvx5cri1u/UYIOCFMCt1R3MyMs5urBWFsM49/VnA/aizVYeKM/sUO/KGVexztm68nWh6jXBgqxGJCCGLqEtYbxA4YmboyN5v1Dsh7h7TiZDu1Vo2fNbY2ekCc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=GSCFxlUM; arc=fail smtp.client-ip=40.107.241.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="GSCFxlUM" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rVQqPhhFzzAD58Y2w24FEyJO9ykbP9iM1APcTaI1bSkjs81fHd/BDUs7qe3uqHmcr/IqkrhmYyoQhh0mQcRmjBl7FLaFsXyPNrrLGSDzhLSOXI9tfUkVan/5AK6n2PgnAfZuAD1HWQzzpQrbTPFkWhyoz2qHyw5ERuzXEcIY2OE9AlAQchPeR70f/Q1waCH2mU1LH1PZeY6bpi/+2jtdvfH22KicmCRHcswbCiLP7D5PupdwzJyrKKf/NI5L2NvPbKtoq43ExIy07L7L1vRrelMfWUH+QoqGgMG0/wAC1fbimX2ry396+1KkqcWvhoeRzSVXlMuDfFoGwJ1ChsuDJA== 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=fnSkLIV9obQZuA+bG5vyt9kpBfeeKXGJOSCwD4qlG5g=; b=s6QCwjLV8okhJuYJmT/PPzde2dhQ3IABL4rYCqnRKit5EZeRBC/lH77H0lWonSoYqZMKI0lr6+ufASZCX9Akoh9mrvl8g4NFfhRyk9Ursok4sPXpZ3qHTOmUVfceXZZM/xbZCP17Dxt9iEMUCJVwdPXhx2moOx564tsfCAAOPZjXJIP6MmV6MTl2HB9A2demI7U/KAFYGmiXIkzr39YSDBG5wY2yqWhFH1MNsGbJ8RMy9s2UZWxPzrGIMNCdi43OhobGZb8SniML9pI4a2gI6GbvkjPrS+R49WQYKNh0HLQSIfV4APdql8pqtnRmSV/eK3pr+9tIw1faNF+KqAInqg== 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=fnSkLIV9obQZuA+bG5vyt9kpBfeeKXGJOSCwD4qlG5g=; b=GSCFxlUMWhm0dYTaPLf/x4NDgyY8fKc00hxK49BAbZ7HgFGqvLap0Q5jE1iGhp/1ULrLVDWRl76tGwBtdYdPZT9hJ4oagApG0LrTHmb6sj1bHrMyOo9S2d8pTt5EseMxKpO+BkylmA5tgsQcK2V24e0FO5bBXgZ6XMfTWDWfOXQHHHPCqrvik853lP3YhkK+4kLJU8iUKqpPzmlxTsctXgZQcJJVxNkr3rtk+ZC6uKozqaCU2G785oYCo7ickPKB4Jve4AqltZQNj37zmTMoF/9pRKTv3xViVV+FzdYkjORm7gANxM89Ipw5LNAkGUVLngAYhyU+h7UnHzY0LNnzSQ== 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 DB9PR04MB8139.eurprd04.prod.outlook.com (2603:10a6:10:248::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20; Thu, 31 Oct 2024 07:57:29 +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; Thu, 31 Oct 2024 07:57:29 +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 v5 06/10] PCI: imx6: Fix the missing reference clock disable logic Date: Thu, 31 Oct 2024 16:06:51 +0800 Message-Id: <20241031080655.3879139-7-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20241031080655.3879139-1-hongxing.zhu@nxp.com> References: <20241031080655.3879139-1-hongxing.zhu@nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SG2PR04CA0184.apcprd04.prod.outlook.com (2603:1096:4:14::22) To AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|DB9PR04MB8139:EE_ X-MS-Office365-Filtering-Correlation-Id: e0e5dc12-5005-41e7-65e5-08dcf981ab0a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|52116014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?DK7YjFBLbdKU3dDTXkAg7EQj0Fx2B/FqZOwQ1ThReJ+liwIvnFMLaN+l1ABx?= =?us-ascii?Q?minGuO9aU1YjWmE0k73PoATCPimBsZMdN9a0w+WyXjA0rvi5HMsY3WYeTMI6?= =?us-ascii?Q?qewUj1epX5acv6HPWCp/IGu2RjdN1QcUTsrPxa1Jj0ACdfUl1xERpsi8zkf5?= =?us-ascii?Q?mL2nhV0iSiGUAzwoC/fMM15w8pTHidk15F5e3GwCRetdI9/sZyU1tGbpkpuM?= =?us-ascii?Q?3Rs0TUDXRU/+9V9l9sreYmFChGV2tJAstR7UA7+Uty/DGR+CbUVABh9D9sUo?= =?us-ascii?Q?X648DyxcgHqdPRpIWh3LZPyhkYCO8j0SavD7dZ81ltjIdwYZ+CxELZDd9R6D?= =?us-ascii?Q?dKBPn4QVoZQ4r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= =?us-ascii?Q?NElQnJms8GNf5GlmiJTenYnNv7CMSyYgA7VVc1Ozg4GmLgszM+JVaV+YCEJM?= =?us-ascii?Q?cXez5iR2n05PZTVD3RkegM+ePTLEsiRj4NQPfekUD9SDmKcv5tpizjJlHWI8?= =?us-ascii?Q?8JeQf47rZgcoqzd0Rsmm2bOCbfGM?= 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)(7416014)(52116014)(376014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ZyheOXLonZ6mxBDDXNe4Qr3MluvHbuqGFRTT/pMPmTKMUfPrNLfCWS0VVs+Y?= =?us-ascii?Q?39vCcu/+IJgGI5ipWZNsziGekatuQBNukpnIgGwxUJwkzY03UT8lsQwfE2yz?= =?us-ascii?Q?G9Opv6R+DuHvpx1KALJxVleBnpBhjGqan9HB2FU+qLTmi1Rim56qK1nmDnAb?= =?us-ascii?Q?6TMiAt6qY3ZZjTOj7vHhuubZZsg4VLBEzfLK3TNb0z7Enj/GCLfYjv+7TJZN?= =?us-ascii?Q?C/Yuz54PaNyBBuCO8BQ6GfOoPEl4r/M1vvVj8ebP21wnkaUY7l/hwScJTlTN?= =?us-ascii?Q?ox413sxXOkAP2raKtRhKlSzriGBGe1LV6xQ1hrP2uE1NjYel8sKP1iELQfrb?= =?us-ascii?Q?BoJo/9Tu3HsU1YCG2GWH6I2lbsd7dCaeNXxYdKOlMF3QY+oRunPUsd1wCxHt?= =?us-ascii?Q?HPOOGjheT6Pu9z8/U0IUhgkHbb2iiTfbvGYDQzqvaDrZZ/eu7J6hMOzEtMQN?= =?us-ascii?Q?YF0Kqjd+gNFE+E3pbdjNK7O7/kgvuZtpHJG4S2Wa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+pjNW+izD0a9BtufTkDLA0DOzBJTwcGnb0T7QBPIJoPb7PYu?= =?us-ascii?Q?9LjhL4LEY9Cl85s+n8RncCGNN3fVZprjJlo3h3x9RF/BKtgHfcz3lJ/AiIOh?= =?us-ascii?Q?UqBXb7OKuRZkEYYfcXoCoMDLz6J4S+Dvzh4TTL+BwkYYtjxJZfFOEQYbimof?= =?us-ascii?Q?O8kfVb6o57NWXRzDCkf97Euoa0Yy/XsY6oGJqFWX?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e0e5dc12-5005-41e7-65e5-08dcf981ab0a X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8676.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2024 07:57:29.7304 (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: ZI/pP1JPUuIOqD0e0ofjIEb1mqpJFXW3NJ8XoNgLT+xVzM4egTAlGohJkP40rEHcau9u+7ppy2YKJ6u3tS9Z8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8139 Content-Type: text/plain; charset="utf-8" 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 enab= le") Signed-off-by: Richard Zhu Reviewed-by: Frank Li --- 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 92f2d2536ffc..e696dc9381cd 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -594,10 +594,9 @@ static int imx_pcie_attach_pd(struct device *dev) =20 static int imx6sx_pcie_enable_ref_clk(struct imx_pcie *imx_pcie, bool enab= le) { - 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; } =20 @@ -626,19 +625,20 @@ static int imx8mm_pcie_enable_ref_clk(struct imx_pcie= *imx_pcie, bool enable) { int offset =3D imx_pcie_grp_offset(imx_pcie); =20 - 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_OV= ERRIDE_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; } =20 static int imx7d_pcie_enable_ref_clk(struct imx_pcie *imx_pcie, bool enabl= e) { - 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; } =20 --=20 2.37.1 From nobody Sat Dec 14 19:09:50 2024 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2059.outbound.protection.outlook.com [40.107.247.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E1A5189B8E; Thu, 31 Oct 2024 07:57:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361460; cv=fail; b=cbd8GDPITFzGsma03jzeUyHO+1VNpWojH9p5cA7Nm/Yt7Wzgazr/2e9WfXFvyghAWwCl6kEaWYXeNTJXDEFaju8cOfQfbCLif1Oei0bjGyGe5x3ggHiGTE+i+CRK++vWLpT4DBWqIxz3eG97ZJy5dXe3a3ChBh/cEdrgRo386PY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361460; c=relaxed/simple; bh=6H1IcKkZ8HQn2jqLOVZwxXHJBZAWksViw52g43JCdn4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=bgHLgp9kn1yNWzjIkzCHS+CIpm5JKpH5djTxqlaqBlj6jCqy3Jl43G4l8YCxkedTsWMijj3ChKIOeFTEUKrAdtcu/M5ZbmSFh/W8eDuD7PElml6er8nnxg51/Iq4XjW+YSOpmaVPGEPVrj3a7NDrey1p2fl5p9jzDOfESnyp0C8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=SMoAf3FZ; arc=fail smtp.client-ip=40.107.247.59 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="SMoAf3FZ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Xp5tb0uvvd99Ds0LkG1c5d0a5PSzQJ3zb9R8oWSiKCrZgyIGxVFLkKnkhD6wVicKzNokrZLGpKzkqnpMZDPm9f3ENZAKJMQt14fHA7vMNOYlu3u1g+dOnnJm9QvzgTK+wOF0L3jzWLnLG0NA3C1Ay4S2l0nLEaeuEwxAovjp4h0haORYFhRD2F70fxeoaacNoDsuKEhfRy41fzmE6HghT65Cc2mP8//EtmmIWYKiBQlhmjf10IbVHQ/QpYXWYWjtRLwgcrgJAWEtnvhjZ4UEWiTYBCngL/590b6a5GBshEKa1DmsyNziyalpYBv6YdEfj/1Jdb4pXusl8TU24HGaGA== 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=Cm53bTy4F05Efkoub0PfGe5TKog53N+URySblXqbzdw=; b=Hp6BGvjOhkdlTEDsjWyUwpPS4vCM8EtOxtmfcsX27HSLpvs7mjtIuSCDQ5Dom9FXtOC9yIzLXbXnJB8F2uYt59Wn6UvZuDWekDjjWNnml0uOHg+xaYRVaxuGN97rPyF1DmDF+os43v/3PqAxUPqGWUr/9EhwM3IMfxRpu3j0gl4jiXNxVvcEKpbJWyLrt1FbvxosglQhCODFZS3YX+js125DN6QaZfgWBD2oGwtqM51Py6j6XOcXEQyytLJwdlpuyb7fm54PniqdV0beAW5xD8X1NNKuzAzTMZSVassuQsj+YctXT789OCnzPiTtt6c9nJb2lkdAFy5VuplWbVxTdw== 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=Cm53bTy4F05Efkoub0PfGe5TKog53N+URySblXqbzdw=; b=SMoAf3FZDigii/z07flBzot7uTDGdJCo/erOU3uvdkNKqV+WQdsU5+jTmkohj9sZ9g/dQksWLY9XVCUE92mbTWLgOpUmiImVtJ33EuyM66qCgUtyLM2xYa7V+f36rWFKRhC/sj7A48UUQElT2PqLxnORBor2dzS9EnLDyb+aoMKuulZYQzyCJvucLKTSn7ms4VIUVVsIg/NcCkkEbOWc/7uBKxESyRbL1Q2T35PFTWcdaOP+E7TEgXeobfxN9jGkawrglboimPdVmQxTtcUftNoSmWJUsMA0W2157D4VGWOf1VW1lwmEgYdj6pYsduHhPem6roZ05HZbpmzi5wkzJQ== 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 DB9PR04MB8139.eurprd04.prod.outlook.com (2603:10a6:10:248::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20; Thu, 31 Oct 2024 07:57:35 +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; Thu, 31 Oct 2024 07:57:35 +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 v5 07/10] PCI: imx6: Clean up codes by removing imx7d_pcie_init_phy() Date: Thu, 31 Oct 2024 16:06:52 +0800 Message-Id: <20241031080655.3879139-8-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20241031080655.3879139-1-hongxing.zhu@nxp.com> References: <20241031080655.3879139-1-hongxing.zhu@nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SG2PR04CA0184.apcprd04.prod.outlook.com (2603:1096:4:14::22) To AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|DB9PR04MB8139:EE_ X-MS-Office365-Filtering-Correlation-Id: fdaf70c6-5e1f-46a5-df24-08dcf981ae68 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|52116014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?P7HB2YxWU+nKbhY0ZnVns2YF4QMoZw+OKZKoGWiAXi2UatGH1yrINCl9ou3h?= =?us-ascii?Q?QvlY/NDTIGbdEaAacoJl9tkgXKb2WqU+hv/bgNpLM/RxpPInrJsPCBf8y0U6?= =?us-ascii?Q?oeUiUCSotnAm4Nc0V0B401ItxND0582JASRv0qNRJmciYWG6lQbKG72uXeA2?= =?us-ascii?Q?XBGeE+5H7AvF907Lx2JbtKYR4LzYERsb5XdoZ/CEgmQ4h+hR2sCvL4r40NNb?= =?us-ascii?Q?sxGqr0TWI66B6topup0gBJlFwc8/p5Ayd8EL1ba1XkMpO70mlIzOT1CxlPhS?= =?us-ascii?Q?biq/sv0+ZT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bga8tFvv1H?= =?us-ascii?Q?+uI9FoKk2JvjxDrDdcbENNbYhIANR38kZBDlQkV5wGv5uFN2l+nn4FNYi/Cp?= =?us-ascii?Q?eKh0e2vR2yDYStC2aHks7uoqfLNgJc60RzBDImrMREXANPySM5x43c0a137T?= =?us-ascii?Q?7U22pChkb8Yi4BtbEe4uErTtSVe+2apjz9Nnhw+DQXVUmP28xOy6ClLkMseI?= =?us-ascii?Q?t8g1wRORmwsYzLcYBw01E2dkldZl?= 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)(7416014)(52116014)(376014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?6tC76tzh/ac2O6/nxjWPCV+6cPJWCCPPuuMthrTZhnBOi+lSCgirAGVBsZph?= =?us-ascii?Q?gT5qS+HD49T51wmXXnzS4UK3//ymc6krIrjaO3GBzOcCnmQQFfppv5sAOwXj?= =?us-ascii?Q?/EdQckJm/2QCVTJFPsOH4aUESbKGxx8aWtwcVI8tQszcXManWWL+Xz0nHfMI?= =?us-ascii?Q?m/xzDmoanukTFfKbgAU9idybVGRgFAqnMIft534c1dSb7p3T800JdmAQ3tpX?= =?us-ascii?Q?ynmKsAfndG/hBWdWpDpdSlIWC6p6UR80lmgjqNcOcodJ1M/Hep8RGf/FlkDC?= =?us-ascii?Q?F1RxXcc6tEnjaNozJMA+dL1lv554+YkbtouWsXYCY8XPSrBgZjCNxfkpPqgy?= =?us-ascii?Q?xYEgFKmWvfb+PYA4X0cVYoNmtEAQ9ZxgLol9wkAPwbqzRG76jdER7mqqDuSY?= =?us-ascii?Q?241UCjiSparUzJqJf5FjYYoe0s1dEXcGFAAJrf6XOM81qUs/SPgquszxPz2d?= =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ovbUDtU+JES3I1142VbeKp1z?= =?us-ascii?Q?P95YmESItuO3CB0CGmonkedxtpjZ4ZrCFyW7vuJ0LayrzzvQnDdgeRD8vrH1?= =?us-ascii?Q?hNrsTbBtJMNGUVv5/E9n4J8mJDJAdREIUeCq4Gsgo0xTgBiiGUhbbjMFi+uX?= =?us-ascii?Q?JVjLPX5VhtXPrEuHaQ8Vr9iey0BGA7GeeqWhKsH2beds8UP/5lR/YJjkaaYS?= =?us-ascii?Q?Oot7mAEKrAUCgz+LXPGQLJ1MYIFiJ5JTA2l2k3TB?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fdaf70c6-5e1f-46a5-df24-08dcf981ae68 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8676.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2024 07:57:35.4829 (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: qr48JUOOEQ+PxflcjpJVpJjqoNW+fXN5/AacqhDx5GD/X8g4OKS+MCzg9c2/ChujlTyR+/qlosr2ORdHkHpKjA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8139 Content-Type: text/plain; charset="utf-8" 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 --- 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 e696dc9381cd..dbcf22e440e2 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -389,13 +389,6 @@ static int imx8mq_pcie_init_phy(struct imx_pcie *imx_p= cie) return 0; } =20 -static int imx7d_pcie_init_phy(struct imx_pcie *imx_pcie) -{ - regmap_update_bits(imx_pcie->iomuxc_gpr, IOMUXC_GPR12, IMX7D_GPR12_PCIE_P= HY_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, @@ -1529,7 +1522,6 @@ static const struct imx_pcie_drvdata drvdata[] =3D { .clks_cnt =3D ARRAY_SIZE(imx6q_clks), .mode_off[0] =3D IOMUXC_GPR12, .mode_mask[0] =3D IMX6Q_GPR12_DEVICE_TYPE, - .init_phy =3D imx7d_pcie_init_phy, .enable_ref_clk =3D imx7d_pcie_enable_ref_clk, .core_reset =3D imx7d_pcie_core_reset, }, --=20 2.37.1 From nobody Sat Dec 14 19:09:50 2024 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2069.outbound.protection.outlook.com [40.107.249.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 867F5192D60; Thu, 31 Oct 2024 07:57:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.69 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361467; cv=fail; b=CqdfV5A62zDjhq06re4Gbc7e7E2/HOGI1VltYj14irq+SQ4jVYLG0figT2eGM+tpI8Z8RqUDMo2kcS0/E6zXfKcqLBbZU7s5iMDFd+6LD1roFnClw/MAeHd1ScDXURxA0tkAmPYycxOdtsJOt4AdGV8UQXyiywf3f4euiWd7PPY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361467; c=relaxed/simple; bh=/UOT/gmjWF3ync39QjPot2t4u3shtCb3O6rjMfuTmPk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=dAh3n/LzorGjA4MUjXwomBOeO0xEWyAdhWZWbqlvD2DZIhVlkmbDVLZjXhiunv6fy5rNmsZwqWL10PeGeJZQ22QBX4fkSjft4/c0akmnkVArm/TOsDKSFeXorgDOulir6EiQG28Xzv6omz7b//c00fAVPCvLfl0a5NdTH9duYh8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=jBZ2Gizh; arc=fail smtp.client-ip=40.107.249.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="jBZ2Gizh" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bJ22O+HmrezJnvxvXPJwp7lEhlQCYwIYCFw2zCCIqcyZH4nUxbcZ8pqpn+9cPUs0zsI/rRpMvDrf9vmfGTHrYbc1iqYAuDi/yDY23aQB0WZcPqx8YSEZidOmw28wOLavAa8Sti2DOYF6NB+wO63NcmeZGrn+Ee2rvlYppzBI7VbTmrKUZLPgs6Jyk8K69CVqOXl27NkDeUIdS4BxSXt43pPIdmNk8NQzI1Vb6U7i8i+KHnF7EPTdVyucjSmazLNFaxxGDvwHBOkfCN3edemTN3YC/1KytChIUzy+/7keZFJnSDa5rpx8eAU1183p7bA7QKFvQg8ghjj+4ykrb/jsIQ== 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=2x8nh85QHQ0gLLkdmuNiEltCwvMvKZrkBbGJybKd5og=; b=PfR9Lf26Et/GtPH0MLBovmxa4Juy2BvySIY2emOC/r70iTpvftmpwso8jiGlemmWVFKBuO6Y3cK7eRQLJOkMFOAJeUPpp0hSqLlMDGPHFdwlpRQyrHvVueivXwFSjYXxZ6N+F0+Qe6zBBD82M70GWgYJSEdpSyIuJho0g9c2WFtZDPB+RlPKRTHFmUbUp6oM0tENWh0jsn02Z/fJDS1MYI/p1Opoj8L2WAf+GHjbmCZalH+HdAyWeheRlvAlpBoYlvPLiolH6qO0Q1y/ZCKs1dGulDsVyEmZ8HFkdGlIBElAgyBwvxCHDRTxecH+IBP/nDupBtlIoOaY2yihkVWj9g== 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=2x8nh85QHQ0gLLkdmuNiEltCwvMvKZrkBbGJybKd5og=; b=jBZ2GizhmhkNjqtEFReazZesP38M4h5iGXSBpwnL3aoyQrBQHqM0pGZS2ScB5laIETlH/qNJwFzBaJAyMKEniXe+iYu5+tb999yaDM+oBK+B/xdbaKCUmkrBSDS9Dp5ChCgrbN1MoRu2+FAv1cyGNEvJ2KnrUklQtJH0k+nP9+G+FrAxmE/545QxWC2XaTcVT3IGeZu0JwuX+PVTv7T3RPgwysn5anv5DRbXjoDbg/jI3q1+g7A/07s2kYbybWpJR7RqLr0txmHI1dW0lrrNKcZ1WVzPx+HntGOu+hmv5zOOIx+295koVB3XkmMAaAhQxoymhhxFOGuo4JnozLJkTQ== 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 DB9PR04MB8139.eurprd04.prod.outlook.com (2603:10a6:10:248::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20; Thu, 31 Oct 2024 07:57:41 +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; Thu, 31 Oct 2024 07:57:41 +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 v5 08/10] PCI: imx6: Use dwc common suspend resume method Date: Thu, 31 Oct 2024 16:06:53 +0800 Message-Id: <20241031080655.3879139-9-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20241031080655.3879139-1-hongxing.zhu@nxp.com> References: <20241031080655.3879139-1-hongxing.zhu@nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SG2PR04CA0184.apcprd04.prod.outlook.com (2603:1096:4:14::22) To AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|DB9PR04MB8139:EE_ X-MS-Office365-Filtering-Correlation-Id: dcf341c7-0648-4fbb-e6c4-08dcf981b205 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|52116014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?OXWnsfpL3U0TkUvy5O5VIH/utxvVYCT55T8yLB2Bbbynapqal43sd460IFhq?= =?us-ascii?Q?pBJxgiH3lxueTms5meLpUjGh8btrLOFMDvg3/IH0OF/ilCUE7m8T+6Kv+hPu?= =?us-ascii?Q?ES8YsdRaYcWkp3CMnQShXvE64whkFlUxLxO5Zg2Z7W+N/4aD1SuPtDOR2YUb?= =?us-ascii?Q?7nT8xI6xXsRkwNQ6arrVaW5atlPKTiH3+Wij6g4x9bvUAPodaulZun5k9BCt?= =?us-ascii?Q?/DdGakzxsajKyMqipS/fNE8Cpa4nVv6YZSRhH0ZFXCc1pIdiqbo1iY050EfU?= =?us-ascii?Q?URG9OjnmxQ+D2qavstv45D9oLw27Ys53V2AvMHsJCv64WSkIRVBzwQ+8Y7B3?= =?us-ascii?Q?2PZVt/COt6fhen09WY385ELetB2A4Kl9wiev1ijlGLBYMkxQY8xeTVMCKYi1?= =?us-ascii?Q?F4duKuxQuSx4/HuvlhTklPlj9RaWWxGj/+iYmH8FQngTLvCq0lusi5IHO4lS?= =?us-ascii?Q?o8b+6pX6xE2opsERQ5ohjz7uljz9dxf9Q1MlGI/ze9ETKqJ+aqcWj4vzmke6?= =?us-ascii?Q?wRP7SY5mvLzuskQhWlqkkzSKRu9biP/+PT4yMCXxCdEcbh1oRtHAKDi5A+6n?= =?us-ascii?Q?AwBGXkWTdEAeGbmLg/lTXHco1Gp2fhksXINUU3unDCWIR/m0eUk6HwPdrMUl?= =?us-ascii?Q?03kLFAiRi/mC4gImQWeLgqLdoTfa4iYCamJhhgPvGYGx2LaGY4pWa9j3qEpb?= =?us-ascii?Q?HvxvYDySyfQFL/5wfAQCo5HEHN1WkRyrUG3aoDqStOJ2KPJ/p/cXcV5asUOZ?= =?us-ascii?Q?S1z1jUr0KW54YYp3VLBrgjcr6TLlE6De9lKAzpy9L9c+kN50lqMQhQWZTdSX?= =?us-ascii?Q?FqMa51ig4VgE39ZI9vOiMfpPg0gPYeZAYr2aNJwExIA8aueJl2Qrjz/Y6lT0?= =?us-ascii?Q?LJqx9FgJiSpJHxAhuU1hpgXFiTOxwVDQEPX17IbBT5oum1xV1ouCAB4O55pW?= =?us-ascii?Q?qpMcokWm71JSP10qvlogiS6U+UiRUt5kaH0/3HHVTQ0DZE3KP9KP/FpGclp0?= =?us-ascii?Q?6m1SHv6sZ5hUoR379fgdT0bH1vFzvLMZ8cp2sytdQrb1fX7ROSb5KJP0y5L6?= =?us-ascii?Q?IaevaHVXKBxPY+V4cR1HijYb8tmuKWNXYigkkwmRUvyPX2+1mUWhberx+gWK?= =?us-ascii?Q?29POSfLm2lkzPEpGxU8fgsPDfamm4laVk9wadHsklr9YgsWCRtiiuRFZMRiA?= =?us-ascii?Q?wITxHGq9vt22S7kRr0fqgN0B/eMdMSPqBZGgV4J3xWOhixkkMN9RgO6E+g6s?= =?us-ascii?Q?scrwywDFQASw1qOibyNJcGFWXK/DiQ1nfXSarVEns3aYKUnGBPH9jiRqISci?= =?us-ascii?Q?AGFKmCV++DiYSxWuy5VGIzxkMCQAf2PECGZ8nNPwv3/mBX7PGcmMVZfJ1ABQ?= =?us-ascii?Q?E6uPENoTr4l6Zfb0MzMCwg8RRzMt?= 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)(7416014)(52116014)(376014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?fjRY7+qEKYHPtnsY9J4pqOG4OSpEl+0q5Ejrq1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8MK8i16IRm26vMJrKsZY6eNckwhCkar2lv1rgo2qFK5NTmnhdGX4433?= =?us-ascii?Q?GxdEFHp4+B2Sorp8S/2OgRLcLZa3bnXaML6jhladDMq5vM2+l7T9QtvOQBJJ?= =?us-ascii?Q?PB4sb9qMPCJijlx1jdw1cl6Nfw+vCo/+6nQNGFKqgWsDcFrkpX08YbGFJYpO?= =?us-ascii?Q?f4G6utgTMxj3rD+/HwCRBCs9GIRHZHgeJpZG+M/qVY+C1GCOLE94AhwH+XdM?= =?us-ascii?Q?LJXkE9ep9skIsNQ4k4lal/yWNm5AT/p6YY1G7is2bScwsUlMhXxL2S04U+Tx?= =?us-ascii?Q?eZGmth5T7PPMbE/zgKQhK7cSMu1pB5HMqef8MnQFgNjbrxpDjsEvuI5s5Udv?= =?us-ascii?Q?Y79it6sRjpKvahcSHy0on1TWpdfGEDIB7KxlSQ4Hqg3nErkGi6t/MAD75Y+H?= =?us-ascii?Q?UFxhxXUYNVTXih5oDSqcHjZJAO+aLeuKII/AeJQiTMj8lccpyRL3yioVkcWK?= =?us-ascii?Q?qfuo3cqbZEkUAQEZCuC8lKRfT5ZNW+tJjX0HaHamwBtMPDCN9XVzEIzHEx0k?= =?us-ascii?Q?Uu2X4uSAVP6zLPNaLMHnca9IcX/lnMMAl1Bt6JweLyOdgoNrvUVJJm3V5zrn?= =?us-ascii?Q?Lev8Tam12w307fGRXwlvdcOv0pG7zbwaHzNTkbGrX+yFYPkFRbxmPeXl3qYV?= =?us-ascii?Q?jlH+sYLt5yqTr0CfBTan91UPwpxlSGNBYU2iKdTG?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dcf341c7-0648-4fbb-e6c4-08dcf981b205 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8676.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2024 07:57:41.4990 (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: DtXLmAZzonssS/YwtKdLvTnNnY4TQ2ZdLIP+p2aWjyrIqzDgXl1uVJ+B4/7zjTgCHk9hxHEnbP+LQC7FAE4CVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8139 Content-Type: text/plain; charset="utf-8" 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(). dw_pcie_suspend_noirq() dw_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(). 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 | 96 ++++++++++----------------- 1 file changed, 35 insertions(+), 61 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller= /dwc/pci-imx6.c index dbcf22e440e2..410a31e5f82a 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -33,6 +33,7 @@ #include #include =20 +#include "../../pci.h" #include "pcie-designware.h" =20 #define IMX8MQ_GPR_PCIE_REF_USE_PAD BIT(9) @@ -83,6 +84,7 @@ enum imx_pcie_variants { #define IMX_PCIE_FLAG_SUPPORT_64BIT BIT(7) #define IMX_PCIE_FLAG_CPU_ADDR_FIXUP BIT(8) #define IMX_PCIE_FLAG_CLOCKS_OPTIONAL BIT(9) +#define IMX_PCIE_FLAG_CUSTOM_PME_TURNOFF BIT(10) =20 #define imx_check_flag(pci, val) (pci->drvdata->flags & val) =20 @@ -107,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; }; =20 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; @@ -898,13 +899,11 @@ static int imx_pcie_start_link(struct dw_pcie *pci) dev_info(dev, "Link: Only Gen1 is enabled\n"); } =20 - imx_pcie->link_is_up =3D true; tmp =3D dw_pcie_readw_dbi(pci, offset + PCI_EXP_LNKSTA); dev_info(dev, "Link up, Gen%i\n", tmp & PCI_EXP_LNKSTA_CLS); return 0; =20 err_reset_phy: - imx_pcie->link_is_up =3D false; dev_dbg(dev, "PHY DEBUG_R0=3D0x%08x DEBUG_R1=3D0x%08x\n", dw_pcie_readl_dbi(pci, PCIE_PORT_DEBUG0), dw_pcie_readl_dbi(pci, PCIE_PORT_DEBUG1)); @@ -1023,9 +1022,32 @@ static u64 imx_pcie_cpu_addr_fixup(struct dw_pcie *p= cie, u64 cpu_addr) return cpu_addr - entry->offset; } =20 +/* + * 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 =3D to_dw_pcie_from_pp(pp); + struct imx_pcie *imx_pcie =3D 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_P= M_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 =3D { .init =3D imx_pcie_host_init, .deinit =3D imx_pcie_host_exit, + .pme_turn_off =3D imx_pcie_pme_turn_off, +}; + +static const struct dw_pcie_host_ops imx_pcie_host_dw_pme_ops =3D { + .init =3D imx_pcie_host_init, + .deinit =3D imx_pcie_host_exit, }; =20 static const struct dw_pcie_ops dw_pcie_ops =3D { @@ -1146,43 +1168,6 @@ static int imx_add_pcie_ep(struct imx_pcie *imx_pcie, return 0; } =20 -static void imx_pcie_pm_turnoff(struct imx_pcie *imx_pcie) -{ - struct device *dev =3D 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; @@ -1206,36 +1191,26 @@ static void imx_pcie_msi_save_restore(struct imx_pc= ie *imx_pcie, bool save) static int imx_pcie_suspend_noirq(struct device *dev) { struct imx_pcie *imx_pcie =3D dev_get_drvdata(dev); - struct dw_pcie_rp *pp =3D &imx_pcie->pci->pp; =20 if (!(imx_pcie->drvdata->flags & IMX_PCIE_FLAG_SUPPORTS_SUSPEND)) return 0; =20 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); } =20 static int imx_pcie_resume_noirq(struct device *dev) { int ret; struct imx_pcie *imx_pcie =3D dev_get_drvdata(dev); - struct dw_pcie_rp *pp =3D &imx_pcie->pci->pp; =20 if (!(imx_pcie->drvdata->flags & IMX_PCIE_FLAG_SUPPORTS_SUSPEND)) return 0; =20 - ret =3D imx_pcie_host_init(pp); + ret =3D 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); =20 return 0; } @@ -1267,11 +1242,14 @@ static int imx_pcie_probe(struct platform_device *p= dev) =20 pci->dev =3D dev; pci->ops =3D &dw_pcie_ops; - pci->pp.ops =3D &imx_pcie_host_ops; =20 imx_pcie->pci =3D pci; imx_pcie->drvdata =3D of_device_get_match_data(dev); =20 + pci->pp.ops =3D &imx_pcie_host_dw_pme_ops; + if (imx_pcie->drvdata->ops) + pci->pp.ops =3D imx_pcie->drvdata->ops; + /* Find the PHY if one is defined, only imx7d uses it */ np =3D of_parse_phandle(node, "fsl,imx7d-pcie-phy", 0); if (np) { @@ -1345,13 +1323,6 @@ static int imx_pcie_probe(struct platform_device *pd= ev) break; } =20 - /* Grab turnoff reset */ - imx_pcie->turnoff_reset =3D 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 =3D @@ -1430,6 +1401,7 @@ static int imx_pcie_probe(struct platform_device *pde= v) if (ret < 0) return ret; } else { + pci->pp.use_atu_msg =3D true; ret =3D dw_pcie_host_init(&pci->pp); if (ret < 0) return ret; @@ -1494,6 +1466,7 @@ static const struct imx_pcie_drvdata drvdata[] =3D { .init_phy =3D imx6sx_pcie_init_phy, .enable_ref_clk =3D imx6sx_pcie_enable_ref_clk, .core_reset =3D imx6sx_pcie_core_reset, + .ops =3D &imx_pcie_host_ops, }, [IMX6QP] =3D { .variant =3D IMX6QP, @@ -1511,6 +1484,7 @@ static const struct imx_pcie_drvdata drvdata[] =3D { .init_phy =3D imx_pcie_init_phy, .enable_ref_clk =3D imx6q_pcie_enable_ref_clk, .core_reset =3D imx6qp_pcie_core_reset, + .ops =3D &imx_pcie_host_ops, }, [IMX7D] =3D { .variant =3D IMX7D, --=20 2.37.1 From nobody Sat Dec 14 19:09:50 2024 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2068.outbound.protection.outlook.com [40.107.249.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E86F155A43; Thu, 31 Oct 2024 07:57:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.68 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361471; cv=fail; b=YcPfCMliGGInPkgz1qeWCOix9RXtaorjveJRqpSef3Hapj4ZaDrKM7o8AVPX/5stUjBFFxVOFUDJuH9WS49osCa4wDCuIHqyTKWL62CfQUiphy1sfG2QC5pPK8eAdK2P1t6C03yYdQKhRUrh6gNyM+7BhmIy7AZTwnjXfTK7Qzw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361471; c=relaxed/simple; bh=HeUvL151ZVz8jBw465yIQ+XeDOUcB1NhIr0mEuJQo7s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=ETzLFSl7jYDQaCxqVJD2wrdEkek09j9pDNBtUcalNQAj6q8oBk1ipr1LBA1Ldj9jQNccOd8E2fDZQyx84n1UrCnQcmRQgAEX/5940NUObUAyMT63SzU8HCZdKkabzqOaSV7iCKQx2fXEMPiiNg5QCdbsyFtHAYXvFfCXdjUUGwY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Bee0TbN+; arc=fail smtp.client-ip=40.107.249.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Bee0TbN+" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pNO/OZZz3YTWhe6e2D3OLTZefZVI0mZgN/VSFe6fxxSfEMmSIT4EjaiKJMppXUOSUKOx2QA2cFrPXj6dEWJFmpHrCKawo8oOdS1jNGx562KlS1KNAtPP7jTMAF5iH8hQnMbkNKcoqfZRQMHhPI2Iq710OC8ViieS4SVON9yHTPrY21wap0Qae0PWdFFARsdcOeFU9jafISGRw1QLaN50eTJ5U0E5k8SBAmyy5Gp99LY0NGa+cdP9BuyfF7nyHSD973QYmlKb5JnfFiLteZ9coqAwIaNvCcv6tsuZRv18OZ1pHHXPviUw46Tf706GCDxgm8KUI7JYm9aShj4j/bnbEQ== 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=z4dbuamOPX2gdANO1GjTEOYffHw4Dwbo03rVE2EdQWo=; b=Ay+0/VnTFSYU83GP4eA1N3YedCOIaeR778AT7NdnuyrAEcAt2zGhUDbTKnKj3Pr2HRe9JW4RAaiiilL6Y/dMKoKwb9aHhfO/LJ/ggB61MD1PUpQQsu7OyHbae4/X+kMNlhWvqcwzzDajxHpbA7SeWbnk+1mQODfXbpSyzc26bac09mntyJHEBOjAr6orwCP2qNQmcPMmaRQCmC/pdHm9e7wKrfKwFqX6Nnu1vsgAYpeAXIjIQo15mjkINvYa0Z+w9Q25XfvREmDoXh7L9FHGF5liyrh5N9z53lyH4uTvH3rf79xk6TBIf8dkI+xehgmsTnCKGMaM3TAjFi9eFGQmcA== 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=z4dbuamOPX2gdANO1GjTEOYffHw4Dwbo03rVE2EdQWo=; b=Bee0TbN+UhODqmYgAJ8FtQo9zrltlFOtvoEsX3itj8Tpgs0+aQ+SB55NVeKteLrl421ZDaqIVs1+FaBPdhz1dFPxxRN5UeOlXy75sahAHMXiloce+GChCG4s7o48k26okV/kIN/9lM57up7hdEHEpQJrjjYjiNIWJwSnc6r3ON/d9ZyVXBwLkylzsmgo3HXufZYTB8l7HTLvjo85V+NsbrtvjpnRbL1m+td3sJQX9g4DBJuZSy0iq0s5jZGLwESJV2C7kAoCUqkl6jFx+UO+b4cnBC2nDXFdz/l1cynnXj0pXCJZTZyXahOUmahMJRlplVcNWjBBoGZE7y0HH73nJA== 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 DB9PR04MB8139.eurprd04.prod.outlook.com (2603:10a6:10:248::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20; Thu, 31 Oct 2024 07:57:47 +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; Thu, 31 Oct 2024 07:57:47 +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 v5 09/10] PCI: imx6: Add i.MX8MQ i.MX8Q and i.MX95 PCIe PM support Date: Thu, 31 Oct 2024 16:06:54 +0800 Message-Id: <20241031080655.3879139-10-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20241031080655.3879139-1-hongxing.zhu@nxp.com> References: <20241031080655.3879139-1-hongxing.zhu@nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SG2PR04CA0184.apcprd04.prod.outlook.com (2603:1096:4:14::22) To AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|DB9PR04MB8139:EE_ X-MS-Office365-Filtering-Correlation-Id: 0fc0c5b4-0548-4ec9-af55-08dcf981b56d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|52116014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?0eSbVJUJT/QKkuI5ywkOVp2ILnTTPOGVOtUkKVTfAROrGoLliPNHWf9Heug1?= =?us-ascii?Q?VlxmJksTrib/fY66qIRc9WiIIraxbaUXkj3IJiIjb5fCoa7ELz/Wh7HIjwAb?= =?us-ascii?Q?mlGfUv64k1OXeJ9JYFEcOANaNVH2uXsDDWsLmhk4cAcp/WUOTI35Y9dN0clZ?= =?us-ascii?Q?i2qIulFEJIJV6DCApwQvNixMomKMDUmjJbjTmZmkWHXPvIw+X0kuXjQnoAoX?= =?us-ascii?Q?H1W0aL2U6Xx0de/C7iH6at8y3KpHkO+/9I4bRmu2PpmSoYzhgr5sVOV4kT8B?= =?us-ascii?Q?x/mFO8MfSJZFciynqTAInYAMF0wmWnVOjhqpSBPsyE6izURhoq1PDZCKttMi?= =?us-ascii?Q?Pa2mQcY1mU+U3qCm3Jc5IpdYPuD1Rt5LAhD0oJIQpsfwaW1lA1AQHrxN8TRk?= =?us-ascii?Q?RKJ4idYRJ8qRn06KicqhMnv0jMWls4cfJ5j5fzZ8e1BITj057MzJojK0vwoQ?= =?us-ascii?Q?8TxVtoWnc3Gbvv+ZXnhk0iU/5b+7pkn/z+V2V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q?TEJq957R6ELWwYuDZTSvbLpT9Uqs?= 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)(7416014)(52116014)(376014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?YpE05U9vaaetzbqDC9NG7I4I3iB7SH6x2DT5Q32uS7zbMsGIfVugj2xr5A50?= =?us-ascii?Q?Nh6YZkakAgkMoZR747kOd5U9qJmx/wCJX7AW8K69AokWp18unJ8NetajXe7v?= =?us-ascii?Q?JAt5ePZKrJJP2Kw94OhTB8vKAfQz1WZUO1kCw+6A/6v8cA89D7Rw0HsZ8yTC?= =?us-ascii?Q?1a21SKFu4EJJs4r8y4x+muL1huy0BbfTdsICVU0DRgCy7ZAhVOPciSXqeRiS?= =?us-ascii?Q?Q0tCVjb6zfycfuIikWfLFeeDSBo3BNZrMcC11Ap4ZjYjsCaO691JxDt6SM9q?= =?us-ascii?Q?FdcJNj68ifqupSVOAgDTfWfPDvK1RFfFwhJxHdXDFC0lSLqQTERfYSGDT3ug?= =?us-ascii?Q?bV/Hf7SGnPUM+7hm/zOoZoO6mWiMstSJcyG1k+U214ss82yeiaQubZruN4L8?= =?us-ascii?Q?ds4rDkGucioIhaxKz6nERmgTAKW9CNzYem3jKqOBSgpgUhy5Nf1UQWdz8Uwa?= =?us-ascii?Q?t42EsWIAwTGLTVN7OSIbDiFFygaEr4CPEe0QTqrl8+P6SCsDe5eFJcWWSAlT?= =?us-ascii?Q?ibkFBk+fiSiWfeN0TfJ73ACwoIXYtVcdUjp92zYAep9fWci+jMYWyzewJkTo?= =?us-ascii?Q?AB1nOcJljmqQXUqVnhygsLOzgQFhQunNF3fDSoeqYYRIuYvd6LL26gNlBwNg?= =?us-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ySVy7usmUOEW+WU1G3PtbQwpCVkgxe?= =?us-ascii?Q?8pvhcRfDA3PxRI/mKu+dVJeSV9yBUjUAb63Tz2vz?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0fc0c5b4-0548-4ec9-af55-08dcf981b56d X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8676.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2024 07:57:47.1461 (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: tfKhCrzAMzZsbW0m57dDECVEkF4kH1BJvD3xuPLNAjy7k/j0+fQ+Ie6MtYM4LnBN1i40cxHDNQ5mm8DR2tiYOA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8139 Content-Type: text/plain; charset="utf-8" Add iMX8MQ i.MX8Q and i.MX95 PCIe suspend/resume support. Signed-off-by: Richard Zhu Reviewed-by: Frank Li --- drivers/pci/controller/dwc/pci-imx6.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller= /dwc/pci-imx6.c index 410a31e5f82a..f662fbb45626 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -1502,7 +1502,8 @@ static const struct imx_pcie_drvdata drvdata[] =3D { [IMX8MQ] =3D { .variant =3D IMX8MQ, .flags =3D IMX_PCIE_FLAG_HAS_APP_RESET | - IMX_PCIE_FLAG_HAS_PHY_RESET, + IMX_PCIE_FLAG_HAS_PHY_RESET | + IMX_PCIE_FLAG_SUPPORTS_SUSPEND, .gpr =3D "fsl,imx8mq-iomuxc-gpr", .clk_names =3D imx8mq_clks, .clks_cnt =3D ARRAY_SIZE(imx8mq_clks), @@ -1540,14 +1541,16 @@ static const struct imx_pcie_drvdata drvdata[] =3D { [IMX8Q] =3D { .variant =3D IMX8Q, .flags =3D IMX_PCIE_FLAG_HAS_PHYDRV | - IMX_PCIE_FLAG_CPU_ADDR_FIXUP, + IMX_PCIE_FLAG_CPU_ADDR_FIXUP | + IMX_PCIE_FLAG_SUPPORTS_SUSPEND, .clk_names =3D imx8q_clks, .clks_cnt =3D ARRAY_SIZE(imx8q_clks), }, [IMX95] =3D { .variant =3D IMX95, .flags =3D IMX_PCIE_FLAG_HAS_SERDES | - IMX_PCIE_FLAG_CLOCKS_OPTIONAL, + IMX_PCIE_FLAG_CLOCKS_OPTIONAL | + IMX_PCIE_FLAG_SUPPORTS_SUSPEND, .clk_names =3D imx95_clks, .clks_cnt =3D ARRAY_SIZE(imx95_clks), .ltssm_off =3D IMX95_PE0_GEN_CTRL_3, --=20 2.37.1 From nobody Sat Dec 14 19:09:50 2024 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2066.outbound.protection.outlook.com [40.107.241.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EFEB8194C65; Thu, 31 Oct 2024 07:57:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.66 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361478; cv=fail; b=bo3iKYbDsS5/ubj+2MCU6olab+mWPZYMuV4Gc0B8FC3zC3dYuim/eqUCXY3Tgw2RgG3CVDMCKJrIFKmskZFpnM097s7MU+zSXYVK4JVhUOctO+kcXC+0rnOwjeZqT5m7c8fk8gqKITtnGMx6lr2nzwJFD4bkJlcK1wTTEMojIJ4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730361478; c=relaxed/simple; bh=4e3I8LWAFTsgaZkfVNIFdEy0GJhh8/lX3a07egnTN2g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=OSQMZRJl2pFCrQLJn341A7gBU9hchjDfVEJxTojK6IylI7nmplMjljqDgzHoXSbo96sneXulDfREkp2aT0/B5lxfg0LGtpyMsb/rv27hMxKAs1hk97JePCnJbdii+7ZmfUNoGwIWNAi5SzVhFGOIrTMVM1lrvCFPqa/vs5fVDfw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=e3BAl2Tl; arc=fail smtp.client-ip=40.107.241.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="e3BAl2Tl" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YCKZc1bvs8ppLzPQ+IAQ983L3OoTYfS8YvJH4b++YIfoYWRM1xGeQlvKZhPsZZNbKLDl4vYuv0KklGggPAP9odi/QwENTlSgnTmY4WGp8HzccgsppofBgBdM/AIZfbDcV3G16RO9xEvl5HpG1gv9VPOTsrEHO7fNF7sD6N3VtHECLC0yihwLPmv30KE7t+AcqZk3djSndWPXs0xkRsC/N8CalW3aSeVDowGNr/XXil2eYmY/o2x51SK9NoPFxm0GNx20QQVeO7QbHWjA+doWJcAPQvAwUzgcsVR++JAUE21JCg2+88ufsoGVPbHPobg2ziGOOpHvUJMtFvRVFD5LFw== 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=kv5k6P43uIyQTjT3yX26MrdfUrBED7zYkyfJXjxU81JYZCRyX2WRKnMLY6mDpwTuZ4TmxWeKQYf95x9zO5aePAIubVJ8EKxX0Qg4t7U/PGbxDsyqIxrGktHIKw0NrovqI+6JhA7JGYvFl2H6FF/W1TpxGpAWR40O9dhSzHuSdMKdQm9GOYr2cjyhRarYARRrAEx4SdN4Br4Jm+R0QJ99Cy88PnILp9Iq6/wB4D3jCPtsrjYqzq4zbcuMOdTA2dJG0vAnpus8LRm1Nw0l3SR/bCZ4o6oU+MKjJ5VtMkWhFTvhTsV8Efzr2NzI8amZcid230d7nOpQpo6KQKfjn35BSA== 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=e3BAl2TliHBTJ42wQQwDs+p665t3FN9ybHAVsVh8bxLRJBWSR2GdMirJaFGGLD3JwYf97y4c1dg9k9vkLkrhYB5KvZPsxO7a6C1crkfy0vO1bWN3NZfhsnvWdvYEkrh4fOA46zq5HXs3jECAzzIom6+UCvlbTusbZ8y3zvmAVD56alJ7dGXsJ/hHt8ogoYNN5Fj+xLPpr+FmJyDPPMY6bREscguYAp7y+mzOACFBgHUelC4N6w8W959DYYvzxlLw/W66lKo+xjFrtg8ZKKy5ccrIuOMhjBT/RUd5yZTIvfDnS15ERf0b2KQyMWolPPGfAm6lGmhUqS/oYZrXgfsOWA== 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 DB9PR04MB8139.eurprd04.prod.outlook.com (2603:10a6:10:248::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20; Thu, 31 Oct 2024 07:57:52 +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; Thu, 31 Oct 2024 07:57:52 +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 v5 10/10] arm64: dts: imx95: Add ref clock for i.MX95 PCIe Date: Thu, 31 Oct 2024 16:06:55 +0800 Message-Id: <20241031080655.3879139-11-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20241031080655.3879139-1-hongxing.zhu@nxp.com> References: <20241031080655.3879139-1-hongxing.zhu@nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SG2PR04CA0184.apcprd04.prod.outlook.com (2603:1096:4:14::22) To AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|DB9PR04MB8139:EE_ X-MS-Office365-Filtering-Correlation-Id: f8f118e9-0684-4e1e-0212-08dcf981b8d1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|52116014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?wfDEie4/5QOvqLaBuUPrsaMX68PjmFNRsm1chj/MIyGUYuYP8Im/eZupg87C?= =?us-ascii?Q?jGegRgJUpfjAGv6lNGeD/74GS/EEh3PeLErRuMbx7fFf32F/TJfFxnQ4sHE2?= =?us-ascii?Q?0LM2qLtiYpBucOaKTkepig7FAJZuRM1PMGAuSPQ59f5/r07HmKwS3IF8imka?= =?us-ascii?Q?A3Zjzt1iUZyxT8yFxrsZKuM38PchyWaTF1Gy83E01BuuNQtJjEs9wYzebCaq?= =?us-ascii?Q?R3cDHhMN8nn/ot2hQYJ0EnRHoggEjYU4k+IX+KddkNsO9/zQtDK1xDpjHT7M?= =?us-ascii?Q?h27cTrZQIOQH4P5svK+CaPaxASaSNrl8YAWcet9oKczPbkoVh3c6pVag0Tku?= =?us-ascii?Q?sF4dY4AUyNdV50MTY+KGBdfg5mr/0UbaHfzJV+XZk5gPcpRHDl8E2DT05uPd?= =?us-ascii?Q?OlZJ55nyxHpxs/3Y1VacNfDjvuFup/cHmjwfN4SFKIbnSCOS0iRw6a+t7OFB?= =?us-ascii?Q?bUhEr6aYtI4yUE+YH0T4bM410CN2DPrGk8DAwvlM6CGKNAGWHuQYApzjOSFE?= =?us-ascii?Q?ETqC7PPtQxTV/hi2xCqJMkN2kIy3Q06lVC073ry81guB6BLhefz+Fslt2ZBq?= =?us-ascii?Q?0M32/l7I5hWeGoIP6hnSH8nTRfkwooXGMILlmmVtbmlv82/wSbizGzKsf0pW?= =?us-ascii?Q?6TuyD24qEyCccDcEtIIg3ZNQNth2dMsjdu96beJQliOP7BVZH9q4rJ8jfis7?= =?us-ascii?Q?WC5mUw1FcWDGxGjvCrobhBL7ECw5YzR1dnv1QLouWw1mx4Uo83FHacGBcqKD?= =?us-ascii?Q?YNeo9pZl78iSn4SdaV5iTWpoSVV6/8dxB/ZvgfNIQz3rY2tD34UPJRAQqRhu?= =?us-ascii?Q?AsV2z2uTJp9sIiPcMhJQe2XTL58GG1SFUi4Fey1JTK5fvhgMWECWPQdmbmRY?= =?us-ascii?Q?pgPzcupMSIZKCdBhl3UnRMWNPm1OEILkftvh4TFr4RZb9cd/DJpguPFoLcQT?= =?us-ascii?Q?HLrPjSd3JkY/iSgRSEj9+pkrDv/NLfVDwgJOkHamt7V9eDIZZSGOaB2qNsq8?= =?us-ascii?Q?nr0qiebIzJjj4/1v3nKWTGvamJEbQJTPUaAHEPzg1Ec/00tUkyu4r4101kNu?= =?us-ascii?Q?Zwxwu9Jo0IgPUEHzuU/dRAGX6MXq+DfYeU1KG90BXdaB8zRERIOgiSpiIsRw?= =?us-ascii?Q?bhMHjQhGfdGrijuVkauBnsnc9GUNEUFKKqj7Tc8Q+SwA30cjbn+/hcbs06IP?= =?us-ascii?Q?32lEhvO8lSiDJx7eS/ZZr5lbUYYrHMDoCDAwUhZnxX+qGjW4Br8SOBgH9Wt6?= =?us-ascii?Q?2Be+X9DHaVyyMIwNZy5FreMIZsG8/P9dVS6axLzSyVY+Sce16YfHonmplKLK?= =?us-ascii?Q?cdjAkg5F4zHfrEDzp0KvwyL+PmgElVdwEIyxovZeYsbB75qtRw+X09X8PJx6?= =?us-ascii?Q?UY8Yk/hcZHj8h2twCcWFwLjmd2Y5?= 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)(7416014)(52116014)(376014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-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Kod7A+eCWvxbgRu9yQ8z4eTaOhw4g5S/SXKOme411t4VHe0oW6?= =?us-ascii?Q?ZGu5dlJHyp8AWJKfVUTu5BxjoEF8qG8dMHNDILjf8A0SQIrY9Hy2rfWVsFXd?= =?us-ascii?Q?/Qpoy0uoReCk7Iz1ZgYp3YRjHRSlwLDlJ5ByxrupL2Vi4RxoSrIHw/i2n87y?= =?us-ascii?Q?L4CoDBQZmMa6lX8AcMz1mGSkk/z32H/gpF7KdBOHbLBzKniG5ysuUIAUb+KQ?= =?us-ascii?Q?VhZ3jWu1Nk43B6Dr7n1ilPpzxJ45X8QXfGAsTT6nq47bHnNuMeL3HumYdVtL?= =?us-ascii?Q?YGxTaN3zGzEgafiJ36eMr6dshYWDPonGeNS+QLdg7BdwQgBesjN6XhED06l5?= =?us-ascii?Q?BvjL6hzfG8Sh/9w9GMhdL3CXrBO1N5tRE7pyqLEvHgVNWCqp9nPmNDzJajdm?= =?us-ascii?Q?YhRKCXEt6cjHZOIYGIG/9vsdUopvWOw9vY0NCGkd0aF1G8mSuZjSVeS1Byo1?= =?us-ascii?Q?B1DV1WVZCdfTQVajEW7hvvmj9nJg/uqF/tkr6keux9d5SHCnoT5dCgus6PCJ?= =?us-ascii?Q?BHCdMcsfF8SoFBra847XUEsbz9hpkXuaDmSVplX9MpAcszlM2lGuAy3MX6Lt?= =?us-ascii?Q?5mCocOPNQ6x0oY9rP467VyDMqf8nhQTds1Q3NkxP7kHurtX68Ptrbj3553bO?= =?us-ascii?Q?/bqpL1yo2nlJvns8A8S+9FrPhpo7L/C0yeXDXBbqnz9bWNOrDJSeKFyJu89M?= =?us-ascii?Q?SLQc485/lylNz6IOc6GyfauulkM49/QW2s7g75te?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8f118e9-0684-4e1e-0212-08dcf981b8d1 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8676.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2024 07:57:52.8510 (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: dKtuCgeAG8qM9Rf8HdPH3OTfYr47qnEwBSkfIv9oMcf0GYoiIIWbApLjHx6DwaPfTQz1pYXO0SDjIvZMBRyGUw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8139 Content-Type: text/plain; charset="utf-8" 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 { }; }; =20 + hsio_blk_ctl: syscon@4c0100c0 { + compatible =3D "nxp,imx95-hsio-blk-ctl", "syscon"; + reg =3D <0x0 0x4c0100c0 0x0 0x4>; + #clock-cells =3D <1>; + clocks =3D <&dummy>; + power-domains =3D <&scmi_devpd IMX95_PD_HSIO_TOP>; + }; + pcie0: pcie@4c300000 { compatible =3D "fsl,imx95-pcie"; reg =3D <0 0x4c300000 0 0x10000>, @@ -1500,8 +1508,9 @@ pcie0: pcie@4c300000 { clocks =3D <&scmi_clk IMX95_CLK_HSIO>, <&scmi_clk IMX95_CLK_HSIOPLL>, <&scmi_clk IMX95_CLK_HSIOPLL_VCO>, - <&scmi_clk IMX95_CLK_HSIOPCIEAUX>; - clock-names =3D "pcie", "pcie_bus", "pcie_phy", "pcie_aux"; + <&scmi_clk IMX95_CLK_HSIOPCIEAUX>, + <&hsio_blk_ctl 0>; + clock-names =3D "pcie", "pcie_bus", "pcie_phy", "pcie_aux", "ref"; assigned-clocks =3D<&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 =3D <&scmi_clk IMX95_CLK_HSIO>, <&scmi_clk IMX95_CLK_HSIOPLL>, <&scmi_clk IMX95_CLK_HSIOPLL_VCO>, - <&scmi_clk IMX95_CLK_HSIOPCIEAUX>; - clock-names =3D "pcie", "pcie_bus", "pcie_phy", "pcie_aux"; + <&scmi_clk IMX95_CLK_HSIOPCIEAUX>, + <&hsio_blk_ctl 0>; + clock-names =3D "pcie", "pcie_bus", "pcie_phy", "pcie_aux", "ref"; assigned-clocks =3D<&scmi_clk IMX95_CLK_HSIOPLL_VCO>, <&scmi_clk IMX95_CLK_HSIOPLL>, <&scmi_clk IMX95_CLK_HSIOPCIEAUX>; --=20 2.37.1