Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3736084pxb; Mon, 1 Nov 2021 20:00:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbq1RFKu749fD9A3u9PR1it6dfd3HblVqckHRYV+tWrpm0JkkQO50cKwS2iBcT+0rcKSwG X-Received: by 2002:a05:6602:2d43:: with SMTP id d3mr9902619iow.6.1635822011529; Mon, 01 Nov 2021 20:00:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635822011; cv=none; d=google.com; s=arc-20160816; b=rHlmFYxVmhJ5gPOh/HOerOOPMoB4HJfoGtRzy5PPCKU4J5Nge5rykrYIfIeGua9v/B 3nngkMBhOwy70tOXH+sv/fAn4yft1P5EjafJx4yJaoWW7t5S8lr92ntW1XA0ETK7jqtN tPeuUd3eX+XzX5Z/+1Yrsj6cfc3fRz7SbeCEBU+qBLpgw51acThwpk5YRL0ka3W+tMla MRqxJZofOUtt7O/iB1ej3C6v5hkN4FdO3kVpGHEVe4/cTA6wj7S9cXGlfHBlIj9y0uok Y/jZNQCIVQT8d2OglE8yewXjl6Fec7IsFtZspKpiNZEbyG0trvOjs8h+sJUScMCiUxE6 5qzQ== 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=+JHQh9B6ZFY1iOr9zYCFCdroKzJRImo/+clzVIhqg9U=; b=M5mKdwWNpv9l6Y3hF5zPl7z6J0hWMd0tfGZWHGLWF4AY62+7uhppzwEZHsLdk/o/mz CFCgyXoFJei3OtUvtprdYYpMXPc5To9rsmhawEUvEqsiiI/q4KafTkHIMjdawVYipak5 5eCtyiMg1RmhsgmZO4qOQtVQ716sGayxe6sF6wgV+7+zvk5sBjMy6lLuhaonUsVBLbW0 WanIsSBfBO1MYWFwM46UeX7oTopBrfa1oaAdnhkLafu71k3ONIP0kPsWmMXMmZjgyOnx /mA2FXRLJTzwNx/NLf5fTFaadGJoyOhu5MpySCn15WKXuRrjaysM4VBZzykvpLDGkHsW MSTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v4si16949566jat.45.2021.11.01.19.59.59; Mon, 01 Nov 2021 20:00:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232414AbhKBDBX (ORCPT + 99 others); Mon, 1 Nov 2021 23:01:23 -0400 Received: from inva021.nxp.com ([92.121.34.21]:51958 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232469AbhKBDBQ (ORCPT ); Mon, 1 Nov 2021 23:01:16 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 107C3200168; Tue, 2 Nov 2021 03:58:41 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id CD1AB200147; Tue, 2 Nov 2021 03:58:40 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 112D6183AC89; Tue, 2 Nov 2021 10:58:39 +0800 (+08) From: Richard Zhu To: l.stach@pengutronix.de, marcel.ziswiler@toradex.com, tharvey@gateworks.com, kishon@ti.com, vkoul@kernel.org, robh@kernel.org, galak@kernel.crashing.org, shawnguo@kernel.org Cc: linux-phy@lists.infradead.org, devicetree@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 v5 7/8] arm64: dts: imx8mm-evk: Add the pcie support on imx8mm evk board Date: Tue, 2 Nov 2021 10:32:34 +0800 Message-Id: <1635820355-27009-8-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1635820355-27009-1-git-send-email-hongxing.zhu@nxp.com> References: <1635820355-27009-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the PCIe support on iMX8MM EVK boards. And set the default reference clock mode. Signed-off-by: Richard Zhu Tested-by: Marcel Ziswiler Reviewed-by: Tim Harvey Tested-by: Tim Harvey --- arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi index e033d0257b5a..87a30daf0b3c 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi @@ -5,6 +5,7 @@ /dts-v1/; +#include #include #include "imx8mm.dtsi" @@ -30,6 +31,23 @@ status { }; }; + pcie0_refclk: pcie0-refclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <100000000>; + }; + + reg_pcie0: regulator-pcie { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pcie0_reg>; + regulator-name = "MPCIE_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + reg_usdhc2_vmmc: regulator-usdhc2 { compatible = "regulator-fixed"; pinctrl-names = "default"; @@ -289,6 +307,30 @@ pca6416: gpio@20 { }; }; +&pcie_phy { + fsl,refclk-pad-mode = ; + fsl,tx-deemph-gen1 = <0x2d>; + fsl,tx-deemph-gen2 = <0xf>; + clocks = <&pcie0_refclk>; + status = "okay"; +}; + +&pcie0 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pcie0>; + reset-gpio = <&gpio4 21 GPIO_ACTIVE_LOW>; + clocks = <&clk IMX8MM_CLK_PCIE1_ROOT>, <&clk IMX8MM_CLK_PCIE1_AUX>, + <&pcie0_refclk>; + clock-names = "pcie", "pcie_aux", "pcie_bus"; + assigned-clocks = <&clk IMX8MM_CLK_PCIE1_AUX>, + <&clk IMX8MM_CLK_PCIE1_CTRL>; + assigned-clock-rates = <10000000>, <250000000>; + assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_50M>, + <&clk IMX8MM_SYS_PLL2_250M>; + vpcie-supply = <®_pcie0>; + status = "okay"; +}; + &sai3 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sai3>; @@ -406,6 +448,19 @@ MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA 0x400001c3 >; }; + pinctrl_pcie0: pcie0grp { + fsl,pins = < + MX8MM_IOMUXC_I2C4_SCL_PCIE1_CLKREQ_B 0x61 + MX8MM_IOMUXC_SAI2_RXFS_GPIO4_IO21 0x41 + >; + }; + + pinctrl_pcie0_reg: pcie0reggrp { + fsl,pins = < + MX8MM_IOMUXC_GPIO1_IO05_GPIO1_IO5 0x41 + >; + }; + pinctrl_pmic: pmicirqgrp { fsl,pins = < MX8MM_IOMUXC_GPIO1_IO03_GPIO1_IO3 0x141 -- 2.25.1