Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4479186rdb; Fri, 29 Dec 2023 03:25:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IEdAfEtbRT+PvDGm/s5btT1q0VYoCwkvft1dz6WIQcpvnuUSqGntSAF/h9wXcz9VRaUmmTl X-Received: by 2002:a05:620a:232:b0:77d:ce82:3ce2 with SMTP id u18-20020a05620a023200b0077dce823ce2mr13021974qkm.32.1703849113921; Fri, 29 Dec 2023 03:25:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703849113; cv=none; d=google.com; s=arc-20160816; b=yhVl0sGcD9vGwrcJYUrLQi8XbcLjfxTUnjRCHcngefbHU/x7DTjPtuzh1uCMt56Tla eVuUXaL/DztFStcaIInA4zB42Xnznpw3Xpcj6bdND3KjTEh6vRkAxnluzstb4unz6iSw ZqMjGkZLiOp8SqYvvzStHVb7rg/357nF2Ufy2mXi+dynsT0zk9t1tlC4+sSZFxvG4PYm X8iYT8gDcKs5oxRGtYD4q5MNeTvyDNg6fT1Id8y64wxybbxJ9NkAYFEHDiSEIl8cxtog YaWUDsfAT7WOysQ97IMn+F/h1fSO5dCtwRGLe1bURCZRuWgtnwKEOLpzOSEqX2jtoFcF 3qDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=HIJ5wRTRbAUEIc2j8tvwJW9JGZJzoAJ9sb6BTH77/ls=; fh=/mTksL3vHH1VcANFHGU4DFYCYMEAlsSi9iZiMWs+96Q=; b=JZWBONcfz17CcysmTPs9iZMFZ/D4E3v7BKN2sNMzq/C7PBo0LiA812SBpfDRBGzV67 +za2tchgoiXJhCVp9hrXNf53M1fghgfYyHwMi7Bobt/Ia9UPyD6oSeHKMcBoAX2POcPq NtQcBvc/lis/GBVaQiTW+BNGgNQ7BAOnfwLpX9/ltAN3TCmIt0Cv4jbm8bzxgAiWkc43 8ICv9XsTXceXaflHZGc6cqFckxZql3kmUT7mLZBTwhniYZOD+p00giHgKBhXT1r2IxYh EjoQpqgqjBAHks4sCbLl8un8WMJSAsbL+bQ8DUNGsgnSnRfRp7oub2lWo+MVpS590oZ9 HyBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IR+9Pbtz; spf=pass (google.com: domain of linux-kernel+bounces-13061-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13061-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c23-20020a05620a269700b007814b7a2126si10372875qkp.646.2023.12.29.03.25.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 03:25:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13061-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IR+9Pbtz; spf=pass (google.com: domain of linux-kernel+bounces-13061-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13061-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9E4AB1C223AD for ; Fri, 29 Dec 2023 11:25:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 225B411194; Fri, 29 Dec 2023 11:25:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IR+9Pbtz" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 429E611183; Fri, 29 Dec 2023 11:25:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9EA6C433C8; Fri, 29 Dec 2023 11:25:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703849103; bh=MieiRL5YdRkCYRdCXxYZ9gmxzPhKZ67/qsDP0kxrLek=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IR+9Pbtzwr09SaZmVGlv9yoDpz0bu/d6mWkxctCHahOojgGp7pfbNM0DxDS5tb+3y tOEMh3fQ6BiTfse0W+6wPYFRr3Ex0I8j2ndTRV3jASg6HrQQvgHn0hFlB8xCYKCSGd reMdwCIGWew6JxWL+9n2gzvPjI4reIWZY99troit764ZHHiRB6Lj+tazMMfyEQwQNa 6XsqCC1wb8pcemSWwTndXT7hWgCcHMSiD49O2ps4sDlWQnPNqj6lPKOE8/ieMOOrHO ghBh9s6zaW1j8U2mzPxL40mueEaopWkYMKyX4TW2goce3aZc7vVmUy8vFJ4uhW3fZ7 X5jf2rbaVMWcg== Received: from johan by xi.lan with local (Exim 4.96.2) (envelope-from ) id 1rJAz1-0007Nf-2f; Fri, 29 Dec 2023 12:24:56 +0100 Date: Fri, 29 Dec 2023 12:24:55 +0100 From: Johan Hovold To: Konrad Dybcio Cc: Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Johan Hovold , Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Konrad Dybcio Subject: Re: [PATCH 1/3] arm64: dts: qcom: sc8280xp: Fix PCIe PHY power-domains Message-ID: References: <20231227-topic-8280_pcie_dts-v1-0-13d12b1698ff@linaro.org> <20231227-topic-8280_pcie_dts-v1-1-13d12b1698ff@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231227-topic-8280_pcie_dts-v1-1-13d12b1698ff@linaro.org> On Wed, Dec 27, 2023 at 11:28:26PM +0100, Konrad Dybcio wrote: > The PCIe GDSCs are only related to the RCs. The PCIe PHYs on the other > hand, are powered by VDD_MX and their specific VDDA_PHY/PLL regulators. No, that does not seem to be entirely correct. I added the power-domains here precisely because they were needed to enable the PHYs. This is something I stumbled over when trying to figure out how to add support for the second lane pair (i.e. four-lane mode), and I just went back and confirmed that this is still the case. If you try to enable one of these PHYs without the corresponding GDSC being enabled, you end up with: [ 37.709324] ------------[ cut here ]------------ [ 37.718196] gcc_pcie_3b_aux_clk status stuck at 'off' [ 37.718205] WARNING: CPU: 4 PID: 482 at drivers/clk/qcom/clk-branch.c:86 clk_branch_wait+0x144/0x15c Now, you may or may not want to describe the above in the devicetree, but this makes it sound like you're trying to work around an issue with the current Linux implementation. > Fix the power-domains assignment to stop potentially toggling the GDSC > unnecessarily. Nothing is being toggled unnecessarily, and generally this is just another use count increment. > Fixes: 813e83157001 ("arm64: dts: qcom: sc8280xp/sa8540p: add PCIe2-4 nodes") So not sure a Fixes tag is warranted either. > @@ -1895,7 +1895,7 @@ pcie3b_phy: phy@1c0e000 { > assigned-clocks = <&gcc GCC_PCIE3B_PHY_RCHNG_CLK>; > assigned-clock-rates = <100000000>; > > - power-domains = <&gcc PCIE_3B_GDSC>; > + power-domains = <&rpmhpd SC8280XP_MX>; > > resets = <&gcc GCC_PCIE_3B_PHY_BCR>; > reset-names = "phy"; Johan