From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF42FC432C0 for ; Mon, 25 Nov 2019 07:01:13 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8EC2720748 for ; Mon, 25 Nov 2019 07:01:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mv0LWtPM"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="JOQr2z31" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8EC2720748 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ugj1r1xa5OIShAB6FsJ5rYzZcwWlCL40xkSXv85ngaI=; b=mv0LWtPMoSnI5xWxE9+K1af0r Ptp9m3l3/VuNIhrGcZpRs85LunpYDZJhe/OW7H4DnD4q/JKoHP2JDd73uTzAugtdg34b1XZCgDBkJ 9UcxfKPVIqS5rIQALWmahjdCoxcI2txgxwzZK8e+ypRKIZkhgxNloUbEUHi9rpR6FFmPQqDxI3X2q SXw+OfbT191n+HIWQeRNtWICwIAMs8SMpEjAPlOuly8J9B6WfdvB/98UNTneffpRJTl/csbIuzwX5 GwEZlzfRILJCwm08hcAop7WmU9LLHxaAbDh7+NkMbcVeYYWAw/Vf6wAKk/s98siumaTuSpSDfeSnS 3e9JoIl3Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iZ8Mv-0007jQ-O4; Mon, 25 Nov 2019 07:01:09 +0000 Received: from hqemgate15.nvidia.com ([216.228.121.64]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iZ8Mq-0007iX-Sn for linux-arm-kernel@lists.infradead.org; Mon, 25 Nov 2019 07:01:07 +0000 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sun, 24 Nov 2019 23:00:55 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Sun, 24 Nov 2019 23:01:00 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Sun, 24 Nov 2019 23:01:00 -0800 Received: from [10.25.75.126] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 25 Nov 2019 07:00:56 +0000 Subject: Re: [PATCH 6/6] arm64: tegra: Add support for PCIe endpoint mode in P2972-0000 platform To: Thierry Reding References: <20191122104505.8986-1-vidyas@nvidia.com> <20191122104505.8986-7-vidyas@nvidia.com> <20191122132533.GD1315704@ulmo> X-Nvconfidentiality: public From: Vidya Sagar Message-ID: Date: Mon, 25 Nov 2019 12:30:53 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: <20191122132533.GD1315704@ulmo> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) Content-Language: en-US DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1574665255; bh=PEZH+DI5aibjZBvzAc3XMH2bX4MsuckLJR1y410J5GE=; h=X-PGP-Universal:Subject:To:CC:References:X-Nvconfidentiality:From: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=JOQr2z31dBc4iSQlbBFoAnAGB3qfn+OzxbycCC3xeQdJc5XNRV6nSKxl5zeSobycP MKSKjLulc1M72WIqUm8dNygV6+MRh3rprksNW8j8UtSgB5UX+HDWUQocQjblaRR2SJ wTmHqLYno/z08BEt8Z/hY0UgkCd8AZLABz6jG1gn1Ho1glVBRE8D1Nd4GIiLIYeVrt ns8vDZSwuX1nJzo5LUJZS3kgO5FDr+Ye3HZc63fTqY3rTtM0MF9wsBeuFybb1RxMAI joAnBegjpjCpwVq6qvl+dLF6W3vQ1v+j8cx9Xa1eP5oA5aDU2OZ1doT7iKgcMDG21G 0vswHjryguNVg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191124_230104_944870_01E2B5F9 X-CRM114-Status: GOOD ( 16.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, lorenzo.pieralisi@arm.com, mmaddireddy@nvidia.com, kthota@nvidia.com, gustavo.pimentel@synopsys.com, linux-kernel@vger.kernel.org, kishon@ti.com, linux-tegra@vger.kernel.org, robh+dt@kernel.org, linux-pci@vger.kernel.org, bhelgaas@google.com, andrew.murray@arm.com, jonathanh@nvidia.com, linux-arm-kernel@lists.infradead.org, sagar.tv@gmail.com Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 11/22/2019 6:55 PM, Thierry Reding wrote: > On Fri, Nov 22, 2019 at 04:15:05PM +0530, Vidya Sagar wrote: >> Add endpoint mode support for PCIe C5 controller in P2972-0000 platform >> with information about supplies, PHY, PERST GPIO and GPIO that controls >> PCIe reference clock coming from the host system. >> >> Signed-off-by: Vidya Sagar >> --- >> .../boot/dts/nvidia/tegra194-p2972-0000.dts | 29 +++++++++++++++++++ >> 1 file changed, 29 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts b/arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts >> index 7eb64b816e08..58c3a9677bc8 100644 >> --- a/arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts >> +++ b/arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts >> @@ -43,6 +43,19 @@ >> >> gpio@c2f0000 { >> status = "okay"; >> + /* >> + * Change the below node's status to 'okay' when >> + * PCIe C5 controller is enabled to operate in endpoint >> + * to allow REFCLK from the host system to flow into >> + * the controller. >> + */ >> + pex-refclk-sel-high { >> + gpio-hog; >> + output-high; >> + gpios = ; >> + label = "pex_refclk_sel_high"; >> + status = "disabled"; >> + }; > > Why don't we put this into the PCIe controller's node as a reference to > that GPIO? Seems like the controller would know exactly when this pin > needs to go high or low, so why does it have to be a hog? > > Thierry Are you saying something like 'nvidia,enable-refclk-in'? I was thinking, since this is like a board level configuration specific to Jetson-Xavier, it would suffice to just hog it according to the mode of operation of PCIe controller. But, I see one advantage of referencing it in the PCIe node (so that the driver can configure it as and when needed) is that one has to be careful just to enable either PCIe RP or EP node and not worry about other thing (like this). Let me know if I got this right. - Vidya Sagar > >> }; >> >> pwm@c340000 { >> @@ -144,6 +157,22 @@ >> "p2u-5", "p2u-6", "p2u-7"; >> }; >> >> + pcie_ep@141a0000 { >> + status = "disabled"; >> + >> + vddio-pex-ctl-supply = <&vdd_1v8ao>; >> + >> + nvidia,pex-rst-gpio = <&gpio TEGRA194_MAIN_GPIO(GG, 1) >> + GPIO_ACTIVE_LOW>; >> + >> + phys = <&p2u_nvhs_0>, <&p2u_nvhs_1>, <&p2u_nvhs_2>, >> + <&p2u_nvhs_3>, <&p2u_nvhs_4>, <&p2u_nvhs_5>, >> + <&p2u_nvhs_6>, <&p2u_nvhs_7>; >> + >> + phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3", "p2u-4", >> + "p2u-5", "p2u-6", "p2u-7"; >> + }; >> + >> fan: fan { >> compatible = "pwm-fan"; >> pwms = <&pwm4 0 45334>; >> -- >> 2.17.1 >> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel