Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1258034rwb; Thu, 1 Dec 2022 14:49:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf4dWmec+mA6YUK1mDiTz5nWaKpJf1/S1n1I+BVX+idwnylShmAg50s9NDf5R6/XOVEjnlQt X-Received: by 2002:a17:906:8465:b0:7bd:7253:457a with SMTP id hx5-20020a170906846500b007bd7253457amr3790150ejc.81.1669934992642; Thu, 01 Dec 2022 14:49:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669934992; cv=none; d=google.com; s=arc-20160816; b=pw2L+5817PToBvbH5gDACyz7gv1Fs/tJCDn8bPr0MkMWzWEvKIFFSZsttez4TaX3nh 5lTnUvxDmoc79zng135FeF+NIl31P2S+qHK97wi0gZLVZcEYsu/ha+1RPpU15Ye7usYA 5hHsBDE0+vjsOAQvUT7cfv3dS7eRb9BPszckV+Q2t/1RumU5PE30SGJH28cPQ60OlRie OXmo+2ZlaD8YNOWslZgXOBBLZyb4GfDLwU8Gw48xnvzJyx27oWBjJAKwpCRpb9xOBbF9 lhxLKKEpcaAfkJZE+5wmq+d8lK7PWZeRb2f7MhPbTQhgESeYauJrEyroWaT01jZ8y2QI HL+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mj0Ij8Mc0FbIJVCGQNvih5TaimfBTbkpHLmNdi0DVec=; b=TdoD1xzktSfFxStsPRwukUfEC5bPqBMiNNQEsm1NNhozPT7Bc77P9JG43kI74akbpk UxrJHkCOjOCz2fxxp0q5/UTvHDV8EToWJ9LjODXh4Zc8F2PHOEOB7Sf6eDB2BqJHglM9 Lz+HvsPL7nZMdaRCpafdQsE9etMyqoymimq9GsE4H5HDPRwFvQm3eI7EOuejIhNxqvO/ ydkxILEidAyjoMwy3vmMW34Q/OVTaXb9XHBbdJMauEf+S7Gk4BdTut0GajX2cVXTDMzP S+rWohBjEnnwHpdDhDiv04//GyLhoo5k5Q9/m7jktMdurw+0I4Dijb4Q13naT8iKQ4yE wDhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U3LQUI+I; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bg11-20020a170906a04b00b0078200e81b92si3704735ejb.758.2022.12.01.14.49.31; Thu, 01 Dec 2022 14:49:52 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U3LQUI+I; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231264AbiLAWaX (ORCPT + 81 others); Thu, 1 Dec 2022 17:30:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231186AbiLAWaR (ORCPT ); Thu, 1 Dec 2022 17:30:17 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 620F4BE698; Thu, 1 Dec 2022 14:30:16 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 067AB62155; Thu, 1 Dec 2022 22:30:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83A50C433D6; Thu, 1 Dec 2022 22:30:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669933815; bh=C9zPt6ff2ci339LcJjA+A5VnNTOlj2rygaMYGmHG9Eg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=U3LQUI+ImSEa4/wJUkQRej3SnDSVRtGUoRzMqcyJYmlFR4e37G98HM/AJJpeqMq5W Ngh+yG5Y0JqE7XCOJaVYr2tayfLQIC+Fkhi8R9OQELvupx2nGnRtqY/4oM7WQgNOCq kUVVO50DZB2oSiMaDeP6hCUdIJc8h2xnPiU0PX8T5xSYeQ+ClbShFDofrr8cfaZE2s 1j3afsRRbbfxBCfzZD1/HjX2KipNAex6wcT8kOdLOh/hsjL86WwZDZX6YTAbdGa8qv 9VnRK9YxcG1kdMEzFkrVuGb8PFKtsDE1zyGqiUbFvg67s8MJRYCsClhAH03z6JsVfd buyq/x3hKNv3w== Date: Thu, 1 Dec 2022 16:30:12 -0600 From: Bjorn Andersson To: Brian Masney Cc: krzysztof.kozlowski+dt@linaro.org, agross@kernel.org, konrad.dybcio@linaro.org, robh+dt@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, quic_shazhuss@quicinc.com, psodagud@quicinc.com, ahalaney@redhat.com, echanude@redhat.com Subject: Re: [PATCH v2] arm64: dts: qcom: sa8540p-ride: enable PCIe support Message-ID: <20221201223012.r6mvz4updf3qoilj@builder.lan> References: <20221201171931.1919961-1-bmasney@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221201171931.1919961-1-bmasney@redhat.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Thu, Dec 01, 2022 at 12:19:31PM -0500, Brian Masney wrote: > Add the vreg_l11a, pcie3a, pcie3a_phy, and tlmm nodes that are necessary > in order to get PCIe working on the QDrive3. > > This patch also increases the width of the ranges property for the PCIe > switch that's found on this platform. Note that this change requires > the latest trustzone (TZ) firmware that's available from Qualcomm as > of November 2022. If this is used against a board with the older > firmware, then the board will go into ramdump mode when PCIe is probed > on startup. > > The ranges property is overridden in this sa8540p-ride.dts file since > this is what's used to describe the QDrive3 variant with dual SoCs. > There's another variant of this board that only has a single SoC where > this change is not applicable, and hence why this specific change was > not done in sa8540p.dtsi. > > These changes were derived from various patches that Qualcomm > delivered to Red Hat in a downstream kernel. > > Signed-off-by: Brian Masney > --- > Changes since v1: > - Add -state and -pins suffixes to tlmm (Krzysztof) > > This patch depends on the following series that hasn't made it's way > into linux-next yet: > > [PATCH v10 0/2] arm64: dts: qcom: add dts for sa8540p-ride board > https://lore.kernel.org/lkml/20221118025158.16902-1-quic_ppareek@quicinc.com/ > > I can't find the specific TZ firmware version that we have so that's why > I included the date instead. > > arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 54 +++++++++++++++++++++++ > 1 file changed, 54 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > index a5f87a8629d6..e953165f3b73 100644 > --- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > +++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > @@ -51,6 +51,14 @@ vreg_l7a: ldo7 { > regulator-initial-mode = ; > }; > > + vreg_l11a: ldo11 { > + regulator-name = "vreg_l11a"; > + regulator-min-microvolt = <880000>; > + regulator-max-microvolt = <880000>; > + regulator-initial-mode = ; > + regulator-allow-set-load; In order to specify regulator-allow-set-load you also need regulator-allowed-modes. But if I read the implementation correction, we don't actually alter the load, so perhaps best to just omit this for now? Regards, Bjorn > + }; > + > vreg_l13a: ldo13 { > regulator-name = "vreg_l13a"; > regulator-min-microvolt = <3072000>; > @@ -139,6 +147,27 @@ vreg_l8g: ldo8 { > }; > }; > > +&pcie3a { > + ranges = <0x01000000 0x0 0x32200000 0x0 0x32200000 0x0 0x100000>, > + <0x02000000 0x0 0x40300000 0x0 0x40300000 0x0 0x20000000>, > + <0x03000000 0x6 0x00000000 0x6 0x00000000 0x2 0x00000000>; > + > + perst-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>; > + wake-gpios = <&tlmm 56 GPIO_ACTIVE_HIGH>; > + > + pinctrl-names = "default"; > + pinctrl-0 = <&pcie3a_default>; > + > + status = "okay"; > +}; > + > +&pcie3a_phy { > + vdda-phy-supply = <&vreg_l11a>; > + vdda-pll-supply = <&vreg_l3a>; > + > + status = "okay"; > +}; > + > &qup2 { > status = "okay"; > }; > @@ -158,6 +187,31 @@ &remoteproc_nsp1 { > status = "okay"; > }; > > +&tlmm { > + pcie3a_default: pcie3a-default-state { > + perst-pins { > + pins = "gpio151"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-down; > + }; > + > + clkreq-pins { > + pins = "gpio150"; > + function = "pcie3a_clkreq"; > + drive-strength = <2>; > + bias-pull-up; > + }; > + > + wake-pins { > + pins = "gpio56"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-up; > + }; > + }; > +}; > + > &ufs_mem_hc { > reset-gpios = <&tlmm 228 GPIO_ACTIVE_LOW>; > > -- > 2.38.1 >