Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp56222imm; Wed, 30 May 2018 17:35:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJwKfDdEiclVtyqXm926BVzMhn6g3dvk1K9o3y7k8tqtb2aCacDg7Ae7b0KPdUSkxM0IYn2 X-Received: by 2002:a63:7c04:: with SMTP id x4-v6mr3771179pgc.67.1527726931871; Wed, 30 May 2018 17:35:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527726931; cv=none; d=google.com; s=arc-20160816; b=nWloBPakb7ndo2mkAZbW0yIkLkVB6COHhUVJmbugP5COkZ6QwVA+x7ReMCgQO8/TKo WhMe804cHzyIjaW9blcGUppLjyjUpA3+GVdo86G7LU+qX1ETr9Sk2gPSFMmEcOwSlVb7 Wb8MRvj4AlyGJrwPrZvsnsjgUxIqWvgJJp0Xt3strtge1dgZrKuU06oij0IQbj6UmTYI 4BawSmhcJbeORtTmp5heCU1zjiNzYDXpJ4NtKVb9Rp//JznR4eAZfV/Y967/RKSp3WDX kN0vi6sDsLVbw5OzDFvEg+3SvVzDln6sm3yrDJarpNQsAeqRWqtzHAEy0AeBwO+jovy9 eiRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=Jtg4vQlHTpJjQgzOwZQhCenxp54fHekQsMZ0SD69Anw=; b=g6e7w7fm9D1xd6NMV4bQljb8TIm3mEOTssN1G6DvyYJ4Q7FejgDaaP7rIEK/btNRoJ uuxPJRo4qzJxUjzVH+qPzRqCORMrdDhmFA53sbVgOgAAsUd9VpUdtNa1hl4ZE8vwFiDh W7Trb9C/M4K88jGcOIO8WaKsgBftsWyuXdA98z016mm+o2tYsedDMUALR/Kx+V0+nEiI hkDH1R5GQ3yTACUJAoLEWgyRU8cy5LNwGybDBcHT2ZKBvC7BCAa6/iLpZ1cKeN8oK1E3 y8O8pYOLxRycIMWJJkI2F/e2p7DlF2mwkT6g/dh8jUQ+p+TSYwyk6oDoWheXR6U7r1Ep nGmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=XFIaNaH+; dkim=fail header.i=@chromium.org header.s=google header.b=aZOLVDE2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p6-v6si11128820pfl.279.2018.05.30.17.35.16; Wed, 30 May 2018 17:35:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=XFIaNaH+; dkim=fail header.i=@chromium.org header.s=google header.b=aZOLVDE2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932561AbeEaAes (ORCPT + 99 others); Wed, 30 May 2018 20:34:48 -0400 Received: from mail-vk0-f68.google.com ([209.85.213.68]:34916 "EHLO mail-vk0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932495AbeEaAep (ORCPT ); Wed, 30 May 2018 20:34:45 -0400 Received: by mail-vk0-f68.google.com with SMTP id g72-v6so12277780vke.2 for ; Wed, 30 May 2018 17:34:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Jtg4vQlHTpJjQgzOwZQhCenxp54fHekQsMZ0SD69Anw=; b=XFIaNaH+MIE5qOIrVD58AMyB/+/n33i4YezZyfvGDD47Cx6BaLvU7mNlT3QR4kUF4E iqUeK4Fg874s0RdPcyo/WbSyoEbLcpD8KJCAiiPhj6yVwPnf2lV+jjJ/5DP2DaRuKTAn gIlfMeWDIOk0wSfGvkjY2s/O1UZDea4aC0Rf+j+c7h3bSMhqzWT2sm5HN5VD26eXb5lX XVRajZpb6IZD05/B3duAzW/8g4QHGgnK/n0XVjZ91yUiXg0dCRiSVJWY7MCV9UiBl/uE eKHITo5WWHa15jvUjczurugWet5s2+cZPTB2/mCPd9to8Cz0e/V9QjLRGCbVAsGx22CY UPpA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Jtg4vQlHTpJjQgzOwZQhCenxp54fHekQsMZ0SD69Anw=; b=aZOLVDE2YrEpQwSyBmsA9f14JOrs/M68wai/8YeYTQgUb+Afy398G9pIXoCA8Wkg9i 5JSS3HJIHhAiuDgrrwVjxW/eCBmSY+LsQ8VYSrOvsO0E431gc/YEFOJuWBi1qDBE2DNF 79QBF/PVPnLiua0rXObu2aagPVr0twan9hdm8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Jtg4vQlHTpJjQgzOwZQhCenxp54fHekQsMZ0SD69Anw=; b=HNttG/I1dVz84chgDxCXpwNge/GL/b3qLk5ouYUzz6Jy0rX+w6jotruxbXEXjczRFp xE4ZB1h/brRB9Vci8FOtaPCqIfzGrh6qXYvwUk+NiaNpGMRPbNcDp84HFpdmXYkgNxvn 7om3qrjwWGH8hc280xsjYvrRsB57wLdhuHTEMr5dF4oALBPmjLqT2N5CLwkD47rv9mKp aBcFU6uaviZV2WHeAP0Hjv6CdLwbY+ZSRv1/xA4CHsp5m5gbGzXkTTQyvAiDhrAXfAzG 6PV7EUpGPUmCJztJeuZbOOL8lnLwznhEfLLWpJSR2SYJSyZ/+hem0kULBG6QXOV6ewNF jOww== X-Gm-Message-State: ALKqPwfPorsUgw21dFoD9BxZW8PGwB0seAUP96i3BS9aiLt/8+32HiSN KoHzFAaVf+q1zXy+V1P8hPktPvaXnuRyv4HPnUPkng== X-Received: by 2002:a1f:d304:: with SMTP id k4-v6mr2896001vkg.101.1527726884426; Wed, 30 May 2018 17:34:44 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1f:3052:0:0:0:0:0 with HTTP; Wed, 30 May 2018 17:34:43 -0700 (PDT) In-Reply-To: <75088820-f20d-32ac-780a-5e7dacdf20ff@codeaurora.org> References: <6d03576cf90f06afb1194301cb41fc31704def1d.1527040878.git.collinsd@codeaurora.org> <20180530103720.GH6920@sirena.org.uk> <20180530155044.GR6920@sirena.org.uk> <20180530162007.GU6920@sirena.org.uk> <75088820-f20d-32ac-780a-5e7dacdf20ff@codeaurora.org> From: Doug Anderson Date: Wed, 30 May 2018 17:34:43 -0700 X-Google-Sender-Auth: KYtlvtIiAVWBCPObs3GX_1y4ekg Message-ID: Subject: Re: [PATCH v4 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings To: David Collins Cc: Mark Brown , Liam Girdwood , Rob Herring , Mark Rutland , linux-arm-msm@vger.kernel.org, Linux ARM , devicetree@vger.kernel.org, LKML , Rajendra Nayak , Stephen Boyd Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, May 30, 2018 at 4:39 PM, David Collins wrote: > Consider the case of a regulator with physical 10 mA LPM max current. Say > that modem and application processors each have a load on the regulator > that draws 9 mA. If they each respect the 10 mA limit, then they'd each > vote for LPM. The VRM block in RPMh hardware will aggregate these requests > together using a max function which will result in the regulator being set > to LPM, even though the total load is 18 mA (which would require high > power mode (HPM)). To get around this corner case, a LPM max current of 1 > uA can be used for all LDO supplies that have non-application processor > consumers. Thus, any non-zero regulator_set_load() current request will > result in setting the regulator to HPM (which is always safe). Is there any plan to change the way this works for future versions of RPMh? > The second situation that needs board-level DRMS mode and current limit > specification is SMPS regulator AUTO mode to PWM (HPM) mode switching. > SMPS regulators should theoretically always be able to operate in AUTO > mode as it switches automatically between PWM mode (which can provide the > maximum current) and PFM mode (which supports lower current but has higher > efficiency). However, there may be board/system issues that require > switching to PWM mode for certain use cases as it has better load > regulation (i.e. no PFM ripple for lower loads) and supports more > aggressive load current steps (i.e. greater A/ns). > > If a Linux consumer requires the ability to force a given SMPS regulator > from AUTO mode into PWM mode and that SMPS is shared by other Linux > consumers (which may be the case, but at least must be guaranteed to work > architecturally), then regulator_set_load() is the only option since it > provides aggregation, where as regulator_set_mode() does not. > regulator_set_load() can be utilized in this case by specifying AUTO mode > and PWM mode as drms modes and specifying some particular AUTO mode > maximum current (that is known by the consumer) in device tree. The > consumer can then call regulator_set_load() with the imposed AUTO mode > limit + delta when PWM mode is required and a lower value when AUTO mode > is sufficient. Mark: I'm leaving this firmly in your hands. I can see David's points here. I could even believe that some of this stuff could be board specific where one board might have slightly different capacitors or they might be placed differently and might need a higher power mode to keep the signal clean. -Doug