From nobody Mon Nov 25 04:41:47 2024 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2078.outbound.protection.outlook.com [40.107.22.78]) (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 EAD251D356C; Tue, 29 Oct 2024 16:36:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.78 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730219819; cv=fail; b=Muhmk/qIZMJRyg+bSrASg23sIvygXhyYZN5arfUStcdfvItIN8Bua0srJXZeBUDwfscVLNn+ayhnP/W4hV+dLab+Qlx2Npqwy4qoOZnHxv5h1rqmqm/CbRvWsAVq7cX3ra01HyiuTH84PQhaeg27/RpCXojqtFjBROuyvpDCmCo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730219819; c=relaxed/simple; bh=NXPlQLd0GR2adwrv2G7c7lY2KTqdBSor+PQ9mBUtQ80=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=kWaTja9Pv2UJFfUg9A8yWWs2hFKx/J14oPc2ghFESCBdXm2p/0Sa14UBHCKiN6yz+Ef/kYwm4WjciMuvUvxpKYzUFby4eR86BA5c6xCe+VTUToXDuhYXgfYeYaZZQXrAeaugVmeyOcgwIYi2zaiIeIfP/YGhY1qFsrkirvtMjK4= 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=hH567bhz; arc=fail smtp.client-ip=40.107.22.78 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="hH567bhz" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rmdVwjo3zi67xX32jAJf74p/P6OQJO4/fIfkj9/5oH+6s7/wA8B2VT+G+4oddXHau3YVxKblPpK3mR1KdI6HpjrIRfgxJZuNqR4a67FoGM4XrDkD+3geZVsWt7y2qGJAzenE4LfZSlgxQwoBJ2IieYt8h9RZIPC52Tti9yhk2WcKbDBRuPzWO+K6s/Q2TCfaMhoE+M8SLmHCfPgZvy4nYvnlHqQVJPeLRb83I/+4TnP4yL9jXeln7XMOFQMN6LdDMH3SMclsZj7ZvsXPrpMQR6f2EOoeIh6ooggbfFxWeM8pcTiLKje8GQWR8FdG2GRqQHlevQAQ1qcYhYbLR7NiVw== 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=Ud83vvAahmvbVVwLXJh+XRg0BtdbsLLBcRBvfAPBPxg=; b=JhtKn4SjY7qcaBJSh90k2axFthZ0rw41vz1bgfZNDj0PR0rtFFAfFfm82aV9ivyyNKlenYC45N/UFpkyM9yJyKR1kKOkAjRLk78zQcJAMZ5cuaUaJ8SGZSP3XrgbVfP0Z7lQfXE+M/lo98bDorpbUcDaqcVQXtjO957DZ25Ddx6lPEP1owv74FUV5VKbvgMHvvoVqkbsskC2WWO4EWKrGCsHOCdz2yQeHr1P7mvKrgSgy1H4q6pHB1WYn+MbNpRP1tJOKhXOyXSuwy4Mlcnypqaw8hkLyv4AFGBBF38AGTOsSwztE4O2AN1Af1cK66wppT5S5/Wlb7FFROzYj38/DQ== 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=Ud83vvAahmvbVVwLXJh+XRg0BtdbsLLBcRBvfAPBPxg=; b=hH567bhze7RcsZIt/dSSdLPe3536P1FolOVz0Z3tPRsUB9Peg1Kyc9XZoLDSriNKnJ8mEDx0HUEExtoGXwatifVohb5jk8v1Si/SnjbT/E+HbD1tZeQWNpalwuuXHxnbgPEqhF5lACkmk9OgIb2wznPjkBOJJabdIkmjdcuQMlSvahM6eJ0/jSkLc7OqL3S6WWLbByKh+AjxzEsolahRBueyRIPPDoKBTMfJWkY8MTir6vsyfmfndDPBrI8KYKG/ZcaSlCiFNU1G7mDcWWwGTqC1Qq91GyR8rrdZyY25rvYRDFBsYWP10PqVOoHM44N6LVkhVwsiRHApORaJviDY4A== 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 DBBPR04MB7577.eurprd04.prod.outlook.com (2603:10a6:10:206::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Tue, 29 Oct 2024 16:36:53 +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.027; Tue, 29 Oct 2024 16:36:53 +0000 From: Frank Li Date: Tue, 29 Oct 2024 12:36:34 -0400 Subject: [PATCH v7 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: <20241029-pci_fixup_addr-v7-1-8310dc24fb7c@nxp.com> References: <20241029-pci_fixup_addr-v7-0-8310dc24fb7c@nxp.com> In-Reply-To: <20241029-pci_fixup_addr-v7-0-8310dc24fb7c@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=1730219803; l=4762; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=NXPlQLd0GR2adwrv2G7c7lY2KTqdBSor+PQ9mBUtQ80=; b=neSi6t48nUqyzgiIKTUZl9yWlJkBbL7wWbrra3WS67+WJ+N01sWoD8iSDTLVwIWxL1iHAFl1A No5VXxlt/FtDeAhPpwlFiaiiRA7gh7fF0cH5iTnc+dVO0zU/+Ym0F60 X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BY5PR13CA0035.namprd13.prod.outlook.com (2603:10b6:a03:180::48) To DB9PR04MB9626.eurprd04.prod.outlook.com (2603:10a6:10:309::18) 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_|DBBPR04MB7577:EE_ X-MS-Office365-Filtering-Correlation-Id: 433bac44-f019-4d52-a88a-08dcf837e4f5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|7416014|52116014|376014|921020|38350700014; X-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zWjhvZkdjaVdMVjVYUDhWTW82a1owaXQ3TTJEUThRaFQvcnQ4NVM5QXFs?= =?utf-8?B?T3owYzAzS0lOdlRaeEMvU3RrSkxvU05aZWh4bjRTZktvUnN1SnVyUWxlM3p5?= =?utf-8?Q?9usDjy57/slxR?= 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)(1800799024)(366016)(7416014)(52116014)(376014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YVNCSVlKeFE0Y2sxOHB0NjZBZHdGQUR3bituUmt3bnYzZy9aRTdFUkl6VFcv?= =?utf-8?B?UC9OeGE3cjd5bHhiN3FucGU5TWVLeUZYYUY4a1lwLzIrNWpwTTlVK1RxZ1dl?= =?utf-8?B?UEpPUXFuYWRmLzVoRjZXZm41Q1cyOHhST2hJODFDR282V09rYnczczUwTlMr?= =?utf-8?B?SE1VL001NzBESURXdFFHNlFmUU0wRXBTdlpZRm5qcjhPRTlLblFHV1ZWbjc1?= =?utf-8?B?SGtrZU1ZYmUxcTRnOXB3SXVBU1orMGRKTUMzZTRLck9QbldiaWw0eGlkWjVt?= =?utf-8?B?VmlKVEt4clV0TVZ6M3VBVHRJUlZHcE1zOWppclEwK2FSTXlrY29iRHJFQzR1?= =?utf-8?B?aXg0MEduN1c3RkJscm1VRlpFUVVIYVBPU0tPbFJpRFB1L2I5Q1o4RUJncysw?= =?utf-8?B?SXVYSFoyZUJYUnRzcGhlcFp5UXo4S0MyMngvTFhiMlNvTGlnZlNSQU5PaDVt?= =?utf-8?B?WGRkNGQ4bEpkbWxTNkxsY2Y1NkZ6aDMvQUxXV00ra2l0ai9zeVl6TTBhVnE2?= =?utf-8?B?U0NzSlZLRTJ5ZVFZR1ZubmE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CtLUi9xVENyRUFVbXMwM1FhNkkwZnR6QTBvWlBzNjJZWllzaTNV?= =?utf-8?B?WmZDN1ZFVXlOVHhjZTRGd3ZrZm41QnRlRVZLVDBVRzJTU1ZJcjJNeGpRYUk5?= =?utf-8?B?TFNXUURrSEFTWnIvMHJaazBkcGVFRkNvWkpmSFovUHIrOG5GZzNIZFpaUjdS?= =?utf-8?B?ZW4vMEtza2tBalY0eDRDQzU2MjIxY1dua3lRNGRPbnpzZnF0MXVZNkxqWlhW?= =?utf-8?B?VUhCVVlSRkpINjhVYlRaVEYvWlprcTJlc2ttak1ueldPMzRoSjBwdy83eWZ6?= =?utf-8?B?REhGUXdZMlVMc0xTaHNoOWI3RzFBTnhPT3VvYjh5N09KS1FjZ2RaZGVDcU8r?= =?utf-8?B?L3VOZHNOUVpXWjRGK05wZFRTb1JIOFFUeHNFRWR4L09KSGpManlZT292bDJj?= =?utf-8?B?NWZPZDRqL1NPbld2N3Q5ME5YNXJzRkZMVVdpK01HRERwOXkyNkxIeVR5eElz?= =?utf-8?B?Kyt1Yy92NkcvMUVGczI3Y24xZGxEbFZsMFhPQVJXeTB5clRGUEpnbFQ1eUhy?= =?utf-8?B?WUVvK1BDSWxhMGJ3L3VyZWI4OUo1S2ozeFcrOGIyaTBWc1FrdFdVME1IcnBJ?= =?utf-8?B?NHBieXhHTWlLR3l6dTdjRm92bEJGYzFLMVBMRkhLQXB4TCs0dy91THZmeVlE?= =?utf-8?Q?4rS/m2mjfkvKKGxYCQizC6ik8?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 433bac44-f019-4d52-a88a-08dcf837e4f5 X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9626.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2024 16:36:53.1386 (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: 0wm6A7BX+57kAHkj7vLw7G0mMiq1ztUOn2MHp4rbUdsFxTVjL+o+Nh1EVxNqPl40dulaMt0sMWfC9i+Nueiydg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7577 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 Acked-by: Manivannan Sadhasivam --- Change from v5 to v7 -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 04:41:47 2024 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2078.outbound.protection.outlook.com [40.107.22.78]) (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 DE25C1D86E8; Tue, 29 Oct 2024 16:36:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.78 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730219822; cv=fail; b=mnjWjHdxsE4kxgapevqwMFEcq8xtaEtGwhq0Y79Q0mogTqgH49jT6PKW+xOZiGwF3qc++3y093PDlOkiZ9AUs0dXs8rJ6l9GMDfPzZvKdiPFnKum4NPxz6PnzA+LkEq3mAqvScORetwd5LrwR1+Rg51xpqXsCtSYGr6l7R5h5kw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730219822; c=relaxed/simple; bh=iJ6/KG8KKdayrGbVtcslMDA3WnqF1vdb/oRmxj7ytWo=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=OiT/VMdVnOkM3lv25eiwDUOOc+wVD4AZpSVIB0viIEqLYWj/k8sBY+lKFnQFktFvuy5HuA1x/0QbYIRG56AfjSeKSA7jxYCJ2NkzAGL8dN0/hUYBCwwc8YExWPqgP2fGE0r186svflmiMUBov67lzrV8wUlwFowVKfImksWOnCk= 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=Nd2zkdWd; arc=fail smtp.client-ip=40.107.22.78 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="Nd2zkdWd" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=no2EibCM2q/PwFQZnjfCZ3uyDf6xmybAfevqnKeTxodDeUtfrffCAs3wZvCz2K/HH16tb7Un+Co8awAt/8R22JHQTh6FDKUrCTpbEA9dC/jym4Pgt21cxu2DEYun/pbidRYWuv3JoP4kGMnRN2BwN+mxEcutMRiJtrbJUHTGfHVuquC6//63KQ7I1zZ4L4M5NWy7v1OUuMbE1DOgdMzS7fj/AhWcBtIqIKI+XgtfBuW8SZlunv1VqsD7CKsZICI35hMP4Ix3Hwfxm6mhqH37ytACzMsQabtFu1BoRkXJFyRFMwkr2WY4AAxd+4J66hVXxFsWQtYLbsLoltyhm8ry6g== 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=L/VhIsVSTv0d5u3ZhfKuu8Af1yUZKW5mR3qA1hzH6eg=; b=WPRJyaZUmUorQXf2OnX1OyD6XK6Mvne36sZzhlij18w16epGGn+NHfA+BKVeIJzN5sD6hjnhJGe+d6TglFWI1UlRGOzp6+LOtDUbhWpoGVpvt0d57AzFF0m55iG4RkbNGLTOSvHWbE90iFkg2KKa2j+ZIEE4JMtiT/F/s+p7Gxz6WIXa2CyQPMMCvv9/Z/8CKGZkdgEEowjX4VlHV5sSCuU5fnBo/x+LmwowE/VATj1XBX0pcZLLLFkErhwPpE94793kbn1UYghn4BkqV39D8byOHR4b8u+UDJxCK2eGRcAznlq3q4UI9Ja0R1aqpTbRb3Mdv4RoUl2Wwb+iIOqlQg== 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=L/VhIsVSTv0d5u3ZhfKuu8Af1yUZKW5mR3qA1hzH6eg=; b=Nd2zkdWdRTuQGfjT+aW3/ESI+sIPPEkLzBwsYc1BL/aNkozNm6FocIHJj4rz7EkAo9MiW6ejMMwjp+PICGnMqYpyFBXluZmzAQeoUZCzPa3Klm0ylvFhZg/gevB0M+B9VS8PyKJJBQ34h419XitOndcNgpKq+ZOtR0a7NCRz9AQz+V2lXOF7JifB4oQmwOLVJM5LKXJ9/CDj/+KC2hz0eSoL0SGBC8u+WZMYdvRpUefIgp4cxJSmeJoXj60u841/8StdfOXnN47GhS327Y4poLNTHMe7/IM+udHco8Z4CBsfFD2zAVc6lr/LblYx3zMTAy13B3tgtD9K+UT2XwmZuQ== 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 DBBPR04MB7577.eurprd04.prod.outlook.com (2603:10a6:10:206::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Tue, 29 Oct 2024 16:36:58 +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.027; Tue, 29 Oct 2024 16:36:58 +0000 From: Frank Li Date: Tue, 29 Oct 2024 12:36:35 -0400 Subject: [PATCH v7 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: <20241029-pci_fixup_addr-v7-2-8310dc24fb7c@nxp.com> References: <20241029-pci_fixup_addr-v7-0-8310dc24fb7c@nxp.com> In-Reply-To: <20241029-pci_fixup_addr-v7-0-8310dc24fb7c@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=1730219803; l=7546; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=iJ6/KG8KKdayrGbVtcslMDA3WnqF1vdb/oRmxj7ytWo=; b=/jyC1OwyX6tQ2kmRI4ZCCYPxvzLkz0MGYm4a0Brx5F1Kkn8GhdcAtbdlD06qrkdD0LTIsD2uo OBcTNM26FD1BCYGNjWDZyfWNRxIg2plSPnneyymPTKZvICtRsXJwVDO X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BY5PR13CA0035.namprd13.prod.outlook.com (2603:10b6:a03:180::48) To DB9PR04MB9626.eurprd04.prod.outlook.com (2603:10a6:10:309::18) 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_|DBBPR04MB7577:EE_ X-MS-Office365-Filtering-Correlation-Id: 85cc176b-3eb8-4586-3f14-08dcf837e7bd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|7416014|52116014|376014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?WXgwbzI4WXdxS2FDNFhTc2pDbUY2ZkJmQkJxeHk2ZWxKZ2tIYnlUNlFuUXZs?= =?utf-8?B?dE9hLzRscU9yWWdmbHVVdmpoWkJZb3lvQ0hDRWRpZFF6cDA5dU1rVTcrdnZN?= =?utf-8?B?YWFWZGNKRU5MUHZBRXJIdk5hRFhjYTAxWFpjUzk3elJRL3lKN2IyQWFTSE9E?= =?utf-8?B?amp6M1pJV0hGVStRWWd0L1d2anhpVlFFMkhsbExqZ25TRVN3RnZmeUxBM0ZK?= =?utf-8?B?ajNEVjVZNmw2ZloxeGFSZGV6NFBpMzVDNDBqaUtFSHdzVE1JSHJwSGJKNF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VVrVFVHYXVQbUFIbVdZaGlN?= =?utf-8?B?ditVdDg0TUdsS1lhanhIckd5Ly9iTG96L3ZNcm1CNDl1MTl1cnU0U2VINkJx?= =?utf-8?B?bGV2bzJDYWZndjhTRHk3UmV3SWRZemtSRnMwUTlZNkxHMnBtdWNSS3ZDTDI3?= =?utf-8?B?c2RJV3ZEbklMeDNHLytlV1A5N2tqN1FGNzluZUxNaE9wV3dHS3VlVnE5WUtE?= =?utf-8?B?a29OM1ZWRG95YjVlbTZIUGgwR0RJUzg1WnVObURhOC9BRk9QVDNBd3pLNzJH?= =?utf-8?B?VjQ1WnVocWFxbnh3Sm93b3lpR2M2ekFmVEF5VUJUK1duRDFPVmFnaWVUNVJZ?= =?utf-8?B?aFVOQnFaZkVmc3plZmdtS211emROTVdFL2FoTjJYZXVGcXBPeFZiQ0hoWmRM?= =?utf-8?B?ODhmRGIyblRaMDFWM1RUbkVTYzJySTVrSzlicXZ3YU9MdFhnMkpEby9GQmo4?= =?utf-8?B?OFByQlZuSkhRbEpBWWNnY2hMaldJTEtUbzJHaGFHbTdqeFZla1RjMm9XU1Zr?= =?utf-8?B?SnN5Qk1NVjF2aTN0bEo1VlByTVhVVUJPS1I2NERoRnM3ZXVMZnlwTGJTYmJM?= =?utf-8?B?aEIyMVFqeFFicEJnMTdjU0FFRGpaaHJ0WEpjRElLRWlMcHlpSm9panlONU9T?= =?utf-8?B?WnNNcmFjbEJqd3I0RlRNKzBiZW8vK1FUNHVMeURmc1NMRTNtTmhkcXBybEty?= =?utf-8?Q?ZV2RmrKP2RFn9?= 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)(1800799024)(366016)(7416014)(52116014)(376014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-Mess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VZ1ZRTk9EMGpVdmZEdk9GMDAybXdCa3Q0YVk4?= =?utf-8?B?YXpQT2hQQ2RlN2NyYWl0cmRpZ1g0WDVzdnN2ZHRGb1hGRFhJcTV3aG90dnVP?= =?utf-8?B?NW9rTzVvbldXR0VWREhCMWZKYk9MRldXVkJSNGd3Wk9TcjZ4d0Rvb1RYeDVs?= =?utf-8?B?ZExYY2JPcDFzc3E2OEhySk5hQW1meUJpbVdvVit2V3d0cEs4Qk9GdWJld2pj?= =?utf-8?B?SGZLU1Q1RENkdW44UUFsaXhDOUY0elQ5aUVKL1JnVjl0RXlSaDA5VW5oSys2?= =?utf-8?B?dmRicElqeXMxa0tpV2w5QU5WYklNSHV4VzhxMGpMbzNvL0o0KzFEQmxtSTJ2?= =?utf-8?Q?5eOREN5n+x4/IRWIVMhanDGA8?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 85cc176b-3eb8-4586-3f14-08dcf837e7bd X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9626.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2024 16:36:57.8597 (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: 6DYc4LQEd0Bs4wItpa5YksZoJgZ/d708Zgq7udOL247gdwDdiWb9sBuKa4q5o/94gdmnH8sMMCVBXohcgUkG/g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7577 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 --- Add a resource_size_t parent_bus_addr local varible to fix 32bit build error. | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202410291546.kvgEWJv7-lkp@i= ntel.com/ 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 | 55 +++++++++++++++++++= +++- drivers/pci/controller/dwc/pcie-designware.h | 8 ++++ 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pc= i/controller/dwc/pcie-designware-host.c index 3e41865c72904..ea01b7bda0a76 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; @@ -722,6 +768,8 @@ static int dw_pcie_iatu_setup(struct dw_pcie_rp *pp) =20 i =3D 0; resource_list_for_each_entry(entry, &pp->bridge->windows) { + resource_size_t parent_bus_addr; + if (resource_type(entry->res) !=3D IORESOURCE_MEM) continue; =20 @@ -730,9 +778,14 @@ static int dw_pcie_iatu_setup(struct dw_pcie_rp *pp) =20 atu.index =3D i; atu.type =3D PCIE_ATU_TYPE_MEM; - atu.cpu_addr =3D entry->res->start; + parent_bus_addr =3D entry->res->start; atu.pci_addr =3D entry->res->start - entry->offset; =20 + if (dw_pcie_get_untranslate_addr(pci, entry->res->start, &parent_bus_add= r)) + return -EINVAL; + + atu.cpu_addr =3D parent_bus_addr; + /* 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 04:41:47 2024 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2073.outbound.protection.outlook.com [40.107.22.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 54C1C1DB37A; Tue, 29 Oct 2024 16:37:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.73 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730219828; cv=fail; b=lckTTgRj3cvQNfqIM72G8mKYtXxuYg5FkV/tQYyLYBdMYK0v59Z6bky2OYcWRLGhtD0LIqDUL0QCdWn9jgQCo/UunClKkpocyymJf/9HfyH+34QHndHAtRrdZVULPCt/fSxZ1CsuiZk3gIVIB5Z5UG7oxFLudV1K0CzbGJS/+yE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730219828; c=relaxed/simple; bh=IMipsZtRh42ozcH33850bFCfms+HZHuAJ8oMSR3hzdU=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=jtRI0h9hZaq+aMTOPZ83bdW7k/8Bk12DbiwVc702IzK4dZGZOA34eFY7HwhkGS1qFf1IC4zmfJYPwjWo7mK8ydOi8Kl0t1gz5Zc7fmvqrwrPxpmvfl5JFr2dD1Ge3M/h3WsWy210cAjKDVFjmtJ4Qk8Sx2hCyo8shew2engZPnQ= 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=izJQ6Xrv; arc=fail smtp.client-ip=40.107.22.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="izJQ6Xrv" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AuO9ePFZdXOcBZUWHRZW8UF/5alueua+z9cSymhZcJD5gZZMS4k7TkgUh8MOMBMqsW0JWcQRai26MGt6iuFyeQcBzEj3eB7KR1imXlk15jOTj8bBIAqQ15uVyaDbzEgYQ2YnMFqT6D4OQzOKeQ4hkOS3kpXbtERYPpY60Zwf3N7aRQYXfRCKNsbtJwiH3CJ60j20EfTsmT0syShncc3ZwfgHnL0BPRfscCDrLR5wLOkP0ftvhcxT2ZMd51OW5NVVOvEFIYl818lWgwWLim8aFyky2xV+O/Qyl6OoCeqim9Ro0CkfGaZHUThrPFEKccsapkdT8ZlNpKmqLKZJIjgAqQ== 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=3cE+RUByeBM+zxwx0nFzkXWP0WlZvWmSl98mTrUt0WM=; b=x90kMYg9a5eLLvo4xsxgD86xoEaGwOY2eEkkBFCKai51G9ytCi/lVcwnLJzT5WPey0rZ0tuDB/zj5gHJ9FhPCMsGAI4J7LAfDIwLNYvHZmCx7wsnmQWxYs4QxWMyldsB5/iViFc6H/S4v6/MfMVjO5kEOmXB29qjZMeWubCehjUIdx0sZtARTh24SdRb5YsyIP2p0XV4Exc1uf9NpdVZ+hYnVBuIEUdCGBrkqGN9PLZ/fPTS5eAzLn7CcwanUjJGHNJPTQZCZstQCtVWmSIm+6DM6ydBUr+h+GEmrIaTW2YXnfJB7EqCoEH1V8w8j8IMfC3Zd2nqmhLVpm4uG8Da4g== 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=3cE+RUByeBM+zxwx0nFzkXWP0WlZvWmSl98mTrUt0WM=; b=izJQ6Xrvjfz2ZMujKMRe8bpAWHStD4V7yYH0VrVUa9dygYifTEFQF1ILT9cU5DCAeRK0NYtrwS1QSNtzmaEGeuLsWoK/STjxQEAfxH+rDIKZxW1dFFgQAgzOCTeAT0S2FgjtTAQcizCPrcFz+Iq8f2qoe0qeUlZ69dg3ewo1BRAJkigMkvUYvQSsKfgipm+n8dPSRNwWKEApkURdWOfea/pMJQf3/7QPkWCfJERL10NKnB49CjjvvXm8UQrOEzok3uQRMpcc99Kw8q8QnxFgXhnGJOZx1YVgGjFIJ+PeesabAyzVr53EAJPb3M1vmVs8soDYbhpvaM3JQ9EezUWcNw== 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 DBBPR04MB7577.eurprd04.prod.outlook.com (2603:10a6:10:206::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Tue, 29 Oct 2024 16:37:02 +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.027; Tue, 29 Oct 2024 16:37:02 +0000 From: Frank Li Date: Tue, 29 Oct 2024 12:36:36 -0400 Subject: [PATCH v7 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: <20241029-pci_fixup_addr-v7-3-8310dc24fb7c@nxp.com> References: <20241029-pci_fixup_addr-v7-0-8310dc24fb7c@nxp.com> In-Reply-To: <20241029-pci_fixup_addr-v7-0-8310dc24fb7c@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=1730219803; l=5662; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=IMipsZtRh42ozcH33850bFCfms+HZHuAJ8oMSR3hzdU=; b=FKTkpRxObUzPe+YEiqYW8Y9/yElh1Af5kmudHZK9r0Fshr9nflpupBLircq1RQSrr4tcidQ2u r2NuBCH7+QpBgYu3eaURUZKm7goAuMUfwdU0J3DonLt4ygIWmAcGoqz X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BY5PR13CA0035.namprd13.prod.outlook.com (2603:10b6:a03:180::48) To DB9PR04MB9626.eurprd04.prod.outlook.com (2603:10a6:10:309::18) 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_|DBBPR04MB7577:EE_ X-MS-Office365-Filtering-Correlation-Id: 7ca8fada-dbc2-4b4c-6b67-08dcf837ea8f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|7416014|52116014|376014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?Q21Db1E5SHQvOHljRzhiMVlwWGlkYmhqUzJLbVZQSnpITFpyd1MzeXcyMWRL?= =?utf-8?B?YmMyYVNqRzR5aUNFdlF3QTdBMHE5emw5UCtSclhmS2RxdWdsSmoyMzgvdzJa?= =?utf-8?B?ZXZvbWhQRWc2aTJVZlppYXc2V29wc1pxR3R0eGxGNWI5R3hrb09DcHFOK05q?= =?utf-8?B?dExpMjRHeW8rNmVYaVluMDU5YWt5dFc3QXNGNFZOZE13cmVzRUhpdXh3SFU4?= =?utf-8?B?QVE3RnowN0tp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13230040)(1800799024)(366016)(7416014)(52116014)(376014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eVU1eWRMTHo4MGpmTEE1WkNNdmhnRCtEMTdrejV0Y0xRUmVFWUw2MU52YVFG?= =?utf-8?B?cldQcXc0czJsNi95ck5TbmZQdC9XWEJ5c0xFaDVhMFBFcGZyM1FlVnBqa1Yw?= =?utf-8?B?TnU0NlA2aDFodkVwYkNvVytLS2hPaDg0ZWQ0aUFGaDE1MCtRWDFNRFUvbUIx?= =?utf-8?B?VmxVY1l3VHMzQTBPYmM4Y0hSMXJoaFBtdkhyQi9xbEJkSjBNVkVVTTJScHBJ?= =?utf-8?B?R3c2YVpmTGIvS20wMlIwRjlqT1lkS01qVW54V0R0bm53eHM1TjlJUE40dkZo?= =?utf-8?B?UUViVEF6aU1TK0ZXNml0NG0zTWlvQlJSMnowMmxCcjZZUDc3aWdscU5QdnFn?= =?utf-8?B?d3E0VWQ4bk0xSjdHYzd6ZFRaSWgxOWlLb014V09vYUdPcEl0ektxZW55enFL?= =?utf-8?B?cDdveTdMVjE2VWhqT29XNit5ajFSdWdIK2k5R1hQVzJmSllML3lnVlVuT2Rm?= =?utf-8?B?VGRRaU5hd2hBNFV1ZkRKNmRFRGxybm5mK1BSRmZHNGpVSXBLNWUrOUxGTnhV?= =?utf-8?B?djJ0YmF6eUVrZDV4Tll5WTNWZkV6ZDlDcE02WkhRTTI0Q0Q2ZzdiQmxQcTVn?= =?utf-8?B?KzB6VzIrU2xGNDNNQzlsWmRRK2R0MkFaUXJ4RTE2TzdHS21wcGVPRVNJdnNr?= =?utf-8?B?akJZY0tJekpEYXNLOWVQaUhLWDJhVDBOUE55N2ZVWHpiczhhQmRZbSs3VnZi?= =?utf-8?B?Ym5KRTBmbjlZZXJ0RnY1NWZ3WFpRdmFWaXJTNThLUXlxL2RiZzdMT1V3eDlH?= =?utf-8?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EM2T3RL?= =?utf-8?B?WUJrUHNHL2ZzU295dGtxWG91Y05xN1dRZkZZTEVVdHRaQ3FZRENCNExETm9H?= =?utf-8?B?eHJveHQ2eTJ1b0dSL0xlc2FobitIWkFjK05DZS9kTmI2UVpEbnU2Z1NpWmFa?= =?utf-8?B?OU1yT1gzREJVOVpaWGQvM3grZW1rZU56Y2IwZEZNdDZFS0cyZkJuOGtsWTFj?= =?utf-8?B?a2c1MktlSnBrNTNYUU9yUkRYd2wvakZRdmExZ093alNlMDEwd1ZpWUIrYW0r?= =?utf-8?B?dnc3Vy9LNEtHUmFMV3BMRGpYQndURDlwMTdpWEVkenBnNkt1Wkd1OUtaWVFq?= =?utf-8?B?QjFXSHBXRG9NSU1nRnJveVphOUJPalo2Vk9MMGFFVi96OElZWlBPTFRBczNY?= =?utf-8?B?UEYvcFJDNkpIb0IyV2dOaFhiNkg4QjlscjJyTkFHY3ZuUmdoM3phRVZrU3kw?= =?utf-8?Q?dYgogIHN/LHCcEbDznKWACUyU?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ca8fada-dbc2-4b4c-6b67-08dcf837ea8f X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9626.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2024 16:37:02.5378 (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: 9CCCn7cz3AH38vpgZaeSpChUNkWhNGyT7ELq9B4XKzuJBhXLJoO05Ga0OCNF3TxInF/onuRYwINr/lWqnyA9Fg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7577 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 Reviewed-by: Manivannan Sadhasivam --- Change from v6 to v7 - none 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 04:41:47 2024 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2060.outbound.protection.outlook.com [40.107.22.60]) (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 DFDC318FC9D; Tue, 29 Oct 2024 16:37:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.60 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730219832; cv=fail; b=Dy3EFB9vRJibGKjymSw9MwoWpfobiKostR2ZoQW2Bs3bOPx/W8A77AMMqZrVdbb2ItI6LONIEaW7qs0lyFubDoEMe1bQ3C651PT1ly3kxQEYZ12fmbdTqMQVPxh+Jn6nv5zokQMMu6FfP3mEoSzrOEBykB8bZzC9rUne/23/7+E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730219832; c=relaxed/simple; bh=QOgfKyodPSXGdn059Wbm5lzn0V1+zBWDoUWmg/pDYgY=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=DfoE6jLRKvwOTmSYNQodx3qmCRA7SGrLb5fFlRmxQN/IBB9EaIX6usT2Ud+bjBw0cm/88xpzuJ8Oxp2VurIEit89C93zWyEIcRxhLrITCiz+LkyDr99o26y8p6iGX1gs4ZLk0GMKuu+EQ8JriM8tzLR6/YnmEE5uqTe1fmCwMs4= 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=Te2JhypP; arc=fail smtp.client-ip=40.107.22.60 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="Te2JhypP" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=LsW/o/rlbIiN99CIYiFjhAecK6heBjS5Cpsxkqc6uVRVC+sVqgm+CPVh7ubi3wucIMQaNPujJ5OvS+z/sicl9Fyr3FRR6KLdyWQx9JO0hkrNxhV3j0qieYcXhOujoAcduCMKGwtnIUXoO/mer2SELppel5PRmtVuB/qQ2fSi5705Td1WeTyHgLrzDDxXqWiYg9g7pSknm4TVLcmlTZY1cE9fpnkoGwtU8KQtEdHJeq63fY0Nz3ayQzSRyFhOY8B+JnDwQggs9f5k5BNxiUJlCMxbVpFrusvL7AdHJZOtsy8/Wx2mmpvfsSTu6l2zWhE/vuFYMLuNISDP1mRr5eJmtw== 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=CIjUKF1pCR2NnXoJoZT8XtU0SA8MMpxu73bnZDj5E6g=; b=DjbV04Tw27NNn0Jv+M3oLI4d1OqP/xxDb0G6iO7V+7g47KR0dooRNOspzmN62iQjQcBi20jSBaXEslVlPAsedTvwUGQLCWH7o0HKLTVsCBH+lnBhaxY2CdNFAUdjO2opUfg9bpmio8KqdselMZrwZCRhLP/eKp0LFfqv/epdgd10CslJ8kxRG7cwCB030V8pYv/N+LJZt5YedFQ1ZOQ6ZOXDuaaHKbkHjveiJaid4sQvFD37DRsA3/TFofGWLxYON3NOgGxdMHuEpj0B5RwZvvS4ldkoofEsPuonjkLVKdp6zQZpuiiTs+BsxMXzRw4eOJdDOQ2ijvf1B1V3jWMDFw== 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=CIjUKF1pCR2NnXoJoZT8XtU0SA8MMpxu73bnZDj5E6g=; b=Te2JhypPy3Z7re/gLb0TBIIhQh5DrKOFggl+BB6gnZ4AW2iQ7uX3QVuwh53HyCPGF3vaVn0z6gXtUhGz0yjMbXl5CU05il3W89gd9SvJ7JBZyVOPhpCb/lPFUq0LSBIAFMWh8diR4mAzVMPPCdXykkmFymEXr83KsplPnSzJiVfm2lXMof9p61nyC/JRllw04q+0IaB1ChsvW2mkXqdqNzjAfPSOaTG02jjQAkRAH8MdvVxVVGBChv0fb13Nf/h0hRXrOcZ6Pj1vwi4/jdUhJlB37qGxFQKKhnzrqEDiAuexu2zlL0ylS6ByEOzuEPuer1itxtDyupJKvkQMfOxslA== 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 DBBPR04MB7577.eurprd04.prod.outlook.com (2603:10a6:10:206::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Tue, 29 Oct 2024 16:37:07 +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.027; Tue, 29 Oct 2024 16:37:07 +0000 From: Frank Li Date: Tue, 29 Oct 2024 12:36:37 -0400 Subject: [PATCH v7 4/7] PCI: imx6: Remove cpu_addr_fixup() Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241029-pci_fixup_addr-v7-4-8310dc24fb7c@nxp.com> References: <20241029-pci_fixup_addr-v7-0-8310dc24fb7c@nxp.com> In-Reply-To: <20241029-pci_fixup_addr-v7-0-8310dc24fb7c@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=1730219803; l=2455; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=QOgfKyodPSXGdn059Wbm5lzn0V1+zBWDoUWmg/pDYgY=; b=9wvE6bON6I4IaU2EIMPtWUKxcAjgPgF13XjSP41Is/Klje1XPIpcpF4IMwvSOP/eKvEdLjWjl qf7zFOo8ip0DMKi3N0DXP4rAX6Y8vfhiP9wtXPBMET2lg38tXC+fXeU X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BY5PR13CA0035.namprd13.prod.outlook.com (2603:10b6:a03:180::48) To DB9PR04MB9626.eurprd04.prod.outlook.com (2603:10a6:10:309::18) 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_|DBBPR04MB7577:EE_ X-MS-Office365-Filtering-Correlation-Id: 1e7d3cfd-5e2a-4d61-8be6-08dcf837ed57 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|7416014|52116014|376014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?aTliUm0zTlBnUnJtYkVucFp6ejJJSytYRlp3OXJydk9uUWgzZFRUQTE1WVBK?= =?utf-8?B?b1ROZ0VGY0FhWDhxb0RVY3FNY2NWcTFEWHo4VU5zZlpncFVxdGs1Tk5ua2Vy?= =?utf-8?B?MXMraFlxQVF2VThsYkRKV0lrR1JmQnRONnhHZDJsM1BhSE5EK1hmMU9vR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d04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(7416014)(52116014)(376014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?anZGYnBtZGxnYWpEbkJpVVZEV0gzWWZDYzE2Z1Zac0xQUThHTFlVWVF4R3Vp?= =?utf-8?B?OW13Y3RSaC9tSlBlSzY4QXBlYWpXUTFRdHdqT1dIRjBBd29ZNi9SaDFOSVph?= =?utf-8?B?MWJkcTB4ek1VVHlOcFZXSzlEN0FUSExiNFJZSjQ4NFVXZDZYa2lyN3hGK0VN?= =?utf-8?B?UHp1bHNMRlpmd20zcDZsTlFEQVAwQ3d1S0tFbTdIc2FDNzVqQlR3UTNwYnkz?= =?utf-8?B?T3F6UU1CbitEWVg3Z28xaWdGUlNaKzBtZzZCb3lwSnM5MzMxN25ZZ1ZmQjFF?= =?utf-8?B?WTRkT0FMK2NRUWQ0WGJXbkJ6WmZ1NHZEdTB2ZTFQVFpVbXIvNXVBY1lBdWI5?= =?utf-8?B?UW15S1N0SnF4UHA3RUxOV0F5Z0ptRDdpZS9DN2N5RmN0U1VJTU1vc0VLMWxt?= =?utf-8?B?dnZRK1l4OFBDbVVYK3JjUFpDa0pGVVhTT1c0SmFoMEE2MGZrd3lSdWVYSFJU?= =?utf-8?B?ME5MZXh0Q2lXQnR5dFBGRTZOaERlM2J2MVBFZnJ1YjU1dDRJV05NRncrV1pZ?= =?utf-8?B?T2thQWhIbW0rMVRRY1NXQnEzQTV0MTl5QUxBeVdRYm5BUnFhL0RyUUdwRHJQ?= =?utf-8?B?YWZzQ05TZ2NHdkNjYks3NzBvK2dEQmxjRHdvdlhScnNwY21kNEJ4Tk5IS2s3?= =?utf-8?B?NHRJcVBBb0VNZjlxL3R0bFo2QXozNnl5dUZSRXdrWWw0a0M3T2pVNHBLUHov?= =?utf-8?B?Z2FzaFhGcnp1d3RyTER2T2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mppdjdE?= =?utf-8?B?eG5TTHNmVmR4UmY5SU5jOUJaOHB1Q2NpOWxGR0RTVFg0OUxjNjBJU0RwRnYy?= =?utf-8?B?Z0oreWNWNmtTSllNTGZ5Slp3OERuak9SSUJIZXhVSG5pRW44blVmV2JHMXo3?= =?utf-8?B?UkkwamJONzIvNzE5cHQvTFJmRFc0bnlkNVJOOTQwaWRzZXQ3UVJQYVhNM3Br?= =?utf-8?B?NHI4VGNsZnAwVXdSZDdERW91ell2SHBIR0RpUFlVcjBRZzZiUWJwUTlMbzI0?= =?utf-8?B?ZUdaWmtwWS9ZSm55bXlzWXd6cjJFR0NkWEJVNkt1cGMzZVpuYUcvanlTS1gz?= =?utf-8?B?cko0bGFBTC9pZThkN0pZajcySWZYb3lrVnFlZnZCQzBMRGswMFp2S1ZVMGZH?= =?utf-8?B?ZVcxTFlkVTRuRmdLNDZXSnFuNk9jM1c3MWxyZVE2UzQzWFpQZGtMd0s3SFA4?= =?utf-8?B?TkVCQjhZSzdHWncyOUF2YklxVE9yVUFpSlBsWXNTV1Vzc2pEUzRoWnltMjNG?= =?utf-8?Q?rAY2u5N9lvuZbOTZZ94k7gTPI?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1e7d3cfd-5e2a-4d61-8be6-08dcf837ed57 X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9626.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2024 16:37:07.2078 (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: qrYj5NA5uinB3/4fvDB1Rq3BogkWoXiBukYQ+G22MBnvEZLkmG4913KqEpHUIUW2fNvlfhxI4gbCe4jn85uymQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7577 Remove cpu_addr_fixup() because dwc common driver already handle address translate. Signed-off-by: Frank Li Reviewed-by: Manivannan Sadhasivam --- Change from v2 to v7 - 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 04:41:47 2024 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2058.outbound.protection.outlook.com [40.107.20.58]) (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 ECE1B1DB37A; Tue, 29 Oct 2024 16:37:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730219837; cv=fail; b=HS5/ESKFPAuQz1ajmDid5BpsW7qx8RR/2xcSoY8gaW/DTrihmtCUlUJc8IFXDdVIuUmk+X4w7k/Wv5DmmJgaJk2IS3n8c4rX4r2zdUd+CPMOpMYo8ZPSTRg0voo5J2UA85HRPRfVVsuTFyEt0wZ5fXp4Ti9btqBeIuspo01FjOI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730219837; c=relaxed/simple; bh=UZs/9ItHp52qTaKjFxZYB4V5+jvB1u6qYUMVnsusbtc=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=Rg5ivO2+oMnYKtF2lHr6jzXCl4JfScenSuzZv+y/HNSIrlVEYvOa8+us2J5vVMiioEaefL99xWFAJlGYErC2DVQ4wTmEx9krfzIYVSmD0zu87wu7gaAR/ccnYxfIxJSSxXL9zsxUbx3RSJP2QG2QRo2F/vMrrkBUSBixU0UPJWU= 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=lxVMvKBb; arc=fail smtp.client-ip=40.107.20.58 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="lxVMvKBb" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=L7Jth3E+fJdus3LnAmz2khReek8JkSC0lOvN8RA8aBa784ChUbwlwR68KUK3Hr+KlEbpmgDFz/ua0y/Oo3IRKb64pZ9Jy5UhVlFJgIsBJ/R4s/+6yHrRtd6OIv/LEk0u46tPY7K+CifYFu4lVfwoPidNj+foXtQeYAU4uIFiQs3LhSrJTQPg+TTGGssU965/I1FX5tFpzq2c+LKYasrKrsFlZqblXVLrIi2NbKxhcs5DuzgpWN5DG6rJnvga1xPxuIgU+GcOtSSzJBHkKKSna5V4npS/yKSX7mrJWyV2Ev4GoHswQgdQrJn08iVIeOSc1EJciWKKypVMWzBjaittqw== 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=R8W/MN5dTLwVKfDTf/LqjNNpJdK6uYbSr2j3BbcfCR8=; b=nkxYPL0K27obdxLuuRiyDQ7Y9yapw6maGga0iIkNyVr4ogoggA0av4eo8HFAdU3J/PElOk6OHnZ+S2J77S6sKNAoFDSxtkW/IPfNMsMU9yS36f0tHWxoltXvDXmh8iQArVgaO5psStiYmaCvfqghN7ArRjLDqZI2YglCutNs+uNyYO+1IEYoGVnp7Ej/dRxf35UGJjxcCjnKN7RB4Ntzg2qeVtl3iGfx405m79TSK50rjckgO5OEre/QKPgmFobFBz8LFl3/sL04SYelFFRPprO4OibbDL7l9rTP72doEygutHqBvU9lF0aOa8SLBDBSEW4Sx8zse4Ra9/QsqZVB/w== 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=R8W/MN5dTLwVKfDTf/LqjNNpJdK6uYbSr2j3BbcfCR8=; b=lxVMvKBb4SP5DU7U+SPogvjJIz55a+eKqURcUXExzC4TfWGFNF+qqO21Ye2uvU+J0iR40Ro/ueyqfC0UGSjBMxI4nikOI3B2viEge/TBS7kFYc4I44rxnsz97Qxqvwnsd/dC4zqrlmGlyD7nv64F37CZuWzu3sWwtFUIyiFiE5FsVzjG/FSp1wqk0lzUXAzlY/jBRPLOfW65Qh/jBeA/4Rh6RTLq3lhAPvzPSafyX2+QLSkINrCjIrBrehASa3fregL2zA3G4JiZiTymtZGZJ7LHTDXAb0nQCiKL8vnGKY77DRDevzXnWQBDKA28Dl0y9bVS0fDF4J4IWIFiqbQeZQ== 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 DBBPR04MB7577.eurprd04.prod.outlook.com (2603:10a6:10:206::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Tue, 29 Oct 2024 16:37:12 +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.027; Tue, 29 Oct 2024 16:37:12 +0000 From: Frank Li Date: Tue, 29 Oct 2024 12:36:38 -0400 Subject: [PATCH v7 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: <20241029-pci_fixup_addr-v7-5-8310dc24fb7c@nxp.com> References: <20241029-pci_fixup_addr-v7-0-8310dc24fb7c@nxp.com> In-Reply-To: <20241029-pci_fixup_addr-v7-0-8310dc24fb7c@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=1730219803; l=2245; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=UZs/9ItHp52qTaKjFxZYB4V5+jvB1u6qYUMVnsusbtc=; b=4epCvFW/6EZO1xZs7xlAeOR1Zr2YfkWMVGeyHsFEPIYCOd+4quY/T3i3rit7D82dIGNoJ+0dB 52tIcdI/Eh9Bio8LLIbzAzvLjpbpDzNd0e04kopNakSKKDav2T95wch X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BY5PR13CA0035.namprd13.prod.outlook.com (2603:10b6:a03:180::48) To DB9PR04MB9626.eurprd04.prod.outlook.com (2603:10a6:10:309::18) 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_|DBBPR04MB7577:EE_ X-MS-Office365-Filtering-Correlation-Id: a3c8e11b-850a-4637-b0b9-08dcf837f062 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|7416014|52116014|376014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?UUM0VDh1akdudEsyN2tYVjVyYnNMZ2ViN2pqUmEyb2g5ZndZaklxOUFaanZJ?= =?utf-8?B?R3EvbWNacEZlZnp5NUdoeVUzVnZJaDZQS3dxcGRLV1B6N0VrSnZpK0U2L1Fh?= =?utf-8?B?dlZZbzlhY1VwZmxMTno2b2N4WjBCN0p5cmwvQTlhVXpNWlBYRE5NYWQ2bkhr?= =?utf-8?B?M0MxaVpmSHZJUER3N2ZXNVJIMmo3cUJmWDEyc3JyR3dhVVFHMjY0Zm5YQ2Rr?= =?utf-8?B?elhabzJMR1NibzF1bUlDb2ZnY1hPWXpuQVN6OFFPcUxYMjVtYVFMaFJMeXRh?= =?utf-8?B?QTNJcSt1dVlqUGFuUzJzMU5LcUhZeTE2WEFXRTNQTUM0SXF2V1dxWTJBaWlH?= =?utf-8?B?KzVwMGdFRExCMHh6dzNjTXc5a2FaSjg2M2VoNUNOcndWQThzOTB5ZkFzL0pZ?= =?utf-8?B?M0c3L2lPcGVsZ3hpMVpTZ2VQNkczdkJHWVhaNlNoMTlqbnV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XS1ZFZk9NK2ExbWZmSXB1b01M?= =?utf-8?B?NUlsNUFMRmR5M3N1YWhxQVBkWjBUMWJaTmkyTE9DeGlWZEloL1BFNGF3UDhn?= =?utf-8?B?NGQ1V2IvVUlCeFpmZENpTlg5bnNLYjVwQ1lPeXhVU2pzeW8valM0cXhtbFJq?= =?utf-8?B?LzNmS2dWUkhNTEdWZ3ZDTVpkdDREcHAxVWFQNGk0empWNE9tUnFJLy9NN2Iz?= =?utf-8?B?S2Jic2NWN25xalhSaXR2eVVzbGx6T2s0b0htRWdkM1FDVGVGN3ExVTdRMmpo?= =?utf-8?B?Zlh4TXRYWmdSRkcxdnBkUEJpU1NTTEFVQVJPZ3c2UHRhcytmWnhuTDMzYlpH?= =?utf-8?B?Q25wMzRTZU1hUWp1TkcxZ0ZNQjN2RXFrMTFnWEpYOFRXOFBwbGJrK3hITExI?= =?utf-8?B?eEo1VkQ3Z3dFN2VqQUpnWUZGVlR2aitHSk15bW96eHUyT1kwNWF0VHVVYlVa?= =?utf-8?B?N0hORnd3WVJCUXVkKzhKTlZ5d1JaY25TR2YraUVxV2ZEWE1valRNa1RUMnpu?= =?utf-8?Q?BgB8Ovp/Eez5t?= 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)(1800799024)(366016)(7416014)(52116014)(376014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eml4V1dJNnVLUDBzWmJ6M2lTUU5BZTRpWEF5Z1JPa1BMRjJqS0Frd0Jxbll5?= =?utf-8?B?WjBLNVI4UnZqYzJzRHhnU1B3QTRrRnkzTG51R1pnOXpJa0hPTDFkbzBVd2Yx?= =?utf-8?B?M1dLUnFWemJuVnptdzB2NmNaelZkWHpCV2hnazQ1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JQbG5xa0xmNFUvczgwd0prZnFOVGJOaVFtYk42SlhHRE9JblJ3?= =?utf-8?B?Qk5tUWpLeHRrZ09xdXo2TVZ3RmtMNFYxczJuZWZNUjU5LytsVVdTYXhUcXlR?= =?utf-8?B?OVZIQkZZZzBjVi9BcEZaOWFuNDhWLzl4dVEvSmorUkZ5bU40VEV1bGc4c3gv?= =?utf-8?Q?4tQroFwPl12X6ASUobgWuI/EF?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3c8e11b-850a-4637-b0b9-08dcf837f062 X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9626.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2024 16:37:12.3294 (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: ooMA0Hj/I63qBY0jcnHG5f9ucnmdZgGpGbkFEA+y9VbwVMOZNE+W4CNMBXIuWYSr0Vi0fcL7Uy8OaZSjeOkSzg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7577 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 v7 - 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 04:41:47 2024 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2074.outbound.protection.outlook.com [40.107.20.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 BAA3B205AD5; Tue, 29 Oct 2024 16:37:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.74 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730219842; cv=fail; b=Qg15utxid0od7I6GT7k7nLKcOKjnc5WzwuHvBV2NjRIrYaCd3dR0woC4dz1GbWUYe7uB4SauhTufAKDcc5HTAU45BSNs4n29nZpQOxL1giZj+IApB5KJZ3NUm0z+k2M9kgnuHep97B3Dj8Y1kDW7Xv9da/ll2PkKWft5FUOLfAE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730219842; c=relaxed/simple; bh=lrLx8Z8SxZT/oJjco5fJswD/ZWUdBilHEZbhlGAZNXk=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=c7B7UHcMaB7zzwgxKOFUusjcSl2+8+72sGZFAx1JwyMNXMfFQwOuY8bbag9uwxd0iImQzsLCDvyo1aHRMePrgPcckdPuvVHFEi7rljuTZ6YnXrU+kVwkIlzW9iBSQ0qAj9srNUFRygutho0LJDclGBtzfpEzd1bX8fjcOWbLsck= 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=Vw8SfGzD; arc=fail smtp.client-ip=40.107.20.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="Vw8SfGzD" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dpindFmvBhlBe0ioOH4j4fJVGyJtmGuJNJCRs8+goRnLLIYvumA9Ffcg7z/MwA1A3HANZZN2oi9UCJWif9X9H1Y+ZnumLIditKhbfETycwtu9r/ZKeC/lgJbfI0WAa6NC5N0AC+mL/UMHo+QU5qAXlAUTHxRI+eg9CymeUXgTv2yqjaVym5VqIU0a8o4NO73YknU32lUOzkVXYJVSQT7Rsm/yn7I4twecjSntZEecGeG3z3u0Z/uD/KwkMSjZLYtZ/zKhx0hWRfP3GokGKrA9kiI32MPZnkeIrAv5+75kzbM3ejtkhZzq3mqxSKfEQU9Zp956YbOom/SLFdmaDHk2A== 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=rH+/ieqErUrPjrX69gEMyYnDDWNyEiJyuGTkw/pz68o=; b=jwml2pKyRZFNm1kpLvLVSueLkm3j76A420rq+kNfrqnXJkXDpyg+PX1FDilEGz//L3ABZxNSKMHp9ZsH8VrzBBoM2JiyFsdEEX8NDiZuIl1W1MbuCMqk8Lx58kXrXi5zWlbzcLy4CnXdz2xqKwlT9mQ7nmiT/JdcQr6+jwY1FHBds2RDiOYmbJCBRaMNGkRArI33E0Ioe/jv5vtRBOYm4G4fllSoxzHU0VW4jNvkviiiGpRjohR+WWbnIESW2L9OsXC8nRI1j/UIerxQ4gBmEmyfBHjyBro7yKMcLY4JX3HB9C4eY9S4uqfQ7oEj6OBU5SR6iq74g8FNfOcoLyFdbg== 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=rH+/ieqErUrPjrX69gEMyYnDDWNyEiJyuGTkw/pz68o=; b=Vw8SfGzDGnK1O9XUvG7rqCMaq3A/VnueWFnX5f8xZMSatTxziRo6xhB4PwI/iEDElEWeJIbKS9iQqterOiTVWbOtKCxSa9w9U0krr4ypYMmI2CkSowEiezq5E1aRqWKf+H8vTG7RE+XFfqN0y35bESBpUPJnkNEoc5EDCopwO4ihknA6kn6GNJGxtbxkRTcjPW/LSFSwHybDsQ9BuKTIZ1CeGjF0wr/zHLoWDeYZnl7MZGHB9Vvfy7J1+7M9SeavyTpdNDuDiQAtybG2KwcPZgFD8TrYIxzzPkFt8Qoe8YwwMtWU37RxNhkPySDo6cA+w1QY6QBtUd3NXelHGKJRZw== 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 DBBPR04MB7577.eurprd04.prod.outlook.com (2603:10a6:10:206::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Tue, 29 Oct 2024 16:37: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.027; Tue, 29 Oct 2024 16:37:17 +0000 From: Frank Li Date: Tue, 29 Oct 2024 12:36:39 -0400 Subject: [PATCH v7 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: <20241029-pci_fixup_addr-v7-6-8310dc24fb7c@nxp.com> References: <20241029-pci_fixup_addr-v7-0-8310dc24fb7c@nxp.com> In-Reply-To: <20241029-pci_fixup_addr-v7-0-8310dc24fb7c@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=1730219803; l=1266; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=lrLx8Z8SxZT/oJjco5fJswD/ZWUdBilHEZbhlGAZNXk=; b=c00KuuZdG71AFNsfjgrrDHH6bo9k8MvyBrdD4imApf+17/aizFO9WqyddXoQ2iQWZILpwQFCA SiNNMyuFH0YB0NOmr/OPdMziMPNgryYxb7vlJ+sTTaGZ1cmaPJbkZma X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BY5PR13CA0035.namprd13.prod.outlook.com (2603:10b6:a03:180::48) To DB9PR04MB9626.eurprd04.prod.outlook.com (2603:10a6:10:309::18) 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_|DBBPR04MB7577:EE_ X-MS-Office365-Filtering-Correlation-Id: 2147560c-08a7-4bc3-da26-08dcf837f329 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|7416014|52116014|376014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?NEJLVzc1RTJ4RzFmL01Zamx3Zm5nT1hKUm1zNEV0by9GYTRnZTZSNU1Lb0Ju?= =?utf-8?B?S1Z0SWY0emlTN21uOUt5MjUzWEtLS0NKRjRYVFhXZlFaaEFBaGIrWjduanlo?= =?utf-8?B?b3Z0TUt0QjdIRk40ZzZBMWNMaDlNMGl4THp1TkdEMVdzVElwWDhlQ0RQc0tW?= =?utf-8?B?QVJaU2lGZXhRNVpnNUI1cUNMbWdsNXZ6TVQxMVBueDY2ZXZva0tXSXJCb2Z0?= =?utf-8?B?enFjZEl5bVdiYTMyMXAxRzhuZVZQRkhjWkZUOG43V1paQ0ZhTXJsdHpWR01M?= =?utf-8?B?QmUvRk04NHJncUFuMU5WWVl0aUFMKzQ4TjVQeWpVSDFSMHhnc1lhQllNN0VR?= =?ut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nlJbnpOMEdOUStVbkw2c2NTSkxn?= =?utf-8?B?bWJtZ2ZLWkV1WWhsYVlxS21CUGdZS2kwSk5nUWoyUmQ0aVJxUTIzTmZtOXlD?= =?utf-8?B?SmlXeFYwc3haek52bllhdW11MktQUjJDVE1qM2wrTVVxMlAvSitnNjMwRlZ2?= =?utf-8?B?aHdMbXJDRUsranBrTXZnbGhBZ21KWXdXRUJkMkpyYWhsRk85dU0xWEU3KzR5?= =?utf-8?B?VEVrMWpVcElWL2hmT0ZDTzc3R21FSkV5ZkZxZitzU2dSQ1dDdTE5djZGVzVJ?= =?utf-8?B?bVNMaXVEd0NsTGlzaUdGSTBJaExFUXNJWU94NnFBVWVJQ1JDdHFBK0tFNmVh?= =?utf-8?B?Qnh4U3JBdkloVWgzbDJJNEZhNHhSZ3dUZjF1NGpyc0JWZTg3Y1dRUXpPOG1p?= =?utf-8?B?cVFtSjlFdjk5T1NCUUE5cEQvYndqNUxVQzVhdkdXbFQ1UE9lRjdtSXZ0M0lE?= =?utf-8?B?bm4weWoxZ3djcGlobWx2TjNma3pURERubVJIMFk5OTJ0TVkyUUlHUG1LbVVr?= =?utf-8?B?OTFGZnRteTJ6VHQ3eVNWSUlBQXIrellmTVVIUzNzdjVubm5vZ1pLMnpObHZL?= =?utf-8?B?V0MzWFA2ckhVaXhNeHV5QlVtYVAwWmpjMFFkZUJpcFBURHlYTW1qN2ZBM2ZX?= =?utf-8?Q?kUct+LP3Aur9B?= 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)(1800799024)(366016)(7416014)(52116014)(376014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bEMzTXI0MlVKUVd4ZnJWdVBmUjNiNTMxSG8vVW8yc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5HSjR0ZWpSYW1BcUVsUU9vdlY2ZUl3aXJaeHZ2d0UvemxM?= =?utf-8?B?U2R0T2xTbS9GSDZwZUExT1hIZm5FK1U3dVhBc0RMcHp2eUtHVHZ0eVFreTZM?= =?utf-8?B?S2xEeW5CQ3JoNi9BajFMSTJKN0lSMU1mRDRQYnZwVWJOcVkyOFJKN3p6MTZx?= =?utf-8?B?ek5hRDFLRTNCVmRkVWw1Q2VTZXY2VXk1L3NOWURKSlQ4bjdIL3JRZmdWVDE1?= =?utf-8?B?YmVIcHlXSlhUTWJaZnZUWitzNjNXZFk5akhubmpYU0Z0NERxUlI3ZUtHcHgz?= =?utf-8?Q?1Iz/wgJJZWlXsjye+LBmWCMHu?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2147560c-08a7-4bc3-da26-08dcf837f329 X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9626.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2024 16:37:17.1292 (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: otaB2Zp4WQOoW+y9BqzNW3i79gnu3skGBNxiPKGXjh/zm0QS9B+aD1FitXE/6Im9l7ObNyFqL6jOH0toMYxrwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7577 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->v7 - 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 04:41:47 2024 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2053.outbound.protection.outlook.com [40.107.249.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CDC16206E67; Tue, 29 Oct 2024 16:37:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.53 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730219847; cv=fail; b=TiVFNqsIlXBQm94Ulz1RK+wYxdguz/4V7y3VsSv045/6H5u2kA5oSd4JlgIgvy8raTM0Yps4b1uQKDF/KczPlRVWxBeqixjfWQ8RmtzNJaHeQm72tlBRqH5uakDjw4MbdjUzT49lDhx2fmLkN0P7m4nvWHpzvObtPpTqgfrlX2Q= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730219847; c=relaxed/simple; bh=ixQDYJyXuHUmAmlzLRMBWxuvNvNweOl8KqjaI6bcV3U=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=c/XDYB2MqcHoiLRSIaacErwHqwshZVaPI51wOi6gdLuq146Rl1P9PMcQP52qkWxyga/PvcM7vY7e1XRrGSKAgLLzOek1+OxD42laNPEqODUyd7MLD0OKDxLS1ORUbSf7oSLNfFoNTIXncws6mbBUGk7bVwKKEUIifRsmAF3GZPc= 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=RogeAcJ1; arc=fail smtp.client-ip=40.107.249.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="RogeAcJ1" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vjjUZEtdarYuod/5WDJaUVGKwdlkVZJCPcn/qHnHMzF6abaq0Db9F2EedvLD6xHzLPpdzkk2DtlLrLNjOd+ZjPfZTXwigHbNa3o08/9OcoHxZAoABOknJNQ+8RyU9GWpB/XeT/eB4d09gk4XH/nBTwPSeAR7L/rZ7IN4iZTfEgQ3/1jsj/TCm35FRc5/DkskbbVc9KRyVf2+aNkPD1xKpIvV1sHihxv6F9OzQIA6/dsp7uvYcoVnqWngn28wDP7d+08qxxqAqTbFKV3V52KiMfnCRkeF7vNNrICss5epnz7/IkmYUUSXUiA48NUrElJY9Cjfdf28PiWmGO2zeeN2EQ== 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=mAK1jmuAtg0H2cjB9iC8wvlwe8xRsTxVgM94PH4fUfU=; b=g4mzzs1wEUbIwKBzN+IfK95/zhyNQUCJzU0bK2JNyyOSw8plLUpy29E0WGE6G7NnLI7icPVgrPtTm8RyMBdQiw+ac20Id84q5hcBYaimwrRWEpMZCp1FRF3E8KwNhXA772OSwij5USJZHy6rEX34ZZyn/2d8B/DwvQe5YpA+szgLH6TOAutWnfiEYQbDBAImvSiLqSdlp8nhKgr35K2x5uDTUjdHydriKLSdcpTJN5ScHWwpCOMNAzIGE37T7vXdcOM6wdJqKyWfFU2xHPyVfpdp78kMR/Jp+lenJSdnHsr7W0fNGOHoeUZe2aFBkjaNzh99C4d35xDWXXnPSUeJCQ== 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=mAK1jmuAtg0H2cjB9iC8wvlwe8xRsTxVgM94PH4fUfU=; b=RogeAcJ1TjXit+FtFRWMnBe/E4AY302awcPm08U4wVDm+CppqQcbkSPHAlU6debBV1Y9zvPhKSQcbGg8wq3e7/gK+/Nc5lHEY08kKJOaw07ZDqhX1MRhQYHIEoOifhrYfe6LHGYT278JwLTHwVhBnN9hrnwt8wbKCHBSTIrfbrNCEV+iH4M4s4heNzo3lNInLQgyCcXBIZMPPAP+MnI1Xf+pllgTFOWlhJMKMJiYz4Y+ruO+mwTz4e0Zj9T7Gj6+ahM1Vabq1eElCbEiZN5rw/C+Cw5N6d58RX2gGSMQkbIg1LNfjSjuiG+9N5KHRSBZvKCjcQBhmMG2i/KrNDz1jA== 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 DBBPR04MB7577.eurprd04.prod.outlook.com (2603:10a6:10:206::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Tue, 29 Oct 2024 16:37:22 +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.027; Tue, 29 Oct 2024 16:37:22 +0000 From: Frank Li Date: Tue, 29 Oct 2024 12:36:40 -0400 Subject: [PATCH v7 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: <20241029-pci_fixup_addr-v7-7-8310dc24fb7c@nxp.com> References: <20241029-pci_fixup_addr-v7-0-8310dc24fb7c@nxp.com> In-Reply-To: <20241029-pci_fixup_addr-v7-0-8310dc24fb7c@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=1730219803; l=2548; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=ixQDYJyXuHUmAmlzLRMBWxuvNvNweOl8KqjaI6bcV3U=; b=ZR6A8qNeIAYIe8Ph71ciCpzXbLqQYWQXs8YoteOpdZhXLGpAGhyXH345js0CyOgwJBiejt6K0 d9zLkq/wclsDnlAUIFVLSq+dWJTJAnmwfeKWhZ76wQ8E2vJlQnGjfoK X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BY5PR13CA0035.namprd13.prod.outlook.com (2603:10b6:a03:180::48) To DB9PR04MB9626.eurprd04.prod.outlook.com (2603:10a6:10:309::18) 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_|DBBPR04MB7577:EE_ X-MS-Office365-Filtering-Correlation-Id: 1606a36f-a823-4388-7cbe-08dcf837f612 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|7416014|52116014|376014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?ZGdWNzJYWjl0QTFqbERMa1BESXFFWVZVdXdhWlFoVk1BVlhSaXUrZ3JkVC81?= =?utf-8?B?Z2JGQmc1czZLM0dmWVNLekhkZmZOVStZR1FuZWh0bWpjYUQ0Y2ZabHlYNWFC?= =?utf-8?B?S2JVSXV6d0VXelc4V0tYN0tYZEtrTzkwb1liT0tGMG0vbHBsMzRZWjMzZGdD?= =?utf-8?B?ZkNiT2dJTy9KMGpacUJhL2RZRXY2MXVEQ0ovYzdBYS9tV05RbW1WeUQyRjVK?= =?utf-8?B?TEpnLzR4TGpwankzZ2c3V245Tzh6eC9hbWV1ZXhLY3l0TGRJUzBSUG10V0J0?= =?utf-8?B?ZXRXdHJmQ3NnL2tGUGhTZEVKL1Ayd2dnY1lLNGJqd0xsRVVSWVhGLzlEZXhz?= =?utf-8?B?by9HRlhnOFh4VDY2WE5HM055b3FaZzBkUUxMZjBDMlBzVkFkdlcvSUlqajVr?= =?utf-8?B?Tnl4a0U1R2h5emhSeVdGL1ZQU1VVcUZJNnEza1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qm1yUmNjQ0MxS1gxdU1KSW15MGkvQmlF?= =?utf-8?B?M3FoeGR5eHgxTEJNU0RER3pBSzdITDBBeTk5RXpsclNNUnBYZEJ2VGhlS214?= =?utf-8?B?N3B3NWlsQUJxRFdQNGhTdGMvMjZMR3VoMWs1eWtmRWVhQm9xMWUwekduTXc1?= =?utf-8?B?ZzJlcS9mWENJMVdnU0JaQk9PblNhdU9xbCtGbHlJWGRFNFI0b2Zkb1pUdC9X?= =?utf-8?B?SkZZQ0RkbGVKdlVQWVNRSFFaTldxQ3ZzUlNqaGQyaEJoY3YvQmt1dmhBUm8x?= =?utf-8?B?anpXKzRoWVUvZXhvZnN0TzdTQnk2ZFpHZThWSlVHc0RiNXh0aW5WV1dtYlB1?= =?utf-8?B?QVFaUy9jY3dWU2UrSXpqTEFVVGFqeERZL2ZqTXRZMHQ4NmJzWXI1ZUgvc3hx?= =?utf-8?B?TkN3SVF6VTZ6ekJ2SVRzVkQydG5NWEswQ2IxajloVDYweTg5cWl6TTJiMGVr?= =?utf-8?B?Wk1ISGMrWDQ3R3VPclpxRHduaHVvTjF3Ulg3TDlCRVcvUTk4c2htVmtEcWN3?= =?utf-8?Q?2aLtQzoUEfflJ?= 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)(1800799024)(366016)(7416014)(52116014)(376014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UzVMaEdKNTNQQWRIbnRiWkh6SHZsVk1wTDVJdkdIZXpzQm9MaWtVRWt6OGov?= =?utf-8?B?QnN4Vi9YUFVVSkc5MTVlUVFzMmF2WldFKytUNjd5QTZBVzNRODlFQlNoYVJY?= =?utf-8?B?TE05cVBzS3Bpd3NSczMzY2ZvWWtnV21hT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Y1FqelFxWHVBOTFwdW5lOEkrb1JHZnZxZUtxajVrei8vcnNsV284?= =?utf-8?B?WmtoRWxtdlJFakZYdEdPd256MjIxK1E3MVpkQk03aGdaYTRwVlp4OHRidUg5?= =?utf-8?B?WW5IMHdWbFhodGJYSWVmZWFiRGlmVkM4QnM0MVU1cDZVUXIyM0dGRW9GeGxF?= =?utf-8?Q?w2OgzqwuPDLGP5zub3eSC910J?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1606a36f-a823-4388-7cbe-08dcf837f612 X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9626.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2024 16:37:21.9389 (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: XNdJ3e5DblFkhIQSATpwjcg+vxhj00ZALCMQ18ngz3vWmZYEprdD6KbzSwuKAOYDSum6HewaVY9O20TtkmP+TQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7577 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 v7 - 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