From patchwork Wed Oct 2 20:47:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13820367 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 20BB1CF31BA for ; Wed, 2 Oct 2024 20:49:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:Date:Subject:To:From:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=sXi+j0EV0CJc/u/p3PXyNKxvwE4Wq3Yfw/N/ihHs1ms=; b=NaTSeA66DV1OrAinOZq/MqicSH ZjmhCHlBAxzRxNueHgLeyufeqlsKCT0T+i+Ezmfj0AQvLTKz2s6PJCYYCBPVgLo2veRe2S9S2KyHY xXLNi39BOWKWwJo21Ozl18rm74ReAUKKnUm8FUjxrzZo/Uk2Eyim+WIZgM11dWJ7q6n0939ImT1Dt maEnINes8B0Y8cooCbx1qs3xvToyrWkBs6yO9UG39H6+oGo7MAvljRwtoI9ciEB/pxa7FDg0odC0I WvkUYNFSN7YAAl5xJNi8ikNTBZx24JKxBXJdS0SIzfdBSMbLAko5ctlgrq17pJJFyg2H/7OlHxPE4 pGcil0Ug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sw6I0-00000007ROZ-3X7Y; Wed, 02 Oct 2024 20:49:40 +0000 Received: from mail-northeuropeazlp170110001.outbound.protection.outlook.com ([2a01:111:f403:c200::1] helo=DB3PR0202CU003.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sw6Gj-00000007RAJ-3N0f for linux-arm-kernel@lists.infradead.org; Wed, 02 Oct 2024 20:48:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BS7v8HqdY3ue5WPiD562Wcxx0kjICiityY+UZTxw7KR8qGDoEt9zooDbMmsTiBxOKbgzCu9sjGmqkjYWBUeZXCJ+H62Mk1LbXDpJgj9ur1ykDJroKY2BOwZtvDbRU2pYXO9P1oH0rCkhWf2/VR05GSowvhupB/3ogdu3/bnAtDnvU+ZxoddauH+jIV2LuNxa3wn/lSZTUsl/BvaQoW01lHGIPxHdT8qtSKEAbJiCeI+zTO6HNDDKvb800SzlDrnt3TR6PXbJ4mQAZvSdCpvWo5NM5Tzpeg59duHzetW3FQ23P/m1G0LMtBnh09x/RjgE1Ad5rNSGrUnYFnskfYr1UQ== 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=sXi+j0EV0CJc/u/p3PXyNKxvwE4Wq3Yfw/N/ihHs1ms=; b=EvByI9W1lX706n50xqzL7wqBT6SzdCRxuzXm4/lYx0S9mc1ON0LU2gO+o2QJ7U2PzSk6wIMlQquwS9HPFdZo+2NXVSbhJ4535bsMsUayVz0W0aDgruE5ldij3u2/jGAei3tWvoK43Z7Oikag9AgRkKjKR7Q95PSOVbf5d/RYhfvPar4+L4bhhbDj7SJbUKCofsl59Kv/BXF6QkHa1bsqBsAl2jEM0j25f55CH8RY5sXVGr0ascuVIxA+/dNXhSlJFmqivNxHoRKnNj53VxTXofgjH4+TeYXr8JZgJx1j5Xp4BEVMiCbIwqXyYRLlMl+ZfI0ctA7A+eIspQPlFL2nZg== 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=sXi+j0EV0CJc/u/p3PXyNKxvwE4Wq3Yfw/N/ihHs1ms=; b=QU498d2cWvgbXRHth2o7upM6t7y3Bf1AzL+dLEh7u4RkK0ryu/jKZITjN1HbKFYfJi+MxN8wGXOV8QTNe8a4KUYV3FwxxFqxM/tm75X5I0Kn57XCRRBJv0otM/i2tcT8FoOHtLAD7i4AwzsZtB0XklA471UznCwLrtyb0rEnIGV+lV+Y3j7/9NJvEkfCfc3B7YWpAS1pCBghUrx40UHdIvdrZZNmjU3Ad//4wRmw3r9xQ/uNb0ClxauQ8OR+5cD7/eA7fx6w7VqlK5fCnNBYu6rUk1MCJ79iKb9OaiFCIUfVg6ki3OGUJGnQoNCjeY8+bZsa28vo6t/0JDfwAc9Akw== 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 AS1PR04MB9454.eurprd04.prod.outlook.com (2603:10a6:20b:4d9::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.16; Wed, 2 Oct 2024 20:48:10 +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.8026.016; Wed, 2 Oct 2024 20:48:10 +0000 From: Frank Li To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), imx@lists.linux.dev (open list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE), linux-arm-kernel@lists.infradead.org (moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/4] arm64: dts: imx8-ss-hsio: Add PCIe support Date: Wed, 2 Oct 2024 16:47:45 -0400 Message-Id: <20241002204750.597337-1-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: BY3PR05CA0048.namprd05.prod.outlook.com (2603:10b6:a03:39b::23) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AS1PR04MB9454:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e0af5a0-d64e-4316-7445-08dce3238661 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|7416014|376014|366016|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: jEqwuRbGNInLaVhy0nTGlxsW0Kg1ls6q1BGnSMMHiOd4/1lusfqH5HM2pZG3SygXWCxhWhzv4jq3Oc8rSkS4EXS9qxx2fKKCGHuLHdBA4HBz3GflAVH0Tbi/xsA4gbcsdWK8ywpaFe3yXsbLLx/ULHrpZSrXhVW0fXwh6uJYEgbS13aDPWGPynEhcOTbV6t2x0H7ShawMfugi8JyqGCvZCc5VIhwxnU28htaAtqSQ9slzbQnp5RKioCNjV2/NQdFFw8wxWHYoM/zJ0p8KeDrE3vECca/5gidywbU7lvjeOqU++ktLxNP1LnyS6xYHCB3R29afEJiEGS0l26S9QaBX3x6923C6GtZ8o+2vRYtK8fu12FxiA6tto2x7J+X6+n1JkAPQC4C6L69iTgeLvrUdhwB+6hR4Jm58p/41iX0kU6zzLxEXlvckLKxoVLF3pf1cdujuzkypjTnuaRxskk5DvMwFKDON1iTP64IoMzC0N7KFzGYyaiS0xSuHwspKLHIWPnqYAz8TWjXsgCpOPSZDmvYbAIitj2x3nxc18+4Z5y9ZAZmqMH8T3He4fYQFNY2SrFXkhWR7xUrY+OCnP0MM+DfqIWelJxCEgjBdX9F2dYobIsiP4X0RdoQVshX/NvdJlXMugs/kJ6WNrspnb4LaLz6c1Gt+bB4ntCnvMJRr8dcP3867t3AV8DUcpFlammFEJ9VsubZYWEttjAvbuoWwLSN4I1/7KWCagR7VYpGNlI9wS1XO6vCg4Y5zVL+9ETLOBUmzo/IMqZjslXOg/zqmv8OaKszH056bl/n9zUUNbYVrVZYamrzDkehHvQTKIvE3+dwv4NZvAqH8+3qvJHEV1vq6SS4VtNscZJXZNP39/9cpCbYeTyelA/ol+kYzpRBz4GRCvcjLLkkpVAqThqjJM685TdMcqLZ5OmNHDlEtzw53i42PTGjxbxpQ7h9Qb0Rssda+JQv3P5re6beeaaD4c94V3xhzN5T48lEs2T51vcMrLK3tj+RBT53fmn4ot/uaASxsqNlD1V4d0rx4dcBMh5CzJs7Nl5qoQ2aHjKJ1Tg3Sr+v35v8QXTZaJsWN4Qb9IwOhQsjGh5P7Nn4VwTYxtp6VfUR2lNVEXAJiQEavmxqwppv0lWejn6yEIoO+ig627QTrf7G1VB3H55ie+XgtrsaKRex0/EZvw7JIb1w3j2KaZDYPl7PV5UOHolpoa65BvQeLurJgyY51beYpgplV9++QSZGSWLdD89WPGz/O0fvWAJWmXEOaKZWL/FZezsTfpwg4AbPtVVZm2nd/bA4BWsnvGCWJzb7gTXuZJPiTC8E7FonmGdr0FutlMaC4Goi+SZ9Q+gSUfIIeL3O/QE9eRIODT/wggStLnIne/I7pbs= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(7416014)(376014)(366016)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 732722lDY1HGdCrvnfvYVUnMkSw/K3QVoQXfiLJ7sIXpHDcEnIK4YQ1wa6VUbDnZYyPpvDjE5fkTOLuP2ioBXI06rCYRi8Po/CezGArDHXhZg+03K+EDOt3kf0nt7NN5JecWLhsNiX/KrKr186g38JgW1c3omhIdbpGt87LWBhFDA2Ypdgjc+VjqcbIehvMs1TVlubIklPbQva9bocEt2oyijYQ/1uMpmOhshnSXXwW+vOhHmvzSfwLRb8vv6btE/RybfnkOSU+M3zPWocpGvv2GcjH39sOIB6vBlBxF3rNcfETg7nvdxDOsQ7C0etSUiEMXdl6LsM9/ZO6fl/xzkFbnPJiGj8473ErWNBY3EhXyiuB7FlCkXk9vdykjPh5AiuP5p98aW/uLvEn5KfCu4qWkM8pRqD/IoaB5KBwkuLU49PnRMm/QLjfcBQtieOq2p2sC9D6/dJn15+XAuY7uIqf3r9Z4PXWKO+eaFXO51I4XuTSYTDv3ctRoEYdsaacQxU+2Ow4jjVJK5zSd48G0tzzEwiG1OHrDx6K7rTQJnPmD9u+MKAgSqllOpTLm2Ewh3ZsJHl2/WcpamiAVwxkq7kwoejRzdR14Alc6jP9GZ2sbe6Toem53Kr6mKLGNmk85z7WkpW4UAVTrOJPAAtNG/G6Y4+KpCpDAI+1JOuWre0j1gSDc7Gq9n9S84tsdMIjBKVeoOtvHhTnlW+tJc2YDgFWj2Y3eaC8eBoKbRWC8zwUHBxv3q8QpCBtE18VBIFdsUcwLFqyBbF44ZJuMB+adYO6wFXBftlHSjFX3L2HXeYK6IElM1Nlw9qTfx31wKITdPJI5Ggk97Qp9tmuKCfWxhVBN1iFqIFFtKBNLzBOCyZNwSWdhO5aTyIyPHkentZm1F6VdtB+5RjdQbOlyByzkmCMRLfEIu3vNkhF9lZy77I1W5IROw58ONnFqE6f4uDBXKWPMOp9bRH+S7HQgxT/UrWfl16csv1x4beKSMn1KiaHMyD1IIM0w+gvKljHW2Dw+ITO2uuBMoi16orCm20PwlC444xzj5k3lvJlWdqcvs5wKn1qRb5vuuZmIsCg/4C9U0rtaJxHA1nZIO1F68Vl4AzbU/EHVxrw1634Q3DbgkGGlLG69V+vsu1Wk05FQ3LjjkbPa3G/KOerxDjoEhjq05bfnWEj0lytsQaCQ7avmwp5nh45cVtVSIPlr8VL4f9STLFZrE2WwlUPJo/YXImdgXkYWNh13aHmfKAXlBcH2pt1+x3ftYO8RtTwKZv5eGeXGS0PxSQwJus7ncg6RYL+pve46PdwblxEEi5CN7po3x4Gh6dpDqeLwWus2KCS94Ow0vCjB1OZFkgU8kN+lDp+WuUpcDPuxdc7CbZrcMotfUpdd0iv1WihEzdZe8iYB9QtrrEjaLHoqHZTfF8imoIHnz+e+3NQ4ITJivjArp+7aF15vwcEm8uzEhYAKWYP81X4EelZSEB0H0bURonbe+clF3EQiXPBK4Ra9JIEhXtMf6AuF9U3JFF9zVNv4mYJwTnm4/Gp5cir+dVG6lMAL9t9/RfBud0Da7e9MuFBiULRD10WngEy+W6iq/rMCxwQkqWVf X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8e0af5a0-d64e-4316-7445-08dce3238661 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2024 20:48:10.0571 (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: AlZgRoBalz9UJycmZb3GtgMM9+ZdjjXK2BDJyMQ2kCD9pmJWKocfB1JMaqw8HQ/Bsi9eLqGw04APc8wvE7rhWQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9454 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241002_134822_050530_53BD885C X-CRM114-Status: GOOD ( 16.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Richard Zhu Add PCIe support for i.MX8QXP, i.MX8QM and i.MX8DXL. Signed-off-by: Richard Zhu Signed-off-by: Frank Li --- On going discussion: https://lore.kernel.org/imx/20240930-pci_fixup_addr-v3-2-80ee70352fc7@nxp.com/ don't affect this dts. This work for with/without above patches. --- .../boot/dts/freescale/imx8-ss-hsio.dtsi | 123 +++++++++++ .../boot/dts/freescale/imx8dxl-ss-hsio.dtsi | 52 +++++ arch/arm64/boot/dts/freescale/imx8dxl.dtsi | 2 + .../boot/dts/freescale/imx8qm-ss-hsio.dtsi | 209 ++++++++++++++++++ arch/arm64/boot/dts/freescale/imx8qm.dtsi | 2 + .../boot/dts/freescale/imx8qxp-ss-hsio.dtsi | 41 ++++ arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 + 7 files changed, 431 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8-ss-hsio.dtsi create mode 100644 arch/arm64/boot/dts/freescale/imx8dxl-ss-hsio.dtsi create mode 100644 arch/arm64/boot/dts/freescale/imx8qm-ss-hsio.dtsi create mode 100644 arch/arm64/boot/dts/freescale/imx8qxp-ss-hsio.dtsi diff --git a/arch/arm64/boot/dts/freescale/imx8-ss-hsio.dtsi b/arch/arm64/boot/dts/freescale/imx8-ss-hsio.dtsi new file mode 100644 index 0000000000000..bf05cae05d27a --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8-ss-hsio.dtsi @@ -0,0 +1,123 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + * + * Richard Zhu + */ +#include + +hsio_axi_clk: clock-hsio-axi { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <400000000>; + clock-output-names = "hsio_axi_clk"; +}; + +hsio_per_clk: clock-hsio-per { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <133333333>; + clock-output-names = "hsio_per_clk"; +}; + +hsio_refa_clk: clock-hsio-refa { + compatible = "gpio-gate-clock"; + clocks = <&xtal100m>; + #clock-cells = <0>; + enable-gpios = <&lsio_gpio4 27 GPIO_ACTIVE_LOW>; +}; + +hsio_refb_clk: clock-hsio-refb { + compatible = "gpio-gate-clock"; + clocks = <&xtal100m>; + #clock-cells = <0>; + enable-gpios = <&lsio_gpio4 1 GPIO_ACTIVE_LOW>; +}; + +xtal100m: clock-xtal100m { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <100000000>; + clock-output-names = "xtal_100MHz"; +}; + +hsio_subsys: bus@5f000000 { + compatible = "simple-bus"; + ranges = <0x5f000000 0x0 0x5f000000 0x21000000>, + <0x80000000 0x0 0x70000000 0x10000000>; + #address-cells = <1>; + #size-cells = <1>; + dma-ranges = <0x80000000 0 0x80000000 0x80000000>; + + pcieb: pcie@5f010000 { + compatible = "fsl,imx8q-pcie"; + reg = <0x5f010000 0x10000>, + <0x8ff00000 0x80000>; + reg-names = "dbi", "config"; + ranges = <0x81000000 0 0x00000000 0x8ff80000 0 0x00010000>, + <0x82000000 0 0x80000000 0x80000000 0 0x0ff00000>; + #interrupt-cells = <1>; + interrupts = ; + interrupt-names = "msi"; + #address-cells = <3>; + #size-cells = <2>; + clocks = <&pcieb_lpcg IMX_LPCG_CLK_6>, + <&pcieb_lpcg IMX_LPCG_CLK_4>, + <&pcieb_lpcg IMX_LPCG_CLK_5>; + clock-names = "dbi", "mstr", "slv"; + bus-range = <0x00 0xff>; + device_type = "pci"; + fsl,max-link-speed = <3>; + interrupt-map = <0 0 0 1 &gic 0 105 4>, + <0 0 0 2 &gic 0 106 4>, + <0 0 0 3 &gic 0 107 4>, + <0 0 0 4 &gic 0 108 4>; + interrupt-map-mask = <0 0 0 0x7>; + num-lanes = <1>; + num-viewport = <4>; + power-domains = <&pd IMX_SC_R_PCIE_B>; + status = "disabled"; + }; + + pcieb_lpcg: clock-controller@5f060000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5f060000 0x10000>; + clocks = <&hsio_axi_clk>, <&hsio_axi_clk>, <&hsio_axi_clk>; + #clock-cells = <1>; + clock-indices = , , ; + clock-output-names = "hsio_pcieb_mstr_axi_clk", + "hsio_pcieb_slv_axi_clk", + "hsio_pcieb_dbi_axi_clk"; + power-domains = <&pd IMX_SC_R_PCIE_B>; + }; + + phyx1_crr1_lpcg: clock-controller@5f0b0000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5f0b0000 0x10000>; + clocks = <&hsio_per_clk>; + #clock-cells = <1>; + clock-indices = ; + clock-output-names = "hsio_phyx1_per_clk"; + power-domains = <&pd IMX_SC_R_SERDES_1>; + }; + + pcieb_crr3_lpcg: clock-controller@5f0d0000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5f0d0000 0x10000>; + clocks = <&hsio_per_clk>; + #clock-cells = <1>; + clock-indices = ; + clock-output-names = "hsio_pcieb_per_clk"; + power-domains = <&pd IMX_SC_R_PCIE_B>; + }; + + misc_crr5_lpcg: clock-controller@5f0f0000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5f0f0000 0x10000>; + clocks = <&hsio_per_clk>; + #clock-cells = <1>; + clock-indices = ; + clock-output-names = "hsio_misc_per_clk"; + power-domains = <&pd IMX_SC_R_HSIO_GPIO>; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8dxl-ss-hsio.dtsi b/arch/arm64/boot/dts/freescale/imx8dxl-ss-hsio.dtsi new file mode 100644 index 0000000000000..f3104e205ae89 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8dxl-ss-hsio.dtsi @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +&hsio_subsys { + phyx1_lpcg: clock-controller@5f090000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5f090000 0x10000>; + clocks = <&hsio_refb_clk>, <&hsio_per_clk>, + <&hsio_per_clk>, <&hsio_per_clk>; + #clock-cells = <1>; + clock-indices = , , + , ; + clock-output-names = "hsio_phyx1_pclk", + "hsio_phyx1_epcs_tx_clk", + "hsio_phyx1_epcs_rx_clk", + "hsio_phyx1_apb_clk"; + power-domains = <&pd IMX_SC_R_SERDES_1>; + }; + + hsio_phy: phy@5f1a0000 { + compatible = "fsl,imx8qxp-hsio"; + reg = <0x5f1a0000 0x10000>, + <0x5f120000 0x10000>, + <0x5f140000 0x10000>, + <0x5f160000 0x10000>; + reg-names = "reg", "phy", "ctrl", "misc"; + clocks = <&phyx1_lpcg IMX_LPCG_CLK_0>, + <&phyx1_lpcg IMX_LPCG_CLK_4>, + <&phyx1_crr1_lpcg IMX_LPCG_CLK_4>, + <&pcieb_crr3_lpcg IMX_LPCG_CLK_4>, + <&misc_crr5_lpcg IMX_LPCG_CLK_4>; + clock-names = "pclk0", "apb_pclk0", "phy0_crr", "ctl0_crr", + "misc_crr"; + #phy-cells = <3>; + power-domains = <&pd IMX_SC_R_SERDES_1>; + status = "disabled"; + }; +}; + +&pcieb { + #interrupt-cells = <1>; + interrupts = ; + interrupt-names = "msi"; + interrupt-map = <0 0 0 1 &gic 0 47 4>, + <0 0 0 2 &gic 0 48 4>, + <0 0 0 3 &gic 0 49 4>, + <0 0 0 4 &gic 0 50 4>; + interrupt-map-mask = <0 0 0 0x7>; +}; + diff --git a/arch/arm64/boot/dts/freescale/imx8dxl.dtsi b/arch/arm64/boot/dts/freescale/imx8dxl.dtsi index 7e54cf2028580..76de3db8b9423 100644 --- a/arch/arm64/boot/dts/freescale/imx8dxl.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8dxl.dtsi @@ -237,12 +237,14 @@ xtal24m: clock-xtal24m { #include "imx8-ss-conn.dtsi" #include "imx8-ss-ddr.dtsi" #include "imx8-ss-lsio.dtsi" + #include "imx8-ss-hsio.dtsi" }; #include "imx8dxl-ss-adma.dtsi" #include "imx8dxl-ss-conn.dtsi" #include "imx8dxl-ss-lsio.dtsi" #include "imx8dxl-ss-ddr.dtsi" +#include "imx8dxl-ss-hsio.dtsi" &cm40_intmux { interrupts = , diff --git a/arch/arm64/boot/dts/freescale/imx8qm-ss-hsio.dtsi b/arch/arm64/boot/dts/freescale/imx8qm-ss-hsio.dtsi new file mode 100644 index 0000000000000..6494f55d33f85 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8qm-ss-hsio.dtsi @@ -0,0 +1,209 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + * Richard Zhu + */ + +&hsio_subsys { + compatible = "simple-bus"; + ranges = <0x5f000000 0x0 0x5f000000 0x21000000>, + <0x40000000 0x0 0x60000000 0x10000000>, + <0x80000000 0x0 0x70000000 0x10000000>; + #address-cells = <1>; + #size-cells = <1>; + + pciea: pcie@5f000000 { + compatible = "fsl,imx8q-pcie"; + reg = <0x5f000000 0x10000>, + <0x4ff00000 0x80000>; + reg-names = "dbi", "config"; + ranges = <0x81000000 0 0x00000000 0x4ff80000 0 0x00010000>, + <0x82000000 0 0x40000000 0x40000000 0 0x0ff00000>; + #interrupt-cells = <1>; + interrupts = ; + interrupt-names = "msi"; + #address-cells = <3>; + #size-cells = <2>; + clocks = <&pciea_lpcg 2>, + <&pciea_lpcg 0>, + <&pciea_lpcg 1>; + clock-names = "dbi", "mstr", "slv"; + bus-range = <0x00 0xff>; + device_type = "pci"; + fsl,max-link-speed = <3>; + interrupt-map = <0 0 0 1 &gic 0 73 4>, + <0 0 0 2 &gic 0 74 4>, + <0 0 0 3 &gic 0 75 4>, + <0 0 0 4 &gic 0 76 4>; + interrupt-map-mask = <0 0 0 0x7>; + num-lanes = <1>; + num-viewport = <4>; + power-domains = <&pd IMX_SC_R_PCIE_A>; + status = "disabled"; + }; + + pcieb: pcie@5f010000 { + compatible = "fsl,imx8q-pcie"; + reg = <0x5f010000 0x10000>, + <0x8ff00000 0x80000>; + reg-names = "dbi", "config"; + ranges = <0x81000000 0 0x00000000 0x8ff80000 0 0x00010000>, + <0x82000000 0 0x80000000 0x80000000 0 0x0ff00000>; + #interrupt-cells = <1>; + interrupts = ; + interrupt-names = "msi"; + #address-cells = <3>; + #size-cells = <2>; + clocks = <&pcieb_lpcg 2>, + <&pcieb_lpcg 0>, + <&pcieb_lpcg 1>; + clock-names = "dbi", "mstr", "slv"; + bus-range = <0x00 0xff>; + device_type = "pci"; + fsl,max-link-speed = <3>; + interrupt-map = <0 0 0 1 &gic 0 105 4>, + <0 0 0 2 &gic 0 106 4>, + <0 0 0 3 &gic 0 107 4>, + <0 0 0 4 &gic 0 108 4>; + interrupt-map-mask = <0 0 0 0x7>; + num-lanes = <1>; + num-viewport = <4>; + power-domains = <&pd IMX_SC_R_PCIE_B>; + status = "disabled"; + }; + + sata: sata@5f020000 { + compatible = "fsl,imx8qm-ahci"; + reg = <0x5f020000 0x10000>; + interrupts = ; + clocks = <&sata_lpcg 0>, + <&sata_crr4_lpcg 0>; + clock-names = "sata", "sata_ref"; + /* + * Since "REXT" pin is only present for first lane PHY + * and its calibration result will be stored, and shared + * by the PHY used by SATA. + * + * Add the calibration PHYs for SATA here, although only + * the third lane PHY is used by SATA. + */ + phys = <&hsio_phy 2 PHY_TYPE_SATA 0>, + <&hsio_phy 0 PHY_TYPE_PCIE 0>, + <&hsio_phy 1 PHY_TYPE_PCIE 1>; + phy-names = "sata-phy", "cali-phy0", "cali-phy1"; + power-domains = <&pd IMX_SC_R_SATA_0>; + status = "disabled"; + }; + + pciea_lpcg: clock-controller@5f050000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5f050000 0x10000>; + clocks = <&hsio_axi_clk>, <&hsio_axi_clk>, <&hsio_axi_clk>; + #clock-cells = <1>; + clock-indices = , , ; + clock-output-names = "hsio_pciea_mstr_axi_clk", + "hsio_pciea_slv_axi_clk", + "hsio_pciea_dbi_axi_clk"; + power-domains = <&pd IMX_SC_R_PCIE_A>; + }; + + sata_lpcg: clock-controller@5f070000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5f070000 0x10000>; + clocks = <&hsio_axi_clk>; + #clock-cells = <1>; + clock-indices = ; + clock-output-names = "hsio_sata_clk"; + power-domains = <&pd IMX_SC_R_SATA_0>; + }; + + phyx2_lpcg: clock-controller@5f080000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5f080000 0x10000>; + clocks = <&hsio_refa_clk>, <&hsio_per_clk>, + <&hsio_refa_clk>, <&hsio_per_clk>; + #clock-cells = <1>; + clock-indices = , , + , ; + clock-output-names = "hsio_phyx2_pclk_0", + "hsio_phyx2_pclk_1", + "hsio_phyx2_apbclk_0", + "hsio_phyx2_apbclk_1"; + power-domains = <&pd IMX_SC_R_SERDES_0>; + }; + + phyx1_lpcg: clock-controller@5f090000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5f090000 0x10000>; + clocks = <&hsio_refa_clk>, <&hsio_per_clk>, + <&hsio_per_clk>, <&hsio_per_clk>; + #clock-cells = <1>; + clock-indices = , , + , ; + clock-output-names = "hsio_phyx1_pclk", + "hsio_phyx1_epcs_tx_clk", + "hsio_phyx1_epcs_rx_clk", + "hsio_phyx1_apb_clk"; + power-domains = <&pd IMX_SC_R_SERDES_1>; + }; + + phyx2_crr0_lpcg: clock-controller@5f0a0000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5f0a0000 0x10000>; + clocks = <&hsio_per_clk>; + #clock-cells = <1>; + clock-indices = ; + clock-output-names = "hsio_phyx2_per_clk"; + power-domains = <&pd IMX_SC_R_SERDES_0>; + }; + + pciea_crr2_lpcg: clock-controller@5f0c0000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5f0c0000 0x10000>; + clocks = <&hsio_per_clk>; + #clock-cells = <1>; + clock-indices = ; + clock-output-names = "hsio_pciea_per_clk"; + power-domains = <&pd IMX_SC_R_PCIE_A>; + }; + + sata_crr4_lpcg: clock-controller@5f0e0000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5f0e0000 0x10000>; + clocks = <&hsio_per_clk>; + #clock-cells = <1>; + clock-indices = ; + clock-output-names = "hsio_sata_per_clk"; + power-domains = <&pd IMX_SC_R_SATA_0>; + }; + + hsio_phy: phy@5f180000 { + compatible = "fsl,imx8qm-hsio"; + reg = <0x5f180000 0x30000>, + <0x5f110000 0x20000>, + <0x5f130000 0x30000>, + <0x5f160000 0x10000>; + reg-names = "reg", "phy", "ctrl", "misc"; + clocks = <&phyx2_lpcg IMX_LPCG_CLK_0>, + <&phyx2_lpcg IMX_LPCG_CLK_1>, + <&phyx2_lpcg IMX_LPCG_CLK_4>, + <&phyx2_lpcg IMX_LPCG_CLK_5>, + <&phyx1_lpcg IMX_LPCG_CLK_0>, + <&phyx1_lpcg IMX_LPCG_CLK_1>, + <&phyx1_lpcg IMX_LPCG_CLK_2>, + <&phyx1_lpcg IMX_LPCG_CLK_4>, + <&phyx2_crr0_lpcg IMX_LPCG_CLK_4>, + <&phyx1_crr1_lpcg IMX_LPCG_CLK_4>, + <&pciea_crr2_lpcg IMX_LPCG_CLK_4>, + <&pcieb_crr3_lpcg IMX_LPCG_CLK_4>, + <&sata_crr4_lpcg IMX_LPCG_CLK_4>, + <&misc_crr5_lpcg IMX_LPCG_CLK_4>; + clock-names = "pclk0", "pclk1", "apb_pclk0", "apb_pclk1", + "pclk2", "epcs_tx", "epcs_rx", "apb_pclk2", + "phy0_crr", "phy1_crr", "ctl0_crr", + "ctl1_crr", "ctl2_crr", "misc_crr"; + #phy-cells = <3>; + power-domains = <&pd IMX_SC_R_SERDES_0>, <&pd IMX_SC_R_SERDES_1>; + status = "disabled"; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8qm.dtsi b/arch/arm64/boot/dts/freescale/imx8qm.dtsi index 3ee6e2869e3cf..ac9064a949d82 100644 --- a/arch/arm64/boot/dts/freescale/imx8qm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qm.dtsi @@ -594,6 +594,7 @@ mipi_pll_div2_clk: clock-controller-mipi-div2-pll { #include "imx8-ss-dma.dtsi" #include "imx8-ss-conn.dtsi" #include "imx8-ss-lsio.dtsi" + #include "imx8-ss-hsio.dtsi" }; #include "imx8qm-ss-img.dtsi" @@ -603,3 +604,4 @@ mipi_pll_div2_clk: clock-controller-mipi-div2-pll { #include "imx8qm-ss-audio.dtsi" #include "imx8qm-ss-lvds.dtsi" #include "imx8qm-ss-mipi.dtsi" +#include "imx8qm-ss-hsio.dtsi" diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-ss-hsio.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp-ss-hsio.dtsi new file mode 100644 index 0000000000000..47fc6e0cff4a1 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8qxp-ss-hsio.dtsi @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + * Richard Zhu + */ + +&hsio_subsys { + phyx1_lpcg: clock-controller@5f090000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5f090000 0x10000>; + clocks = <&hsio_refb_clk>, <&hsio_per_clk>, + <&hsio_per_clk>, <&hsio_per_clk>; + #clock-cells = <1>; + clock-indices = , , + , ; + clock-output-names = "hsio_phyx1_pclk", + "hsio_phyx1_epcs_tx_clk", + "hsio_phyx1_epcs_rx_clk", + "hsio_phyx1_apb_clk"; + power-domains = <&pd IMX_SC_R_SERDES_1>; + }; + + hsio_phy: phy@5f1a0000 { + compatible = "fsl,imx8qxp-hsio"; + reg = <0x5f1a0000 0x10000>, + <0x5f120000 0x10000>, + <0x5f140000 0x10000>, + <0x5f160000 0x10000>; + reg-names = "reg", "phy", "ctrl", "misc"; + clocks = <&phyx1_lpcg IMX_LPCG_CLK_0>, + <&phyx1_lpcg IMX_LPCG_CLK_1>, + <&phyx1_crr1_lpcg IMX_LPCG_CLK_4>, + <&pcieb_crr3_lpcg IMX_LPCG_CLK_4>, + <&misc_crr5_lpcg IMX_LPCG_CLK_4>; + clock-names = "pclk0", "apb_pclk0", "phy0_crr", "ctl0_crr", + "misc_crr"; + #phy-cells = <3>; + power-domains = <&pd IMX_SC_R_SERDES_1>; + status = "disabled"; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi index 0313f295de2e9..db21c6d64f24d 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi @@ -323,6 +323,7 @@ map0 { #include "imx8-ss-conn.dtsi" #include "imx8-ss-ddr.dtsi" #include "imx8-ss-lsio.dtsi" + #include "imx8-ss-hsio.dtsi" }; #include "imx8qxp-ss-img.dtsi" @@ -330,3 +331,4 @@ map0 { #include "imx8qxp-ss-adma.dtsi" #include "imx8qxp-ss-conn.dtsi" #include "imx8qxp-ss-lsio.dtsi" +#include "imx8qxp-ss-hsio.dtsi"