From nobody Mon Nov 25 20:34:38 2024 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2045.outbound.protection.outlook.com [40.107.105.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2CA3217302; Thu, 24 Oct 2024 20:42:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.45 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729802542; cv=fail; b=JmYgw8tC18u0an8m9usVcGoKiB4jpRBATQYW6kyX1nEFEF67mCmbn04cI6QG/DEHCOsiGjgnc1XBwYuOkcfuQDx42AHoky+uxzGotTe7CIHy3yycICXsP+vjnspJHSub+lKGgF+QOuC6d6y8C/n2js6MH8/nM3aLsmBCbepdofA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729802542; c=relaxed/simple; bh=GsBrY/rr2TGV9C/ufXVpAjG8EooxUe4YBDJ9aZkc+U8=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=Wpb/SloybnvEkzkhvSj06vv6ss/qfEBE7WPSToZXMs81IYr+Vqdoo0CD+djp8kS32BzFESSlXCxloa4qUXFSoaQqiuWtulaRAfT6FzyDVQWdbwG2OTG/2rBVtyAqqnQciVZt/sbOnJ16u/vpmq19bUb44Pkg7jkisTsiXUjEwfM= 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=Aw4USNMB; arc=fail smtp.client-ip=40.107.105.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Aw4USNMB" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xExKwUHTn6oZsXwRvMdoP5g6tFY3lG3X7l0RcW/z1UD2lC7dG1lvPl28BEEKtau64lquy2Igx+hHPzkq7k3eUPiqGy2hp+Z0RornioV5Rufcu6FVyBRFhkE31MbpbNFTtxahvUX7eLWb8TBgZi+v2s1+datJ5VdlxXvD4u/YBHVt3/rAWRETR6u4HYqwktaLNXsEFRc97bkwUoGE+boLbhy0QNZ4lB2JEZRP2sx5R+wzaMD6oRdxSFF5Hv8HJO8J47HjJxciz2tLiV9VUx8i5kNKyEhB0zapMwCYoPWd5u2g7TEBBHkqVMP1nUjr07LDw1X+drqmaudPMV+xDr4RkQ== 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=2ZEqB5SgGYv/wLtHKqtrS28/MuvXtIH7arWnGnAkSxQ=; b=TMpLZgd4wqcziKR01Gnb01GGQHPnCkDE2eYon8t2+9/C//29d7UEjLtEpmvGb80Jm+XsbCTDb0drI4A27g5AMMIT9aEsfv/OphxEKhm+g3ocrBRn8ghVPNNG+68ECWogiAOR2sxI467qi2D8/nbdtcqTAJm61K1Ap5b9vEPCGs2OIfzzMWcm1jYGhymmz1Esuas6dJX4nh8LLwoV1na+WFSR5Gzgx76eD7LzbZnF/5ehXyOLDNLcOm2jZcBYcQzLERWGoIdLNOOso5YH+t/yDXMPZMqK7PvyyWEf5tL+IbQfoJXe4cF8FsVglIKLeGh9c+RsNkLhSBlMjpqgxGZITQ== 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=2ZEqB5SgGYv/wLtHKqtrS28/MuvXtIH7arWnGnAkSxQ=; b=Aw4USNMB7TKUDptBJ8By0tAsio2H54K6A2agLXSKMjAjnLezJpjfJ9VAScAZtoyayt7c0K7n/LqonB8RFHmbEdftHUbDTJ7QIHiPxnepuOPXmM+qlQXKnzIEa5yc6wDuieu+QMF24ACtbNAoXy5bdZvUN4eQXqHgQzZHzuyGNj8Heh5q5cSIalIPUq0XC9N9lgw0gMsw9ZwDiD7/DX3wg++z7onJKQ63dVoMKdpiXwar1B14gHAYwn1pLjGiPxmkSbGMDhOyUd5QLn3tpI6yLdCNiWwMd5qEhCs9fJGKFn55whcAImSGM/hsZ1Sv/tbzqr3ln+bB7zMCI2Mk+2wBdA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by PA4PR04MB7517.eurprd04.prod.outlook.com (2603:10a6:102:e0::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.21; Thu, 24 Oct 2024 20:42:17 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.8069.024; Thu, 24 Oct 2024 20:42:17 +0000 From: Frank Li Date: Thu, 24 Oct 2024 16:41:43 -0400 Subject: [PATCH v4 1/4] PCI: dwc: ep: Add bus_addr_base for outbound window Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241024-pcie_ep_range-v4-1-08f8dcd4e481@nxp.com> References: <20241024-pcie_ep_range-v4-0-08f8dcd4e481@nxp.com> In-Reply-To: <20241024-pcie_ep_range-v4-0-08f8dcd4e481@nxp.com> To: Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , Abraham I , Saravana Kannan , Jingoo Han , Gustavo Pimentel , Jesper Nilsson , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@axis.com, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1729802524; l=6280; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=GsBrY/rr2TGV9C/ufXVpAjG8EooxUe4YBDJ9aZkc+U8=; b=ovwh5BoEazxQSkess/heM2mtUzNAlTzZAc/9uH+fSvCv/SPD5JyAPhMC9HLfFwlBinBisJRMO x1V7/EzLQxnDDtthTziKY2Fyl95BKt58z/edAtVscRq+yEPYD8VG2Th X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR13CA0112.namprd13.prod.outlook.com (2603:10b6:a03:2c5::27) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) 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: PAXPR04MB9642:EE_|PA4PR04MB7517:EE_ X-MS-Office365-Filtering-Correlation-Id: 5808ea38-83a8-4067-8006-08dcf46c5926 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|1800799024|7416014|376014|366016|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?a05YR2xwYnlwYXNqQ3BydUZYL0RrNFJOdmZjR3RZWUZ2SjFLM3FqcmUvRWVz?= =?utf-8?B?NTZBb0F1RDRtZGc4ZFRFUkd0TUJ0N0h0alAzZmk5NSt2THBIRUcwcDBLblJv?= =?utf-8?B?Q1hIc0lueHJ3QVFHbVhVbmJKY2Z2ejlEaTdKK0pxN0hyanFZTTR0TVZ3Q29u?= =?utf-8?B?NFhHd0tHWGZGUHpTQzZ5WjloS0x3d1Z6UkxyYzVFRGVhbzlBQkgrcVFkMFh4?= =?utf-8?B?RnNIdkRxOFZkWW1qMDRPWHlad0NmczVLVFFpd1AvYmxXSFZCNWlCZUNFaWpT?= =?utf-8?B?Mjk2dzdOamRETmlQWUNVS2FIVXA4Uy9zKzJwN0Jsa1dEZC9GdEV5cnNMU2pD?= =?utf-8?B?Z1pOQkJiMjlpTlEreEZ3VzdKc0U1UTlRNW52b2ZxcFlKcFY4MXBtQWp0a2pn?= =?utf-8?B?Z20va0pSTE10dmJ3SEFUSVdBOVNkZm1PMFNHS1FmM3FlSjgvaVpDMTR4cmEv?= =?utf-8?B?OUdzdkpVbVo3cmZ1V3VwU2dYMTNFeVV3RGkwd1VycXdVUVNKd2Zhd25yWjFl?= =?utf-8?B?cjNxVi95ZytFcTFqRDVSTkRrKzErZjc0Yzk1eitzbzZXUHJSMDE3VnExbTJv?= =?utf-8?B?WGF3WC93dXVEem1tSUZJUUkzSEpzOTJVNGtveFdCQjV2c2RIQjVWSjAzczdB?= =?utf-8?B?RkdiZkNoWDlMb2N3SjRVcHlKNk56NEMxTytRYTQ0L2xyVnlRMWpqd09EYUF0?= =?utf-8?B?YldQSjIzbldNMUNSeHFoWDhxS01LYld1WnNUM2lIT3dDeFhDQ0ZVcDhqaUFX?= =?ut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DcwM2ZJ?= =?utf-8?B?VkkxUzZac2VScElaOWt4cGxrVVFhR2pnYzh3UTJ1ZTZBTWNpS3RYOTI5VzI3?= =?utf-8?B?VHFpblJ2QjZrWGJ3aUh3VEZqTFh6K1hqTWMxblNselpDTE51clQyNWx0elkz?= =?utf-8?B?U3FraFVaaTRiZVYvUk1EdzRjRldNM0Ixd1pBaVZrRFRaS2srVUtiVUtCMWN4?= =?utf-8?B?L1JjMnI0MkdaS2FKd1JhQlNUNFNIL0NTYis1Tk9pWkk4WGc9PQ==?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(1800799024)(7416014)(376014)(366016)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ak02T29LcldxVG1waTF4QTJLYU43a1BHaVd0dnBDeFBtcXVaSXhpV3BWRkJt?= =?utf-8?B?YjN1NkFkLzlEeEV3L1FCd0dmaTVIa3llYU1pZDcxMjRJR3BkcnJjeEFwNnRZ?= =?utf-8?B?UGtaUmcwMllLZFpEdnhwVUJjMkxJNGUxdnlwaUNERzMrZE52MFVaMW9BRmZM?= =?utf-8?B?VmlsRUFMRFJDWkRna2FnREdDMnVWTVF5M2ZFdGZlWjlTWUdKVWFQSnllVEhJ?= =?utf-8?B?dS8xMHkwOVNmdlFrWkd5TkZHTE5SUjBURXlDZG53WWtHekd6WmtiR2RrU1lQ?= =?utf-8?B?YlV6NkIrTE5JeXZRa0lQdFI3UENFN1kySUlTYllocThZOGJ0YU5NU2RueE1B?= =?utf-8?B?WUFhTTVYbWhDOFdrVGhnNmVoYlZ1Y0dJQm96emhYS2ljMVJmYnJzdUxqTUVt?= =?utf-8?B?d1EyYUV3Z0tDb3pjOVBWdEJFQk1lV3pU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RW04NmlVQUhteHpLQThPRCthRit3NUdhUzFhK1JDSnZXWCtC?= =?utf-8?B?UFpzMWg0SXRjRk1XVUJWMC9YUnhFd09mQWRaYW5nelBuM0Z0VXZGUytNNHVQ?= =?utf-8?B?cTRRZDkvNnNYWVZibXVoNFFEWTZ1Ni9hdERJcDhRUzVsZGFTaSswUDRkZW44?= =?utf-8?B?ZDNENk8yUXh5OWxDYjlqdkcrNVprc3h4Zi9lWktPZm5Yc1ZjV2Q3RGpLTE5q?= =?utf-8?B?WTlONytjalVhNWNnYStaNVBtVktpUHV2N3FreGliTkErU2x6VTdCQ2VVU0dL?= =?utf-8?B?QUhnSFM5STJtb25jekhlYVVCZUVGREtTS0wreGQvdlNoUEJlMUsvOEd4SHVj?= =?utf-8?B?MUplMTUyY2JBNCt1UndXeWJHUlZXUUZNQlFPZmhxc29CVHJ0Yi9tSlBvV1lq?= =?utf-8?B?K0NUamFNTTgydkNDODRnMTR0L0xxbE5FbCtCSnF5eTJkK1VoUG5ja05Fd3Jw?= =?utf-8?B?ZTFybG5GVjFsRjdCRk16UE9EaHEyWHlDMjZsMVhvR1VweW9mMEgxYTB3eVVM?= =?utf-8?B?RGc3Sm13dFh5S0JFWU94eWNQWGxueGFCdk41VFdkZHBRSVArSXdMK0lHNXJh?= =?utf-8?B?dVJqNEtVZFlLYUJGVDZpVkI1cWJZVThQRFpCS2EzTENnRlVENHNkUkY1WjN6?= =?utf-8?B?cWVFNTZXNnhRaXkwdXBtRGpuK0lMUlo3WEhzaG5BUDNCS1hLMlVkc0lIUmdo?= =?utf-8?B?TzBaUVRmQjZBY0l0N04vZnVJZHZBWU92UWRwdnlTWVBFUDR6VFRWRzdFbHNa?= =?utf-8?Q?alb4qUMy+NEN5mnv9f7aZJ3uu?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5808ea38-83a8-4067-8006-08dcf46c5926 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 20:42:16.9954 (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: y4CFhmwQgPjtm6HpIfBMFVCgSlvykrxv4LHTMEEAdLn8tfbUbWos+eB9Ke+vFrYo9qW1fu7CmdWbZE7O9NJlAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7517 Endpoint Root complex =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=90 =E2=94=8C=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=90 =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =90 =E2=94=82 EP =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=90 =E2=94=82 =E2=94=82 =E2=94=82 Ctrl =E2=94=82 = =E2=94=82 =E2=94=82 =E2=94=82 CPU =E2=94=82 =E2=94=82 DDR =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=90 =E2=94= =82 =E2=94=94=E2=94=80=E2=94=80=E2=94=AC=E2=94=80=E2=94=80=E2=94=98 =E2=94=82 =E2=94=82=E2=97=84=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=BC=E2=94=80ATU =E2=97=84=E2=94=80=E2=94= =BC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=BC=E2=94=80=E2=94=A4BarN=E2=94=82=E2=97=84=E2=94=80=E2=94=BC=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=98 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=98 =E2=94= =82 Outbound Transfer =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =98 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 Inbound Transfer =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 =E2=94=8C=E2=94=80=E2=94=80=E2=96=BC=E2=94=80=E2=94=80= =E2=94=90 =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=90 =E2=94=82 =E2=94=82 =E2=94=82 =E2= =94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =BC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=96=BA=E2=94=82DDR =E2= =94=82 =E2=94=82 =E2=94=82 outbound Transfer* =E2=94=82 =E2= =94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=98 =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=90 =E2= =94=82 Bus =E2=94=BC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=96= =BA=E2=94=82 ATU =E2=94=80=E2=94=AC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=BC=E2=94=80=E2=94=98 =E2=94= =82 =E2=94=82 =E2=94=82 =E2=94=82 Fabric=E2=94=82Bus =E2=94=82 = =E2=94=82 PCI Addr =E2=94=82 =E2=94=82 CPU =E2=94=9C=E2=94=80=E2=94=80=E2=94=80=E2=96=BA=E2=94=82 = =E2=94=82Addr =E2=94=82 =E2=94=82 0xA000_0000 =E2=94=82 =E2=94=82 =E2=94=82CPU =E2=94=82 =E2=94=820x8000_0000 =E2=94= =82 =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=98Addr=E2= =94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =98 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 0x7000_0000 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=98 =E2=94=94=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=98 Add `bus_addr_base` to configure the outbound window address for CPU write. The bus fabric generally passes the same address to the PCIe EP controller, but some bus fabrics convert the address before sending it to the PCIe EP controller. Above diagram, CPU write data to outbound windows address 0x7000_0000, Bus fabric convert it to 0x8000_0000. ATU should use bus address 0x8000_0000 as input address and convert to PCI address 0xA000_0000. Previously, `cpu_addr_fixup()` was used to handle address conversion. Now, the device tree provides this information, preferring a common method. bus@5f000000 { compatible =3D "simple-bus"; ranges =3D <0x80000000 0x0 0x70000000 0x10000000>; pcie-ep@5f010000 { reg =3D <0x5f010000 0x00010000>, <0x80000000 0x10000000>; reg-names =3D "dbi", "addr_space"; ... }; ... }; 'ranges' in bus@5f000000 descript how address convert from CPU address to bus address. Use `of_property_read_reg()` to obtain the bus address and set it to the ATU correctly, eliminating the need for vendor-specific cpu_addr_fixup(). Add 'using_dtbus_info' to indicate device tree reflect correctly bus address translation in case break compatibility. Signed-off-by: Frank Li --- Change from v3 to v4 - change bus_addr_base to u64 to fix 32bit build error | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202410230328.BTHareG1-lkp@i= ntel.com/ Change from v2 to v3 - Add using_dtbus_info to control if use device tree bus ranges information. --- drivers/pci/controller/dwc/pcie-designware-ep.c | 14 +++++++++++++- drivers/pci/controller/dwc/pcie-designware.h | 9 +++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/= controller/dwc/pcie-designware-ep.c index 43ba5c6738df1..81b4057befa62 100644 --- a/drivers/pci/controller/dwc/pcie-designware-ep.c +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c @@ -9,6 +9,7 @@ #include #include #include +#include #include =20 #include "pcie-designware.h" @@ -294,7 +295,7 @@ static int dw_pcie_ep_map_addr(struct pci_epc *epc, u8 = func_no, u8 vfunc_no, =20 atu.func_no =3D func_no; atu.type =3D PCIE_ATU_TYPE_MEM; - atu.cpu_addr =3D addr; + atu.cpu_addr =3D addr - ep->phys_base + ep->bus_addr_base; atu.pci_addr =3D pci_addr; atu.size =3D size; ret =3D dw_pcie_ep_outbound_atu(ep, &atu); @@ -861,6 +862,7 @@ int dw_pcie_ep_init(struct dw_pcie_ep *ep) struct device *dev =3D pci->dev; struct platform_device *pdev =3D to_platform_device(dev); struct device_node *np =3D dev->of_node; + int index; =20 INIT_LIST_HEAD(&ep->func_list); =20 @@ -873,6 +875,16 @@ int dw_pcie_ep_init(struct dw_pcie_ep *ep) return -EINVAL; =20 ep->phys_base =3D res->start; + ep->bus_addr_base =3D ep->phys_base; + + if (pci->using_dtbus_info) { + index =3D of_property_match_string(np, "reg-names", "addr_space"); + if (index < 0) + return -EINVAL; + + of_property_read_reg(np, index, &ep->bus_addr_base, NULL); + } + ep->addr_size =3D resource_size(res); =20 if (ep->ops->pre_init) diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/con= troller/dwc/pcie-designware.h index 347ab74ac35aa..f10b533b04f77 100644 --- a/drivers/pci/controller/dwc/pcie-designware.h +++ b/drivers/pci/controller/dwc/pcie-designware.h @@ -410,6 +410,7 @@ struct dw_pcie_ep { struct list_head func_list; const struct dw_pcie_ep_ops *ops; phys_addr_t phys_base; + u64 bus_addr_base; size_t addr_size; size_t page_size; u8 bar_to_atu[PCI_STD_NUM_BARS]; @@ -463,6 +464,14 @@ struct dw_pcie { struct reset_control_bulk_data core_rsts[DW_PCIE_NUM_CORE_RSTS]; struct gpio_desc *pe_rst; bool suspended; + /* + * Use device tree 'ranges' property of bus node instead using + * cpu_addr_fixup(). Some old platform dts 'ranges' in bus node may not + * reflect real hardware's behavior. In case break these platform back + * compatibility, add below flags. Set it true if dts already correct + * indicate bus fabric address convert. + */ + bool using_dtbus_info; }; =20 #define to_dw_pcie_from_pp(port) container_of((port), struct dw_pcie, pp) --=20 2.34.1 From nobody Mon Nov 25 20:34:38 2024 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2065.outbound.protection.outlook.com [40.107.105.65]) (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 7F58C200139; Thu, 24 Oct 2024 20:42:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.65 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729802549; cv=fail; b=l62X/KnS+89kgPuVr7tfNfM2s5PFYnlmG2KrgohctY6Zl+nCP0Mw2WinW/kkTx5YSTCUPZm9LUZ9MKXN5MRUwU33HLolQbBjjI09V6mRsgyp2bRXY7R7iuQK8AB28ScKvmPPDYFCAq9EvUO1i9TXuKPLDMzJLWELDwBg8KMPoLU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729802549; c=relaxed/simple; bh=m/FwtlHiYrAps1mkcMK3XbQDbcLOYoRH/NBYh7k2Qns=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=penub7pxWh07LbUx5daoDb5r899zLQ4OzWFh0dopqk+nTScSFawL3m8w3FNaWWx9dNl/E4tDOrLDpJJHL5pxlWKFXAiaz78vBv1YrceB41bHtfxoA7QCY/enSuDErEPN7YMr7DsgGVmkuYsdE2uTB1S2olEIPLmIeaNpYKIy3R8= 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=l7BNFItf; arc=fail smtp.client-ip=40.107.105.65 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="l7BNFItf" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bljI9Mf6hGH42DHGdy0NuYDtWrOqv63+s7H0pLmUuQa3QZ4uNl0EZuoM7+ljQjREpa+EupfVgjqvh0En9MbcZEZymVSSx/LxNZiTu+pmX2kB2SpSACUNcmsx/4pLnPfSoIsio6AJEIwJrPtQ7kBdoibYfl5qaTPXvgP3E1pSnJ8nEAjrpDsHpCZ7qeAuLHohWISC9qKmr0TEDZDg05pZF/SHVzPf+RF1MdD1rNK82xkIn5bl2vjHVwWTL8r9bYUMrAU0uQ7PUJ7GGDHNytubGwPmqVcY33qusHXyVjrnXXD8aYfexxquE1OKLgw2FFo/xJM2gzWamKuNdGQajn8FhQ== 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=eXSC/+4XeFnAaeLe8Zg33weCJ32yXdCxNoRWfCy7Uys=; b=jPJ250TGut8KfzTBpR2h6a65fSoKqNWkG1JDVqv0A/Bz3HkPj60M5kV6oApWgQMiloPBylZBEkvsbTVUhmXy9rAW81k6B56oew/DpWyL4IJkM0jTtI9pRx0zLR3oAWzEwdWfhJf992k726v5DBPqkiVy8yq12rjKNrxQxvdLfhLuknmBmjHw4p5j23kddJ+t6KFHn0XOmn8+Uhhu3cqbQvyHhC0WriX7jR+jj1aVhAO0Qz3tW+whRxXR3VV02rzwrU+omW0UwZXZ6UsEXSmGVG1/2PL4e6gPnRHpTFZEEgVHea9TKpOPmHUPtxj36OePial7YqVHUHpCNkmbHTkJ1w== 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=eXSC/+4XeFnAaeLe8Zg33weCJ32yXdCxNoRWfCy7Uys=; b=l7BNFItf6g8Gu2bhdZ/eQ5e1eArF8GiC8T5MY+8zKfOldSZ1UkoCEvya2i9ZWWMDIBRK7PDg/fL6BIwvP7zPPRFK75+8o97mOPTzVTqdsXpLkyp2xNaE49ZkeiR8pmUVLutu6uJyQxvimsOSnObgUxPefzMja/8zigfWBxhhSwzlXbtLTvzVk4nM3ls6H8fKdiOVxEyLnKzhK/1kp+bpiNN5CNYdjTpr4DW1bWgrBvLEl0YFGRCWb/yz37FOLdk3ep2hfauwh0vM5J+K7XtQee/nah8P8QccrzueVe4uKWCmwjycjwhwjStuw4gaIdcVWCXqFLHwMqYkdAXwURNE9A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by PA4PR04MB7517.eurprd04.prod.outlook.com (2603:10a6:102:e0::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.21; Thu, 24 Oct 2024 20:42:23 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.8069.024; Thu, 24 Oct 2024 20:42:23 +0000 From: Frank Li Date: Thu, 24 Oct 2024 16:41:44 -0400 Subject: [PATCH v4 2/4] dt-bindings: PCI: fsl,imx6q-pcie-ep: Add compatible string fsl,imx8q-pcie-ep Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241024-pcie_ep_range-v4-2-08f8dcd4e481@nxp.com> References: <20241024-pcie_ep_range-v4-0-08f8dcd4e481@nxp.com> In-Reply-To: <20241024-pcie_ep_range-v4-0-08f8dcd4e481@nxp.com> To: Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , Abraham I , Saravana Kannan , Jingoo Han , Gustavo Pimentel , Jesper Nilsson , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@axis.com, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Frank Li , Conor Dooley X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1729802524; l=2245; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=m/FwtlHiYrAps1mkcMK3XbQDbcLOYoRH/NBYh7k2Qns=; b=m5Z77eCpz0KfGVrSQ8G0m9mY4FDQI+h8dn+co13soG8oDM99wh1tkact20JO8Dq97bxVTwmXl 8Rg0Ag/aq+fBFEC6ofPqGM7cpioVoj1k5bTDGa47/3tj1SYOq4FrMP+ X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR13CA0112.namprd13.prod.outlook.com (2603:10b6:a03:2c5::27) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) 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: PAXPR04MB9642:EE_|PA4PR04MB7517:EE_ X-MS-Office365-Filtering-Correlation-Id: 6cea029f-f71f-4246-b4ea-08dcf46c5d04 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|1800799024|7416014|376014|366016|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?eVgzN1ZrNXRJQmZpeGRMUkZDakpuRmxnRXVIY1c0dndlQmVHZFZtcHpuWS9T?= =?utf-8?B?WDRKbUh1ODY2UlNPbENEQk1EOWJSb2dtcmdhOFg0ZEVaMWtsTWVvY2todnZP?= =?utf-8?B?cTF3WHJ0QUxEQVNCQW5Jb1BqYnVGVTE5VDlIV2YvbHdIMEFDQlMxQVIrTDZR?= =?utf-8?B?QS9zMTh5RlEvLytwZUdRYXJ0SGRBdUYzK01nZ2l4emwwdDBYQ0dFcEtHRUZo?= =?utf-8?B?WE1nVXpGL0JWMmlqKzJYWmJZcGtiN1BNeE1TRjBVMThxWVpGQU9aZ0RjSGtp?= =?utf-8?B?OW5USXg2d2QvdSsreXVEZ1dxZ3NWZWMvMmRRcXFwSXgrV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dHlsa0Y5akRUVlhyZFFhWmMzdjJ0b1Ry?= =?utf-8?B?STgxc1k4MllDRmdWcXFEcUE2VmxBd0c0MFpYOFlJVFV6SVliQTVjWnBjeWlT?= =?utf-8?B?b0VaUUp0SjA5aW9OUFU3SWQ4d3RqeWY4cUo2a3lMSHExSHZvc1l5WVprK3JM?= =?utf-8?B?eEFvOFlFVDY3K2hEZmYrUzhOaHI0aFlCTHFsWUJnUnIvbFgwYlJVd3BGTWll?= =?utf-8?B?cHNmSml2V1dWanBnQlNOWnZZZmU5ODlTWmdMWW9JN0VJYVdVUWg3YnNneTRU?= =?utf-8?B?RnhRWHowK2Eyayt5aDIxVUhrVWZOUC9STUEzR1R3a0hrN01nYWRNaDB5VU9E?= =?utf-8?B?SUNFd1ZzUUlTTFNQL0FJQUpYTlkyd2Z4YW50MmdHcC9HQ3UxQUp0THRvNHlm?= =?utf-8?B?OFpranpTeXRRTithZHdKb3FFQkNTNUlZb0dSR0NUbkxlS1N0TFl3bDhxOUMx?= =?utf-8?B?dGpRTGdIM3RpUTJMeTJtYjBNbmxLTm05R3FZL0hMUWhPM3gyUU1oK0tTSnpU?= =?utf-8?B?ZEgxTWptTm11NmJ1SGg3UDZvYWNZL2ZLUnVSMmNKNmJqYlNnUkp1QzZaYVBE?= =?utf-8?B?K2RPUDlUOFNQUGZKaE1IUllFd1U1Qy9lNDQ1eU55M3p6ODZQcjVGem94R1k2?= =?utf-8?Q?ThFXcw/zFNPOK?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(1800799024)(7416014)(376014)(366016)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WndueEMwdzN5Si9wcHEyU2lrZVlMRFI2S0dZOFcr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wZjJjOEIwUU53bk44TW80OWoyOEpueXQwdnVlWG5vaitEWlp5NmRTU3NF?= =?utf-8?B?STJWQTdDbHFtK3pmNllmRzIxMEQ5Zk9QcFM0RitZZCtoMDl6K2dDZ25NY1Ro?= =?utf-8?B?UTdxR2Q1aWtpMkZid1RnUmx2REV5N1VvcllvVFNFWmVneE1mQWZweVNXNGlU?= =?utf-8?B?ckduNmFFdi81cmRiVlplQzdmQXU3NStGZnZTWFhINS9tcXlHN1RnZmQvV1Q5?= =?utf-8?B?Y0xUb2xiZjdsVlVwcFlkRjlMRk02TXdhR3BrV2tndXQrempUMGZCbjV5Si96?= =?utf-8?Q?4wl11rt7PJ/Ms8ZL/ngy4w4iH?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6cea029f-f71f-4246-b4ea-08dcf46c5d04 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 20:42:23.4826 (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: JCRUNEVf3E1iSwfEJU5Ca1FimR5vrLD08ghUMvRIvHkEx9LtYOo6I9WzNTNEQQMA4A5yE0xklOi6ph9rrvNqrg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7517 Add new compatible string fsl,imx8q-pcie-ep for iMX8Q. reg-names only needs 'dbi' and 'addr_space' because the others are located at default offset. The clock-names align Root Complex (RC)'s naming. Acked-by: Conor Dooley Signed-off-by: Frank Li --- Change from v3 to v4 - none Change from v2 to v3 - Add conor review tag --- .../devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml | 38 ++++++++++++++++++= +++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml b= /Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml index 84ca12e8b25be..7bd00faa1f2c3 100644 --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml @@ -22,6 +22,7 @@ properties: - fsl,imx8mm-pcie-ep - fsl,imx8mq-pcie-ep - fsl,imx8mp-pcie-ep + - fsl,imx8q-pcie-ep - fsl,imx95-pcie-ep =20 clocks: @@ -74,6 +75,20 @@ allOf: - const: dbi2 - const: atu =20 + - if: + properties: + compatible: + enum: + - fsl,imx8q-pcie-ep + then: + properties: + reg: + maxItems: 2 + reg-names: + items: + - const: dbi + - const: addr_space + - if: properties: compatible: @@ -109,7 +124,14 @@ allOf: - const: pcie_bus - const: pcie_phy - const: pcie_aux - else: + + - if: + properties: + compatible: + enum: + - fsl,imx8mm-pcie-ep + - fsl,imx8mp-pcie-ep + then: properties: clocks: maxItems: 3 @@ -119,6 +141,20 @@ allOf: - const: pcie_bus - const: pcie_aux =20 + - if: + properties: + compatible: + enum: + - fsl,imxq-pcie-ep + then: + properties: + clocks: + maxItems: 3 + clock-names: + items: + - const: dbi + - const: mstr + - const: slv =20 unevaluatedProperties: false =20 --=20 2.34.1 From nobody Mon Nov 25 20:34:38 2024 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2079.outbound.protection.outlook.com [40.107.105.79]) (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 3BAC421730B; Thu, 24 Oct 2024 20:42:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.79 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729802555; cv=fail; b=mHsuKAXN5yfau8tIg9OiiXd2WbBiHS2mhiViznzh5QQXALKdYKJyirHhwuwR2eb4ouXpVu9Ft0PA3R7ANdNnO81+bVRHUN63VACmMhKXyADJGUvVQoglYB+n79g5LgXV5nxLU6MtUqcI1WpxiCzDWo0pTNNofFbTb9YcXTdXlKA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729802555; c=relaxed/simple; bh=pa21YroKN1Hep2b0+6lkuwO0n6eajEDfXOfgCIbz374=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=tp+HLB71lt1ADAJxK3MVVaVcljyC56wkqJylQO8mLSykm4WXiO2s2xVSbt8uqUxv4bm9nE0H1UJyIE94dN38vKIjiCpPjxCA8wIZ3CDi1qTWwRbkGLseJUhbWECvuyaAs8WoOHLGK3gnyXl0xZRukVcLdV5IARyiScYGjaybgyg= 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=m28Z4gIq; arc=fail smtp.client-ip=40.107.105.79 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="m28Z4gIq" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yRAf66y8yVdTkJ5VLjm2JfKLA5t+koxWWYubaBi5k976xZMJv1VJbhaS5rRHyXO3AR/VIitYrXHRNScMa6GHeepORchyLY+MOPypP8w11HNKRiCFJJwXp40oDukx8r5HtdGxRjIP3Xs1nL1XuS7flPb4Jd6Uhx2THKMLr0rWDIYjtJqtX+bnCxOpTsoNz6Juoe3RqAJJoQ+aavdcHgqpFtbcAXWha5JCm+fjpLX9qvq5cZAQfY4Igf5eqyaArhmoau9RVB1mvaSN/e5vLAsEbf4mWCg4gJI4IxKSAZzETbfWhY+93jfM7eBZlhTSQM6MUGGUtzPVRAlumktFge/gKA== 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=xag/w1g9a9ktecMSESDiXVwOlvIRngpJp5VTemD6Bv8=; b=ZkNPmeNNvO13x/CQXqPMmz19S92m9cxX6Zsamu+fRZ8SMLbCG9c0GqzFqmrVB6wVjJm3QMX6CzBrth4pMAlaG3AHE4JS0ZSJTO3EcyV1kFoNoxJmnWw0+SlqTlg9A34uF9r+5Wrg6vmRtzmF1wCqgKwTmi3JOseaGWjo3aHvjRBYqf7vf0NUa1bSHx0A+qwjvNQLer5CPRJMMRffGXAdIWkP+TrSHbnaz0AfYU7VNsAwM9YOQWgBApjE9XO8reGgt1oBzZYRnVHjehJSNDX6mAyBAwddbTw5F794ViCYFw84Or5YMr9wP6mRLWI82tTtyfox3meJq0X7iQX8N3hfDQ== 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=xag/w1g9a9ktecMSESDiXVwOlvIRngpJp5VTemD6Bv8=; b=m28Z4gIqjPsSD0KRqb/snBgSPaZLxtqKDjSJuDi8HD8NEUsU5pQ2ErqK9bASy1vHggI5b7uQDsfGHqXojGh/gf54svbNqfOY8uSQG13JPKp+Xye9FbVZ0pC/1/cK9K+24z4DJC2UFRBmu5XD4JEeaWqM/9WJKM9OxX8Uq45xu1WuZfEiVWagqsymWmDVrm0qTWgkDL9N3Ul/Qo1CatdHbQerfsAd6TEm0R/yBFzwhXaDRgeVGKeV9dofBOv5MWbfZsFQc+9BR/0G+6UeJkCkB1B3uP4fcdPczHaoNGxkPdExESXgTeguZQj8UaDhkyvX4lqTwnLSU6wnIUsqOwl9bw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by PA4PR04MB7517.eurprd04.prod.outlook.com (2603:10a6:102:e0::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.21; Thu, 24 Oct 2024 20:42:29 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.8069.024; Thu, 24 Oct 2024 20:42:29 +0000 From: Frank Li Date: Thu, 24 Oct 2024 16:41:45 -0400 Subject: [PATCH v4 3/4] PCI: imx6: Pass correct sub mode when calling phy_set_mode_ext() Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241024-pcie_ep_range-v4-3-08f8dcd4e481@nxp.com> References: <20241024-pcie_ep_range-v4-0-08f8dcd4e481@nxp.com> In-Reply-To: <20241024-pcie_ep_range-v4-0-08f8dcd4e481@nxp.com> To: Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , Abraham I , Saravana Kannan , Jingoo Han , Gustavo Pimentel , Jesper Nilsson , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@axis.com, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1729802524; l=1266; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=pa21YroKN1Hep2b0+6lkuwO0n6eajEDfXOfgCIbz374=; b=TMYO6I8IT2cnF3WLAyfp8t7Qbi6JBVX4CUPFyIdQzCC2HU8mvJe9M7EXVYFTaoWf2LbgRWml0 E+bz7aEhthvA16GvXOruBnW/aVQSmhPgW0tfMcmOWuDsDm+dnDfbaKP X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR13CA0112.namprd13.prod.outlook.com (2603:10b6:a03:2c5::27) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) 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: PAXPR04MB9642:EE_|PA4PR04MB7517:EE_ X-MS-Office365-Filtering-Correlation-Id: b392c4a5-34e8-4c59-282e-08dcf46c60a7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|1800799024|7416014|376014|366016|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?T0NDWUE2czdSNVlhMmh2dmRpU0J5U2R4ZmtEZmFiNTFFZFdlUTh0UmJpb0tC?= =?utf-8?B?T0g3aGhzbndXdWFkSTNPYjFxODJNcmh5WnRsek5neFpoVDRnY0htVm9GMHFh?= =?utf-8?B?SW01NkEyRXBsUUtvZC84TjE2eHorVFZZTUNIT0gwTW9YU01SS2pqVEp5dX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eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(1800799024)(7416014)(376014)(366016)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?R1NTZ01EWnVsQUZ5YTc3bE1GTThFcG55TC9HdHNjNlFCU1p1bUhDM1RMN0VV?= =?utf-8?B?bzcyODhsK0EvT05pVm5QbSt6ZmhYam9XcHoyNmZqNTBVVnJLemxkVHIzYlJo?= =?utf-8?B?L2ZnSURTKytnaUQwVndHU1dQaFI3aWlld3VxTjBHekZyRTV4UXJOaU9lcFow?= =?utf-8?B?SUkvS21neks4WDlYajJLVGh6OUVqczdyQjFJTWUwVWp2cFllZ1dJUktJSTFE?= =?utf-8?B?U2N6anVlWW9DWWU5dVdHNGd3c2xTMWQxRGRRcHRsc3M2eTZPUFkwdWZXMGhY?= =?utf-8?B?T1VVRWFCZC92eEZ2L0V6WlY2V2pndlNMYUV6TEdyUDFzMzNKaWpQRzNReHFV?= =?utf-8?B?dWJDMHdmbXBSUThZVlNraUxqVXVNYzAzL1orazRMSXl3blJYTkxNSGNaOXJD?= =?utf-8?B?Q0dVeE9Vc1N5TU8yeTBWOFdFa0IyVy96cEVuSHNQSy9STmwzTlJTd2RSbG81?= =?utf-8?B?ckVWTTVOYnFqb1FmeTRKK3VTVVhpQlBIZDFNM1F6d0lPSUFrU25EQ3hsdXkv?= =?utf-8?B?c2ZnWFhhOStFNWJBMUtFSEkwVWpsWUlqbzdMMzBMSzcwUzVaWnVHYk9raGd6?= =?utf-8?B?V3hWQTVYamxlYnRJZUJFU3B5cHBrQVFIWG5Qd095cUlIc0JTQ05QNWVnaHVZ?= =?utf-8?B?WGc5WDNvRC9ST25Hem1hQmUrb3hiODNrUFBzZG40dXBZOFZTSTM0ZFFUWFFs?= =?utf-8?B?bXlyRWJIQ1A4aTNPT2hFbElyRVpKSnV0R01xNStUcERjNW1iQlUv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WZrekdoY1ZN?= =?utf-8?B?S1RlUXVoOXRMcU9NUHp5U3hnSUszZkR4ZEtiNkY0bERPMHRPZDNUc0g0Z3VP?= =?utf-8?B?NVdNZHA5L1JiL2dEbHJ2QXI0YlRWVVdJanZZZGFOU0twVTBwaWFDcUs2QmhE?= =?utf-8?B?NEJ4dmJpUU1MdU5uZEhhVHRUQU1Ob2k1UmlEdlZZOGp4SFBGQnFiSlJGeS8x?= =?utf-8?B?VnFiSTl5QmFzZVFwWFBmaDRBUmRhOUtxQ1F6dkNESW80c0s3djQzT0hNT0hv?= =?utf-8?B?ZmZjZmMyWmpvRE9ZcGdnbURqWk41MjZVOUNrZVVHNVp1VzMzNyt4S0t5UlFP?= =?utf-8?B?VDlZODB2WWlnRVNsL1daN1c5dnY0NTF3OCszTUx6RDUxb0w3czM1SE9zZ3FI?= =?utf-8?B?VmlnK01IL2tJTUFxSXhTdDRPODRUQk1wMW44eFBKWHh1RkxPcjIwakpqTjdR?= =?utf-8?Q?yoiTM7A0YVjZa20lF02L7QNs4?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b392c4a5-34e8-4c59-282e-08dcf46c60a7 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 20:42:29.5899 (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: xntXs1Fo3VE3UTHzQy7Qd0MKaF2Z9lBYv7Qql4YIfneCQavcuFcOsRCYcKaoGC6P+3BeloqRUjR2d4LMhNYSkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7517 Fix hardcoding to Root Complex (RC) mode by adding a drvdata mode check. Pass PHY_MODE_PCIE_EP if the PCI controller operates in Endpoint (EP) mode. Fixes: 8026f2d8e8a9 ("PCI: imx6: Call common PHY API to set mode, speed, an= d submode") Reviewed-by: Manivannan Sadhasivam Reviewed-by: Richard Zhu Signed-off-by: Frank Li --- Change from v3->v4 - none Change from v2->v3 - Add mani's review tag --- drivers/pci/controller/dwc/pci-imx6.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller= /dwc/pci-imx6.c index 808d1f1054173..bdc2b372e6c13 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -961,7 +961,9 @@ static int imx_pcie_host_init(struct dw_pcie_rp *pp) goto err_clk_disable; } =20 - ret =3D phy_set_mode_ext(imx_pcie->phy, PHY_MODE_PCIE, PHY_MODE_PCIE_RC); + ret =3D phy_set_mode_ext(imx_pcie->phy, PHY_MODE_PCIE, + imx_pcie->drvdata->mode =3D=3D DW_PCIE_EP_TYPE ? + PHY_MODE_PCIE_EP : PHY_MODE_PCIE_RC); if (ret) { dev_err(dev, "unable to set PCIe PHY mode\n"); goto err_phy_exit; --=20 2.34.1 From nobody Mon Nov 25 20:34:38 2024 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2053.outbound.protection.outlook.com [40.107.241.53]) (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 C21C92185A0; Thu, 24 Oct 2024 20:42:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.53 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729802562; cv=fail; b=ZumEclf1sypJHZyiL4v2/i2uq8dN3pJDi8XSwm/uWr9E5LFWD6UESdjIOyxAmCIivVXfTqo8sec/utxkcgFlqayyycQM+Iw0A6WZ2722Xb2z5+0Mcddnh8bVYGI9iKRsE0z2hUfrh0E/VY+JC57zaykKHZ5M9p4JLbyVbtOWaIQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729802562; c=relaxed/simple; bh=i4d7sd3yQU/0Cg6+DkY2bKY+7qcWwb5wLX8OMJ1co/w=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=aABoXAM9zR6ryyXFTYzwr2ZAaYBVdAq52bVfzUiQ+REkDElMovFLljGvPtB+b1srmoHzV5rDTRySfJpjRxCx4kGak9VmoRKRdDMhp1FKTjIVpvUsHMTEA1dDx3AbeofUR5INe59MsQM7gAznGPBhq9+e5REsU4gNVfmp/so434s= 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=OTmoVbSS; arc=fail smtp.client-ip=40.107.241.53 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="OTmoVbSS" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Gifn+qoJuVMTh8ayl2p8U9HO9/sgBTlQbOHDco33+GrLkSSXZ2DkkE0fUVuZxqjiav+I9/MEpBiJ8rui2CgebUyX++VR1fo13AJcnOyJdjMBQilN2JfqC6cRdr8XA55d4MBtSpEHm8ArWHNbP6QEEGcIxc2HuZsNdxCLb8BHUTjqOPeBAbN4RXeqY9h4+AEDiUzflTQdovtknAz2JiH9mus0QsMOvMKBgaMBm77lLzCOMbiVy2Ng7TjMEBD+a2cpteDD/dpwr8dGmDzuGSzgeoUEZ/l/oNTwOvHte8wlw51BXBZQF9QXXS6h4T+OnyxNBD5yv/D2Y5jpdubyceTfDQ== 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=6Aii/uNy6ZXcLmek1tL8aJJUKXUMsseRVTsqG7jcHas=; b=ZOeoSSMPQ5Sot6qOL8kJ6EJCJ+koRkhXI/gwjy3KAGsEwJGg7BPDxAq2U3IsE6o5d+TNztsFGRMSW65DUHKERTENRJm6mI5Pk4DrC9WDufe0OHNbCuwv9BFbkSVqVJgNyTKRNCMoqdhOIAc3d4h3MyXEV+g7JrqGgI8Vm+MotLvCBmtoL8Gr9RmPrawipsJkd3u6LoJgyCuE5TXCsA1YOWUPvP0WKw3qYHrs74mAl7ORYqtrbdRw9Z0rekO9pgZ5VNyZ8RWf+T8xnSKoNds+lDyunU4QvLIt6U5ySoIdB7MGazEp/N/cqiNV0+haf2eCYYaY18jPF4jA/5dvuMv5NQ== 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=6Aii/uNy6ZXcLmek1tL8aJJUKXUMsseRVTsqG7jcHas=; b=OTmoVbSSQH09c/0KQycUIjriY/RkD2LpQlhKUElrI80UenfQkamrMbtuFD3DyAD4TyiojImkmgCLOVMYYr3ulA5Yn2Fs00vZwex8o0K4786GuRtdi+l7tfT3kJbRi5rKApnf/MgfQM9qrLwosET3aYkXbZfkgVbl79QF+6kzq8LanAl4Olk6G5uFro4xB8kWXMITGh0w/2oVwWouMP2T4Yg9DyXK27lIuDcw5VuUKm7aoGgj2PUJjzFVTwmIBLWZb6b1vEGrBruF2HF/iNbStHYjVFBhZtUjQTqHzLx+wswArOFm2u5A+rxs0NT3IdNFur1/NT4NXDcdxsoWKkWCQA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by PAXPR04MB8223.eurprd04.prod.outlook.com (2603:10a6:102:1c9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.20; Thu, 24 Oct 2024 20:42:36 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.8069.024; Thu, 24 Oct 2024 20:42:35 +0000 From: Frank Li Date: Thu, 24 Oct 2024 16:41:46 -0400 Subject: [PATCH v4 4/4] PCI: imx6: Add i.MX8Q PCIe Endpoint (EP) support Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241024-pcie_ep_range-v4-4-08f8dcd4e481@nxp.com> References: <20241024-pcie_ep_range-v4-0-08f8dcd4e481@nxp.com> In-Reply-To: <20241024-pcie_ep_range-v4-0-08f8dcd4e481@nxp.com> To: Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , Abraham I , Saravana Kannan , Jingoo Han , Gustavo Pimentel , Jesper Nilsson , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@axis.com, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1729802524; l=2809; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=i4d7sd3yQU/0Cg6+DkY2bKY+7qcWwb5wLX8OMJ1co/w=; b=n/QBCb8gXv8fK+/RmW+tOA/Iv/5x6pK3TBnUbHuZgoyU3+BeQJf9sj7HTQfn8cvvfG4OSPbKX zPGv/lkpaGqCBe1sMS9bPhdGGVVCWnubxf1Z1Fmui94v4KieIR/ZlRL X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR13CA0112.namprd13.prod.outlook.com (2603:10b6:a03:2c5::27) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) 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: PAXPR04MB9642:EE_|PAXPR04MB8223:EE_ X-MS-Office365-Filtering-Correlation-Id: 0a75c20d-9326-4e58-30d1-08dcf46c645d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?MkF3bWpmL2Q1SlIzakRDZ0gwd3BuSk1hWTBSeHIyZnJkT2o5ZlpDZ1lBRzRo?= =?utf-8?B?NU96a3dVSUwvazlrc1FqTGdZWTZIVXIyd1hOcG15YUpwWWo4MDFGRzViZEJQ?= =?utf-8?B?OTBLRTVxT3VOcGt6SGNYSXpuRjVRMElyMSt5Y3JVT0tXcU95R1FxaTFzc2ls?= =?utf-8?B?RTlvancyaFlOMlhXT0ZPMXVnMWpoTDlZcVQv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)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?U3ZYWXFGR3hoWlVyTXJ1Slc3K3NVYlJuRDM5OHZqTC9ZTjVQY2hrLzhVb2R5?= =?utf-8?B?S2FBZXpEd1AwdGducFZjTzM5YzZJQTQ5WHNHMWhnOFFEMzVqT3FsY055cWhC?= =?utf-8?B?NTF3cFNMeWEzMUIyYkFqRDRtN053bzNRbEJyZzY2NjRxNjI2RGVGSnVkRVAy?= =?utf-8?B?WjFFeUhVOHdvRlA4Wklzc3RwS3dMZmpVRVZoUElPR2RwV1Z4WGZxck8vdVcy?= =?utf-8?B?Q21iVWh5emJNd1NENlBpc1Q4U01kczBpSDltRHJjc0UzRmlqTTdSMnl2bXJL?= =?utf-8?B?RTV1a3FQNWRGV05aZXJLclNlSFpORnh2bmkxdXQ2ZklQdU5kc1J6WHlEbDhi?= =?utf-8?B?WkxMOGo4Y21ndmEvZUJMdWw2NkpmUDZoSVlTZElmYm9FSFozejNvTndLWTZ4?= =?utf-8?B?MkJPZEVjdVdJRGhvR2xzd1BHMEhpMkZRbzdBZ042MlRwTUZ6b1l1NjNyYTFm?= =?utf-8?B?ak9laytndGI5TnRvS1NJaHdiUUxDNk04UEFTQnluYnFPemYvZXplRDhwWVVl?= =?utf-8?B?a1BDZlRTWWtJSW9KTm9QenBOZHp2N2pad0hUTm9IcmtWSGIyU3N4S09hbFNn?= =?utf-8?B?RzhIRjgyUDFHNmZEbDB1YUt5L3I1V1U1dFExMjBjeFpNNVpQYWREOUt2bGZa?= =?utf-8?B?SWNSbTlGbXVZQVB5L3lBa1VDZjRRSzgvS2s5YU52RnQwUloyRVg1d3A2N2dD?= =?utf-8?B?ZFNzUS8vU056NHNuTlJJUUFKWkphQjBYZ2hFU0w1cFNJYTFnZjlYZ3Z1Z3d4?= =?utf-8?B?QnVwQlpPQ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lSzVZbGVGa3Jy?= =?utf-8?B?N2RqaW1JUWh2Qm55cWZIaGVnazY4cU9Ycm5NWEk0TEQ2SnpBaWdRWXJSRTdq?= =?utf-8?B?ejVKMjJpZllNc3lOV0hIdWgwS2dSWXFuTWJoMENDTmJmZWU0V1R3ZTZBeU93?= =?utf-8?B?dTFTMUZFTk84d0s1dnJFM0NtNUNhbXdhSnRwUGVrYmo2aWxFc1FEMW11SmRn?= =?utf-8?B?M2ZFcUdlQkpnWERlU1dBcWczSEJLL040OVlCK1gyNTJYdjNlUzRucEwzSU9D?= =?utf-8?B?OFhNL1Jlc0VPY0tPL200cjNjNHBLdU5mWnlhVlVvKzUxSlREaGZ3d0lXSEpY?= =?utf-8?B?QWo4YVE2bVR0UU9La09hdUlyVnJGajNQVENhVWM0WDBrRnZ0SU5PZ3EwWUF1?= =?utf-8?B?MkRBaTdxK3g2U042RkQ2bmRlVmJqYWxiWE9LWG5YWE1SQWRQemYyQUJWdU43?= =?utf-8?Q?9RCGnZl3oLKF2ebp4EyB27va1?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0a75c20d-9326-4e58-30d1-08dcf46c645d X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 20:42:35.8805 (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: suGZ4zzq1NFUkGXoBoOx8sBQM8VckFKgsFmhawgacTE0GXfatWzmDmkLXQuHAjBlwXU3MGqCTdoj4GKbe/cqPw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8223 Add support for i.MX8Q series (i.MX8QM, i.MX8QXP, and i.MX8DXL) PCIe Endpoint (EP). On i.MX8Q platforms, the PCI bus addresses differ from the CPU addresses. The DesignWare (DWC) driver already handles this in the common code. Reviewed-by: Richard Zhu Reviewed-by: Manivannan Sadhasivam Signed-off-by: Frank Li --- Chagne from v3 to v4 - none change from v2 to v3 - add Mani's review tag - Add pci->using_dtbus_info =3D true; --- drivers/pci/controller/dwc/pci-imx6.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller= /dwc/pci-imx6.c index bdc2b372e6c13..5be9bac6206a7 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -70,6 +70,7 @@ enum imx_pcie_variants { IMX8MQ_EP, IMX8MM_EP, IMX8MP_EP, + IMX8Q_EP, IMX95_EP, }; =20 @@ -1079,6 +1080,16 @@ static const struct pci_epc_features imx8m_pcie_epc_= features =3D { .align =3D SZ_64K, }; =20 +static const struct pci_epc_features imx8q_pcie_epc_features =3D { + .linkup_notifier =3D false, + .msi_capable =3D true, + .msix_capable =3D false, + .bar[BAR_1] =3D { .type =3D BAR_RESERVED, }, + .bar[BAR_3] =3D { .type =3D BAR_RESERVED, }, + .bar[BAR_5] =3D { .type =3D BAR_RESERVED, }, + .align =3D SZ_64K, +}; + /* * BAR# | Default BAR enable | Default BAR Type | Default BAR Size | BAR S= izing Scheme * =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D @@ -1448,6 +1459,8 @@ static int imx_pcie_probe(struct platform_device *pde= v) if (ret) return ret; =20 + pci->using_dtbus_info =3D true; + if (imx_pcie->drvdata->mode =3D=3D DW_PCIE_EP_TYPE) { ret =3D imx_add_pcie_ep(imx_pcie, pdev); if (ret < 0) @@ -1645,6 +1658,14 @@ static const struct imx_pcie_drvdata drvdata[] =3D { .epc_features =3D &imx8m_pcie_epc_features, .enable_ref_clk =3D imx8mm_pcie_enable_ref_clk, }, + [IMX8Q_EP] =3D { + .variant =3D IMX8Q_EP, + .flags =3D IMX_PCIE_FLAG_HAS_PHYDRV, + .mode =3D DW_PCIE_EP_TYPE, + .epc_features =3D &imx8q_pcie_epc_features, + .clk_names =3D imx8q_clks, + .clks_cnt =3D ARRAY_SIZE(imx8q_clks), + }, [IMX95_EP] =3D { .variant =3D IMX95_EP, .flags =3D IMX_PCIE_FLAG_HAS_SERDES | @@ -1674,6 +1695,7 @@ static const struct of_device_id imx_pcie_of_match[] = =3D { { .compatible =3D "fsl,imx8mq-pcie-ep", .data =3D &drvdata[IMX8MQ_EP], }, { .compatible =3D "fsl,imx8mm-pcie-ep", .data =3D &drvdata[IMX8MM_EP], }, { .compatible =3D "fsl,imx8mp-pcie-ep", .data =3D &drvdata[IMX8MP_EP], }, + { .compatible =3D "fsl,imx8q-pcie-ep", .data =3D &drvdata[IMX8Q_EP], }, { .compatible =3D "fsl,imx95-pcie-ep", .data =3D &drvdata[IMX95_EP], }, {}, }; --=20 2.34.1