From nobody Tue Nov 26 04:43:17 2024 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2074.outbound.protection.outlook.com [40.107.21.74]) (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 067991DEFD8; Mon, 21 Oct 2024 20:07:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.74 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729541276; cv=fail; b=TD+scf17KRRUSHzs/JVmoO0Q5IfNvd8Qh+VXqxSc0Eh0aj7UM4rkHW5DhIbvtImRSuMcRMDm/gjBMVgCqYmvTIYtzfN3bphadTezCvxEuNGswOW9L2Q2LTybIzLBnE2Vc+F1/mhZoesNIXOH739QzzdPjE5K1fuz0ggL8Va7aPk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729541276; c=relaxed/simple; bh=z/qjOkp5hDUbKkPREBnGFcyAmTYIDRDWM3qKhQ4IVc8=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=EK31jCZroe8PEcZ8x5DU3/UvZliDOlL9KxQqSMwJb2HHDA5m2NGNi+N9bqizdNVfh9GkzDr2HZ1/31uWhyAmJvTz//8PYGJMXRLjknTp9HV1/qhSiRQ8awlsYhChnLn3a+xEau17NILWjXy5Zabf2cdghtSojEVDm7gtbO3cR1M= 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=M8IB0YX8; arc=fail smtp.client-ip=40.107.21.74 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="M8IB0YX8" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KfWAs6+M+oErTg3vqx92HCqpnf2hhuk0qF13zMI7UEdQV/e8t9zK5K46jLOVgu/GPM/fxu9B1tRFOThq2Sww/2xsbnXUErPeK71ksV2xy7SOtw+7rcHhb1Butlj1hEITIojy1b/d0sAXcaNZZo3tPXHG3As0LtGjp5hN74PUq4fQI200wRgoHu2BzfL1u73/HQeS6+XopbPxScaL7FGSiavZ899eMls+Eio3zM7dsSdTmF5HwmIDnf59JMmX/e6C+vtbwVA7rWZX4JcV5GcVSzxp0893oHalnepM015gZfDJJNO8A5Qc2EvJR6O78IT1lOrMgeXAH/tpKIWwbAw1YA== 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=3Bk7q8jaB5ypFH4kg7DtQLBpo4spagjA9PptU/sPGm0=; b=TvEfiZwoLCMPaAE8WpUc2VZK2NHiM7eOW+p2SZf1kTbW/hVN6zJQVPW4/KtEJjU7iu1S6B2QPQhsudY/NYcQ98WKBqo2xuwjQKeXPQtFDAbcLpq6PnOdmuqGzDGGDyrJtrahZrrtWazBE3NVuzynFSFHSdo9cTmLTcZ6efOsI7Mtts55KhM9WYBKCt0vw5K0WPlqJAdJJLFdtzbDGXfDgINQU/CJKSPTitDyWK11iJx/hup/sNSa4TRjM37oZAHIWkCdbso5YDEZjFoRZQ9TS4Z6ckhdpO6D2lFqp/RS5A7g7VzLqtQs6pxQBs0MOsV3NofkqsUt3IkMEv0c6fQcow== 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=3Bk7q8jaB5ypFH4kg7DtQLBpo4spagjA9PptU/sPGm0=; b=M8IB0YX8v1nQuoBFCe1mAPduB5iEXeRIq60fESldaO9hLUmyBKIFcqHyY6FNtMUHzX7rCh+J5R3ZQJoyyH62p5RUlAe16Jru1noGJrizpPNGHFlZfYRi151iKnf5dz8QXasmNJUsx6hNF4YsNhRtOsr5PpyetMDas+0QC3zh0G4qyDwzMXV6cSnNWZzMRR+qUEmB+JvL/vmQvYqEO5SGUBfA4/ccmVS1tOvbS3Ji3vIRkVTAT1TpCk+qPs3N60U/3CfLNUSuwoH5OGHelmv30u8BVjpQB2EasGSaihh2r+1sGkkQu95RjbDaKuVSXbbNl8QhECBa1USX8Any1BuQtg== 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 AM0PR04MB6882.eurprd04.prod.outlook.com (2603:10a6:208:184::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 21 Oct 2024 20:07:52 +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; Mon, 21 Oct 2024 20:07:52 +0000 From: Frank Li Date: Mon, 21 Oct 2024 16:07:36 -0400 Subject: [PATCH v3 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: <20241021-pcie_ep_range-v3-1-b13526eb0089@nxp.com> References: <20241021-pcie_ep_range-v3-0-b13526eb0089@nxp.com> In-Reply-To: <20241021-pcie_ep_range-v3-0-b13526eb0089@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=1729541264; l=6071; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=z/qjOkp5hDUbKkPREBnGFcyAmTYIDRDWM3qKhQ4IVc8=; b=NB9QyP5FD+su171LzohM4TyXh/YDwW3sB1H/1vi82nQ6RRL5v8bUUFioIfVQ1pFn4ddhsOtSz uWCtPSYEejgDd/4ZJ7AQc0V9raeQ+4gaBmkL5dSA5Xd1GmrWNQJLxdy X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SA9PR13CA0071.namprd13.prod.outlook.com (2603:10b6:806:23::16) 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_|AM0PR04MB6882:EE_ X-MS-Office365-Filtering-Correlation-Id: b262bce4-4927-4c3d-2e68-08dcf20c0b19 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|7416014|52116014|376014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?QllIUXg5MG9KRmh6TnZHanZ2VTdHMG1NWDNZREZockJqdGVWRmtjTGJqWE93?= =?utf-8?B?U2JNMjV3VmJHYW1DTUhsa3pENmZaWnc4M25SZFkvTEdEd1VSV3pKQ01ZZll2?= =?utf-8?B?eGFydkJtcFdkaS9iYkF3V09oQzZGOVc1MDZUQVc0WnpCVGY4Z0lqUFJrYmlG?= =?utf-8?B?ZUVYdEphQ25ZZjJIa1ZjRXp0ME02Rm5pRG5KTVlScjVjNm9NM01rUUdtQ3pr?= =?utf-8?B?THVodE9HRkIyVjdlRkc3dGhSNUxOUk9WTEJzWnljeGxmQWhIVngzdHVnSldE?= =?utf-8?B?NW5WREhnQTc5eE9yY0wzZ0t4bjI5aTZQUlpnRlJsNVhDK3U4RGoxblhuRXZp?= =?utf-8?B?VXZLWHYrVktwU3R2dUEyUEcza2hBRDh6M0xKSHdZVS9aQ2xRcHczL05tQzVB?= =?utf-8?B?R0dJcXhMcStjcENLZmFUdGs2NFQ3YWxUUnBXenlBeVZOdEM5YlYwUnJ0ai9s?= =?utf-8?B?QzkybkhhQ3J1cjIvUXlBSXEzQ2R0L3JUQkNmMFh2ZC9zY2pJeVdXOEY0dVd5?= =?utf-8?B?TjhyMk4za2ZEUnZ0ZEhMZ3ZJUzhOT2xJeU9ZRUxKQmZ1cCtUdGt1WnRwNVhL?= =?utf-8?B?UWRTSzBrWWV1WWlveEhnWGNRaklCZ3hUWC9hb2RCUURLSzVKMGFMMGhwdHQv?= =?utf-8?B?NTlnbC9JY3ZlUi8xaU9wTnExdytQenVXV2lVL2V3d3VvYWRWS2hSbmdlb1Fp?= =?utf-8?B?ZWtXT2ZRdVIrVzI3WWJHMlZaNVluTXFJVm1vR3pkL1grNzVwRVFjZTR0YWd2?= =?utf-8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OXdlN0Jt?= =?utf-8?B?RlpqQzV3dWk2RXRzREFoaEpmalNGMGFpb3ZkaTFFMFlqMFNKVVZDQmoraVVR?= =?utf-8?B?QVMwcWJvL0YrUjZxVmpzZDJyZ0FvZkJDKy9iSGhkMXhDdUVhT0VQc2k1TVNw?= =?utf-8?B?cHBzQ2Z1N1lrdWdiL3BmREtaVjRoRTFWb2FyNjBDZVQ2ek1YSUdwQzFNY0Fs?= =?utf-8?Q?4Dkz+xlcD2rYq?= 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)(366016)(7416014)(52116014)(376014)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?T3JXTWVXSEtpbGJPdmkxRFVkN0c1MHQ3TzZBeFJCLzV2Znk4enVSbkpMNjNB?= =?utf-8?B?LzZaeGtIUzRUQ3RIMGwvUlYraVFCL3ZlWmtlTHFaTkE3Zk5CMWZXbDRSRzhZ?= =?utf-8?B?Um5DbHIvaldVRHU2aCtNQWlhZSs1YldaZGFwTFFDbld5bnRzbnQ5UUxkZmZU?= =?utf-8?B?QVNxV0h6YVF6Q1U1TDY2dzcxaXRTS3FrM3I1RXNxTXZzSyt3ZFNHNDhOWVVz?= =?utf-8?B?YWxIQ1dGNTArbzRBOUVJUzNGYVFObzkwVEtCRnFpaUtXMEUwMmp5dlJnYmxR?= =?utf-8?B?aUhNYzU1WExZRWFtN0c1OXdRaERhL1NBY244SXBUdWNtWDRZYVJTSHVBVXRP?= =?utf-8?B?ckFTd0ZmWllPSStPL21XWDgwZkM1MEpSUi9mQTM3ekxRb0RFL01uOFk5WXpS?= =?utf-8?B?cDJaV1RJVnRTSW15bFBJOEN1TDYvQmpTckhCcEhSWE54Z2tMdEc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.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 20:07:52.0156 (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: cnibLKj8M7lRn/IX/PC/LWtI0rA07Zzpj/XcP5AnQDxHvmhsCtZ9R/HY/wbHn0P52hToJb+DhEV5+LoHHpjRBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6882 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 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..e22d32b5a5f19 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; + phys_addr_t 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 Tue Nov 26 04:43:17 2024 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2062.outbound.protection.outlook.com [40.107.22.62]) (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 939751EF0B1; Mon, 21 Oct 2024 20:07:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.62 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729541280; cv=fail; b=MnaFkMoOBCpp1DSFZkLrZ9hg/bmCbsRFAiJGpv8pPH18RBmLWsPpMCdgGsQ64ODH+tYhhI1USM+Qdre2zuAA7SDfrS2gGK+VJLwFqykMZ01aaOJ69SE3LMRggOwgGmbQ/zS6f88g7nXAYNjNn7CS93W2u3xVpXX8CrLX6P3lntQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729541280; c=relaxed/simple; bh=xOwP7kvEkIrcZ/CeDAklFFYJhRHhXZJV3LaiInaRPbU=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=VTE6WB5cblEpbOcxfi7J4YXTTz/2NS8iEO9TQT6vDROtu9DKabH7G/pnST50/IsLTaXDB87i5mzw5bfeiPGoV4bORTjtH1/nR/SaLwJ6hCdmTCZKMaAUPrwdcHcI4/QLkzCqsi9uvB1irRtfqEp7VZcqCHNr7oZ0ghUabmQ3Vwo= 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=fmDkrPlo; arc=fail smtp.client-ip=40.107.22.62 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="fmDkrPlo" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=htzpOipjuoybDnmdpjyJ5WqTwZP8wNA6DjctnBcwHXItQLH7RzovUrnraTqzpCbixAQKLD3zzp5OBr6o1xhG16OpvikottXZOANnSL8iRbTWaPEfUEKjoh0eWDSbNVjfe+dr/AWIevyjW/t4PkgZESAL3oUp2wFaES1QZiubjy8qiDIZ9cJqinMFuyg/XXO7mYyt0gQJ+bu3PbiyHZrjcGWsR8DaerTXNRQ1unEBTsinC8L6Gomsg2eivzuEWJFChggxTHmlJd96XgHTNtyvXKe+k6kTERequNO4FlRolQ+uUA8817hAT4bTJPyNG/ZuZnslJDW0btg6Z9nJCfHJjw== 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=EySDpmn2t3TBrfXQwsbftUWGKwgsxNSHHulyrBuHokE=; b=d6CgXM6wCCmmpsPluvCbk7ZdKTygSH2qRaxtA3NzsBALfG64tzqb9RLi+2mTZcW1hwOA7tw+EudOxzSk5DZlnikgM7ZD2b1W/Lunt1wHYqdQY5j5byyUqZfLd94TYnMdJ2z3YRJVXWnw5rtc11Lhs3UQpvVTQjwXZdQQeLyLc2N3gMnX7dcgtTzZp8GRHfBwDHEnZ4vxze2WhcgS4JF7ZsvXlYAdKkUW8WD+E2EItX2AfHX27GZpRHmPgGP+ndlHtbd4gWGPoAe6Y3eROR+b4B/7LPCwV9B9lWMcLR9cdWvsRCiDZ+DzSBkvjWmnIu1sJF9YMk+e3HjpwYlCUQROoA== 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=EySDpmn2t3TBrfXQwsbftUWGKwgsxNSHHulyrBuHokE=; b=fmDkrPlo95SDBnZ/YvSW8mFSpr/aQ0jkCbhXCU79iHz/kYptPBmg72DEsulGXFzRsLQ+2rVWzBxUn0GQXjAPdM30kVD05/OV3Ox1QI2gMoHAQnACfougoah4hN4OHgTAOXvnJQPx3Pbn/0bCU0QtJz6968Bnj9ItdZ2y1RHPJKl+ryoVc4BnRueMG2fsbyIxj5ano+P7x49V7viRmog9mr3OO7BhCXyBZDzTN2IIGbR8GsBpDA4ndJmrTrjnnv6tpVg78qtGZK6w8TQRTXeKevh76d+fDFiB2kWAl9ky1BpG/YI4xjLRrIAUHT6o7ktZkhVaqJuoa6qhOSUbtp0xOA== 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 AM0PR04MB6882.eurprd04.prod.outlook.com (2603:10a6:208:184::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 21 Oct 2024 20:07:56 +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; Mon, 21 Oct 2024 20:07:56 +0000 From: Frank Li Date: Mon, 21 Oct 2024 16:07:37 -0400 Subject: [PATCH v3 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: <20241021-pcie_ep_range-v3-2-b13526eb0089@nxp.com> References: <20241021-pcie_ep_range-v3-0-b13526eb0089@nxp.com> In-Reply-To: <20241021-pcie_ep_range-v3-0-b13526eb0089@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=1729541264; l=2164; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=xOwP7kvEkIrcZ/CeDAklFFYJhRHhXZJV3LaiInaRPbU=; b=a1F5rE324OXu6nIVpdYsQC3wLw9VVPumrDbJJDApNRRNYYO7OkvDqaBE5k3q5BRt9UBEph2eG zmU6UvskXRNA2f6u51O2SwloFlCNOcO1zj6M1kDIF2g6w1gcW+yYsxI X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SA9PR13CA0071.namprd13.prod.outlook.com (2603:10b6:806:23::16) 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_|AM0PR04MB6882:EE_ X-MS-Office365-Filtering-Correlation-Id: 9e69eb12-e2ea-4c73-4655-08dcf20c0d7c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|7416014|52116014|376014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?OERsdkM1NmZkcEFSdEs0M0d2WTBKc2szWmxDR0h0NUVJaGduVGxGMnlxSnRh?= =?utf-8?B?bHMxRnVUSjBGSTZFWGF0NUMvMjZQdWFNejRhMVo4ekFpb3RUUW9kazlvcEkz?= =?utf-8?B?bC94b0RydjA0RHQ2VStiaU94RjYzazUzUFBZeW9zbkl3RnNHeVYrSXRJQUNk?= =?utf-8?B?anJTSTh1Y2t0ZUtRaldSOXhGVmxOQnp1OWl6SGs2TUNIQVRxZGVYZ3NSV3JT?= =?utf-8?B?ZTdSRDVOaU5DRTE3UFVXcjI5MkZnTHVCU1BxUzhURlJsakcrbFRCZGsvbzVB?= =?utf-8?B?ZGg5aFdYL1ZKQ2pTbll0NGtrbjNWSHNYSnZKRXZWUSs5d1U4dzlvOFI0MTBv?= =?utf-8?B?dXY0UTZVN3ZZSDFlTGsyMEdhcEZYeGF4NEpDM2lyZU52dDNHaloxUnJrb3Rx?= =?utf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MUdQVFhDbWxrT1M2?= =?utf-8?B?akk2LzF3dm1wMzVxaVYwamQ4SjNVdEJvTG53SHpHRWljaldRZDhIbU5rL2Jy?= =?utf-8?B?ajgyc2dHM2pjOFVLelJyaldDVDJBVGpOWlVUdFZiRDdGekpUL014NXoreno5?= =?utf-8?B?NGwzR2F5OXlpUXIxQ0NlUVJnSGhLcGFSQXQzc3l4aC8vb1BMM2Z5OXEvSlNT?= =?utf-8?B?WkQrakFpNm5IOVg4N2l4aXM1NUlpelpxbWFWeWhuY241V0lTWXlSdmxLTlMy?= =?utf-8?B?ek40SlRPZy9EV1pheGdhMjhVaWFCMHRjcXdLRldHYWwwU2dnMmlRLzNlangx?= =?utf-8?B?eCtCZjZyc3pOb25HTkVPbythYy9vMnZ0cWdxVTg4K01LRm9aSC9oM2xKUGsv?= =?utf-8?B?YzRuM1R2QUdDeVZ0RHcxQzc1UXVvUytqOU5iclJVeEZPUGdLRmtEU0I1OG5l?= =?utf-8?B?aXNuU3hUNWczbEhSSW8yQUVsRm9KbWp5WGpUbDFpK2hvUVlYUVEyaitqZ2tV?= =?utf-8?B?VVRoV0NXYmN3di9URWdaeGxNNDVxOWJoMmtZZ202MzN4RlFzSUlqZCtib2xE?= =?utf-8?Q?EFOHmnKtuGwbh?= 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)(366016)(7416014)(52116014)(376014)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WGxEeXRGeUowSzNaSDc4K1RPckZMdHlCQWxJSVVnQWVZMmZaK3M5OEtTc0h1?= =?utf-8?B?c0t0enI2Z3ZZQXpRS3Z5TW5HL3VXT1R5SXRIOS9QRm1NQnFyTnVha2JPMHFW?= =?utf-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WNNOGc3TmxiZkN3a1REMWYwUmpqWTg0?= =?utf-8?B?cE5oaldJL1JrbzUyRGxURlgvK3RoVjRzSDRTZHYvejlBNE9PaGMzdUV2Vjdl?= =?utf-8?B?UE1mV2hxeVp2aHlQSmhaSDY1STlQT2l1b2FiNDJycGhSRFIvSVFBZjh2bDli?= =?utf-8?B?bnFUdUJoR2Y5OXg3L01RMkpzaC9ZYWhsK01VUlk3cnRNa00veG5vTVR3N0lH?= =?utf-8?Q?j2iaVJmDf8KzJGXiSWP1hl8By?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e69eb12-e2ea-4c73-4655-08dcf20c0d7c X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 20:07:56.0226 (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: lGWx2+F0FVMQQTDOTwh+HGlD8OemZDvY9sO363MvPEKmg60iVdqIv6WVrniKOeHw1Wl4coENR60Hc+WdvFqrlw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6882 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 --- .../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 Tue Nov 26 04:43:17 2024 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2088.outbound.protection.outlook.com [40.107.20.88]) (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 B1C4D1FBC98; Mon, 21 Oct 2024 20:08:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729541284; cv=fail; b=uhFdgPapBXLEvh6npFIFb0pkykThWGoo/n2rEZ9BjXUtoY7GSYXyvmNcpAL+FEY5c5JZw6p5CtuNWfbk8hDNfcDcJLAyHE/v8mNjISyt1hKxcOOd7If16ohI72Q6r3AaE3/wDtzmemEs3eI8dmfgpHWkg3bvYH2/xGlEyp5iImo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729541284; c=relaxed/simple; bh=GExlPE6INqJBVe829R4B7L+Abmx+hOxi51phEI8z7Gw=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=l2efUZwUcqjJLzHrOJ3DWwiDF0GvmLWHa9cm4AZU3MYXtoZUssNddfa3tQpUjqDfTXTywdKsixzH28XU6utsTyL+S6WL+pX77DTUJNrJ6Hd+ywTj68eosCAsLfEOgl6vRz5ETFtQsmm4iYbjsDKpPhus88cjlSygZEE2qAGfwpk= 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=ZwmyqVqe; arc=fail smtp.client-ip=40.107.20.88 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="ZwmyqVqe" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mWgbOVLkoy/f/kgr0RKQdmQsJ2p+vJqraVRPP9bySc67bhLqQv154lXZhrQUSFS0YLMzdAC1iVnaqRPJcBHeQ/40dWZGWXT/+Y2pCWSI3v3hhGycL/LraZU1BpYWbrhIfhU61l1mQ1yR+L/DkKDsvIjTB007avrt/Bs+F6mg4cB9WtyqVAr3dfNCrpP0RlNNOrkatXkpoA+qKYQjACpwfe806jOOwFMbCxmCkN7/+oLzWWvx2tiCRZhQN1lMCwxsG6lMCDuiDVsKRfonuBwj7qaHuQQ0n6N6kI/dLF4XRN1VSR7xGOxPAz8yF2SwzrQNtHz/f2dkQREO6nIHFEBKIw== 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=84RI+077QT0IyR3qvihpandZLg8yhI+5Vnaa39qgDFs=; b=sdbjTRUkPYmfpJIhZQX4RB7W+cSVYjDvcbTUOD4AAJpsNjEmvGUnKeP3fr6gmXeOfI95asOOGrq83fuvshLjaPa0ezJuQeCLzfPIJ83a3qlnR8idvQn84kLVo00J4LZq/ZVNzbYHqtDwmZIb3Yw9mFTLkTfcvZGZCj2OQ46T966gaDjJ9n0eeiYJ7esZsPltQQMGF1lPBp9+u6GxK24UrisxCObLm7adChQx3bkgywOdXtlJiOaioa1LfQ7MUkGVhr2hkCguMgTtgkyBFqutZR71Y2aCba0dF1kKBivhsi0c0OJMZhqKMWXKzqd4YUVYoKox+r594hzgTx0MeioY2A== 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=84RI+077QT0IyR3qvihpandZLg8yhI+5Vnaa39qgDFs=; b=ZwmyqVqefz3bZ8qe9DeHzcm0bmaakQDx9s8G32hIkyB7WR/YxLVedea7+e1eiKuk1PeODkpztBGpgN9Bat55BCgdtAO/Y3/+BwX8fkKUdVkDInxoKX9TZBaRcRZJ4Mg/PdhqqwoW7e/l9o3XIYDCxIlEzcSuoq3aOkkjo69LPWjE5ec07z172i92/tWmEg73FZMGxGtsMBSq5zfYlaphpRyWBeo5r0/5MmemdCmhyxh083vJXkUgT6PbaLcRXuGCWXLjbRbMvf4lSnIgWyImg6Gp0j7l5vxsKqKi0KiFIQk1vrGAkCM+7AT0ln/gxnJHt12GyYLP/duNjRfXJurGaQ== 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 AM0PR04MB6882.eurprd04.prod.outlook.com (2603:10a6:208:184::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 21 Oct 2024 20:08:00 +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; Mon, 21 Oct 2024 20:08:00 +0000 From: Frank Li Date: Mon, 21 Oct 2024 16:07:38 -0400 Subject: [PATCH v3 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: <20241021-pcie_ep_range-v3-3-b13526eb0089@nxp.com> References: <20241021-pcie_ep_range-v3-0-b13526eb0089@nxp.com> In-Reply-To: <20241021-pcie_ep_range-v3-0-b13526eb0089@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=1729541264; l=1188; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=GExlPE6INqJBVe829R4B7L+Abmx+hOxi51phEI8z7Gw=; b=crDAQDQKZ6D3k6ZY8OmJpO6GsDeZURRgb44H6Y+TiYfG5JjD1HlvPlMq4EtNrY0vyWr2XuS61 UIBDmoTEAEnAiJtBuLMQYUZ67vF/1JGUdEf17KLb+AW11lQiUi12n+u X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SA9PR13CA0071.namprd13.prod.outlook.com (2603:10b6:806:23::16) 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_|AM0PR04MB6882:EE_ X-MS-Office365-Filtering-Correlation-Id: 180c6b20-4386-4c34-0650-08dcf20c0ff5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|7416014|52116014|376014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?bGF4Qmd6UG1IVVpGbUV5djJXYTB6VDhUMnNTQnlZeGxhWkRqYy82a0NrTXZD?= =?utf-8?B?ZEpCYlZwZnMwdG9WVW1Ed1dQQ3JuS3pOLzU5ZkNNaVNlM0xkcEpYWXlNSGxJ?= =?utf-8?B?T2thWitaejFZdDNib3NXRWtBVnB0NExNTEJ6ZGNhWGUrd3pFeTJxS3U2MEFM?= =?utf-8?B?UXE1U28zYnJPNGtmOXc0dW1hT2w0RFcwbzRXTDlXTm4rd1JPQ015azNtWmty?= =?utf-8?B?U1RHOEtuNUNoUWtzZ0JmYUlHVjZYY3pjbVQ0YjNJSmVI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WWFZLQ3FvU002dTBFczE0Q3gxK2w3alQzSFhj?= =?utf-8?B?UE43OVJNQy8yeE9ITVF5Q3JDVU0zSUNsdURWK1RXRTRucHpLaGVmM1ZxdmYx?= =?utf-8?B?aHBTSVNKeWpER1dKNlhBVlhmNmRpdldrcllTTE45emxsTEJUa2lvalZWenNV?= =?utf-8?B?THFVZkZkMVdRSUIxWnRva0N6VUNRODRKeDVFdllqUUxZVHlsemNHMHpQUzJy?= =?utf-8?B?T0xSSU9ZVlc5c3phRzZKVHJMOVNqVVhuNXR1OG92bkxza1IzRHhqWVlidk9Q?= =?utf-8?B?NEVXNmprMFNQMy9HQjVCbDIxK25nV0pMb1BvNFArRGxDMEtXaHN4Sy95bUx5?= =?utf-8?B?UGZFVWVSWTZCTmV0dGtTTVlXOHNIMC9sSC96cGlJQ3hqTkFXQ1dqa2VXUFRG?= =?utf-8?B?a05sYkJYNHk0RG5XdHNYMTdWMlZEZWhPY21IUGlXZFYxb2dOcVdZY0VxbE1C?= =?utf-8?B?MzZKckR1NEZtbmxlVFZTSFZOVTFtQUsxbHMySzRsYS9KN1ZSQUhSMDB2YUlY?= =?utf-8?B?TFVjalFiOHZmMURsS0NKVEovR2x3TjBKYzFhREVIUUE4eHFNci9ycUtTWEJB?= =?utf-8?B?alZzY2U4dVNDanBtWTlreVJhRWoxRUJyNm4wZ0F1RFVmV2RzM04zQ0VENUJQ?= =?utf-8?B?S3Z1bzVZQXhiOFAveGxzWWkrMTZRTTY1NzVybVRxeEEwa3RqMU5oQ0JUMmNF?= =?utf-8?Q?QgG1qVsnkG9Xn?= 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)(366016)(7416014)(52116014)(376014)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange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1TEJIUlVtbTg3blVpRW0zWDVvM0Fsb0VuaVNmcjBjRm1l?= =?utf-8?B?Z3dFTmI5VHFsOERXcW4yV0dRUzNOZGZtdU53S2QwOGMrRXkvYklpTFJKVDI2?= =?utf-8?B?ZENpcmZWdkt2M216RndGcHA5OVR2U3JYSWlna29RY2RNQU0wMURUenRrZEdt?= =?utf-8?B?Q2JpZXA3U2ZvSytSQlZyUHNURmpsczNmUjJNcWpMYklrUkQ2aU14THNlUmNY?= =?utf-8?B?cFRJUEZwTXF3b0lieXljUkJ3a0cyeVNFYUljNmpwTTBzOUtGY2tkVHRudkVu?= =?utf-8?B?VHhUZ0g3WWExbFlLRTZPMHFLNG13SDk5R0xScjRQZ3poYml0a21iRHZ0WXRD?= =?utf-8?Q?Xa8d4YEAdFPb3VqbTNQzCW4HW?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 180c6b20-4386-4c34-0650-08dcf20c0ff5 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 20:08:00.1852 (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: rO2KiRTjn5iEQitW6B8fNzTMpVvUs9Mx2lC2WKhhhWLEjYlGJXBmJMEkdjhw7k6ZKlhzrie8ImqCPEGdkCm+Qw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6882 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 --- 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 Tue Nov 26 04:43:17 2024 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2075.outbound.protection.outlook.com [40.107.22.75]) (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 02CD11FCF40; Mon, 21 Oct 2024 20:08:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.75 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729541288; cv=fail; b=VgadqfzCYqOUBEO+7A1mMtz3doZhAz4CRUD1NofqRxZLL2vuoaIKW7XHNvBiiaEc68abMOvrYa2fgaqNBZjgdickhiIDI2RR3ec/9jXCiBjvT6fejRO9+J2aFNLiPkqEGqXPN4+E/GxotLyHCE1K2S0qSEFTIbtsFowhaD4VnV4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729541288; c=relaxed/simple; bh=BLCZ2PxedJ8sdH0+OO2S4L0OwBVlKQm8vFUPblDgBs8=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=vD3Ij100eNz0lcT15DEvhyzwoDDHz8CGGECfD8Kq+b0hkHVkPQAwXG+ejWH9cLTEg7MrkpbuJz4Wr2nmeMYhqb9CqdryHZV8IzINg3FZECK0NFlaGSIY4lD1MBEGNr/oJCtuwWUczxAW3zX81X6Q2aqjHqZqskvMOPVCUGfpvwg= 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=lYmXJDMr; arc=fail smtp.client-ip=40.107.22.75 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="lYmXJDMr" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nBtgyFeEcG5A7soUlVllARJCh6L6WawVfy9SEnQDckXPSjjRXs2R+39QEh9cCjVLdsYoZD2tWaQCQMg5w+UNbw51MJr1t+jskgF/qrcLaE0I14AHEEyB30gJGxi3X65NNYrZI0kbNg9O2WJfZWlrtLMUBgEdNh+ZUe6G/QRP/HHff70Gyj+PfxlLSkXfAZcmx3m3zqMUdwyKGjBecrLwbJccnjtXpx7vc24LDzIMZ9gxXE1nCe/iU6Cu/EUhJBJcGZ8yNJET1j1hofxkDs88ETCrCmtQfOS/dYvBGXfVafTP8XdNgnEDXVKhnvCcQQiZcqhWWNQb3kre/bzdS3V+iA== 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=9PyAIWaOdZO0FeU9DlPkmrVDHjIO1344fxwDNX/2GJo=; b=fMGhLNsfW4xdNvO6I9i6ROTpkSmTp2Gdkx9SHuFnyYvYyxj1Spy5yHFU9QVdatu0QTLDcYOMuh7M3yCl0wz4QQEhzqiE6aUn241T9N+Ap/pvnaqVEbybAOBcelhYM42ZtSCXUlD4nKdftVuE1iU5NYoIJrQY9sDy//SGlOvAlH0IOvXwkKcmVmiS3LIOo92O7YOAW7lqb5j/RPeE8bbYDxrRgmIgIE1FkCFKEzXSpMedGKC2fp89yyR6bOeUFjHG5CTwG+fnyYCattLM+BexrOrQ8S9OS1hd/FSzv2OMD8lK5UhOM+UuWUBILfczkzRwvbTA81e+X9CFna25o1JANw== 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=9PyAIWaOdZO0FeU9DlPkmrVDHjIO1344fxwDNX/2GJo=; b=lYmXJDMrq8LdN7l4XN4lNpgvjNshB+E2q3xohRA+rlSz4nd5geB2jhaXIbkEEHFBubn+d1mXlHUTqJuUdATy9NbLUHt2vVzeS83t3jl7VeTZQ5GNcTfzkYWo10YI9R+UywhnutPiaHG9wtG4SiBV8VyOZPb8EoviOW2Xp40WZLPKXVUcEZJtjSOKYuKPPpC0DUHNm2nwPElTR5UHf08L30gDWSWcjhYNm/E0zxp1fIIvYgfLSMTjI4JzeWWXGQ8J2kSfK4HRqSgL5gwnajyMBothHI+OLZzRTDLfJf00hnHLMoN1sX9ckPaldjbf1sM65HPC6XygNxQCC7V6FBFySg== 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 AM0PR04MB6882.eurprd04.prod.outlook.com (2603:10a6:208:184::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 21 Oct 2024 20:08:04 +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; Mon, 21 Oct 2024 20:08:04 +0000 From: Frank Li Date: Mon, 21 Oct 2024 16:07:39 -0400 Subject: [PATCH v3 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: <20241021-pcie_ep_range-v3-4-b13526eb0089@nxp.com> References: <20241021-pcie_ep_range-v3-0-b13526eb0089@nxp.com> In-Reply-To: <20241021-pcie_ep_range-v3-0-b13526eb0089@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=1729541264; l=2779; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=BLCZ2PxedJ8sdH0+OO2S4L0OwBVlKQm8vFUPblDgBs8=; b=I0Y6HBxi83M21mJruo/UF9A9/P79iglng8Vq/leSNmuBTVJgb5/hHk6IspsBWf8mdE1ifzvX7 fFArpwcY8/IDx/GMhaF07h1l3DIiltAhF6NJflP2H0zWRZ1ryhgZnmi X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SA9PR13CA0071.namprd13.prod.outlook.com (2603:10b6:806:23::16) 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_|AM0PR04MB6882:EE_ X-MS-Office365-Filtering-Correlation-Id: fc65adfc-fdc1-4f44-2792-08dcf20c1248 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|7416014|52116014|376014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?L1liTHVQVFhqUmQ5MWJRV096M29LN3ZaSXRHQTNjWGdiYlB5ZGFDU3U2bHc0?= =?utf-8?B?TjFVYlBXTnVqdzZqdnlxSDd5RFV4YkZNTUFlNzhCMDV1L1M5TVVXMEp1cTFv?= =?utf-8?B?Yko2dVBaVlNFQlRKRHRtM2F4T3JSa1A4WTB6cmxqUU1wREo2bUlCUnM3WTls?= =?utf-8?B?YmlWYUd2WDdNZ0FheFFodmdPdEw0L0VxL2RjVWhKWjhJbWF3N09INGx2ZTEy?= =?utf-8?B?OTB4NmxRb0F0UlJyWktwcmNLcko2aGxMY2NXbEthOVBORnlaSkV6ZlR0a0Y2?= =?utf-8?B?Zm5acnRWTTlrM05QSmh3Q0JjRFMyYnEvUmhGQXU1YTJJMVNKRlI4a2NJQzdq?= =?utf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SjluOW9kZjdn?= =?utf-8?B?UklQYXVRT0VtSjhsdXUrQlUxUUluN2FtVTJIUHFMOW9oWHRvTlY2WkJ2UUlR?= =?utf-8?B?UElEeUVtd1dlNHdybjFVaWhBeDlQRUdFcDJRTXBTOTUwaUxERzV1QW0zNkx5?= =?utf-8?B?R29ULzc0N2FoZk1oREZySnAyV3JFUTA5bzJWSTMzSTNHdktrTVEyUGFjaXFl?= =?utf-8?B?TlZzcnJLbkVXSTdoN3BWTEFjTGZxZHpER0o5Mi9XUGV1T0U1OGhhZEczOHhh?= =?utf-8?B?dlQ3LzEyR0p6a1dJbnBLSSs4ZVJON1hlb3pFWDd0b0JCVG1ZRWoyYk1XeU14?= =?utf-8?B?T2xzNGR4N29STmZVcFBnM01SVUhlUWRpWGxlVml0K01OVGxkWFBiVGtyTGVG?= =?utf-8?B?aVhnU1pSRDNkUUdORkVwVlFSZWliRldPQ2FGaFd3YisxWkFiT2RKRUhSYVNV?= =?utf-8?B?cFpmbGQxeGI3TzZjMWhqbkEwc3hsKzRXTXJwZzE1RmtiRzBzOUNtQzMwbHdF?= =?utf-8?B?WVlqQ3Q2dlNiemN5dWZucGtNL1B5VVZ3TWdFZ2F3VUxGZ3ROaW9rVGpUMjRZ?= =?utf-8?B?b2pFdnlCanVKczFFS1F6S0ozMzRNdzZORXZsVXpYRi9TckhKS2VBMjg4WTVC?= =?utf-8?Q?O0OTmaweptoih?= 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)(366016)(7416014)(52116014)(376014)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UVI5Q3d3Ymh0VE0rbXVtUHN6bWs5Vm45ZlhYSzNzS3hrOVpzOG5zQ0JRUmhw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k52VXdpMkhUUjZqbzhuaUZuczRaYm13TVpBQWtH?= =?utf-8?B?WjExQWtTRWViUHpWQi9sTTNLOWpmL0haZlo5NWJ0eWF3THlZYTRVNGtNYS9o?= =?utf-8?B?TjlQSzdKTHlwbmdYN2psZHhaaDY5aHpPQXUvSHIxTTYrTUxoZkxBbzFkcXNH?= =?utf-8?B?QXl5QklJMjV2UlpsS1dNNnZPTGhBalZXMFZZUGF5dWtQSllXQnd0dXhldUs4?= =?utf-8?B?WGl3eHlBN21PUFlKZ29zZW5pUkl2LzFCai92TENZRmV4ZDhOQ3hyMTgwZitG?= =?utf-8?Q?wgqLe3uYc3oW6GRIDphULIkjh?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc65adfc-fdc1-4f44-2792-08dcf20c1248 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 20:08:04.0771 (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: qUlC8cRfjyuzpJ0t5YnrrrN1Hu4s6s9NcJJMS5gHbwrpYctWUYLTdaIi2LGQj8Kwi/lAtSdRMU8QBp7yVdCnGw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6882 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 --- 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