Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1711858rwe; Fri, 2 Sep 2022 02:27:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR6tZdPV5sUYeOzquVcPdETiPsiz3ese9rn/ydUsG7bCaSWMsVEpZxrhk/zwGry1VCKvJxPY X-Received: by 2002:a17:903:40c4:b0:175:a556:c896 with SMTP id t4-20020a17090340c400b00175a556c896mr4230620pld.157.1662110872757; Fri, 02 Sep 2022 02:27:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662110872; cv=none; d=google.com; s=arc-20160816; b=iuYL4HJ1ABARWGkrY7f36rH2xvP4L1ZHi6qypwMxZxPdrLS/cuNUCxov18KiPeLZHq SE7C64gpC5CPhwEdO0UXiPCPA3B+kGNKLPEBAakzhYOedCm2zc8gB41AawgE7KBivOqT 7t4uB2JZGUu4qTtXAnJHMbCX/xe+vwCeXZ7RerZXS+dcIxoA9vKHhoOB4MPx2zO7s3um ARfVxJ92jMoK38FGjKR9ZyrX0NV0ZvSaOxch6tLVv+/1YnsN8/OxE11jhGe0CBndQ7MU BgpEbKpW/4cum55txemkV9YrtP3Jniv0Pd3GJZ4oaEuFmfIct5WW1NB9RItRX1+ldySx ogcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=98iQYBIfpPHtWYCHjQlAzxLyC54peB9kuXZjNKX48MU=; b=k/dPMOK03LOCh3DahMSRXHdi1xbyAEDS/Lp3YvTTY08N4p3F5oTK/fPcmjQ0WY0QXD UwJQMqEl0kS+zv2Bzecw3IUnwOK+v4Jf11LPkvRz4DUpdaFDvbOSgkp/vvqH3STV7ixH lEKjA/9INP0lj+ZcyTUO+af4+qIylDVyqDjJLT7RBwTOs8HeAF0c05Oe+InUJHhJzFl/ gFR7PpEtTnmp5Y/Hqnk5TR6lgJF+Hsn0jT0Ctcr32K9JDIN4Cpg/HqfiDa6P19p1EHA9 BgVfD6ChuuSw/sn9Qt25Il5gJkzUXP1IbrLX/4gnWN+UPM8kXGG9KHfIulE9yxWkys7D X8oQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p17-20020a170902f09100b00172db9d9a01si1400825pla.616.2022.09.02.02.27.40; Fri, 02 Sep 2022 02:27:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235674AbiIBJQb (ORCPT + 99 others); Fri, 2 Sep 2022 05:16:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235922AbiIBJQE (ORCPT ); Fri, 2 Sep 2022 05:16:04 -0400 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB62667441; Fri, 2 Sep 2022 02:15:58 -0700 (PDT) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 798461A2ADA; Fri, 2 Sep 2022 11:15:57 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 3E8EE1A063E; Fri, 2 Sep 2022 11:15:57 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 429CF181D0CA; Fri, 2 Sep 2022 17:15:55 +0800 (+08) From: Richard Zhu To: p.zabel@pengutronix.de, l.stach@pengutronix.de, bhelgaas@google.com, lorenzo.pieralisi@arm.com, robh@kernel.org, shawnguo@kernel.org, vkoul@kernel.org, alexander.stein@ew.tq-group.com, marex@denx.de, richard.leitner@linux.dev Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com, Richard Zhu Subject: [PATCH v7 2/7] arm64: dts: imx8mp: Add iMX8MP PCIe support Date: Fri, 2 Sep 2022 16:58:01 +0800 Message-Id: <1662109086-15881-3-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1662109086-15881-1-git-send-email-hongxing.zhu@nxp.com> References: <1662109086-15881-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add i.MX8MP PCIe support. Signed-off-by: Richard Zhu Tested-by: Marek Vasut Tested-by: Richard Leitner Tested-by: Alexander Stein Reviewed-by: Lucas Stach --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 43 +++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index fe178b7d063c..21a4cc417c81 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -1084,6 +1085,17 @@ media_blk_ctrl: blk-ctrl@32ec0000 { #power-domain-cells = <1>; }; + pcie_phy: pcie-phy@32f00000 { + compatible = "fsl,imx8mp-pcie-phy"; + reg = <0x32f00000 0x10000>; + resets = <&src IMX8MP_RESET_PCIEPHY>, + <&src IMX8MP_RESET_PCIEPHY_PERST>; + reset-names = "pciephy", "perst"; + power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_PCIE_PHY>; + #phy-cells = <0>; + status = "disabled"; + }; + hsio_blk_ctrl: blk-ctrl@32f10000 { compatible = "fsl,imx8mp-hsio-blk-ctrl", "syscon"; reg = <0x32f10000 0x24>; @@ -1099,6 +1111,37 @@ hsio_blk_ctrl: blk-ctrl@32f10000 { }; }; + pcie: pcie@33800000 { + compatible = "fsl,imx8mp-pcie"; + reg = <0x33800000 0x400000>, <0x1ff00000 0x80000>; + reg-names = "dbi", "config"; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; + bus-range = <0x00 0xff>; + ranges = <0x81000000 0 0x00000000 0x1ff80000 0 0x00010000>, /* downstream I/O 64KB */ + <0x82000000 0 0x18000000 0x18000000 0 0x07f00000>; /* non-prefetchable memory */ + num-lanes = <1>; + num-viewport = <4>; + interrupts = ; + interrupt-names = "msi"; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 0x7>; + interrupt-map = <0 0 0 1 &gic GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 2 &gic GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 3 &gic GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 4 &gic GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>; + fsl,max-link-speed = <3>; + linux,pci-domain = <0>; + power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_PCIE>; + resets = <&src IMX8MP_RESET_PCIE_CTRL_APPS_EN>, + <&src IMX8MP_RESET_PCIE_CTRL_APPS_TURNOFF>; + reset-names = "apps", "turnoff"; + phys = <&pcie_phy>; + phy-names = "pcie-phy"; + status = "disabled"; + }; + gpu3d: gpu@38000000 { compatible = "vivante,gc"; reg = <0x38000000 0x8000>; -- 2.25.1