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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE3B5C04A68 for ; Tue, 26 Jul 2022 16:03:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233894AbiGZQDr convert rfc822-to-8bit (ORCPT ); Tue, 26 Jul 2022 12:03:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233383AbiGZQDq (ORCPT ); Tue, 26 Jul 2022 12:03:46 -0400 Received: from de-smtp-delivery-113.mimecast.com (de-smtp-delivery-113.mimecast.com [194.104.109.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1089417E06 for ; Tue, 26 Jul 2022 09:03:44 -0700 (PDT) Received: from CHE01-GV0-obe.outbound.protection.outlook.com (mail-gv0che01lp2048.outbound.protection.outlook.com [104.47.22.48]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-17-v-DuqpjXPFiBtxSJDWkrog-3; Tue, 26 Jul 2022 18:03:40 +0200 X-MC-Unique: v-DuqpjXPFiBtxSJDWkrog-3 Received: from ZRAP278MB0495.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:2e::8) by GVAP278MB0246.CHEP278.PROD.OUTLOOK.COM (2603:10a6:710:37::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.19; Tue, 26 Jul 2022 16:03:37 +0000 Received: from ZRAP278MB0495.CHEP278.PROD.OUTLOOK.COM ([fe80::3510:6f55:f14a:380f]) by ZRAP278MB0495.CHEP278.PROD.OUTLOOK.COM ([fe80::3510:6f55:f14a:380f%6]) with mapi id 15.20.5458.025; Tue, 26 Jul 2022 16:03:37 +0000 Date: Tue, 26 Jul 2022 18:03:37 +0200 From: Francesco Dolcini To: Ulf Hansson Cc: Max Krummenacher , Linus Walleij , Max Krummenacher , Linux PM list , Francesco Dolcini , Mark Brown , "Rafael J . Wysocki" , Kevin Hilman , Andrejs Cainikovs , Biju Das , Bjorn Andersson , Catalin Marinas , Dmitry Baryshkov , Fabio Estevam , Geert Uytterhoeven , Krzysztof Kozlowski , Marcel Ziswiler , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , Vinod Koul , Will Deacon , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux ARM , Linux Kernel Mailing List Subject: Re: [PATCH v1 0/5] power: domain: Add driver for a PM domain provider which controls Message-ID: <20220726160337.GA41736@francesco-nb.int.toradex.com> References: <20220609150851.23084-1-max.oss.09@gmail.com> In-Reply-To: X-ClientProxiedBy: ZR0P278CA0051.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1d::20) To ZRAP278MB0495.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:2e::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7a00a230-24d3-4880-7595-08da6f20668b X-MS-TrafficTypeDiagnostic: GVAP278MB0246:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: OwqtWOdrQOybZ14QQjP8WJWRqzsbOkxxiNrYWuuPZ3YbxEhNcWVc2Nuzhs/C0y205YUcPLREun2YkancoXSF2ZOgy/xvmOSEPPmdzCiMR3Tlwugoqz2x2NjBkaOByAO/chN9q+Gw9yekJSjaH/vCb2y5yBnZlsKxFxUILRkglJfzicd1Y0ESIl36X25BsifQX1zy9PPbJoNYvu5QAGo/1eK38BKJ6CtjxMTbT3ImAfy2MYNzlo9MBNYfClx92TWhMVbLh/7Q6/mvaSZbGUWL2FEc9ozGzmR5V8eZVucc2vtcGZWtPCtNAdO276+3qU9q2ougZnOtB7JqE4mvy0e5crqplFvMfrLSKT4cmzvbTpm4fKPkUtSjGDuKbqD2d56/LkpQNl+5jCYD2C2EvtWXXzb3qj1q/IsTdxJKXKhhyJfFplTH1yvs25I5XChNqfRvvGGTcQDGBQFHwmTTjxwH2tN/iWp1s0CWtJTUUoZ+BHWX7yet3WWNBoUkB1bJvp3jekhTEf2LjmWlzHqmfwwuuHGvwte+z3yK5XGVhHmJza1HO6zY7Vph2jCMt9PDjWhvejpdUCX2QPE09/fHwvIKzyoX0YkYq01G4UckiIqvKpd2xiX0asSCn7DLwKI/1VENZH1jIzu0hlpgdmSSAtiwYwFqWKY/2erTuFq78h4tXltkg7A7jnwO9ytcXCbHaQuwEG/7rnavHtQf5qJ3UiuZirRLk8Pc0DPvsozsrjs6AbwzF9ExtYPkMuJNtFFW/xL4L/yBkE+blxZEjsTW9VBXxdnnARQPh4AFcmR5ssooJ9EFFJIEsGsoZe6OMJd0Pz58 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:ZRAP278MB0495.CHEP278.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230016)(4636009)(39850400004)(366004)(346002)(376002)(136003)(396003)(52116002)(6506007)(1076003)(6486002)(478600001)(2906002)(44832011)(41300700001)(5660300002)(33656002)(86362001)(7416002)(8936002)(316002)(54906003)(38350700002)(38100700002)(6916009)(66946007)(83380400001)(186003)(6512007)(26005)(4326008)(8676002)(66556008)(66476007);DIR:OUT;SFP:1102 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?io2KSHXvK4sE6MW4ZTPVba+iYfW94eZUsG3ixr+43+NTI82ARdx1KUe5DTef?= =?us-ascii?Q?Zx83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N2wFkxwGvqfN85RI43T7JsN?= =?us-ascii?Q?lrinwv1yy1avQtXRqRnJZBT1EbaXBYU0eZFEPelIF3BQ22oZoUPLMTglaEyA?= =?us-ascii?Q?X0wzLYNlgyYihju7aOqb+ZJ0WbLhiE6xV7UUWZwulmxOI/pqEtDKvh03Cbs4?= =?us-ascii?Q?tLEHZ/8ETFv2VWaJZneNC0uvZ6Ju70b/SJbu2mI6C8GUXlD8tu4aLPHs055L?= =?us-ascii?Q?Rls3FFRomIUJpkxtLnrPLjN1anUbnVFx9ysiDzd4rS/2M2GrNk5G9+sEAIu1?= =?us-ascii?Q?PkDTW6eU9Yu/1sIrHHOM9DdeU2JBn09O7+sEgfxQDOOVK2mlZdTVMinnkpoX?= =?us-ascii?Q?0zoa0P8q28jhE5355SW9IZhbg+Z1c0IZb/6O3TSJOgG7isK4zca88f1WJg+F?= =?us-ascii?Q?n0jiOkvafh3bL2669Xxla2YfHc/Io0IDpXewh4z1Y2wdrnujV3NdCR8jv1N5?= =?us-ascii?Q?G8QQgW3iYRZCH3Y9C3/rZEm0CZ+UqXq1ueXA8t5diYebUssClANHh/ZEWEyW?= =?us-ascii?Q?5FTYMjV7QwWuqMGAnuJbxp1ij55492Nk3CFBM6mERMeaed29C/jnUKTO5rlm?= =?us-ascii?Q?ebhq1GHq/IM/txJWMHkKDOqI1pxyIioycJhYpJQSf1zr2mvE3CLhOnSq3LnE?= =?us-ascii?Q?gCZIWdx1xXaWr4XEQnEjDpab0zyr3COAAuTX6SldAEhJykbz5jadjNupc+HU?= =?us-ascii?Q?yiejicLG60rJEuk/VJzgSQ4=3D?= X-OriginatorOrg: toradex.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7a00a230-24d3-4880-7595-08da6f20668b X-MS-Exchange-CrossTenant-AuthSource: ZRAP278MB0495.CHEP278.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2022 16:03:37.7179 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d9995866-0d9b-4251-8315-093f062abab4 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4kzfuW1FBMESeUvddNC0/o9wezGO5bDj9HB8U3wEABqjrB/3PsdNr5WKwBmAJmBUUBk+s8TgW2iPWHNuq1MbL2xtdbcu+JuJEu9OrIXd6rE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVAP278MB0246 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CDE13A77 smtp.mailfrom=francesco.dolcini@toradex.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: toradex.com Content-Type: text/plain; charset=WINDOWS-1252 Content-Disposition: inline Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hello Ulf and everybody, On Wed, Jul 13, 2022 at 01:43:28PM +0200, Ulf Hansson wrote: > On Thu, 23 Jun 2022 at 18:14, Max Krummenacher wrote: > > So our plan is to explicitly handle a (shared) regulator in every > > driver involved, adding that regulator capability for drivers not > > already having one. > > Please don't! I have recently rejected a similar approach for Tegra > platforms, which now have been converted into using the power domain > approach. Just to quickly re-iterate how our hardware design looks like, we do have a single gpio that control the power of a whole board area that is supposed to be powered-off in suspend mode, this area could contains devices that have a proper Linux driver and some passive driver-less components (e.g. level shifter) - the exact mix varies. Our proposal in this series was to model this as a power domain that could be controlled with a regulator. Krzysztof, Robin and others clearly argued against this idea. The other approach would be to have a single regulator shared with the multiple devices we have there (still not clear how that would work in case we have only driver-less passive components). This is just a device-tree matter, maybe we would need to add support for a supply to some device drivers. Honestly my conclusion from this discussion is that the only viable option is this second one, do I miss something? > If it's a powerail that is shared between controllers (devices), used > to keep their registers values for example, that should be modelled as > a power domain. Moreover for power domains, we can support > voltage/frequency (performance) scaling, which isn't really applicable > to a plain regulator. > > However, if the actual powerrail fits well to be modelled as > regulator, please go ahead. Although, in this case, the regulator must > only be controlled behind a genpd provider's on/off callback, so you > still need the power domain approach, rather than using the regulator > in each driver and for each device. Francesco