Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp681689rwe; Fri, 26 Aug 2022 12:12:55 -0700 (PDT) X-Google-Smtp-Source: AA6agR6fOQ07wINlCeDTub0VLSBZCgcvXCKHN9dgZX1E/+m+M2sbpFw451m0F8AFNpIFoM6j7Ckl X-Received: by 2002:a17:907:97d3:b0:73d:8b9b:a6c1 with SMTP id js19-20020a17090797d300b0073d8b9ba6c1mr6311972ejc.71.1661541175570; Fri, 26 Aug 2022 12:12:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661541175; cv=none; d=google.com; s=arc-20160816; b=GTkyzeTEm4YaytLpiw8X83htnn8e+0PAjzoouwurEPJZCYZdJFoLYDU5CI42NlUR11 7lfGXxvSJHBCKMTn1o1rehAnUQNz4SfiCooRD25Bgn5ys18tYsRfMOhFhSfAvmkJHgBW ez/l6p27H60zXbvO7A3i0ErEAlASlZiNqgKK0C5dHAJ8dEkUpI8H2pwo3/QeduX6ONXQ BMJZoh1WpuXV/Wei/fBsLa4uT6RU/+vrzDI/y50gHUs7vUk4HUCUVCXXGongT9u3IfJj 54mKVf2srzr+B0l/H04VCs2OVM5vwljYgTq3FeRz3DrW89i1JQuJtOrI7YC0XTiqHMOY 5b+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=HRgBpFXgSQMZGCsBW/CwE1JX5bs8OGAzh6IFnAk2Y1s=; b=Iw/yeGgPuiCbNeBAA/cF/LmgojzjpbfiM73AU1gnCQ8f9Gb+QwAibpiqVTLKQX1l3W W0MQFeXqfqfOkbN6jORqScKItfdcwb6JrJewIhDurPWB0WmVP6QGZ7mty4AhEYAGn8Jn H9gnSy/pMftuylLFHcj+RRpez9rZhSO4Q37W1SzzLhdY2SbkHk9PQNf2Oxnyl6NMZVpd hrYv+XgWCwAMszi5rr2g8zDGjiVu4yBEIQNobz6DlAlBaKSPCunGQeS1iZmDEMcc/sv0 uw0B1VTroxPh1h2qGXHIWuCokI/2XCCjFZYwX/moJYk5u2F6cFVBJGpEWdWHyg5Jiv2N JDlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he30-20020a1709073d9e00b0073d74e1a466si2026473ejc.390.2022.08.26.12.12.29; Fri, 26 Aug 2022 12:12:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345174AbiHZSop (ORCPT + 99 others); Fri, 26 Aug 2022 14:44:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345183AbiHZSoZ (ORCPT ); Fri, 26 Aug 2022 14:44:25 -0400 Received: from relay07.th.seeweb.it (relay07.th.seeweb.it [IPv6:2001:4b7a:2000:18::168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 627AAF0746 for ; Fri, 26 Aug 2022 11:41:18 -0700 (PDT) Received: from [192.168.1.101] (afbd60.neoplus.adsl.tpnet.pl [95.49.29.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id 7F4C33F6DA; Fri, 26 Aug 2022 20:40:16 +0200 (CEST) Message-ID: Date: Fri, 26 Aug 2022 20:40:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH 2/7] arm64: dts: qcom: sa8295p-adp: Specify which LDO modes are allowed Content-Language: en-US To: Douglas Anderson , Bjorn Andersson Cc: Andrew Halaney , Mark Brown , Andy Gross , Johan Hovold , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220825164205.4060647-1-dianders@chromium.org> <20220825094155.2.I430a56702ab0af65244e62667bb7743107de0c96@changeid> From: Konrad Dybcio In-Reply-To: <20220825094155.2.I430a56702ab0af65244e62667bb7743107de0c96@changeid> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25.08.2022 18:42, Douglas Anderson wrote: > This board uses RPMH, specifies "regulator-allow-set-load" for LDOs, > but doesn't specify any modes with "regulator-allowed-modes". > > Prior to commit efb0cb50c427 ("regulator: qcom-rpmh: Implement > get_optimum_mode(), not set_load()") the above meant that we were able > to set either LPM or HPM mode. After that commit (and fixes [1]) we'll > be stuck at the initial mode. Discussion of this has resulted in the > decision that the old dts files were wrong and should be fixed to > fully restore old functionality. > > Let's re-enable the old functionality by fixing the dts. > > [1] https://lore.kernel.org/r/20220824142229.RFT.v2.2.I6f77860e5cd98bf5c67208fa9edda4a08847c304@changeid > > Fixes: 519183af39b2 ("arm64: dts: qcom: add SA8540P and ADP") > Signed-off-by: Douglas Anderson > --- Reviewed-by: Konrad Dybcio Konrad > > arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 45 ++++++++++++++++++++++++ > 1 file changed, 45 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts > index 9398f0349944..6d05cb54e32f 100644 > --- a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts > +++ b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts > @@ -36,6 +36,9 @@ vreg_l3a: ldo3 { > regulator-max-microvolt = <1208000>; > regulator-initial-mode = ; > regulator-allow-set-load; > + regulator-allowed-modes = > + + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l5a: ldo5 { > @@ -44,6 +47,9 @@ vreg_l5a: ldo5 { > regulator-max-microvolt = <912000>; > regulator-initial-mode = ; > regulator-allow-set-load; > + regulator-allowed-modes = > + + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l7a: ldo7 { > @@ -52,6 +58,9 @@ vreg_l7a: ldo7 { > regulator-max-microvolt = <1800000>; > regulator-initial-mode = ; > regulator-allow-set-load; > + regulator-allowed-modes = > + + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l13a: ldo13 { > @@ -60,6 +69,9 @@ vreg_l13a: ldo13 { > regulator-max-microvolt = <3072000>; > regulator-initial-mode = ; > regulator-allow-set-load; > + regulator-allowed-modes = > + + RPMH_REGULATOR_MODE_HPM>; > }; > }; > > @@ -73,6 +85,9 @@ vreg_l1c: ldo1 { > regulator-max-microvolt = <912000>; > regulator-initial-mode = ; > regulator-allow-set-load; > + regulator-allowed-modes = > + + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l2c: ldo2 { > @@ -81,6 +96,9 @@ vreg_l2c: ldo2 { > regulator-max-microvolt = <3072000>; > regulator-initial-mode = ; > regulator-allow-set-load; > + regulator-allowed-modes = > + + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l3c: ldo3 { > @@ -89,6 +107,9 @@ vreg_l3c: ldo3 { > regulator-max-microvolt = <1200000>; > regulator-initial-mode = ; > regulator-allow-set-load; > + regulator-allowed-modes = > + + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l4c: ldo4 { > @@ -97,6 +118,9 @@ vreg_l4c: ldo4 { > regulator-max-microvolt = <1208000>; > regulator-initial-mode = ; > regulator-allow-set-load; > + regulator-allowed-modes = > + + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l6c: ldo6 { > @@ -105,6 +129,9 @@ vreg_l6c: ldo6 { > regulator-max-microvolt = <1200000>; > regulator-initial-mode = ; > regulator-allow-set-load; > + regulator-allowed-modes = > + + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l7c: ldo7 { > @@ -113,6 +140,9 @@ vreg_l7c: ldo7 { > regulator-max-microvolt = <1800000>; > regulator-initial-mode = ; > regulator-allow-set-load; > + regulator-allowed-modes = > + + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l10c: ldo10 { > @@ -121,6 +151,9 @@ vreg_l10c: ldo10 { > regulator-max-microvolt = <2504000>; > regulator-initial-mode = ; > regulator-allow-set-load; > + regulator-allowed-modes = > + + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l17c: ldo17 { > @@ -129,6 +162,9 @@ vreg_l17c: ldo17 { > regulator-max-microvolt = <2504000>; > regulator-initial-mode = ; > regulator-allow-set-load; > + regulator-allowed-modes = > + + RPMH_REGULATOR_MODE_HPM>; > }; > }; > > @@ -142,6 +178,9 @@ vreg_l3g: ldo3 { > regulator-max-microvolt = <1200000>; > regulator-initial-mode = ; > regulator-allow-set-load; > + regulator-allowed-modes = > + + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l7g: ldo7 { > @@ -150,6 +189,9 @@ vreg_l7g: ldo7 { > regulator-max-microvolt = <1800000>; > regulator-initial-mode = ; > regulator-allow-set-load; > + regulator-allowed-modes = > + + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l8g: ldo8 { > @@ -158,6 +200,9 @@ vreg_l8g: ldo8 { > regulator-max-microvolt = <880000>; > regulator-initial-mode = ; > regulator-allow-set-load; > + regulator-allowed-modes = > + + RPMH_REGULATOR_MODE_HPM>; > }; > }; > };