From nobody Mon Nov 25 09:37:43 2024 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2044.outbound.protection.outlook.com [40.107.20.44]) (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 F17F61DFE3D; Mon, 28 Oct 2024 19:06:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.44 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142378; cv=fail; b=HI1E+I2CoyQ/+bxFyktCp5avYhfhfvYUj24xRp+9Q1kcMSaB1/2/2hYymGUY0VD31STivd3hIjB7LwCxYbSgxlpnHdxzo/yWasSFSRgWUmU7cHIkVVPc3FGlsbEE6kU8CFx/z9+LUYAfWy61/U8fX5/SE2wD5VssYDrGxqacgyQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142378; c=relaxed/simple; bh=1rSpPrZTOLMx4xcaG4Itd6ReEroEzwhMtX2XtNZo75A=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=u2MAgySjgJ0OeepLKgTJhjsKiqcAlhqD+8Lji0WkM4e9Yy/+SgpHJHNvMKprYGoBDoMc2PLXRWZIUPMLg5zsRFGklydNJ4cJEEnBcLaKyTigbWK0g7lsQO51oycWUWJe8pBP0GGdPTBp6y3Va6liYiMCeS0eqzjiqRzCs9gLy8s= 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=i44CfLEA; arc=fail smtp.client-ip=40.107.20.44 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="i44CfLEA" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bYdR31S7JxRhwuB2Qa+v1lkJ5lEnSOpyh+o/d4iIoKQmdj3Vxj3PMFHJ9iqEVUO+4Myl5fapCCJg6szdamK0ISgbtwIyaEjAOVkbWTWgn3DUUJ0+vANxGzCMDAf9N8f3C7y5MYRuXnnmomKW7Rs52er2kLq/c9TDycwHFS/xw22b5x7MqcXPMq1ei34lXaVcAdaXXEKRITC48lChj0PvhNhFoCFqGaSwuW2jjiJ9ac9Ne0K/DsCtukBYHTdlqQwdkJ5Rtw+tT7jrnjwSJKhz3jGyEMQ0NyjCMnLc6yVafrsn7F4QqtFXcg98NttEOP/top+zF8xXUkitq7qzFRDbfw== 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=j/JXxzlgrGYw0PU9k1GSfpOM2XBdolyCC6yjHKtj9mc=; b=U56AaNicLTW7w20oCYSoDMhA9/kzpNpJLAHudHvbTaHVTgxAp+vcjMhVB/UvHoB9ICcvzhfyWFvb+Ud0bJqWBPWbKh38N5yclpCQzY0ZEGzS4giuHRuuzwtLs/kHQul3WhMF54dtSS45aoNQBJNlujSxOg/0BEHdMV8hnaRa3WGrfGKKl7NBuApP8fqp0IfA/q7aTb/v/85mgoGDTjcr560VQ7zSG30y3ODji8MmlUKancXIlcNyMI7+zxhFZkBd31HGXO+2Vd3kd8ZM+9Y1ktpgHrJF58DgLBeQ5ZARxnA6NxOKxLfUvG0liNyQibPNihmbPFJcB52IZTRc3ubs1Q== 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=j/JXxzlgrGYw0PU9k1GSfpOM2XBdolyCC6yjHKtj9mc=; b=i44CfLEATVuAKr9NkEo5nIT8nyAN0O3131/VQOW+g+pNar4yLiviiHDj4fqxtWQT3NVTQlwTU0sQWbhRrBon4gP4MvU0GoKld3jJFHAfawcO2t/WhpPa+SB0Bm8z3QECX/4wHt6j6Ye9OnsJV1JYOAyqYB3FffytSE5p7/NiQYash93aa+tNn2mqSLaM6BdRiTRwsUrqrlu0TGWf308qRBEjAN5VWLJLVDt+qUM44ggoLCBBaxrh8DsyqkeG93KSxXa82mMe4baL3pM6ELmvr8IzfuxT7cmTdnUPyPM7qQH4IVLpdw3ynBBqly3eMiP3CVd/ccTRu4ZaLk1GCmFYqQ== 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 DBBPR04MB7946.eurprd04.prod.outlook.com (2603:10a6:10:1ec::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.25; Mon, 28 Oct 2024 19:06:13 +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.8093.021; Mon, 28 Oct 2024 19:06:12 +0000 From: Frank Li Date: Mon, 28 Oct 2024 15:05:55 -0400 Subject: [PATCH v6 1/7] of: address: Add parent_bus_addr to struct of_pci_range Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241028-pci_fixup_addr-v6-1-ebebcd8fd4ff@nxp.com> References: <20241028-pci_fixup_addr-v6-0-ebebcd8fd4ff@nxp.com> In-Reply-To: <20241028-pci_fixup_addr-v6-0-ebebcd8fd4ff@nxp.com> To: Rob Herring , Saravana Kannan , Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1730142363; l=4762; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=1rSpPrZTOLMx4xcaG4Itd6ReEroEzwhMtX2XtNZo75A=; b=J6JHDGWw7+6ttmVw93GRpH/jRwLln1TzuZg5mAkybhPYDvZQ+fEG8f+9RhzC56plqOFdcImic T2IfknfXeVzDnLRpqG3P3EcsV5ohLwEU6D/ZNYt0B17KM190FvUOY4/ X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR03CA0005.namprd03.prod.outlook.com (2603:10b6:a02:a8::18) 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_|DBBPR04MB7946:EE_ X-MS-Office365-Filtering-Correlation-Id: b7335a89-7173-47e9-2c42-08dcf7839706 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014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= =?utf-8?B?RlN0bGJDQkJBUjdDT0dCVDZJUWkzWWJudXhLVG5XYjd3VzRQendqR2krSnB0?= =?utf-8?B?OWNjaWJRUzVGUkhuWkZTamNBV1V6Zm1MdFBYdVExOWlmUUl6UDBveXJaSHFx?= =?utf-8?Q?DmSYgp99UliHY?= 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)(366016)(7416014)(376014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?d25heHlBNllZeE8xbzNVRk1ZVG9rRkdhdElPZDdsR0NIcnVyK2ROZ1BGdm5j?= =?utf-8?B?c0tvRHQ4NjNxQjJ1MWVaLzkwZTNNUjhDQm9XajR0c2hKbkk5U2FhVTJaRUFo?= =?utf-8?B?cWFqeWVwc0tqT1Y1enJzR0pwT29SZzZEY3BpTTRyeGdabTJoRW1EU2RCb1JL?= =?utf-8?B?bEh0bEtPNDhQYXlOZzRhR3ppY1JaM0swSXJQZ2oyRWhhSW8reGNwMU5NNVcz?= =?utf-8?B?K3UwN3lTK01FOEp4ZVd5amFOem1Xb3pwYlFweG1vK1JNUkY0T0Y0N1RaQU9r?= =?utf-8?B?M0c1MXlSNkc4VTRUSHgwa245T3hROERyOEsrQ202TEViVmRJKzJValNQTVpt?= =?utf-8?B?dFdhSFozb1FGaHdnYXdrMWQzNFlNamFZR0F1T290dHZVV2d1RmxKdG5UNjFP?= =?utf-8?B?LzluQXdjWFF3cm1FcnhHSmJIdGluQURKbCtRbmdTUnMva1FSUFlINEE5ZHlS?= =?utf-8?B?aDJscjdyV2dxZkdTdUp6VVlOdW9WV2NwT2s5S21acDkrV28rdXlvYk95dGc1?= =?utf-8?B?RGhQOFlhb3l4V3JPb3FO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WnFjMXZjRmlRejZUUk1UWElKdkg3RXpQYWxpQVhIcmNWaVNraWhxMmtOMHQw?= =?utf-8?B?NFl0dmhnN3N0Snk3TUlxcU9VWG5qbi8vUzJ1amhvNENteWJ6ZVpQZXFIMzV4?= =?utf-8?B?V3ZNanN6TVpNK0pXVm5WNFFqdEYybVoxdFdYOWJIQUlsaC91ZDJMVU9lTFov?= =?utf-8?B?TVRQMXNoaTdPM1BkQnRkTVBsMnZqVWFabkh2OHY0N3RpY2dsRUV0VFpnZDY4?= =?utf-8?B?VXVQL00wQjIxWXgvdktFSTE2cFM3WGUvRlF2aVc4WStyNm13U1YzbWIzSmFr?= =?utf-8?B?ZU9FRTVQazFmZUN0VnhGNTluQlFHcSsyUHNiTUcxNURYemE1djV0cU53eXRI?= =?utf-8?B?VUZhUzhwTGY2end2NHZUTnJScjdualZqL0l0OGIyT0wrRlM4eVNXeVk1U1JU?= =?utf-8?B?N2tmcmE1d21XTVhDTVB3cnBLdzRZd2VWbDJ4L0JIOTBNN1JleEhmZUYyaTFF?= =?utf-8?B?TmU4dTBtSnlRb2hFajZBTzZTTm9pbGVSaGtnWUtyUTIxSUh2UnBWYmtvZklT?= =?utf-8?B?MWtvbnU5UUlXMEhBWlFaNlROeG1mY05CNVdNOUJjMlpjQ0p6aTN1cGlxSE5E?= =?utf-8?B?K0JrUVV2dnpGcHhML3EvNk9CMDE0Y2xrYXBXeDN0Y1lxeTNnZTNVcVpWbUhG?= =?utf-8?Q?Vs8CHeTntbm1NC3nusIImSUTY?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b7335a89-7173-47e9-2c42-08dcf7839706 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 19:06:12.7368 (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: jPbyIgtpRxiIuPXYjon8GAYaJTu9MplsXJ9SzDQ6HYMWKdghiBYsKb3CdfLRghskuAAnussHAy4ILdy9nppsYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7946 Introduce field 'parent_bus_addr' in struct of_pci_range to retrieve parent bus address information. Refer to the diagram below to understand that the bus fabric in some systems (like i.MX8QXP) does not use a 1:1 address map between input and output. Currently, many controller drivers use .cpu_addr_fixup() callback hardcodes that translation in the code, e.g., "cpu_addr & CDNS_PLAT_CPU_TO_BUS_ADDR" (drivers/pci/controller/cadence/pcie-cadence-plat.c), "cpu_addr + BUS_IATU_OFFSET"(drivers/pci/controller/dwc/pcie-intel-gw.c), etc, even though those translations *should* be described via DT. The .cpu_addr_fixup() can be eliminated if DT correct reflect hardware behavior and driver use 'parent_bus_addr' in struct of_pci_range. =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=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 =E2=94=82 IA: 0x8ff8_0000 =E2=94=82 =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=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=96=BA=E2=94=9C=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=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=82 PCI =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= =82 =E2=94=82 =E2=94=82 IA: 0x8ff0_0000 =E2=94=82 =E2=94=82 = =E2=94=82 CPU Addr =E2=94=82 =E2=94=82 =E2=94=8C=E2=94=80=E2=96=BA=E2=94=9C=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=80=E2=94=80=E2=94=80=E2=94=80=E2=94=90 =E2=94=82 =E2=94=82 Con= troller =E2=94=82 0x7ff8_0000=E2=94=80=E2=94=BC=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 PCI Addr 0x7ff0_0000=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=98 =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2= =94=80=E2=96=BA IOSpace =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=80=E2=94=80=E2=94= =80=E2=96=BA =E2=94=82 =E2=94=82 =E2=94=82 =E2=94= =82 =E2=94=82 0 0x7000_0000=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=96=BA=E2=94=9C=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=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=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=98 =E2=94=82 =E2=94=94=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=96=BA CfgSpace =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=80=E2=94=80=E2=94=80=E2=96=BA BUS Fabric =E2=94=82 =E2=94=82 =E2= =94=82 0 =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=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=96=BA MemSpace= =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=80=E2=94=80=E2=94=80=E2=96=BA IA: 0x8000_0000 =E2=94=82 =E2=94=82 = 0x8000_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=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=98 bus@5f000000 { compatible =3D "simple-bus"; #address-cells =3D <1>; #size-cells =3D <1>; ranges =3D <0x80000000 0x0 0x70000000 0x10000000>; pcie@5f010000 { compatible =3D "fsl,imx8q-pcie"; reg =3D <0x5f010000 0x10000>, <0x8ff00000 0x80000>; reg-names =3D "dbi", "config"; #address-cells =3D <3>; #size-cells =3D <2>; device_type =3D "pci"; bus-range =3D <0x00 0xff>; ranges =3D <0x81000000 0 0x00000000 0x8ff80000 0 0x00010000= >, <0x82000000 0 0x80000000 0x80000000 0 0x0ff00000>; ... }; }; 'parent_bus_addr' in struct of_pci_range can indicate above diagram internal address (IA) address information. Reviewed-by: Rob Herring (Arm) Signed-off-by: Frank Li --- Change from v5 to v6 -none Change from v4 to v5 - remove confused <0x5f000000 0x0 0x5f000000 0x21000000> - change address order to 7ff8_0000, 7ff0_0000, 7000_0000 - In commit message use parent bus addres Change from v3 to v4 - improve commit message by driver source code path. Change from v2 to v3 - cpu_untranslate_addr -> parent_bus_addr - Add Rob's review tag I changed commit message base on Bjorn, if you have concern about review added tag, let me know. Change from v1 to v2 - add parent_bus_addr in struct of_pci_range, instead adding new API. --- drivers/of/address.c | 2 ++ include/linux/of_address.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/of/address.c b/drivers/of/address.c index 286f0c161e332..1a0229ee4e0b2 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -811,6 +811,8 @@ struct of_pci_range *of_pci_range_parser_one(struct of_= pci_range_parser *parser, else range->cpu_addr =3D of_translate_address(parser->node, parser->range + na); + + range->parent_bus_addr =3D of_read_number(parser->range + na, parser->pna= ); range->size =3D of_read_number(parser->range + parser->pna + na, ns); =20 parser->range +=3D np; diff --git a/include/linux/of_address.h b/include/linux/of_address.h index 26a19daf0d092..13dd79186d02c 100644 --- a/include/linux/of_address.h +++ b/include/linux/of_address.h @@ -26,6 +26,7 @@ struct of_pci_range { u64 bus_addr; }; u64 cpu_addr; + u64 parent_bus_addr; u64 size; u32 flags; }; --=20 2.34.1 From nobody Mon Nov 25 09:37:43 2024 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2044.outbound.protection.outlook.com [40.107.20.44]) (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 ED4101E009E; Mon, 28 Oct 2024 19:06:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.44 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142381; cv=fail; b=GCsTZZGTw+dIPwz2MrGSTbS18NP0gAWVGOotUsV2Ogmit3o0uSe51uwAZGqTks/H9ompI4QAMhMnUgtyQfQtSDm/BaGYLc/m4GiX01FbDQDq37ZjKCNL0yVH29XNcBLT5Ep343xGl0blucgKOIXQhUrh4CpNMQTU3Jv2LcLbBDo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142381; c=relaxed/simple; bh=xiXouNpVhhagOvQdXFLvlfaRhzcVDADSufDDS7ir13g=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=KwW1PUJjcTlWb8kyFN9X1MvqP27//CZW4IqNv2vhV38cTowPwGFvFMyPFAWjZi7xte+g8XXY4gXn1fAKj9e379JZ9I+ViXKv5UqsUMxenJngvvRdFbedUzQw6Ydg+CwQ2lX6SQdUNuqJY3OhWeWfqLwChWev7nVMlnP0DRQi47k= 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=YQgvxOlr; arc=fail smtp.client-ip=40.107.20.44 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="YQgvxOlr" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=k00L9f9BI4YCq9756XeJ287hUTvHIJVk5PNGhHPIeReAf1qxwDXzzyBz+iH8dhyaGWJTNz7p2kwXxNskAFJCoiP6j4KM4zFGmUhun8lNHjM8jLtVmxRqa7YUnjO/15p/Zlx3guCkKoJV33D6mXhRkhQNf4orlZ1rLaMiclh0LWSoVv6gshpGoIhdZ0n1+UywsejgbyXhfGytxKtdS8YMsCpC3YJFzFWBO0ct56/ZqbwOzOuGz/GnBZJM+XjFl/jNcnaOfKMLGfWqyj6QsKJuD5H80EX7AkniUt3lyHlNJAp3nQKewXUjt9Ca0opLJULjVbmCeQcEdRA9iPL4tGEiSQ== 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=72nw29hHFDlpi9crET+L23if2rJ656JTjj/1lPj7nXM=; b=jqyNrWEbXumyQ8Jtu1oS6TfvB3nPYiPKXDvoQQyWu1TYdRdsb1WkV4z1poXr8vyEuMVLqvp7r+vM2vDTuTuOoYa3DRBycG95gvO3+0abuxjspkk0LWuZbyp8tt37lmkR5/t6duDy0w3MTdX++ts368YGHrAWAEgo9loaI/1DcWOv35n6rciSD2J4lwp2Dg7GX129UWJ7M6x3ZTWELfLxDB0eIYe/fQy8yzOLC+SAr0vMeQP4TPCUwlUErNhxDumH4nP0XrfC0yTBBWIapJs8/GTnacqrk64XtmDnxxY1vnjZrXlzuLAkdQVH6sZMDs5bVWlsF7huSpfIJrrR+lYAcQ== 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=72nw29hHFDlpi9crET+L23if2rJ656JTjj/1lPj7nXM=; b=YQgvxOlrCjV0BhbDAPSweEuhr5pwW/M/Alb56QDsrCzbtVLA6H5GHxkB9UUJExh4J13VcgkJ1shQ6aG+GRLCi8f11AQey+EjwBNgspFmvcWv414RUed63n0ynTlkKI8QNo4IlqtFlhhec4j9RtUhlmC9uN7vRMvnRrEygEguG1+vWBEOzNTBIMTOtnI2PTbs/EmkQqKS2QUqTFgUARpk+tKzlzj/DglUni4LctNBXKNjUhav2B+LOr/eMUjUlqFeOyooZWdoI9EcaPa5/qZ4POhZhXSRwyFXQUwAD2xEotkVTOoOAOfaFwU82UZo9H4rZ6CsYW9NMcSLEXn87cq5tQ== 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 DBBPR04MB7946.eurprd04.prod.outlook.com (2603:10a6:10:1ec::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.25; Mon, 28 Oct 2024 19:06: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.8093.021; Mon, 28 Oct 2024 19:06:17 +0000 From: Frank Li Date: Mon, 28 Oct 2024 15:05:56 -0400 Subject: [PATCH v6 2/7] PCI: dwc: Using parent_bus_addr in of_range to eliminate cpu_addr_fixup() Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241028-pci_fixup_addr-v6-2-ebebcd8fd4ff@nxp.com> References: <20241028-pci_fixup_addr-v6-0-ebebcd8fd4ff@nxp.com> In-Reply-To: <20241028-pci_fixup_addr-v6-0-ebebcd8fd4ff@nxp.com> To: Rob Herring , Saravana Kannan , Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1730142363; l=6907; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=xiXouNpVhhagOvQdXFLvlfaRhzcVDADSufDDS7ir13g=; b=1XAtPwmnz6utgJb/RgXFDtavRFJLTmEvREIQo8R68WR2nw0mr9p7AuMh2ILH2KG9QuZC0XOqd GVmw+rYESP/AvIAsufScZqwYRpxvl/2uw0EzbJk+uSP9fWALk43Bj0/ X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR03CA0005.namprd03.prod.outlook.com (2603:10b6:a02:a8::18) 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_|DBBPR04MB7946:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ef1ffbe-4d91-4a31-5adc-08dcf78399b4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?dG5jcC9IdVY3TnNUZjJUWWhqYUwvbnlsSmJTblNINTRsM0tCNER0QkZNVEdt?= =?utf-8?B?NE0ycmVpamczTnBFWEphN3J3WWtRa1YzYUFQVFpQeGo0UHRFY1pOenMvNWRC?= =?utf-8?B?VnVJSzFqMUIyVUpGemJldmFsUVlPUW44UFkxVGpSRXBsZlRwYXB2YklmMmRO?= =?utf-8?B?VS9mYzBoZ3RYMlZ1VFJHM0wzSzhObVNMYzZLZlplZkJ1VGpvSmM2SGpvY0FL?= =?utf-8?B?bnVHSE9kTkY3VjFoVnVTMmdqTEhDRzM5bXlRZG5yTDR2YXNYcnJBNEJKempp?= =?utf-8?B?azBaNlJVR3lFanZsQkNIanBkVkhJZmE2Ui9oO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nMCt1dmNSenNTZW9ZdC9HQW5RMjZOK3ErS2FLdXFKM1hLWlBDaTFs?= =?utf-8?B?eFF4Mks1dURsUnJTL1p4NEdUeUF5bDJOZXRGUzg4a3Zzc3RiNlptVFRuWVhj?= =?utf-8?B?ZjZyamtmRThnTnE2aXJ3YnR5MVZMM0JydWRpSVNLdGdhZ2FxZFNaRWh5WFAr?= =?utf-8?B?bGF5eE5LelRLUFRkYjdqZlRGQjAvN0luYzlpZTBSSWlvL3NDR1M1anpvUUp1?= =?utf-8?B?TlYzOSttSjFScm84NHh3MG4zK0lBbEk4a3dCcW9GeDRPSjd4NU96dWcrVjd3?= =?utf-8?B?NEVHeFdpRjM1UXlOWjlLL01KdGVtR1hYRUF2akxBek9wQWo4UHVaTW5Hd2c4?= =?utf-8?B?TnYrTnNIelFrUk9wZ0FqN1FrM2wyNU44YStJdkNHc1JSY2VCYkRsTGF1N1RS?= =?utf-8?B?WkwyWkJpYy9LODcrdkNkQ3IvT0owMis2L2piWXRlenNwd3l5SkdDNDVpVm15?= =?utf-8?B?NUI3d3JHZHVMSzkxaXFFb3JVNVhRWFhDbnhLMzUvNk5nMFhmNjY1T2h6bGt6?= =?utf-8?B?NVdGRS9mNVI2NkxBZkZnbDIvd1dTM0pYblhxckNGTytuSmJDcUR6b1dqU2dm?= =?utf-8?B?VEQrY3VnR0tIK1E4ZWhTaWl4OEJEbXJ2dmVrOXg0OXBEMjVUVXg5ejRFakpp?= =?utf-8?Q?aczuh5sg+5ait?= 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)(366016)(7416014)(376014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cURaeHZ2bFJZalJNYko0Zzd4T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Uljem92Qmx4bDhnNzUzWlIwM2ZEUS9pU1dhVnE0TUx0MVJ3K2Ux?= =?utf-8?B?Ykp2c3orUGJlSGkxSGlvQ0VHY2FHdWFWdGxrUFJPcm55OUtvSGpZSFlySXI0?= =?utf-8?B?ZlhzRStyakxXVzlXeVFoZ0QySy95V2ExS1ppcjludTVvU09MSVgxd3FJNkRJ?= =?utf-8?B?bWRPRHFoSDd4RldJTm9qa0hBNGFFckM1K2l0OXV6aXJYQys5NHdVYzJmQ3Nj?= =?utf-8?B?UXNSSDRUdHNDVkpQdXY3SkhDOTA3V2QzYW9rMTRUS1pEOWY2VWtwckpRc0pB?= =?utf-8?Q?F3+hjtGjs+CMbYzShTYzZHuCd?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ef1ffbe-4d91-4a31-5adc-08dcf78399b4 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 19:06:17.2531 (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: +H2/7q3a05XVFq77nLUer3jVCQhN6+brmNfuZ1W9SBtiE2eRVbjuA+OH/D7TgPfOyR5R5TGfscue3S7eF5A+rA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7946 parent_bus_addr in struct of_range can indicate address information just ahead of PCIe controller. Most system's bus fabric use 1:1 map between input and output address. but some hardware like i.MX8QXP doesn't use 1:1 map. See below diagram: =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=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 =E2=94=82 IA: 0x8ff8_0000 =E2=94=82 =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=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=96=BA=E2=94=9C=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=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=82 PCI =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= =82 =E2=94=82 =E2=94=82 IA: 0x8ff0_0000 =E2=94=82 =E2=94=82 = =E2=94=82 CPU Addr =E2=94=82 =E2=94=82 =E2=94=8C=E2=94=80=E2=96=BA=E2=94=9C=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=80=E2=94=80=E2=94=80=E2=94=80=E2=94=90 =E2=94=82 =E2=94=82 Con= troller =E2=94=82 0x7ff8_0000=E2=94=80=E2=94=BC=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 PCI Addr 0x7ff0_0000=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=98 =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2= =94=80=E2=96=BA IOSpace =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=80=E2=94=80=E2=94= =80=E2=96=BA =E2=94=82 =E2=94=82 =E2=94=82 =E2=94= =82 =E2=94=82 0 0x7000_0000=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=96=BA=E2=94=9C=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=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=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=98 =E2=94=82 =E2=94=94=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=96=BA CfgSpace =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=80=E2=94=80=E2=94=80=E2=96=BA BUS Fabric =E2=94=82 =E2=94=82 =E2= =94=82 0 =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=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=96=BA MemSpace= =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=80=E2=94=80=E2=94=80=E2=96=BA IA: 0x8000_0000 =E2=94=82 =E2=94=82 = 0x8000_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=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=98 bus@5f000000 { compatible =3D "simple-bus"; #address-cells =3D <1>; #size-cells =3D <1>; ranges =3D <0x80000000 0x0 0x70000000 0x10000000>; pcie@5f010000 { compatible =3D "fsl,imx8q-pcie"; reg =3D <0x5f010000 0x10000>, <0x8ff00000 0x80000>; reg-names =3D "dbi", "config"; #address-cells =3D <3>; #size-cells =3D <2>; device_type =3D "pci"; bus-range =3D <0x00 0xff>; ranges =3D <0x81000000 0 0x00000000 0x8ff80000 0 0x00010000>, <0x82000000 0 0x80000000 0x80000000 0 0x0ff00000>; ... }; }; Term internal address (IA) here means the address just before PCIe controller. After ATU use this IA instead CPU address, cpu_addr_fixup() can be removed. Signed-off-by: Frank Li --- Chagne from v5 to v6 -add comments for of_property_read_reg(). Change from v4 to v5 - remove confused 0x5f00_0000 range in sample dts. - reorder address at above diagram. Change from v3 to v4 - none Change from v2 to v3 - %s/cpu_untranslate_addr/parent_bus_addr/g - update diagram. - improve commit message. Change from v1 to v2 - update because patch1 change get untranslate address method. - add using_dtbus_info in case break back compatibility for exited platform. --- drivers/pci/controller/dwc/pcie-designware-host.c | 49 +++++++++++++++++++= ++++ drivers/pci/controller/dwc/pcie-designware.h | 8 ++++ 2 files changed, 57 insertions(+) diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pc= i/controller/dwc/pcie-designware-host.c index 3e41865c72904..a4f2578700eb3 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -418,6 +418,34 @@ static void dw_pcie_host_request_msg_tlp_res(struct dw= _pcie_rp *pp) } } =20 +static int dw_pcie_get_untranslate_addr(struct dw_pcie *pci, resource_size= _t pci_addr, + resource_size_t *i_addr) +{ + struct device *dev =3D pci->dev; + struct device_node *np =3D dev->of_node; + struct of_range_parser parser; + struct of_range range; + int ret; + + if (!pci->using_dtbus_info) { + *i_addr =3D pci_addr; + return 0; + } + + ret =3D of_range_parser_init(&parser, np); + if (ret) + return ret; + + for_each_of_pci_range(&parser, &range) { + if (pci_addr =3D=3D range.bus_addr) { + *i_addr =3D range.parent_bus_addr; + break; + } + } + + return 0; +} + int dw_pcie_host_init(struct dw_pcie_rp *pp) { struct dw_pcie *pci =3D to_dw_pcie_from_pp(pp); @@ -427,6 +455,7 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp) struct resource_entry *win; struct pci_host_bridge *bridge; struct resource *res; + int index; int ret; =20 raw_spin_lock_init(&pp->lock); @@ -440,6 +469,20 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp) pp->cfg0_size =3D resource_size(res); pp->cfg0_base =3D res->start; =20 + if (pci->using_dtbus_info) { + index =3D of_property_match_string(np, "reg-names", "config"); + if (index < 0) + return -EINVAL; + /* + * Retrieve the parent bus address of PCI config space. + * If the parent bus ranges in the device tree provide + * the correct address conversion information, set + * 'using_dtbus_info' to true, The 'cpu_addr_fixup()' + * can be eliminated. + */ + of_property_read_reg(np, index, &pp->cfg0_base, NULL); + } + pp->va_cfg0_base =3D devm_pci_remap_cfg_resource(dev, res); if (IS_ERR(pp->va_cfg0_base)) return PTR_ERR(pp->va_cfg0_base); @@ -462,6 +505,9 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp) pp->io_base =3D pci_pio_to_address(win->res->start); } =20 + if (dw_pcie_get_untranslate_addr(pci, pp->io_bus_addr, &pp->io_base)) + return -ENODEV; + /* Set default bus ops */ bridge->ops =3D &dw_pcie_ops; bridge->child_ops =3D &dw_child_pcie_ops; @@ -733,6 +779,9 @@ static int dw_pcie_iatu_setup(struct dw_pcie_rp *pp) atu.cpu_addr =3D entry->res->start; atu.pci_addr =3D entry->res->start - entry->offset; =20 + if (dw_pcie_get_untranslate_addr(pci, atu.pci_addr, &atu.cpu_addr)) + return -EINVAL; + /* Adjust iATU size if MSG TLP region was allocated before */ if (pp->msg_res && pp->msg_res->parent =3D=3D entry->res) atu.size =3D resource_size(entry->res) - diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/con= troller/dwc/pcie-designware.h index 347ab74ac35aa..f8067393ad35a 100644 --- a/drivers/pci/controller/dwc/pcie-designware.h +++ b/drivers/pci/controller/dwc/pcie-designware.h @@ -463,6 +463,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 09:37:43 2024 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2079.outbound.protection.outlook.com [40.107.104.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 483D41E0B78; Mon, 28 Oct 2024 19:06:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.79 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142386; cv=fail; b=o1yx4EQK8vOOAMxq0p4/zxoTd5crypSjeLI80SYnC2oz4qY6oCTOylTJveSCpG9QGWMJ6u8AQcEn4Ltrxkc217W1K02C64MQqpyLMLGTKpqH6c3yarg7vlyur/dZhIsjPw21x1+a96enOCYhBwBUdBi/F6/tKumDMvuWZlpB2Wo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142386; c=relaxed/simple; bh=wjq39b1bSlaqsK6CqdYI9THTeDF6beeukudaMwC5+eM=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=kIIe4XJ07fnWHxpJovbU0Goev3VtXJHRAUA69YokT8U4vXAIPjlgybdq2ejFOj2g/h9s+SsfW1mSyGUJkB/38xUoyoN/B4KIgF37kBWNiysgJ9KMbDH0qsOyVTrl0Tku46mV4m/3VDkwinltZK0wYcnGs1Rj8/caruap5ocm/pw= 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=Behj/9mt; arc=fail smtp.client-ip=40.107.104.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="Behj/9mt" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YnFsSnT8dtkr9cPeii5vvS6munI7Pi0twrD7z4imwDDM5FPj7WeIdwPlqrFgdI9KPr+5KAVgW0s1cRkv//y02go/g4T0QeAX6xaRnCIY9nhrRNsqmFJxew1tDtzc/FymqPtDMqFrKZdPD+lfK+wlhNisEmoQoeIJI//t9G1OgQcN5ofRIj6jhT8Jte8XU+8g9CW+R8J6544YN1guYIATnBEGfSSqoaexq84GGFuyKCZkxR4Df2dYIjFId1YiCId2VXCnv+hMldNpyqWZmTsxjam2cTp1BWWwwEe7zsdqEVG0Np34bkSgqzLEGp5hclBOK7jYqjMTaQq3aJSRk3OniA== 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=5ilQ06dZ+gRqsAnBOtuudd2FBhIfbsL8re509y5kH6U=; b=utDSc75tLU/nUHT1jvwjwOQ0puDGO1spxw1/+HgCS0YG42CKIiqZ+P2bBVjPBYH0Ma3fxV6upw/hbW7VFwTZZEWVqzCdGxlscYA1ehHXwqMTQnO1VizK0ZnSqTqv+dn2QIByIPC6nXwrBwdrVXgJ0yly3v3A86FfOAGQw3hUHgnmN2pW1FtP3KCKfC9BdggtgHtBEwSOrNQDeRCAhFpESABO4kOAVQ+E0ANs2S10JODjCI1jEVVOy5T58K7giAatEYbf+03/vyFvsIH2Z8rQ5riGHBQ0aRsti+DNztRzz/kEq+ObBZGo7smflBd8lXA1tGIDDdBlaBARVMUPPzzNQw== 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=5ilQ06dZ+gRqsAnBOtuudd2FBhIfbsL8re509y5kH6U=; b=Behj/9mtJ59S3b8sm4ogk3Zqk18D2EXHG1m25RLSVX7etMM64u9v1LLpIlximVYAKI+YulPMU3bsR9IvTV8JJ9NrbWwSrH4dMSKEIoKmuKfGnRXIGJUZ/9nf89xbp/o0xxEgl3/9wInW8snwYFUePiYUWRw+DTyyh1uZAfnbW1ukkjYSdYkOacy82geJd/paCKkXghxJvQ7WiV7dYtuKjv9VWlg7xSQcCVVAPdWPrfZmjcnCRaEYpZHX4KEKvxHB/bPoWbS5+nPpwdn4Cjtldni236Ow9VdBcgDznYxw4iLLHfXFKzAldGutRLZNHun5ILpil/9wnYcP/jY1GN6ZHg== 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 DBBPR04MB7946.eurprd04.prod.outlook.com (2603:10a6:10:1ec::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.25; Mon, 28 Oct 2024 19:06:21 +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.8093.021; Mon, 28 Oct 2024 19:06:21 +0000 From: Frank Li Date: Mon, 28 Oct 2024 15:05:57 -0400 Subject: [PATCH v6 3/7] PCI: dwc: ep: Add bus_addr_base for outbound window Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241028-pci_fixup_addr-v6-3-ebebcd8fd4ff@nxp.com> References: <20241028-pci_fixup_addr-v6-0-ebebcd8fd4ff@nxp.com> In-Reply-To: <20241028-pci_fixup_addr-v6-0-ebebcd8fd4ff@nxp.com> To: Rob Herring , Saravana Kannan , Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1730142363; l=5630; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=wjq39b1bSlaqsK6CqdYI9THTeDF6beeukudaMwC5+eM=; b=OkTwnRGEyTpEsvbOP8JxrxmK7S1zO2r8ZqzQDDCSgQTstxt0IDtyadD3Suu3yRVF7yfa7/KT5 lp1tb+eBOuqCLfKtJaGjwCcceNyXd0Rh0P3jBTkUfn64VE6+oYN+1el X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR03CA0005.namprd03.prod.outlook.com (2603:10b6:a02:a8::18) 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_|DBBPR04MB7946:EE_ X-MS-Office365-Filtering-Correlation-Id: b641c80d-0b8d-455e-f3d5-08dcf7839c65 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?RGoxV2N0ejB2djdHaW82eUUvK2YrSVhzc1pvS2thQVV3QzJDV3RkaEU0RGZP?= =?utf-8?B?cG8vUjJCZVRrVjh6cGVOVEVmZUdzRUVnYWZVTFNudlhiVGxlcHRWdVdNd1VL?= =?utf-8?B?UFljdG1YYUg5dk10bHV3d3NpRXlaVU93YW1YUFhqa3ZTc0NoVWpLUC9sc0hN?= =?utf-8?B?Y25zN2tVWVArd3BzYVE5UlZOZVQrOGNVTytnWFFoTmdGUDQ5dW5vNDVZS1R1?= =?utf-8?B?eHB3TUkxVnFDY2hCKzAzNW1CYW1UMGpRY1V4NHdnWjR4OTIxcGU4dzQxbFpt?= =?utf-8?B?UEV2MlVudzNjS0t2UW1nTDVlMzFpTFo3NmM2cTNjeHJ5VTYzTTZUNll6Rzcw?= =?utf-8?B?aDRWUmszaVZVVUQ4dUlSVjI5SE0yblg5a2ZIU29JMlJXZFZpd0w0NmFhRnkv?= =?utf-8?B?Y0lqdmc4NFB0clVaRitFanNmWkd4VWtSZzBuM1E2NGpyejBGRDRhWVRaTWh0?= =?utf-8?B?emlIclZIZ2lOT1lrYjFmZXhid1U0RDVpd2hFZlZncmRiellPY01ybmp0dE5P?= =?utf-8?B?S1k4aWRsa3liWWZYWFZUOEVwWm5sdG1tOS94UE0yUkdZTFRqVVVvaEsvUi9N?= =?utf-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f-8?B?UWV2bnM5MG9qU1NaSm90ZXdMb2VJLzhtRW5idkRhMWUxbWY0TzVqOVVOV3FO?= =?utf-8?B?cTNNN2RqQWlRbE1hUGh0THhRN1FCMmtndGU4TURhUEtiOG9CSGhqcWI5cTVk?= =?utf-8?B?dGNrenJia2Y3L1FwL0UvOW5SNi92bHBVNnQ5S0NSakZjWEVLc1BRaWJMblZa?= =?utf-8?B?bFJoYnZrL0hVUmZOTnYvVnZBbVdoVkEzTk50SGJHVUY4cGx3dWhyTUtrMlBX?= =?utf-8?B?TFlQdlRNQ1A3RHorSVhXSTI5d2FKZzlRNHJ5ay9IY0NDNzV1Y0RSbi90VW0v?= =?utf-8?B?SHI3VmNzdmgwMVFweWo3T3J5V29jK2doNjc4cVRyMDNkZW12WjFFWmlaYlhU?= =?utf-8?B?eExhVlVYYmYwaUY0TnowTDgwODlnQjBVcUR3U1pUNUtnVFE9PQ==?= 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)(366016)(7416014)(376014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?a0dmaEp1cXRMUjdvRzdtdnVUNmFMUGhqZkhIRmZ2S2lGa2lqdmxIQ29xTVRw?= =?utf-8?B?RWMxeHdEeEtmZXhqK2U2R2NhekVGZzVFZlFaWTczNmVEbTlFMVlXMHFtNFVH?= =?utf-8?B?d3RCcHNNMTdRbFI5Uk0rb3JKa1ZMb1JNa3krdmxick00d3k2dVlNdFZtUWRk?= =?utf-8?B?YWlqcGJLMjQvVWk5V2UyZUFHL2lTWXkvQzl6cTBrTUUvTFI1ZUk2QVJCMFVR?= =?utf-8?B?M1hMYWttTUUxUVIxM2NITWdPUWxudU9keWIvdjZKWGF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nlLVkNDVHd5Ukkxa05iTzdCMXBTaDd3aHdE?= =?utf-8?Q?p2j5vR8zC8FX6Lgiw2LaRCJRV?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b641c80d-0b8d-455e-f3d5-08dcf7839c65 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 19:06:21.7565 (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: QPD8tend6DRo+XH1G3qGxRN7VGdu142qLEuVFTF2tFuo8xViqjpRlqSjW+plZyQqSAiDgvhGL3oRFWk/hFlPiw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7946 Endpoint =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=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=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=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=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=80=E2=94=80=E2=94=90 =E2=94=82 pcie-ep@5f010000 =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=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=82 =E2=94=82 =E2=94=82 Endpoint =E2=94=82= =E2=94=82 =E2=94=82 =E2=94=82 PCIe =E2=94=82= =E2=94=82 =E2=94=82 =E2=94=82 Controller =E2=94=82= =E2=94=82 =E2=94=82 bus@5f000000 =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= =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=82 =E2=94=82 =E2=94=82 Outbound Transfer = =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 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=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=AC=E2=94=AC=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=96=BA =E2=94=82=E2=94=82 =E2=94=82 =E2=94=82 Fabric =E2=94=82Bus =E2= =94=82 =E2=94=82=E2=94=82PCI 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=E2=94=820= xA000_0000 =E2=94=82=E2=94=82 =E2=94=82CPU =E2=94=82 =E2=94=820x8000_00= 00 =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=98A= ddr=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=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=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=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=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=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=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=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=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 <0x80000000 0x10000000>; reg-names =3D"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 v5 to v6 - update diagram - Add comments for of_property_read_reg() - Remove unrelated 0x5f00_0000 in commit message 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 | 21 ++++++++++++++++++++- drivers/pci/controller/dwc/pcie-designware.h | 1 + 2 files changed, 21 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..a5b40c32aadf5 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,23 @@ 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; + + /* + * Retrieve the local bus address information, which is sent to + * the PCIe Endpoint (EP) controller. If the parent bus + * 'ranges' in the device tree provide the correct address + * conversion information, set 'using_dtbus_info' to true. This + * allows 'cpu_addr_fixup()' to be eliminated. + */ + 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 f8067393ad35a..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]; --=20 2.34.1 From nobody Mon Nov 25 09:37:43 2024 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2066.outbound.protection.outlook.com [40.107.20.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 BF44E1E0DBE; Mon, 28 Oct 2024 19:06:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.66 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142391; cv=fail; b=ajpNreGv2LKOGm9DSstRPE74uKA4IYESsNA+X8clrumE+yiA0blA5m3YOvJFYW63aXbC6YRhqDnmQb72QSN0qEhMZzmX5F8yHbIriF956+7wUnqmh+5ABBpoqoAw01mBxN4o7lXBAbNu4acKouOgzyN3cE5KtUvbCijo4p1Nah8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142391; c=relaxed/simple; bh=Z1ygha9+xD7FlYOYS9zQvq9PhEUCSi65GmFlWznej58=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=RDnXiDhdYDsJUBl4mBG++wH6JOvYYeRnq9Ml2XFEl+5dNaINNRC1NTGHYfDG6ZYPHFoTa22FmmzNOuG3LpYFSDqX3kop+7/J+e6rxtvsWDcNgEZJQuNa/Cc73u3j7idzZZ3Li+KHKb1MAh9xcQ+MK8X64CK9CqzrPRDLDScJqkY= 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=HUxrZEDO; arc=fail smtp.client-ip=40.107.20.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="HUxrZEDO" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=av9e+Kc2JrWaLyEWhPZYlXWiqCa6euMp5DW0RrxwtoxYDIzGF4pooHtlvgV4E8h/Bld2rDdQAOY0pcj58U6FJx8LisFkSxViziaQnkgqHP97YX8n3X5Y1z9MvDe/jFfiC9/RYx3IZqvBx7rAC3gJ45rC5wVaYFSY0vHK42+A+a9IY9o8hJShIC+qihaCAziLkkWrmBwhIrzwbaWOXcthaWQ6tclspvvaLXl2FnW1P/QjcADE1YaqlSvoARlxChH4yWMJ3bsF0K7//sOd8eog/FqRi8jY8H+840fnYz6pJYsXa90lcj1wJRZjDpWKmI1AbOG5L1kd+/tyC18iByXE0w== 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=JQeePKxiG6VD8uGDrodNnYj3a8VmNmBfPCLUrcwxvY0=; b=TlGh6s1La7ck1FxUs+0t9xuG7eQweL3/JTD75lHfhl1nzHVQeqYUT+dZuGKHHOhg8tKQ8EXghKlDEIMFlTsoG/e+TkWljTpD5LZIcKfSwanSEeJUG+pTG4/6a/RnoMVacEMg0o32dvmwmQxX8eN35r5UWR6A1nPdsl1t+nJnoGj+o4BDFVSKjr2LAgNWgntYQxa1Kl6+7MF9IH31gZiIIFr+ens+2RQIsLxZRqKc+oLezOcxOYVrSKrVQLLdmBKxvfmoq+BXzlkLDLni55i/h3sjOPmc3mkcE0qf3X1Cjexl6tgD0Jp9Ehp72nC/wlohX2yKpXeCkxlJ3x/Al8B7XA== 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=JQeePKxiG6VD8uGDrodNnYj3a8VmNmBfPCLUrcwxvY0=; b=HUxrZEDOhFypuVm7mu2ROiFs6IU2Xlsyt6imA9EMl3RXgR9r0vYWm0Ld03zEcLhkqlxACn2gNTgGb+VsT4cTiK+nmDcIl+JQwr0a1PCQ9WPkjVo47C50F8hEHq+rMslGVTaOim+xyswYDW7dbemp7mmzNoxHi+1NsiZ5mvnC3lUCFbOAvL/k/eLH7NUX19/ENEgK+MzKEnP2ipZALr1BiCCRv4ZRO0eVCzWSXDbcWYMWecLs2tnXfvqEZmfi4p24WnjFVO5Yhkg165SygSg80Y2uFrX0fCVshk/1W0DQhP1Zcj4UquIoYR80PbT9sjCP1HR33dJECMREeXJKv32RoA== 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 DBBPR04MB7946.eurprd04.prod.outlook.com (2603:10a6:10:1ec::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.25; Mon, 28 Oct 2024 19:06:26 +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.8093.021; Mon, 28 Oct 2024 19:06:26 +0000 From: Frank Li Date: Mon, 28 Oct 2024 15:05:58 -0400 Subject: [PATCH v6 4/7] PCI: imx6: Remove cpu_addr_fixup() Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241028-pci_fixup_addr-v6-4-ebebcd8fd4ff@nxp.com> References: <20241028-pci_fixup_addr-v6-0-ebebcd8fd4ff@nxp.com> In-Reply-To: <20241028-pci_fixup_addr-v6-0-ebebcd8fd4ff@nxp.com> To: Rob Herring , Saravana Kannan , Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1730142363; l=2455; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=Z1ygha9+xD7FlYOYS9zQvq9PhEUCSi65GmFlWznej58=; b=3yp3+KMBu8iS9BIFCUUKquHWkCCIC92YBwOFNA3a2qFhTRSk6+IqYryloMK6W1SDbP64xj0I7 6YW3oTyxAU8D7qNmJaahKNlaWRnHHnM6Za1QPBZDnv+KmuNK70AJjCb X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR03CA0005.namprd03.prod.outlook.com (2603:10b6:a02:a8::18) 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_|DBBPR04MB7946:EE_ X-MS-Office365-Filtering-Correlation-Id: 2d445dac-04b0-4180-36e5-08dcf7839f15 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?eGd2U1ZJQld3aWU2YnkrUHNtV2VhTlEwRmNsUld6NC9NRktJa3RncDJQeGJC?= =?utf-8?B?OWdhb2FXTXNOZzlOTnB6eFdGN1pCdkZnVitHcmpXY2lhcXpKaGpwZDIwN3Zu?= =?utf-8?B?ajYzVzVYZjlnY0ZzU29Sd3RRTG51MDVtTUlBSW5rYnpseERYQlA5bis4ZFJZ?= =?utf-8?B?RlNSeithNmg3NkFRZHJUNU50OStrbk5NZWM5RUhjb01LVlN5WTlDbEFOSkV4?= =?utf-8?B?ckV6U3JSaU9Fcm9qazlIVDF6Y2hpb1RTNkJCYTdKaEh1bnR2Znd1TWdrejc1?= =?utf-8?B?aGRBQllIZHFSQ29OdWo5U3Y2SlpaTDBUVVQ2S1h6aFhqbkRjQ1VQeThScWdy?= =?utf-8?B?WFUxY2JIclpiZkxkZGEwU3E1NUoycTJmQWhHMHhnbFBCM2hMSDJJYStESk50?= =?utf-8?B?T1dKcWY5dFZ2a2ZBaVhxd2NZYUF1KzFKOEYxMHdyemlpWHYvVjg4K0ZMMDNm?= =?utf-8?B?bXI0NnZWbkowb2tIazlLamwvYStkVEJ1WS9CajhDVi84VVU5TjBJalpNR2Y3?= =?utf-8?B?M3JFemh3Ylk5RDg2N09XQjk2SUZkc3RJWHhkRzJWdVdXb01raHBSdE4wVUR1?= =?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xRVVIN0tP?= =?utf-8?B?Mk42NEZReG5WdG5DeGlldFdPbUxzRS82STR4UTR2MURmeUdRVG5qNnY1MUo2?= =?utf-8?B?RDd6RGZJaTlkbVZ3MldDMEI0V21UOWFUaTRMWURuRDhVcm4wZ0krMXozNFJX?= =?utf-8?B?M2NmcnhjUkEyblppWllpYzhIT0pIbndkdmZFS0I1VVpSbXdybzhuQmh3NUN0?= =?utf-8?B?bUN1MldkYlpLNkU5cm03ZzdxdDJSK3NDMTAzNGVvNndmeE5MenFNdkhpVWxu?= =?utf-8?B?djhRZzV2UzUzSEhyK3pKS283WmRWUEdkeU4yS3BidzFwWG5TMWxFZXA0R3lh?= =?utf-8?B?TnVaYkxpRXNqckxNSExNSkNuaUc2UTVDR3hPSnBCaEYxdUhWZlZ1TjRMNFp3?= =?utf-8?Q?DlgwS4mBUqdgt?= 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)(366016)(7416014)(376014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cUxuT2xzZW8xQmhzL1ppQ0ZrVlFqUDJJUTR0N1JYNC9jWmlVTytkOHpFM3pK?= =?utf-8?B?ejVjbTJmZ3NLVi85NjZqeDFOc0tiY0d1TzhKSGZFZWhkSElpOEpjdlhqNmhw?= =?utf-8?B?bktQVWlQRGM0SXdWWCt2ZDZkSGhSdEk2M0dJL2FNK0hTN3VGK1dYKzVCNzkw?= =?utf-8?B?V1d5U25yR2Q1WWVBRHhiWWRleFBqVTYxWG5LRGhHdzRLbHZYVE8vQzdoL3VX?= =?utf-8?B?MTMyYktpU3lIM3UzTDY4bUNoZFlrVXRTK3VSaDA5dy90RzRMaFRodkF1ZDlO?= =?utf-8?B?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rM1d1VHdBYUMveTRMNGV0dmpt?= =?utf-8?Q?r1B77KOSnBfrizgpd8+3BCG88?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d445dac-04b0-4180-36e5-08dcf7839f15 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 19:06:26.2626 (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: PFUPx1u1bdEFlK3NSpIk4+6fAbdpxzV+nlXtPgXt9FKbCi6bh8YPT5EVnI2OZgMWcDqe6HUMZO9EXfcUSZ9xSg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7946 Remove cpu_addr_fixup() because dwc common driver already handle address translate. Signed-off-by: Frank Li --- Change from v2 to v6 - none Change from v1 to v2 - set using_dtbus_info true --- drivers/pci/controller/dwc/pci-imx6.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller= /dwc/pci-imx6.c index 808d1f1054173..533905b3942a1 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -81,7 +81,6 @@ enum imx_pcie_variants { #define IMX_PCIE_FLAG_HAS_PHY_RESET BIT(5) #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) =20 #define imx_check_flag(pci, val) (pci->drvdata->flags & val) =20 @@ -1012,22 +1011,6 @@ static void imx_pcie_host_exit(struct dw_pcie_rp *pp) regulator_disable(imx_pcie->vpcie); } =20 -static u64 imx_pcie_cpu_addr_fixup(struct dw_pcie *pcie, u64 cpu_addr) -{ - struct imx_pcie *imx_pcie =3D to_imx_pcie(pcie); - struct dw_pcie_rp *pp =3D &pcie->pp; - struct resource_entry *entry; - - if (!(imx_pcie->drvdata->flags & IMX_PCIE_FLAG_CPU_ADDR_FIXUP)) - return cpu_addr; - - entry =3D resource_list_first_type(&pp->bridge->windows, IORESOURCE_MEM); - if (!entry) - return cpu_addr; - - return cpu_addr - entry->offset; -} - static const struct dw_pcie_host_ops imx_pcie_host_ops =3D { .init =3D imx_pcie_host_init, .deinit =3D imx_pcie_host_exit, @@ -1036,7 +1019,6 @@ static const struct dw_pcie_host_ops imx_pcie_host_op= s =3D { static const struct dw_pcie_ops dw_pcie_ops =3D { .start_link =3D imx_pcie_start_link, .stop_link =3D imx_pcie_stop_link, - .cpu_addr_fixup =3D imx_pcie_cpu_addr_fixup, }; =20 static void imx_pcie_ep_init(struct dw_pcie_ep *ep) @@ -1446,6 +1428,7 @@ 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) @@ -1585,8 +1568,7 @@ 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, + .flags =3D IMX_PCIE_FLAG_HAS_PHYDRV, .clk_names =3D imx8q_clks, .clks_cnt =3D ARRAY_SIZE(imx8q_clks), }, --=20 2.34.1 From nobody Mon Nov 25 09:37:43 2024 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2050.outbound.protection.outlook.com [40.107.105.50]) (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 866541E0E13; Mon, 28 Oct 2024 19:06:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.50 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142396; cv=fail; b=Ul8qLmAfrFJ+HLh06WlhveOBXU2zdftmNl0Rh5AWpI/9xHREiJj1wHhD0JvQzeYzVYAbTGp35e8atjvIeRWjTJ2/9aEJzrjCFG1I2zmvNRlCdW6A6LaRd+fMHFq1Ica33xRrQzSbJ7MVQbZos5I0h9D86zPFZLiBhwDelhfh3tE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142396; c=relaxed/simple; bh=RzDiJjc+I6wcWk13KTVhystqp6RElq6XYrrJPcrtUXI=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=Bal1JvJjlezuqv1029/GiB0PU29j9XyHOHTXq7z4PpjVKgU6qaBADS3rYaKMqRS+fjxTaPsh5wO59bGep3nH/YWRqj3h6Ty1SQb1/ldQy+i7HraB209hA6hZJjtRw2zqq3ZXiB+hm/tWclMg3If9pQHbVvHM9geDnkASDQauQlU= 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=N44izmjO; arc=fail smtp.client-ip=40.107.105.50 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="N44izmjO" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sSV+ijxIhHNlbKkF4M6O4HgbJnOQNTIpVEn5Ir2S5Lgj0CrlWC8agsZ/31TGylcjMD4MdMBP9wo4qrFVgTBgLlU/SJto08/DQWj5FmID3XBi+uRnQMsnGvkWL+YhwBEn3VZzG9fNUmoVftHREgt/Exvyp8AAshe80m3DvKUOmSDZZtHzE3vZAy6AasbrSldFeRrlyjPEuYi/XKyzXM3W8s6RrpsWsM/VqDq0bpbpFC6BRHYETYAe4Nw+lI3bsSX1BCkEKp7YTg7vSZ4hhmQeduxqSJmymp3tOqhtmNI2rt8kTW2HURXjSXloqfwE5HORehJnFpmczyAS7mErO0orBw== 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=/fLhtILW+VZvuJWqnGcQ5qJ8MgmTM/8+pr67M3KgLGg=; b=ENpnqWiLJBBLV+VCKlM30qePXQpCzPBVLwk2VvO8T/TI0U7JOIJHFwbUXF2cN//oakm/UzLO2CAlJ56UulQeH+W6VAyaqslOKH+AEHhUALXDVyxHeFNhy8lnksZ12x72V1KxmKLnl8FuVgJW48wdjMytMcVyqo8c7P7/J65z9AS3oaRZhvbWArkMyb77z2iNw+/i8gmOZbQKsduWqCQIYaHODBFrC7zzdFXbttDdisz4J//v+JbTmOALdCrcFZr2CxVIDwfU0I23hi/UMpk4v2giki9Gn9XCuuGeZPlNybrES9PrKtent7we61jR4G5615VRjvEkZDyWjxIAT3ZzSQ== 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=/fLhtILW+VZvuJWqnGcQ5qJ8MgmTM/8+pr67M3KgLGg=; b=N44izmjOI78GLcEWrcxyAngSHk8NPOM8ScBeG6C6KQdKDCNVhhGb+rZSaJJTRsdUmDnAn+QaxShl5uPzm/x6oc4Q5UhjGq/t68pvctNxMfTuMdPazGJAWfeBCAw/tfuAyVKufOsLGWenMQw02OKfTEk1tfF5u9xxvtofOo0oSnJ68WQaurJxSJQu24EloGVhooLspRXtLo/i6/DGLRExJXPS1cfRcMPvjbUJ83cizpkGO8z+/ZlDB2NeBKWchKXDWjjIU9GVMgIUbPnuOi5hWfTvmrf3rp4kyzkCog1Q+H2V3fxAX+CaKHaxQ0y1lkYlHuyiOQIX0jqVOTL1MFRcDw== 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 DBBPR04MB7946.eurprd04.prod.outlook.com (2603:10a6:10:1ec::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.25; Mon, 28 Oct 2024 19:06:31 +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.8093.021; Mon, 28 Oct 2024 19:06:31 +0000 From: Frank Li Date: Mon, 28 Oct 2024 15:05:59 -0400 Subject: [PATCH v6 5/7] 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: <20241028-pci_fixup_addr-v6-5-ebebcd8fd4ff@nxp.com> References: <20241028-pci_fixup_addr-v6-0-ebebcd8fd4ff@nxp.com> In-Reply-To: <20241028-pci_fixup_addr-v6-0-ebebcd8fd4ff@nxp.com> To: Rob Herring , Saravana Kannan , Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, Frank Li , Conor Dooley X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1730142363; l=2245; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=RzDiJjc+I6wcWk13KTVhystqp6RElq6XYrrJPcrtUXI=; b=4pLCC0gu4iUv8H3jhxnhRvuIaw/u0nXT1sQLIFaamEuBI4cI2BBNKfVSbOkgwvowA/asZbAt6 PlbQkvTs0tnDhy+C0RON5/FEnA+7pRc0hrxhondKCLzaAboBcbUHIO4 X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR03CA0005.namprd03.prod.outlook.com (2603:10b6:a02:a8::18) 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_|DBBPR04MB7946:EE_ X-MS-Office365-Filtering-Correlation-Id: e22b3740-aac1-45f4-f963-08dcf783a1e2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?Nit4OHY5UTF2dkdXUXl2d1dJWGU3anBjanRoUS9FYWdyc0VjY1UwMmhaSVcy?= =?utf-8?B?aDJQVTMrMWloNDViNU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QVZXbWlWWnR3Vlo4?= =?utf-8?Q?BURK2NUJgsNB/?= 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)(366016)(7416014)(376014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RThOWDJCWW1xSTBwQVlZSmcrQ0tBNVI3WU0wSTVSYy9iZi9OczZiRFh4NjYz?= =?utf-8?B?T2Z6cExGNGNheTE2OEdVTlYzODhQaENDRm9JTFNmSVY3YnZUdG9URDNxNWZB?= =?utf-8?B?M1MvVmp4T1lJZU5YVnRJSlMvNWcxY1pkUDlhdlo5Tmo1SUpSUDNjd3ZJaE9N?= =?utf-8?B?TExiUFE5MXVIYnpWS0dLQ0RFeitCcGJhUUQvNnRPY3paeXNpRURUc1ZuY0gy?= =?utf-8?B?MXUydHE4T2c3b3Y5UUJtdW0wMzhwcUFyV2hlT1BlejdQUUtSY3BwQkFPWWFC?= =?utf-8?B?NlZkWHIzbDNseGN4M1ZPRjVBdCtzUkh2Y1dGdXdDN2I5ZXAwV1ZMOUQxRkEz?= =?utf-8?B?L01HZ0FIaTVjKzZDdVU0Q1BtcHdwWVBqMnljVlZ3VVRNa0JibjhlQ09KSHdG?= =?utf-8?B?QTIrVU4yeWpsakxyUE1BWEJjRUlxWC9ROGlaS2ZseTRFQWhWMC94TlBLNENr?= =?utf-8?B?ejgzcUF6amtuaERtNFROZTBHOFF5K1VGaGIvNXBtdnlleGdrL0xVQi9qeDNn?= =?utf-8?B?NVN5ZE5ORWNJS0xlekJydlB2dzRPc0hBSytMV05wOUIxdUFSRXZ1cEtnK1k0?= =?utf-8?B?QUdoZk9Gd1hDeUsxSkk5VTdaK3ZYcG0yYUNXaGIwNVdOV0tYOV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cGVNVlF2MjNzR0w5R2s0?= =?utf-8?B?K011NHdCMEZRdGtqSmNCdVBnY3Z4NktUOFNUNThsNlhqMmtSM0JaYlpGTlZB?= =?utf-8?B?M0E1WGdZMm5NSjZrSmUrRk0xbDhYeEw0Y0J5ZDBpaTBRN0krYnpmOXg3cC9j?= =?utf-8?B?RUFaaGp0V3VHSksxME8xUW15V1hzeEpPakZjcWE4K0RsbjRXd1ZlM1FrWWpa?= =?utf-8?B?bzB6VkE1K0tGWVV3eGtNVmNMdFlrZmZwUlR5M3o2U1dhaTZEL21vUXdQZjhW?= =?utf-8?B?VmVjTHI4b0tuVjRwbHo1U1d2N0hkbjNkRWQ5RVpxL2R1QkhMajV0ejM4Y21h?= =?utf-8?B?c0ZJRmEzWXNzSG1jaXdJZDF3ZVN1YVZ3bXFnODF6T0h1Q3ZFN3dxL2JrWGdB?= =?utf-8?B?TDFTOFVZaGRmSFFaQjBJYWRzdmxpaEcrQkE2Y2wvcjJUbGJJS3R1WDV5NzAx?= =?utf-8?B?RWU3S1JZQ3AzSXJiL21oK21ZeWNvRlpEdUt4VHhOSm83U0R5c2xRTkhudUhE?= =?utf-8?B?cnpJY09mNFV0MEdnbC9BZmx2Z0k2MG1idVQwSVF0L1BZdXowTDJ5d2dWejVk?= =?utf-8?Q?1dqaePksWiQFtXP+kvaxN4zpY?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e22b3740-aac1-45f4-f963-08dcf783a1e2 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 19:06:30.9591 (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: ecl2W0LQDKHR13T4eIaNja4FRVInU+ehU/8l4+DPFb2nzx8mqLk4VFf6C/QygXAFVWT/Q/SAqTV1LmtkU71QDA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7946 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 v6 - 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 09:37:43 2024 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2064.outbound.protection.outlook.com [40.107.21.64]) (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 635BB1DFE12; Mon, 28 Oct 2024 19:06:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142400; cv=fail; b=cOB55Aq1SqyS0LX4Fudh95Ig/dwb+7HV7+PevEXGjGqYnTMDRRatAn3SjkgRIXTWzMtl9P3vWhfOHumnJYw9bRH2RMO3ocodKlyodb2IF0OZ9qjRvfR1kaB0fZ59d501jsIPc0cWFduDfPaJS0cqjA7r6Ef9tP2NR8HWNBtg/9g= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142400; c=relaxed/simple; bh=MHdl1pBB8ltbGON7gH0Psda0JXVx4MU6Xi578sObIvc=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=MWZEjDY0iwsucjueILUQkeGumSRUKUtaheGfToRJOgZ+G21eYGVdeydE4TwnZcAe8gmhqgrRZnSaxutQXBDHukwbpX5nacVe/4LaInS8I8Ace9typHDztheh1waxHbdZexJin8ZR4iJhE1P4KTy8gvhfpW94VdFIY2uZYpTK2BE= 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=kwSBa+XW; arc=fail smtp.client-ip=40.107.21.64 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="kwSBa+XW" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Rl8rssUPgB7EqAco+rWgN4AONyKlI2GMKHiLYpZ90bOPM5DX+oYY4jgl7tJvUYFHes/JwUJjwymV0Qqm+jxmSJd5BpirOtOYJjMXMSjbdEGOByFpUkX0JzqfQqU3zWLQ2mO44rn3mlV4tAZuKSd/7TL1nZtv1pt5dEVPN430gekYJM/pA92gyvh5kYUsOzYiBza0FeZ+gVbkW/xKg3Y2Dkze5LWz7TOiGUBDC18uUmtYOEoC31LE2pbrjI0jzEqWSH+I/JUrCPiBvuSOS9FI3ORAVljOLLU8MzFn491GFg19yAjuetmL++3ajntIFrG9XaGZp1MK2MMkUzzBsmRl9Q== 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=VMSng6Hkq1ZytcY3Ph/5wRTVWQF53XvR2y3i6XkNIAU=; b=hKFWGXSLsciIIHk9poOQIr90ZoUGJvTnc2LobhrrvIStDgvRmXYNspPkGhFtZjYblTYXSM2B5Pk2Cl231cu7Z1LJkgmna6glmFS0tu5BTgf9wGqEhjDQCSfseTS55F9eKxnMtexiL46kNcvnjrZyc36yPQ4YbZJxhcKhYBMA2XQV8US2x6fTZnZK6gEn90svbW5x5txUrn5TlzfcALo5DRzWAWVn6Kmj9BVrKDBuhC7JJAFVT4GIjUr5c2XawR1HzO/HX2ypuvwuJKQDOVxqETInVBoDr0jrIo4pdFVZ9QMFDVLXM59TlLaK/XBADmUp9lxIqxO2NH6sJWXMFJTvhA== 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=VMSng6Hkq1ZytcY3Ph/5wRTVWQF53XvR2y3i6XkNIAU=; b=kwSBa+XWWEKfv8Ow/I8Pq/QWeUkEWZuB5giKah165ILfxBvigkIIGdJQVbBj3/iQrHi02kcYjDz8t7ITK0pHWzoM/iN3ki10/xu8KgWhpQ4WRj0i4H5VraUAyOH/jjiDFrgHOLxRi9vIYvw4U4R8YYWutOzYB5TL82QP+ZMOejaklVhSGum5BBb7smLRQ5+ONfkvTSPXE3gLU1K1WHAHEPJi5NT4V6S8r7yEdIxO41M5ofm5YfLeHrMkxJHLrVn70qKrFJ5PeU8f06wwGd2wI3whICrVPTNbCh2KHZLC8ODKS6LeqwNtWc53cTTlwI/8tQaTP+QFD5AtBnPRQ5QBoQ== 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 DBBPR04MB7946.eurprd04.prod.outlook.com (2603:10a6:10:1ec::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.25; Mon, 28 Oct 2024 19:06:35 +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.8093.021; Mon, 28 Oct 2024 19:06:35 +0000 From: Frank Li Date: Mon, 28 Oct 2024 15:06:00 -0400 Subject: [PATCH v6 6/7] 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: <20241028-pci_fixup_addr-v6-6-ebebcd8fd4ff@nxp.com> References: <20241028-pci_fixup_addr-v6-0-ebebcd8fd4ff@nxp.com> In-Reply-To: <20241028-pci_fixup_addr-v6-0-ebebcd8fd4ff@nxp.com> To: Rob Herring , Saravana Kannan , Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1730142363; l=1266; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=MHdl1pBB8ltbGON7gH0Psda0JXVx4MU6Xi578sObIvc=; b=7wUDVK/qc/0ISWrgJoCoXb3D5iiXVsBocxv53p37ZhxLt0LjJqo1X/hN5j1q0wzpE6MNwd8La s2ecKtb1BEPDqaXSP6/atN5z+Rz0exk3hLtpdmJKiRY6peboJCyfSQi X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR03CA0005.namprd03.prod.outlook.com (2603:10b6:a02:a8::18) 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_|DBBPR04MB7946:EE_ X-MS-Office365-Filtering-Correlation-Id: 678cf69b-be54-4e49-c5ab-08dcf783a492 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366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ZscXk1eldB?= =?utf-8?B?OXUzazYwOGlUZ2NyejM3Z2dGY091b0lRY0NWU0pxMUJQQVhUR092bng4emRG?= =?utf-8?B?Q2NaOTdtVXkzQUFrbFJLSmJNMy9leE9CL2VqQ3dQaEFDVjVCb3p0YlYxV0FQ?= =?utf-8?Q?uICSiRfuaDJ8G?= 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)(366016)(7416014)(376014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eFZIekJlZytYalhybDdkZ1Iva3krUEJSQ2pLK3ZBTzdsMEh6Znl1RkQzS3NJ?= =?utf-8?B?VkhtaFZIdEp0VVJqSll0TnArQkNLZDFDYjZndE85U0FsTitubW52RVU3SzZS?= =?utf-8?B?NXJ0VnQwWGQxTDY3SW5UMG0ydUhhWGxyZHAvZXk3TWJBYXRwQTdRMU1GbENn?= =?utf-8?B?dzBudDRza1hMNTJrdkZNUGNQbjJWNW5wWWJjT2JFYnkzek82ZGUxeFZiSW5U?= =?utf-8?B?Y1FzRWhvR2VmTXZvQVZaSWJLc21ENG55U3BPOTA2QnB4K2VrVjdOYTVzRWxu?= =?utf-8?B?T1FPSGpMQ3liOUgvVGFXaEdxeXFwbnBINXpLMlQ3Z1JVTVMrTGxtaGNGTWt5?= =?utf-8?B?KzVBMC9NV3BEeUxoTXBSUWZYd0hXZ1JsSFNKL0tKcEoxSVBtR2Y4S1dkb1BF?= =?utf-8?B?V3I1Z2RiOTIycmhJUGM3K1cza0V3Y1IzMEd4K1o3azFuVzNpNnBXcE5XTVFF?= =?utf-8?B?ZUxZQ3d1MC9IemN0RmlKeGxDTktpQ1NpemwzTlNtZ1hJRXhTQnZuK252VUtU?= =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VkUwY04yc1lqUmpLVEZvL2ZSN1M3?= =?utf-8?B?bWVPcFhPYitHUU1vRmVNZmRCejVBRVFaREpSRDRSZDVLNFBCRXlheS9KVE8v?= =?utf-8?B?UHpIS0grT3d1NnR3ME1CQnJvckhoRXJZWTc4bXkzMkR3VjNwNStoUDdBdERP?= =?utf-8?B?K1JPemxhRlFuOUw0OGhmNSsvTm81OE9FakdnY0FhSWIxU2ZFRDRRR05JOURl?= =?utf-8?B?NGxYM0Yya1NBU3NadUJ6NzluM3JwdXhTc1kzUmlGeFBEMnczWmpSRk5GcElu?= =?utf-8?B?NExEQ3FBcEJiWWp4NU8zbTZ6RWFLemZ2dGJQcEhzN3dlRCtmQ2Y2MnVZb2RI?= =?utf-8?B?bUE1VitQajhmUUE5ODR0V1labXpCK2QxbE9PYXd2UHh0MVlSc2xkQ2xwR3J3?= =?utf-8?B?TkJRZGN4aG9IaVhPNlNDZ1JKWCt1THpGdlhmZzdxWFlyM1J2YWhZRzJxYVhZ?= =?utf-8?B?NmdhOGo5emNQczJmaWt3UnZFQVh2TlMyV1FheHdNN0dCZWdPdUI4NzA3aXcx?= =?utf-8?B?UVI0SjJZeXVQeDUrYjBhbVVKdkVmTXh3azB1RmpGN1ZicWlINi9teFV4a283?= =?utf-8?B?Q3RiRnRPUGVjeUhLWENLL3B4RlVzZ1loTG90Uzk3MTArRE0ySjFGbWJjWWtx?= =?utf-8?B?bkNOYzRBZWJ5Q0VIN3pCejJZbzJDNmRlMkNzZEJyUHhMcHhxMko3cUE4dWNO?= =?utf-8?Q?3ldZHoPczDFpXkujVBO+C0BJB?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 678cf69b-be54-4e49-c5ab-08dcf783a492 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 19:06:35.4833 (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: ApzZgWhIA5RqpgnstKTIqxBvurNVXszvXzdVw0om4KFMvkA+UApK3RvOGZSjwfT/JZrCFKjwsnWjY/UmBTyKQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7946 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->v6 - 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 533905b3942a1..8102a02a00b38 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -960,7 +960,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 09:37:43 2024 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2082.outbound.protection.outlook.com [40.107.104.82]) (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 B903C1E231F; Mon, 28 Oct 2024 19:06:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142405; cv=fail; b=q78AVhFwdx0yWPQoXvKjl4uzpUlKMGDYLnDvsm6+zCysyiWha0TklpknSYXjFyAa7XhMe2A4dAcvuTrXkvp07Ummh5K/EE3BXIjpRPp7EfO+RXGNr2uTG4eDIetp/ezwUxD6VNhkuAjBDbj62vC9spYNpEuuTFoeFZ5PZVE8bSg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142405; c=relaxed/simple; bh=oBTuOyGf1p5J6QSrmR/H90B4rkHNLZfeWqkQs2nR+Ss=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=tfdhIA5cZqUN/6MB7EVZhBF138U17l1S8O+JRekg1h+SMVtMhS+YC1lEZZ+c8DFqYQvfw1n2wRjnD1ScpGYOC0ABUkhWiSxDRKzUdIp6XmFBD/3RHbJUjCPUyBXx0Q9LS/QWYYBk8hAk1BTUe7tKeqpQnVngbByewADjZBWOAZA= 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=cVjjYAoK; arc=fail smtp.client-ip=40.107.104.82 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="cVjjYAoK" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MN/KylURMhw6Bu2u0iiTSF4F2KH0xrbMV6d+BYBHUnVITbL2N5ZscSa8MYHRFvWfx1jGZMKPxWG74C7GSZSNtc1TYawMwv1HxHSwIXgRTzVyMg3TdWBaPO8Vh7OJwpcGKvxD4DC6YiqogCx3O6xIX2TPeKBoUmTCsB8mC1FCvW9bz+pCxP/59cbZvsIcwKaa6V481KtWWlevKoyQaayL4yZJVXChp0wEeGVYtynrEC1ZC+iyijwvTD5VLgpD6T/zziWkc6ji9WETbD4M/caANL2x5wjHNX0vVR7p5jNNYTsAsA0H/Ap6r2txQJAb4qGfLQB9au6/7SPYGUBMRQKVDw== 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=eIG3DwZHBHBFPNj0et0JCjxq4EvOWJCsaM4GFikwMac=; b=KGalesmhdrs97FKwb1YskqE5YyEbhNPvcM4PShIWVkKCc5KDYd2I2BQsTSmdQZ0Em0R1G+7sGTUrCzLkXy9DZVRAJ1nQgDykDqRtOFmQqQ88W8ljtUx8obb0xAx7qS08PEHrMW7X8b1olJTbqbbwk+gGx1M47uPYet9jkbmr69pEiDBJriwjFPPgW15fWyCfPaAn0UhS04Vq18Y0in5sjMBkjBWgurDfqSg7aFUuHRSPc/JuRSA31u/OdeHvZo0Snw89kW1f1OiNm3RRQGotuMhwqlFaIrVCnH21YbdPLNv904bPXj+cQWaxHEdn2azsbhpUMDpdDLn48q11P3g0dQ== 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=eIG3DwZHBHBFPNj0et0JCjxq4EvOWJCsaM4GFikwMac=; b=cVjjYAoKGv9tyLZOG460zuHGCtEzSnYcqBQpLOXYKCGdmX7b1MJJFOWMEWV1ngyXlllud3Fh6/R433Khn0WKkCKI2IGQ5x6Mqxhz2KwH1/emAJv/8akbt7AkgCK1tbhSYbcapUFybGCrEBOZOHN5ltYuySzo5LoTtY/mRB+BeCZGSxuCrULhrvvCoCkBeatHD/JsfjdCmpkmKNXAPmBAUW44cbK4W1O4p36ueGYU4ikUA5JyDdFIpL3bPa6POvAT652CDP9UX45U5iqTlRmkc86lH2xy+5NHwP4ankoxQ5QpDjJl+JdmnEXgS2QBzLeSKARndXFOiSUlOkvyIR0E1Q== 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 DBBPR04MB7946.eurprd04.prod.outlook.com (2603:10a6:10:1ec::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.25; Mon, 28 Oct 2024 19:06:40 +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.8093.021; Mon, 28 Oct 2024 19:06:40 +0000 From: Frank Li Date: Mon, 28 Oct 2024 15:06:01 -0400 Subject: [PATCH v6 7/7] PCI: imx6: Add i.MX8Q PCIe Endpoint (EP) support Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241028-pci_fixup_addr-v6-7-ebebcd8fd4ff@nxp.com> References: <20241028-pci_fixup_addr-v6-0-ebebcd8fd4ff@nxp.com> In-Reply-To: <20241028-pci_fixup_addr-v6-0-ebebcd8fd4ff@nxp.com> To: Rob Herring , Saravana Kannan , Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1730142363; l=2548; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=oBTuOyGf1p5J6QSrmR/H90B4rkHNLZfeWqkQs2nR+Ss=; b=k4cpxKXncruZS/S2xE5yJeROU6BdD2P8NV5gQAPw2o9sbickQbk8X+D0+Ae84EXIXvqc1vNFM S7JCn5F1nIZDZAhOy4Sjg7I1qnyHVWxCW0qVQBdGH1avRdG2zevRSPl X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR03CA0005.namprd03.prod.outlook.com (2603:10b6:a02:a8::18) 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_|DBBPR04MB7946:EE_ X-MS-Office365-Filtering-Correlation-Id: e334dac4-ccc8-4c37-37cc-08dcf783a780 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?aEZZQ3VEV3o2cmtianFZY1BrWGEvZ0NuT3pZaEpCd0U2eW9LdVFzTUlKazFC?= =?utf-8?B?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2THQ4RmdSWjhlenJkNm5hSmlU?= =?utf-8?Q?aOIReBliVnLMw?= 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)(366016)(7416014)(376014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RUNNUDB3ZDJGdktBVXQ0bmlZUzBxRU50UGZFK09rUG1HOXBTcVN0TG56SUhl?= =?utf-8?B?a1N0NXpQVnJROUUrZnU2OGlZeHFrTXFmeWN4VTU3Tm5kMWpjdWlkYTZCWWVD?= =?utf-8?B?OUtGVkl1L1NqbmdiKzBPRWc1MEhrMFRzemFmY2UxV0o2Zzg5Z3IyZTc0UGtC?= =?utf-8?B?V2xqUFYyL3orZlU0Z1grYWI0dXJpUFY3UzV4cmZuN1lPaWtRZlB3U0VmdDJB?= =?utf-8?B?UG5MekFmam5KTmZwaXdrTFNjWWhFZGlCQWNjSUJGd21lSkRVOW4wbk54MWVZ?= =?utf-8?B?MW9uV1hieVNKRWFtQ3V0WnNXM2E0aDNjcGhMak0vRys4azhrb0Q2b1lhVTdw?= =?utf-8?B?ZHllY0YxaXdRY1J1M1VBRlBicytEY0pjMDdHV2N3MEJnMlhBUG9zaUhGVVBM?= =?utf-8?B?SzZUR0lNUXpJWDhrbjYxU242V1Z0K09vUUZZQWJXV0ZranVESnllUUhxR1dR?= =?utf-8?B?YTlwVWYrRjRueGdzK2xJeDN1WHNJbUFQSnA3dE1SMzlsNitUZkZVdG5KdG80?= =?utf-8?B?bDI4VEZRaFU4R3hkUnVmdEhhVEN2ditjM3NmYmx3dHZTcW14R1ZpMWtrOGxv?= =?utf-8?B?aCtmN3ZsTUt0SkVzS3VrY2pEODYybk9EVzhhT3ZkeXBPdVNEQkJB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DEyT01mSHBsYytK?= =?utf-8?B?K0ZwbVpaRGxHY2hHMnBkWnJDTEFYS2NlUGRDa0dBd2JmbkRjeExFQXRhZkdv?= =?utf-8?B?eWVuQnp1ckJXVi9wbnpWMEIzK0NyTVZJaGVTTXMyV3FlUnBSeWxaTEplZVVD?= =?utf-8?B?NmdzcjAxVkdJRU56RXY1UEprMWJGdklMc1ZTSExwZVNwRnVUbjdHL0lhUXpJ?= =?utf-8?B?L3pOMDB5RXVqQ0RKOWhFWWN3eDhraStyc29UajdpeW1vTWM0ME9YRlE1VjNG?= =?utf-8?B?UU1IeDdKUmF1Y05vaGozSFZqWUV2RmF6LzUrZG9qTUl3bUk3QjBLcDhwUlBW?= =?utf-8?B?S3IrRXRkeE9PWEl6WlZiM3pXQmtVUG5UZWR4N3FUMnk1UGxaVlBpZGEvQzYy?= =?utf-8?B?WVZoWWxaL3F3MVJONEFFRm5yb2RCNzJxZ0VqSjV5VWdoQXZEOTlocjNyd1hk?= =?utf-8?B?cVRDRkNET2NRUGdUdEhaNHhTekRMZ00yV2NYZCt5ZjljbkkrQUNINTk4RW9j?= =?utf-8?B?VE95ZEx0MFJYbkwwU1RtRWtYZUJ5TTZoQm13cEhSV2k4SFJCYzlRRjRsSGli?= =?utf-8?Q?eq/RXrVC+Vt9PrQtpIw7Nrb33?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e334dac4-ccc8-4c37-37cc-08dcf783a780 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 19:06:40.3650 (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: W77i2dcd1YOj2GEBw28Tk2rkQHBJqC6DLfsPi+81pW9cFD2LIEnU/9qYJMEeI0CxUvlX+l3nIEVK/t7WbBfZNg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7946 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 v6 - 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 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller= /dwc/pci-imx6.c index 8102a02a00b38..94f3411352bf0 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 @@ -1061,6 +1062,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 @@ -1627,6 +1638,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 | @@ -1656,6 +1675,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