Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1280233pxb; Fri, 13 Nov 2020 08:37:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzsnPNdO3OzPd5Bp2lVpmGoFZHEw0tBoDYXV1f0cWkgMV2zfvrgtfPVUwjgsZMnhXeuPBSR X-Received: by 2002:a17:906:ad85:: with SMTP id la5mr2867969ejb.423.1605285474533; Fri, 13 Nov 2020 08:37:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605285474; cv=none; d=google.com; s=arc-20160816; b=oo/iNusqQ8LelGqOZG/n10IwsndpMBnrEhBNVZJdbZQLqoX6kCRqS74/Ko5uEhCSiS XBhUknhSKJSu/G+7Z93v7G3yjplbu0c4UXE3QnBByeCXEBGH0c9GjU/lUB/1aBYhPa22 FYkZF/C3QOzyDlc9WXKJJrJYCIYYvA4aP6yZIv+iJFUijrm4e782ag1Wo2+I4FapkYWD ur+gH2WsMk4/7gwVY1ZpRXVJoHOO73fvpiNLK+DDUwhjxuZO4/NRaiawZZ4K8mJeOyq1 eLXA2cnKyuQd+eqaDAod40t3MnGe+Lex7A442jloOC76eyVZtSBJ+6+SMI/nC2+fRuaM XJOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=dQRQDur4C385F9uHjVsTWYFjOPOTyFC/a81xU2Lamvk=; b=mU5P2djtX2mmS1fOH7vqsveLhlGZMxcgxsBuTQU6v78SlFCa4LaAp2R5MKLZL8GFe3 XCbdWARLPTyCFPMsP8lYKxuoDNWwxH7aQqvhdA09xeA7T3NpB41gNTsaLiZhgsGDIUfd g8g6Vc5YoHJK2PzWhn5ofMc7IjMWO3PKlaUAIYhaN83rZYku9QDVqtNBfb5dy+hV4qDc XY1hDuAX2gQ6JsSKl4D+bLoyiC3UkIPb3SKAsq95PW9hyGI5zRy3fOCYyq9v4doIYaRU FOKKjvJuCiOLbtB/XeIFiTu/yNE9SLwGBQBDJcpi4pZwsF/wPsclpLVjB+eqKfl/ZgHa VRaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hYjtCO8h; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mf25si6058441ejb.54.2020.11.13.08.37.31; Fri, 13 Nov 2020 08:37:54 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hYjtCO8h; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726489AbgKMQgF (ORCPT + 99 others); Fri, 13 Nov 2020 11:36:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726157AbgKMQgD (ORCPT ); Fri, 13 Nov 2020 11:36:03 -0500 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 724D1C0613D1; Fri, 13 Nov 2020 08:36:01 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id o15so10575893wru.6; Fri, 13 Nov 2020 08:36:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=dQRQDur4C385F9uHjVsTWYFjOPOTyFC/a81xU2Lamvk=; b=hYjtCO8hZTyLH2Kyoh58AH0k4dJctPDDMUFST3ORvzuMx/d+q622LhLzVrAUwruqpj vatSp2tdsnyRwv0asO3bbpGDvd0vEZjDV3IaINbpZsJmI5S0GwzO7kZs5w4Lyo2VH/4c Y1Xhiw7uCTIk5kY2QZeUv7U1NQWSzu5o9XoRi5yn+8NlZq7l2qlfEeSbzOt2RJpv5OYy 1x6+4v3ShQP7Hi7WCV6M1Cx8cu9XeKLqQAKEmagxoqkiRNn8VSJv/QtGIVgzQBRaUZ+M mco4TyKjxVpCzCsxEz/w5kDm69UIKoK6OgA032HEi8rB4Km/3qZsxJLI5l6qtY4Bhnoc fs2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=dQRQDur4C385F9uHjVsTWYFjOPOTyFC/a81xU2Lamvk=; b=rD/bCBXNWkpvdjvfUv6BFFy8VlXp2KjMGabFmI3TzfOO3LWol6VUkbCkkxhQSFuvDQ zzlV4UqIIO53MjZ+ZqnAJ4kk1RWZgKr0SN7Q6QRLfFbUSi1D3496YTJ0NjnZuj9doJn1 xp+NjjMfdIH/rXXagAk8NyaTm3vcK7+bqzRucrpoIiqSbbflWvRaGyaBi1+YI8lImJHc WccbtXLz2baWRRqVcYhA18waEo9R5UHGUn3ueyehMDoODPcfxchtsopU5VwNsR8C2k9s vaPfqZO4cRy5ZHGFZGI/f9mc6ENdg6uOnf03jOcm//O705xHDT8SxjrOwWDbgK3QxR5u +mgQ== X-Gm-Message-State: AOAM530rdnu0JeM4msWRvjr8ukU0CuG6RaezGylQ4UuKCfm3wcRG0ahv o0LLt+51LDZJLcvN0shq1g4= X-Received: by 2002:adf:906b:: with SMTP id h98mr4463717wrh.310.1605285355248; Fri, 13 Nov 2020 08:35:55 -0800 (PST) Received: from localhost ([217.111.27.204]) by smtp.gmail.com with ESMTPSA id t7sm11384960wrx.42.2020.11.13.08.35.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Nov 2020 08:35:53 -0800 (PST) Date: Fri, 13 Nov 2020 17:35:52 +0100 From: Thierry Reding To: Dmitry Osipenko Cc: Ulf Hansson , Viresh Kumar , Jonathan Hunter , Alan Stern , Peter Chen , Mark Brown , Liam Girdwood , Adrian Hunter , Krzysztof Kozlowski , Greg Kroah-Hartman , Lee Jones , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Mauro Carvalho Chehab , Rob Herring , Marek Szyprowski , Peter Geis , Nicolas Chauvet , linux-samsung-soc , driverdevel , Linux USB List , linux-pwm@vger.kernel.org, "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List , DTML , dri-devel , Linux Media Mailing List , linux-tegra Subject: Re: [PATCH v1 00/30] Introduce core voltage scaling for NVIDIA Tegra20/30 SoCs Message-ID: <20201113163552.GE1408970@ulmo> References: <20201104234427.26477-1-digetx@gmail.com> <2716c195-083a-112f-f1e5-2f6b7152a4b5@gmail.com> <1f7e90c4-6134-2e2b-4869-5afbda18ead3@gmail.com> <20201112204358.GA1027187@ulmo> <25942da9-b527-c0aa-5403-53c9cc34ad93@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KuLpqunXa7jZSBt+" Content-Disposition: inline In-Reply-To: <25942da9-b527-c0aa-5403-53c9cc34ad93@gmail.com> User-Agent: Mutt/1.14.7 (2020-08-29) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --KuLpqunXa7jZSBt+ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 13, 2020 at 01:14:45AM +0300, Dmitry Osipenko wrote: > 12.11.2020 23:43, Thierry Reding =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > >> The difference in comparison to using voltage regulator directly is > >> minimal, basically the core-supply phandle is replaced is replaced with > >> a power-domain phandle in a device tree. > > These new power-domain handles would have to be added to devices that > > potentially already have a power-domain handle, right? Isn't that going > > to cause issues? I vaguely recall that we already have multiple power > > domains for the XUSB controller and we have to jump through extra hoops > > to make that work. >=20 > I modeled the core PD as a parent of the PMC sub-domains, which > presumably is a correct way to represent the domains topology. >=20 > https://gist.github.com/digetx/dfd92c7f7e0aa6cef20403c4298088d7 >=20 > >> The only thing which makes me feel a bit uncomfortable is that there is > >> no real hardware node for the power domain node in a device-tree. > > Could we anchor the new power domain at the PMC for example? That would > > allow us to avoid the "virtual" node. >=20 > I had a thought about using PMC for the core domain, but not sure > whether it will be an entirely correct hardware description. Although, > it will be nice to have it this way. >=20 > This is what Tegra TRM says about PMC: >=20 > "The Power Management Controller (PMC) block interacts with an external > or Power Manager Unit (PMU). The PMC mostly controls the entry and exit > of the system from different sleep modes. It provides power-gating > controllers for SOC and CPU power-islands and also provides scratch > storage to save some of the context during sleep modes (when CPU and/or > SOC power rails are off). Additionally, PMC interacts with the external > Power Manager Unit (PMU)." >=20 > The core voltage regulator is a part of the PMU. >=20 > Not all core SoC devices are behind PMC, IIUC. There are usually some SoC devices that are always-on. Things like the RTC for example, can never be power-gated, as far as I recall. On newer chips there are usually many more blocks that can't be powergated at all. > > On the other hand, if we were to > > use a regulator, we'd be adding a node for that, right? So isn't this > > effectively going to be the same node if we use a power domain? Both > > software constructs are using the same voltage regulator, so they should > > be able to be described by the same device tree node, shouldn't they? >=20 > I'm not exactly sure what you're meaning by "use a regulator" and "we'd > be adding a node for that", could you please clarify? This v1 approach > uses a core-supply phandle (i.e. regulator is used), it doesn't require > extra nodes. What I meant to say was that the actual supply voltage is generated by some device (typically one of the SD outputs of the PMIC). Whether we model this as a power domain or a regulator doesn't really matter, right? So I'm wondering if the device that generates the voltage should be the power domain provider, just like it is the provider of the regulator if this was modelled as a regulator. Thierry --KuLpqunXa7jZSBt+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl+uteUACgkQ3SOs138+ s6HFrg//XUCBi+MoTYKA9Q0nyyDEbz8pB7xsPWf9AWJHRToygKc0DTU1ZaPQLNp+ zx+Yg2HSEBBzzv1c5cABiz0dUaE+gkzTfY74+wByGBumAiPaFCOmamm3fwgTlzsM ZzTrLxJShO6bIo12gq98qI68RxlwptdQcGagjc4QLcaL1xxhdyYiEFtQj8X3rwfp r2ELceMzT3klMTV34ghkgQKBRkgxm3thCmk+O/+scUwM9ju23OeClHBPsq+YwWz/ ItCwLTUXyfPTSzIqXbjPEGXPbNGS2aUdYo0YsY42Q5XswBGPGXV+VgCPd153Vyek x+tAG0YSkV3NWFIQKBR5iwvguqZbVYgBR8tonT+LH9qyx6wADX2bp1VtEssD3Dsq qWc7y+PnmrUkx895JcxYLzhGoN5Hr3xwKeTLSRxGCQQvh1fqJJO4Ja4QnBdxK1lm FLLCPrq0/yK+o6DKJnAWjBcVyWfY4z2MPej6lao9ZlR4nC0qaY9URhD//kujuB7R dsRKyAwamYzw0b1doZWjffloEhog7WbjMw8UsbF+E8K7kSNePUqgaWWMsZDwh6yI VrszC62dJzCUMweS9s2mSjQ08xGrcITA8i2qxMKpRQA6VoZzMAdP6WjxseQoDa4g 6Rsyr9Mt8Ed+Gs4vssp8C6jeFDQEGXM+37kYIC8LrNM21HZoq74= =p82m -----END PGP SIGNATURE----- --KuLpqunXa7jZSBt+--