Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp9770rdb; Mon, 22 Jan 2024 10:11:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IGiR/wWr4nZRe2gTJa5hrmIFNXKwQU+pLlzSiPwbc3G7LUzcMk5IcO/XK1vgZbv0iBCys0C X-Received: by 2002:a05:6870:231d:b0:214:3480:45ff with SMTP id w29-20020a056870231d00b00214348045ffmr271313oao.111.1705947094884; Mon, 22 Jan 2024 10:11:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705947094; cv=pass; d=google.com; s=arc-20160816; b=ePUyKB1Dh9+rU0AOeOANTsNVwrd/NwpPpOY6tnv280DvdJPvyP7yTayVVXSiRxD3hf DTfZFNjWkOFKCrqv+O2DPXHlTRL1i8ugAuffTZFbgS+simdpbujkbyEbBLZLxJ/RKUKx re5NnCoqrVFT4GZACL3iaLC5Jvb571yWNpdrH58aAB1nq58osNUfq1UsoKflA9QjKqSX /6/TJSziMn47lo6+9o0k+K2IDrT3RpQnl9nzszBJ4aNEo+FCUXnmOKlbZOzQdgsznCBd 9iKbswp6CB5XQ00oB2F2aF3LOYZBqdwCyWpwaclKZcK4RF0ktvvyi7QDcYx01nlQH0WV 7JsQ== ARC-Message-Signature: i=2; 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=MbfpcC9rexZykZ7v+SuwBzWgkcYVEu5bvJgw4f094bc=; fh=3dVR+J3BB3XLH52mZgR960YdR3VExbGDIBEomVypvRU=; b=O/Tm2SvaoOmIYNm7EvKcYLO9lZd7ioPf/m7TbwaC0Zw6bNsh5+30VFX9jHJPmwsDhW UKxPUNSNArQ45RbOf4RidfuRQ4RM++01bjXomOmV8YXASRDsrCXpNFjjWeGvmUGQba5S XGiWFoQUPHw7AuzPlF0GK4OcX91i6TdKvJZy2crEvV9vybIZ+Q8lwNDfliEEJz1T4Tf4 Mp8Qo9xeD2qKsxfJ2MRzTnk7IXaEga4zBwMWWiThriGfgKPvDtHS6iNKJsbHcQx+S5uF mbHJs/pbIvaZIWFmOVaI/XwkSe3RswwVkHXEHDF76DRPkO73EAuRf9lacLLpCjmPSLXD xaQg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NNydHcMc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33835-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33835-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. [147.75.199.223]) by mx.google.com with ESMTPS id n12-20020a056214008c00b0068561c2ca9bsi5946344qvr.1.2024.01.22.10.11.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 10:11:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33835-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NNydHcMc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33835-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33835-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 391791C269DE for ; Mon, 22 Jan 2024 18:11:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C3703FE33; Mon, 22 Jan 2024 17:36:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NNydHcMc" 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 2CD563FE28; Mon, 22 Jan 2024 17:36:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705945001; cv=none; b=OGRkyB/d1mZ+KeHKbI8cbqbZIN0tVA6F6w1D3MhTNbt0sALGkRjTxj29hYqD1sQOs1QMacZJdVgbI04ZnmXdBzj7F9Od+NDuXlmlATyancA1ZPV8lDPb3hXOuc7HsxgKGVlxpbTS6GnqhMU4kj8fc0QxU8YCgqICtnDKbDYOEkc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705945001; c=relaxed/simple; bh=Do6GH6AFLzNEnY0lWxGGX8GYLxuoxZy9j7mds6kAXtI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=byK4cZRH7HSQx7DPSAFL0xOjk07ujLQcQwFl4egwRPw6q6LiwKHnDgLpo7cR4bzhW8KUI3TX/jk/9LTdWL1G7qjli1pkisODiVmOOK1wTeE/NXNK1J547m8LCs2OT6esc4M6UD9bKwiOXikSu8ApmpsCaMA/dcweztY2uD3xrqY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NNydHcMc; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E3F0C433F1; Mon, 22 Jan 2024 17:36:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705945000; bh=Do6GH6AFLzNEnY0lWxGGX8GYLxuoxZy9j7mds6kAXtI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NNydHcMc7/QEWugoSfbb5DWGOsn4aK0LhJI/R6p3sYhfcxjihuoQJMsx+CLWiP4Rp iEjmCVn28bQmDNgNOSCty7gUppgoTTJ5FcGqnSqk1yYwm0oZcfd1F1MaNdFGsQN5Hp nOCX5iUjak5ju5xd7nDQ0NU4HQAd6ixUqMn6AOJqwyvTzVur3V9rp+ZjN4u3GEOWtT Ncr++vP9S2Q0J33y/DRBGQpE9xQpt7CTGuOCHMTy8LItf/pZAfCCyDUdEqelwLgOho QWYZvo5owITvfDI1bS5prylQ1daAB6DvisORykBpQ3ichc1dv+WW5Xe+0c0izoy8Ix FC+xyP+nhIApA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rRyE7-000000000su-3oVt; Mon, 22 Jan 2024 18:36:52 +0100 Date: Mon, 22 Jan 2024 18:36:51 +0100 From: Johan Hovold To: Manivannan Sadhasivam Cc: Konrad Dybcio , 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> <20231229170334.GA9098@thinkpad> <20240122172528.GE3176@thinkpad> 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: <20240122172528.GE3176@thinkpad> On Mon, Jan 22, 2024 at 10:55:28PM +0530, Manivannan Sadhasivam wrote: > On Fri, Dec 29, 2023 at 10:33:34PM +0530, Manivannan Sadhasivam wrote: > > On Fri, Dec 29, 2023 at 12:24:55PM +0100, Johan Hovold wrote: > > > 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 > > > > > > > Technically this patch is correct. PHYs are backed by MX domain only and not > > GDSCs. Only the controllers (PCIe, UFS, USB) are backed by GDSCs. The fact that > > you are seeing issue with PCIe Aux clock suggests me that this clock may not be > > applicable to the PHY but it needs to be enabled for working of the PHY somehow. > > I'll try to find the details on how exactly it is needed. > > > > But if I get the answer like, "This clock is also sourced to PHY directly", then > > we may need to add dual power domain for PHY (both GDSC and MX). > > > > So I answer I got from Qcom is that this clock is only applicable to the PCIe > controller and not PHYs. On some platforms, there is a separate PCIE_PHY_AUX_CLK > coming from GCC that is used during L1SS state. I think that caused confusion > while adding PHY support for followup platforms and folks just used PCIE_AUX_CLK > since they couldn't find the actual PCIE_PHY_AUX_CLK. Thanks for sorting that out. > I've prepared a series to fix this mess, but I want to know how you end up > seeing the above "clk status stuck at off" issue. Is there an actual usecase for > powering up PHY without controller or you just experimented with it? As I mentioned, I ran into this when experimenting with how to enable the "companion" PHY for four-lane support. There shouldn't be any use case for it (apart from using it to determine that the current description of the PHY resources is incomplete or incorrect). Johan