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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 54275C43334 for ; Wed, 15 Jun 2022 20:49:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2Ime+Of+Sg1X5L8emfojZooXz0haFgrfej+jgyXzd6E=; b=puJ+Ds2A1YPhbC z7U5YLMwKOeqR8LTknBGSi4B06Zgb0cyWMf3q6LfSqL2wdYuNRzS2+gks73cFl3v8TP19Fu+PhB+H nOWr8+6iVqZfA72scgKnu34PkHE1c+A2KPWwUoAzn8MlLsfqwqFZKsuxfWUP36gojW0cIIhRRz18r KSm2RFAVmNKUWqPeYRz7Xbj2Lb+YiQKveql0k2VQ3jcvprqW7tdKiyExGzeAbN2uwunc4b4+nW+J4 ELW8HkMtNMywFOZnXBbXzugQyldNEeWyJGoE4EGeleq1xJxferJoKi6pxG+li0W1FkoMX6nVJ0KOx fiLtxOskXQ7ge4FHmhSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1ZwE-00GJWT-Fy; Wed, 15 Jun 2022 20:48:30 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1ZwA-00GJUD-DI for linux-arm-kernel@lists.infradead.org; Wed, 15 Jun 2022 20:48:28 +0000 Received: by mail-pf1-x430.google.com with SMTP id u37so4063925pfg.3 for ; Wed, 15 Jun 2022 13:48:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=c6+/MuYjgyn2udQAyYO1pcnAtH6vCX68BZVqdL6DnAM=; b=cJX06OPiClEPKrxTiXas7HB6WtJRm9cySIHWVKh7Ki7j3H9kK2AFdp8Q1FguyRd58x PaH1GoWdRDWmWvYK9aq02GYuLKlyPzPCiC/A0hNAHqw7XoGK2cbIiqa5oZeG98GmK33G UvBGwf064e/kjFJVo8x/gssDvQGs6OtC4xZmpdY5EjSujvGQnLOhOe75SGsnbn6onlRZ vCGCrcmmmIxGQ9v42+lPxCFsATzzGwavFuWZ2Q82aqm5WNb790TbSc1A6Y9wo3QK/QYf 19tRPPJ/Ai6gLmB9FsTwmcKiy6kaFR+c7wJs2RyhK8Ehe2mSkB/wRHeqe5IOAr3jotKW fPMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=c6+/MuYjgyn2udQAyYO1pcnAtH6vCX68BZVqdL6DnAM=; b=Br3wJnPHCGWFy3ge+GSZsUngpU8yE4U3FiMhMgCY6TZIT6L2QyAX/o9EkPF5p95z5o 0Lfy2D/jdsaezdFs34KvO3e0OjWEGBnoKbnqoPPVtiBTDM3h5JVqXJE+Y67/XbSkHoS2 tVpFfnJSBN/jQAM8Es8lv9yE1cdeKnTzYinnI9bKo5cfrFUmt/WkjnTJIY2EpgBmKGTS HiZGvfOFDgWcKREFX5OxcUtiKeKjL8U9HLdKjFsl7Lbdl+nby9QaCfzYYVzpAH0J+Rj0 fCGZCwQyeCPEjMRSYrt6OWXbN78P394ebLucPWt4qmYRruuSwL+n7rtva0r/9pHY849W tNkg== X-Gm-Message-State: AJIora/ZfVUNKptORML4OxDbcfiQX2NDR15Heu0Hr/5tTg2uQdJJyBKd SxmmymeIX/Yo3+r3a83oY5W2/Q== X-Google-Smtp-Source: AGRyM1vxUFh649IvXZavkwFGw+qBXaVL9n4KDXt80qmiBlcu4flgIbvfKkajNW5wqADIULcUT58ZmA== X-Received: by 2002:a05:6a00:26cf:b0:4f6:fc52:7b6a with SMTP id p15-20020a056a0026cf00b004f6fc527b6amr1389852pfw.39.1655326103240; Wed, 15 Jun 2022 13:48:23 -0700 (PDT) Received: from [172.22.33.138] ([192.77.111.2]) by smtp.gmail.com with ESMTPSA id p18-20020a17090a931200b001e8875e3326sm2225563pjo.47.2022.06.15.13.48.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Jun 2022 13:48:22 -0700 (PDT) Message-ID: Date: Wed, 15 Jun 2022 13:48:20 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v1 0/5] power: domain: Add driver for a PM domain provider which controls Content-Language: en-US To: Marcel Ziswiler , "max.oss.09@gmail.com" , "geert@linux-m68k.org" Cc: "linux-imx@nxp.com" , "broonie@kernel.org" , Francesco Dolcini , "robh@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "ulf.hansson@linaro.org" , "biju.das.jz@bp.renesas.com" , "bjorn.andersson@linaro.org" , "catalin.marinas@arm.com" , "dmitry.baryshkov@linaro.org" , "shawnguo@kernel.org" , "vkoul@kernel.org" , "geert+renesas@glider.be" , "kernel@pengutronix.de" , "khilman@kernel.org" , "s.hauer@pengutronix.de" , Andrejs Cainikovs , "will@kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" , "rafael@kernel.org" , "festevam@gmail.com" , "devicetree@vger.kernel.org" , Max Krummenacher References: <20220609150851.23084-1-max.oss.09@gmail.com> <20220613191549.GA4092455-robh@kernel.org> <12e3bb72-af2d-653f-b342-c6b4d6a1f292@linaro.org> <8decc5b6d1f0bc028d60d444d939da4408e756d3.camel@toradex.com> From: Krzysztof Kozlowski In-Reply-To: <8decc5b6d1f0bc028d60d444d939da4408e756d3.camel@toradex.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220615_134826_510377_B180413E X-CRM114-Status: GOOD ( 33.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 15/06/2022 11:13, Marcel Ziswiler wrote: > On Wed, 2022-06-15 at 10:37 -0700, Krzysztof Kozlowski wrote: >> On 15/06/2022 10:31, Marcel Ziswiler wrote: >>> Hi >>> >>> On Wed, 2022-06-15 at 10:15 -0700, Krzysztof Kozlowski wrote: >>>> On 15/06/2022 09:10, Max Krummenacher wrote: >>>>> Hi >>>>> >>>>> On Tue, Jun 14, 2022 at 9:22 AM Geert Uytterhoeven wrote: >>>>>> >>>>>> Hi Rob, >>>>>> >>>>>> On Mon, Jun 13, 2022 at 9:15 PM Rob Herring wrote: >>>>>>> On Thu, Jun 09, 2022 at 05:08:46PM +0200, Max Krummenacher wrote: >>>>>>>> From: Max Krummenacher >>>>>>>> >>>>>>>> its power enable by using a regulator. >>>>>>>> >>>>>>>> The currently implemented PM domain providers are all specific to >>>>>>>> a particular system on chip. >>>>>>> >>>>>>> Yes, power domains tend to be specific to an SoC... 'power-domains' is >>>>>>> supposed to be power islands in a chip. Linux 'PM domains' can be >>>>>>> anything... >>>>> >>>>> I don't see why such power islands should be restricted to a SoC. You can >>>>> build the exact same idea on a PCB or even more modular designs. >>>> >>>> In the SoC these power islands are more-or-less defined. These are real >>>> regions gated by some control knob. >>>> >>>> Calling few devices on a board "power domain" does not make it a power >>>> domain. There is no grouping, there is no control knob. >>>> >>>> Aren't you now re-implementing regulator supplies? How is this different >>>> than existing supplies? >>> >>> I believe the biggest difference between power-domains and regulator-supplies lays in the former being >>> driver >>> agnostic while the later is driver specific. >> >> That's one way to look, but the other way (matching the bindings >> purpose) is to look at hardware. You have physical wire / voltage rail >> supply - use regulator supply. In the terms of the hardware - what is >> that power domain? It's a concept, not a physical object. > > Well, but how can that concept then exist within the SoC but not outside? I don't get it. Isn't it just the > exact same physical power gating thingy whether inside the SoC or on a PCB? > >>> Meaning with power-domains one can just add such arbitrary >>> structure to the device tree without any further driver specific changes/handling required. While with >>> regulator-supplies each and every driver actually needs to have driver specific handling thereof added. Or >>> do I >>> miss anything? >> >> Thanks for clarification but I am not sure if it matches the purpose of >> bindings and DTS. You can change the implementation as well to have >> implicit regulators. No need for new bindings for that. > > Okay, maybe that would also work, of course. So basically add a new binding That I did not propose. :) We have a binding for regulator supplies so you do no need a new one. > which allows adding regulators to > arbitrary nodes which then will be generically handled by e.g. runtime PM. Almost something like assigned- > clocks [1] you mean? I guess that could work. Remember that's why Max posted it as an RFC to get such feedback. > Thanks for further refining those ideas. DTS and bindings describe here the hardware, so focus on that. Device is supplied by some regulator which I assume can be controlled by GPIO. I don't think you need new bindings for that. Implementation of bindings, so Linux driver, is different thing. > >>> We are really trying to model something where a single GPIO pin (via a GPIO regulator or whatever) can >>> control >>> power to a variety of on-board peripherals. And, of course, we envision runtime PM actually making use of >>> it >>> e.g. when doing suspend/resume. >> >> And this GPIO pin controls what? Some power switch which cuts the power >> of one regulator or many? > > Well, that doesn't really matter. Resp. this part one should be able to sufficiently model using whatever > available regulator lore we already have (e.g. whatever delays/times). > >> If many different regulators, how do you >> handle small differences in ramp up time? > > Well, I don't think this is any different to any other regulator(s), not? Them HW folks will just need to tell > us some reasonable numbers for those delays/times. Probably... I just wonder how that would work in practice. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel