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 F1A2AC0502A for ; Wed, 31 Aug 2022 06:42:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230298AbiHaGmv (ORCPT ); Wed, 31 Aug 2022 02:42:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229879AbiHaGmv (ORCPT ); Wed, 31 Aug 2022 02:42:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D54EBE4F6; Tue, 30 Aug 2022 23:42:50 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1B2D5617B0; Wed, 31 Aug 2022 06:42:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 669F9C433D6; Wed, 31 Aug 2022 06:42:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661928169; bh=wHxNLZ8wYygk0ecxMitMpRPezWusffNg4BCOnaA+jtk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=svl1S5Gytc5jhHXKgx+K9sMMUOzCPtxMTxgyz/oObb2TsC/wjQaN2R8DQ5X8Jm6c0 295dqgKWJmTdL5jlW6h/BgfMtN3x6KUk0Wbgl/Brw9nV0ivEOJJijvyldXesbiGvJL OfXQ5IVvTQahjyB4Dw/Nd3OMfeewepl1DV0GYlHiZ5jZyNtqes6ViuogXvxpSL2Tyl 4itvK27HP5M7r/u5Tls9m9D62PWSSbOIIwodgnhpbyRihvw5aDRIo7Ky6cfwicrRHg 7roIKr8kDc3oLkc2XK/t2SVqkVT/X2/FlnRf7QRt7K76aPFyUTX0Q9dlYdULOj4Xyi h18u130lvPinw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1oTHQz-0006E9-61; Wed, 31 Aug 2022 08:42:45 +0200 Date: Wed, 31 Aug 2022 08:42:45 +0200 From: Johan Hovold To: Douglas Anderson Cc: Bjorn Andersson , Andrew Halaney , Mark Brown , Konrad Dybcio , Andy Gross , Johan Hovold , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/6] arm64: dts: qcom: sa8295p-adp: Specify which LDO modes are allowed Message-ID: References: <20220829164952.2672848-1-dianders@chromium.org> <20220829094903.v2.2.I430a56702ab0af65244e62667bb7743107de0c96@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220829094903.v2.2.I430a56702ab0af65244e62667bb7743107de0c96@changeid> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Mon, Aug 29, 2022 at 09:49:48AM -0700, 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: Andrew Halaney > Reviewed-by: Konrad Dybcio > --- > > Changes in v2: > - Rebased atop ("...: sa8295p-adp: disallow regulator mode switches") Looks good: Reviewed-by: Johan Hovold > arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts > index ca5f5ad32ce5..5b16ac76fefb 100644 > --- a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts > +++ b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts > @@ -83,6 +83,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 { > @@ -98,6 +101,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 +119,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 { > @@ -121,6 +130,9 @@ vreg_l17c: ldo17 { > regulator-max-microvolt = <2504000>; > regulator-initial-mode = ; > regulator-allow-set-load; > + regulator-allowed-modes = > + + RPMH_REGULATOR_MODE_HPM>; > }; > };