From patchwork Thu Aug 25 16:41:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Anderson X-Patchwork-Id: 600376 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 7C148ECAA24 for ; Thu, 25 Aug 2022 16:43:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242563AbiHYQnT (ORCPT ); Thu, 25 Aug 2022 12:43:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243106AbiHYQm5 (ORCPT ); Thu, 25 Aug 2022 12:42:57 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95577BB90B for ; Thu, 25 Aug 2022 09:42:33 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id u22so18983068plq.12 for ; Thu, 25 Aug 2022 09:42:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=ijJ2pkBNHuBjJLx62XRRrMsVukQZ0pijiSuWRTmAOcg=; b=FpUumiYM8PyUzChNl+dISlDVe7Ai2xqr2SdiKrR7DU58rUk32wTu1pmwoOOTmreBFa T0ew/JfVd1fq4tsP+C1diInxwaM4HSRNiRoHIMWkVrQ3/2C4HwULW7jDpKbMJIuEclk9 Z9beSIC5CFYLM911N+vPTLGPsJD/K/tX79q1w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=ijJ2pkBNHuBjJLx62XRRrMsVukQZ0pijiSuWRTmAOcg=; b=q9N0cqygm9NreYwMyrp25SymDYjqOMXUvRjX1Q2o7NQQr2nmbUW+N2tnLwT74TBN1Y hTfS1z+bMH+lodB9WpCjRrJWpyknvHjLv9TLcE+HwS5JAzTeYNqxSAxg2Q85BptcM2pV /YtKw146x8uWHzXLsakfU9SXVUYxi8mSdar94MxkgyOXOeN33yLdP9/D/etwFRw/My5Y UEC0VuHWlt2608D0mUTEDmFdcvsgcHM10u5/3ADtAfbU0p87eV7/B1gbrXXYtKp2BbXS RtktPDO9ctDafmYMbqLUOL93shbF8NQ0/X35oWuw1a7r/lJtMcgTgCdwoEwqDYYblKpD bpxQ== X-Gm-Message-State: ACgBeo1T0AK2Q7FrZrzkSx6XnuVEJJawiR3lkTGLZL/wXsEfVlYqjRGN BYSzOpEw88dRkG/NahiD6Ko7LQ== X-Google-Smtp-Source: AA6agR5qJDtbVVpWXZGCSxH+GzWXDOfrZz/xVX1OL4NkcvTQOPMSawsKsdQDaPTw7mTSVKdhn7tFZg== X-Received: by 2002:a17:902:ea0e:b0:16f:11bf:efe5 with SMTP id s14-20020a170902ea0e00b0016f11bfefe5mr4648992plg.57.1661445752765; Thu, 25 Aug 2022 09:42:32 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:201:b7f2:d739:e847:6e53]) by smtp.gmail.com with ESMTPSA id y13-20020a17090a154d00b001f2ef3c7956sm3775799pja.25.2022.08.25.09.42.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 09:42:32 -0700 (PDT) From: Douglas Anderson To: Bjorn Andersson Cc: Andrew Halaney , Mark Brown , Douglas Anderson , Andy Gross , Bhupesh Sharma , Konrad Dybcio , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/7] arm64: dts: qcom: sa8155p-adp: Specify which LDO modes are allowed Date: Thu, 25 Aug 2022 09:41:59 -0700 Message-Id: <20220825094155.1.Id59c32b560c4662d8b3697de2bd494d08d654806@changeid> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog In-Reply-To: <20220825164205.4060647-1-dianders@chromium.org> References: <20220825164205.4060647-1-dianders@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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: 5b85e8f2225c ("arm64: dts: qcom: sa8155p-adp: Add base dts file") Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/sa8155p-adp.dts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sa8155p-adp.dts b/arch/arm64/boot/dts/qcom/sa8155p-adp.dts index ba547ca9fc6b..ddb9cb182152 100644 --- a/arch/arm64/boot/dts/qcom/sa8155p-adp.dts +++ b/arch/arm64/boot/dts/qcom/sa8155p-adp.dts @@ -43,7 +43,6 @@ vreg_s4a_1p8: smps4 { regulator-always-on; regulator-boot-on; - regulator-allow-set-load; vin-supply = <&vreg_3p3>; }; @@ -137,6 +136,9 @@ vreg_l5a_0p88: ldo5 { regulator-max-microvolt = <880000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l7a_1p8: ldo7 { @@ -152,6 +154,9 @@ vreg_l10a_2p96: ldo10 { regulator-max-microvolt = <2960000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l11a_0p8: ldo11 { @@ -258,6 +263,9 @@ vreg_l5c_1p2: ldo5 { regulator-max-microvolt = <1200000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l7c_1p8: ldo7 { @@ -273,6 +281,9 @@ vreg_l8c_1p2: ldo8 { regulator-max-microvolt = <1200000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l10c_3p3: ldo10 { From patchwork Thu Aug 25 16:42:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Anderson X-Patchwork-Id: 600375 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 50D01ECAA25 for ; Thu, 25 Aug 2022 16:43:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231594AbiHYQnV (ORCPT ); Thu, 25 Aug 2022 12:43:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233141AbiHYQnD (ORCPT ); Thu, 25 Aug 2022 12:43:03 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3B04BB92C for ; Thu, 25 Aug 2022 09:42:35 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id t5so1739615pjs.0 for ; Thu, 25 Aug 2022 09:42:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=e/fD7sKxnTMTED8wIUFpATFsGKD6ybPH9oG2WPNRWok=; b=ltchGKz8TzyNo0cZcFPvC2GBTH9V9f+1y1mjExbH8r1jZCj+Nx0pOjOD1k81FWocER DOMGax9JdqjwayYbU9wBTXo9xnYVv3315yF3troEEiIHEG3A1Qp/C6zeDEJn3/AOTwkY OVWn3oUfs/zfPIKdARPwQDXxuJkB+Qf8fV8fM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=e/fD7sKxnTMTED8wIUFpATFsGKD6ybPH9oG2WPNRWok=; b=IsOMS5vgtTWUrnsWrO0s6V8QhTwW6l498YVp490j72OSkr56lNqtvCPqrH/CmLpBLf RZcIVJn+zRJ5BS1kFCTt5gXJmOogZ1hqPgBXlDXvk9OhO4k/k8I73skGZgHhQY96IkyM SgLWc4IqF73/yLqsDui9fsBtBRXJxPensXw9GOGYoNtBaZsZPs0a6oLUCf/QA+z187qM eedDinFOqenKhFLwxLySts5DSliC1A62pdLYy+JXS5/GgLqLUbajAPf4elz0G+/TPjT7 fTC3UONIvn7GNgEZ+Ye/An0ashKxOuoBgQ3N3TGI2l/vPS/6WljYp3XTDtmX20KnlTgQ VxNQ== X-Gm-Message-State: ACgBeo0UeRJ7K4dCBsME1b7IvxpQPOrEoxwr+qFBzTqcQB4fzy2uLQIq k1CFBhS3iVuRGzRhyBtGcDIJDA== X-Google-Smtp-Source: AA6agR7eGfeqQGJzsdcwY0kKSKRwuBqDU7PrLa/tRF93qIGxFFnclul+YZxqN2K0cOcynGFvY2M+vg== X-Received: by 2002:a17:902:e851:b0:172:dda3:77d3 with SMTP id t17-20020a170902e85100b00172dda377d3mr4482458plg.19.1661445754631; Thu, 25 Aug 2022 09:42:34 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:201:b7f2:d739:e847:6e53]) by smtp.gmail.com with ESMTPSA id y13-20020a17090a154d00b001f2ef3c7956sm3775799pja.25.2022.08.25.09.42.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 09:42:33 -0700 (PDT) From: Douglas Anderson To: Bjorn Andersson Cc: Andrew Halaney , Mark Brown , Douglas Anderson , Andy Gross , Johan Hovold , Konrad Dybcio , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/7] arm64: dts: qcom: sa8295p-adp: Specify which LDO modes are allowed Date: Thu, 25 Aug 2022 09:42:00 -0700 Message-Id: <20220825094155.2.I430a56702ab0af65244e62667bb7743107de0c96@changeid> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog In-Reply-To: <20220825164205.4060647-1-dianders@chromium.org> References: <20220825164205.4060647-1-dianders@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 --- 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 = + ; }; vreg_l5a: ldo5 { @@ -44,6 +47,9 @@ vreg_l5a: ldo5 { regulator-max-microvolt = <912000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l7a: ldo7 { @@ -52,6 +58,9 @@ vreg_l7a: ldo7 { regulator-max-microvolt = <1800000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l13a: ldo13 { @@ -60,6 +69,9 @@ vreg_l13a: ldo13 { regulator-max-microvolt = <3072000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; }; @@ -73,6 +85,9 @@ vreg_l1c: ldo1 { regulator-max-microvolt = <912000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l2c: ldo2 { @@ -81,6 +96,9 @@ vreg_l2c: ldo2 { regulator-max-microvolt = <3072000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l3c: ldo3 { @@ -89,6 +107,9 @@ vreg_l3c: ldo3 { regulator-max-microvolt = <1200000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l4c: ldo4 { @@ -97,6 +118,9 @@ vreg_l4c: ldo4 { regulator-max-microvolt = <1208000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l6c: ldo6 { @@ -105,6 +129,9 @@ vreg_l6c: ldo6 { regulator-max-microvolt = <1200000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l7c: ldo7 { @@ -113,6 +140,9 @@ vreg_l7c: ldo7 { regulator-max-microvolt = <1800000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l10c: ldo10 { @@ -121,6 +151,9 @@ vreg_l10c: ldo10 { regulator-max-microvolt = <2504000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l17c: ldo17 { @@ -129,6 +162,9 @@ vreg_l17c: ldo17 { regulator-max-microvolt = <2504000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; }; @@ -142,6 +178,9 @@ vreg_l3g: ldo3 { regulator-max-microvolt = <1200000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l7g: ldo7 { @@ -150,6 +189,9 @@ vreg_l7g: ldo7 { regulator-max-microvolt = <1800000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l8g: ldo8 { @@ -158,6 +200,9 @@ vreg_l8g: ldo8 { regulator-max-microvolt = <880000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; }; }; From patchwork Thu Aug 25 16:42:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Anderson X-Patchwork-Id: 600374 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 B8AE7ECAA25 for ; Thu, 25 Aug 2022 16:43:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232011AbiHYQnj (ORCPT ); Thu, 25 Aug 2022 12:43:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241628AbiHYQnK (ORCPT ); Thu, 25 Aug 2022 12:43:10 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B64BBBB93F for ; Thu, 25 Aug 2022 09:42:37 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id io24so5713116plb.1 for ; Thu, 25 Aug 2022 09:42:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=GCPlgnHc/tqqZbHrYV7o6ujHvxSc8tKeAcrwUSDFs2U=; b=IBrHCrtG8zBkQ1j7mrbEy2+vHfvyFZ5fAen674rqZS/pGYZc2Xinw5PfNwVY0HrtI0 YqpWcbmPRsSSCLSUzv1iv5hB3lWUPxxeaTLukfCe8S5Xt7ZQpMR0woxvlaq1ahJf0rkQ gWfXdjHpWnh3jDc47vEoqQqev8DFqhHBGLbI8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=GCPlgnHc/tqqZbHrYV7o6ujHvxSc8tKeAcrwUSDFs2U=; b=vm5FsH2jATXk+PAKJDVq6dXoY5R31Bi0veC5T5F0FapT6BE5NUQ3FpIQhfXA4nhDdQ FQvg6nsFnWb99cbRklOEHn7VoF3KKGTeVKjUtopOJrqPKAnUOKWwHErl9lFRy688ryY6 TfoJXpIs2dBrCwgEVxQ9s7B6GUw9Oi4OSryOQnYR/E/jukXi0GvnHNZjMgZS6YFlijV/ U5FSYZodZT+xVfAWAmbl1ObNlDI+aQXjU3CZHY/HSiRlvEHyKWneUzHUpAd93lc0DhTK Xpb/0YvewoUX91DbWIg+NldI/HXFMKfp9F8z6yFsSXrFoytSfrLM7TcKjyhsgCBRSCCd oUiA== X-Gm-Message-State: ACgBeo2isB4fYk03EcR/fbVF4VtHcQPzB+U627K1gXIPD/h2tuK4WUE9 cYW6km/CFVfdf38GRwIBRGIOxQ== X-Google-Smtp-Source: AA6agR6Wt1iOXXhr0+A0GtcD6P4ZZH0CF6AGxjt4ez1FIHCEMrN2s3snf+8YYZAidTL+8CMDHzbP3A== X-Received: by 2002:a17:902:e80c:b0:172:fb87:d4c1 with SMTP id u12-20020a170902e80c00b00172fb87d4c1mr4624728plg.112.1661445756301; Thu, 25 Aug 2022 09:42:36 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:201:b7f2:d739:e847:6e53]) by smtp.gmail.com with ESMTPSA id y13-20020a17090a154d00b001f2ef3c7956sm3775799pja.25.2022.08.25.09.42.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 09:42:35 -0700 (PDT) From: Douglas Anderson To: Bjorn Andersson Cc: Andrew Halaney , Mark Brown , Douglas Anderson , Andy Gross , Johan Hovold , Konrad Dybcio , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/7] arm64: dts: qcom: sc8280xp-crd: Specify which LDO modes are allowed Date: Thu, 25 Aug 2022 09:42:01 -0700 Message-Id: <20220825094155.3.Ie7d2c50d2b42ef2d364f3a0c8e300e5ce1875b79@changeid> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog In-Reply-To: <20220825164205.4060647-1-dianders@chromium.org> References: <20220825164205.4060647-1-dianders@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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: ccd3517faf18 ("arm64: dts: qcom: sc8280xp: Add reference device") Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts index d6f272c71a47..f64d58e371bd 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts @@ -88,6 +88,9 @@ vreg_l3b: ldo3 { regulator-max-microvolt = <1200000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; regulator-boot-on; regulator-always-on; }; @@ -98,6 +101,9 @@ vreg_l4b: ldo4 { regulator-max-microvolt = <912000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l6b: ldo6 { @@ -106,6 +112,9 @@ vreg_l6b: ldo6 { regulator-max-microvolt = <880000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; regulator-boot-on; }; }; @@ -120,6 +129,9 @@ vreg_l1c: ldo1 { regulator-max-microvolt = <1800000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l7c: ldo7 { @@ -128,6 +140,9 @@ vreg_l7c: ldo7 { regulator-max-microvolt = <2504000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l13c: ldo13 { @@ -136,6 +151,9 @@ vreg_l13c: ldo13 { regulator-max-microvolt = <3072000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; }; @@ -151,6 +169,9 @@ vreg_l3d: ldo3 { regulator-max-microvolt = <1200000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l4d: ldo4 { @@ -159,6 +180,9 @@ vreg_l4d: ldo4 { regulator-max-microvolt = <1200000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l6d: ldo6 { @@ -167,6 +191,9 @@ vreg_l6d: ldo6 { regulator-max-microvolt = <880000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l7d: ldo7 { @@ -175,6 +202,9 @@ vreg_l7d: ldo7 { regulator-max-microvolt = <3072000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l9d: ldo9 { @@ -183,6 +213,9 @@ vreg_l9d: ldo9 { regulator-max-microvolt = <912000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; }; }; From patchwork Thu Aug 25 16:42:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Anderson X-Patchwork-Id: 600053 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 B914DECAA27 for ; Thu, 25 Aug 2022 16:43:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243279AbiHYQne (ORCPT ); Thu, 25 Aug 2022 12:43:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241729AbiHYQnK (ORCPT ); Thu, 25 Aug 2022 12:43:10 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FEF3BBA52 for ; Thu, 25 Aug 2022 09:42:39 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id 67so12135736pfv.2 for ; Thu, 25 Aug 2022 09:42:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=d4UI1F2bYQXxMhQ+dzwb24OzDE0AWn6jHagvx1unuTc=; b=j2TmCgWoyZB+Cpo//y2pL0iJWB6+3zKzqNBOT20pGN+dgBTtvknEH0+UTM8TAdCzVh dysJKTPjXyAB3UBpzQ2T3oOwomVdTHtN+4gQjAY5UA/sRo5XCxJETvStIXM8Incpygzr R7nZ1AFZAw2wD44wIiNTkupLmmp6c+QtnnQ4Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=d4UI1F2bYQXxMhQ+dzwb24OzDE0AWn6jHagvx1unuTc=; b=oYDy0nXyb/8lO0b7woA7Nzu0pN9ZnLKSxUSsvi8g9ED2nB8sg2Hw0glrP+edaNNMhI DU6MEMAA66sOkvb3q06QyczTx3YYNY1reheETQRIjlDtK/3BrfOjfo81lnvl5o1UiBR0 rdJzLKv6Uo8nHrq4YF0DbKPzAKZk6+wEXE+Cqb4pVl8Gkw+RMLeOZZPPu5MDbpCSKVmk 6dYZNyQ41WFz22YybmdwuKG8f3/QAMYIzdv1lvIuNjvMcHm1FIHMUto0ScpejuwduCsK aWGQLnPL6y8NJ9s5QstxmPt7vxmztaXV73No0ptOhPP7tsWnQsPvWPiq5Cp7pHMW73Ri kZqQ== X-Gm-Message-State: ACgBeo2SVDNR/unG+Xiy38CSRJ3tqaEsUaRLTOciCq76pZlRePaMCCtd m50UYC8CAQacvDPu4n0p/Qqnqg== X-Google-Smtp-Source: AA6agR7oIU56o6vD6pTE3YQcipHjvbw7cxpA0pM2NX2Adpgu6SmRbTACnoc2Kt822IR83Vn0HGDAFQ== X-Received: by 2002:a65:6e82:0:b0:41a:9b73:f0e6 with SMTP id bm2-20020a656e82000000b0041a9b73f0e6mr4049513pgb.371.1661445758192; Thu, 25 Aug 2022 09:42:38 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:201:b7f2:d739:e847:6e53]) by smtp.gmail.com with ESMTPSA id y13-20020a17090a154d00b001f2ef3c7956sm3775799pja.25.2022.08.25.09.42.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 09:42:37 -0700 (PDT) From: Douglas Anderson To: Bjorn Andersson Cc: Andrew Halaney , Mark Brown , Douglas Anderson , Andy Gross , Johan Hovold , Konrad Dybcio , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] arm64: dts: qcom: sc8280xp-thinkpad-x13s: Specify which LDO modes are allowed Date: Thu, 25 Aug 2022 09:42:02 -0700 Message-Id: <20220825094155.4.I897770a7ac41f8dc3e37dfed12102bacdbf9da56@changeid> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog In-Reply-To: <20220825164205.4060647-1-dianders@chromium.org> References: <20220825164205.4060647-1-dianders@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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: 32c231385ed4 ("arm64: dts: qcom: sc8280xp: add Lenovo Thinkpad X13s devicetree") Signed-off-by: Douglas Anderson Reviewed-by: Andrew Halaney Reviewed-by: Konrad Dybcio --- .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index 16c6e4d920bb..0c2534b4ec24 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -80,6 +80,9 @@ vreg_l3b: ldo3 { regulator-max-microvolt = <1200000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; regulator-boot-on; }; @@ -89,6 +92,9 @@ vreg_l4b: ldo4 { regulator-max-microvolt = <912000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l6b: ldo6 { @@ -97,6 +103,9 @@ vreg_l6b: ldo6 { regulator-max-microvolt = <880000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; regulator-boot-on; regulator-always-on; // FIXME: VDD_A_EDP_0_0P9 }; @@ -112,6 +121,9 @@ vreg_l1c: ldo1 { regulator-max-microvolt = <1800000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l12c: ldo12 { @@ -120,6 +132,9 @@ vreg_l12c: ldo12 { regulator-max-microvolt = <1800000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l13c: ldo13 { @@ -128,6 +143,9 @@ vreg_l13c: ldo13 { regulator-max-microvolt = <3072000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; }; @@ -143,6 +161,9 @@ vreg_l3d: ldo3 { regulator-max-microvolt = <1200000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l4d: ldo4 { @@ -151,6 +172,9 @@ vreg_l4d: ldo4 { regulator-max-microvolt = <1200000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l7d: ldo7 { @@ -159,6 +183,9 @@ vreg_l7d: ldo7 { regulator-max-microvolt = <3072000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l9d: ldo9 { @@ -167,6 +194,9 @@ vreg_l9d: ldo9 { regulator-max-microvolt = <912000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; }; }; From patchwork Thu Aug 25 16:42:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Anderson X-Patchwork-Id: 600052 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 69952ECAA28 for ; Thu, 25 Aug 2022 16:43:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243242AbiHYQnr (ORCPT ); Thu, 25 Aug 2022 12:43:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243168AbiHYQnO (ORCPT ); Thu, 25 Aug 2022 12:43:14 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1F38BBA6D for ; Thu, 25 Aug 2022 09:42:41 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id r15-20020a17090a1bcf00b001fabf42a11cso5663910pjr.3 for ; Thu, 25 Aug 2022 09:42:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=1iSoarUuZghqoZ9BO4yPvK2wOsr6euij1iIMl2wEkF0=; b=dn9VNFyC2mvOz+uMJuyG2QsZ4uQ6N4cyWaWpG+hO49Ft6/ndiFximzKeHO9zu4fbRz ymcUzje6WLdgRFROIJWbgW4Yd6SHWZDIlrnl9z76xFLv/FmImwYLoWxHdWak/dhQZJyL ggYcbDzlkl+gP7fcgc9DKYHT+wayT1BUILgxw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=1iSoarUuZghqoZ9BO4yPvK2wOsr6euij1iIMl2wEkF0=; b=RARxLjPXgbzak2RQBqLcHd3EcZkSIc11w+9+85WqNtOH+Ow42+OXJdNjBA+ETN5Rj5 UbaH2XZiBkBW6qgsdcN9LS9QSXhTVdue5qGGKz5jrMtjf2/2IBaNpKzap+LvCmayXN2a OndWB/P1rIfDbGZp5CyNzjMtK3TenGodDd+hqm7Du+DC4UEUAL09AMKQt2rFT/soZTk1 H+VVwjbaDx/sFjM1xC3ITr8TW4PfMNFSUa6GapJB40NOUYuFXm+PjbIN50uykWY/Za36 QHGyiC78m69qEVpvHqhmfIpOw4zTfsJf6FnZ/NxqWJhqlTu9vmuHkvBPYW+rGtonS9th djLQ== X-Gm-Message-State: ACgBeo2/z9Gu98VPP9SbEf0cBU/SEj1OWtkoeeJrcJiCh9QPPh440YAD Cmpk9Q0G/FwJSZCnrY0fvWB5XQ== X-Google-Smtp-Source: AA6agR6gIvPcI+zjJol/aTiQLzWV37Iywk46MfGMUttZNyfnd9mNkax4MDZzVRrO2F1uXUjDuZxTfw== X-Received: by 2002:a17:902:c40e:b0:172:dee4:882e with SMTP id k14-20020a170902c40e00b00172dee4882emr4472238plk.11.1661445759868; Thu, 25 Aug 2022 09:42:39 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:201:b7f2:d739:e847:6e53]) by smtp.gmail.com with ESMTPSA id y13-20020a17090a154d00b001f2ef3c7956sm3775799pja.25.2022.08.25.09.42.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 09:42:39 -0700 (PDT) From: Douglas Anderson To: Bjorn Andersson Cc: Andrew Halaney , Mark Brown , Douglas Anderson , Andy Gross , AngeloGioacchino Del Regno , Konrad Dybcio , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/7] arm64: dts: qcom: sm8150-xperia-kumano: Specify which LDO modes are allowed Date: Thu, 25 Aug 2022 09:42:03 -0700 Message-Id: <20220825094155.5.I51d60414a42ba9e3008e208d60a04c9ffc425fa7@changeid> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog In-Reply-To: <20220825164205.4060647-1-dianders@chromium.org> References: <20220825164205.4060647-1-dianders@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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: d0a6ce59ea4e ("arm64: dts: qcom: sm8150: Add support for SONY Xperia 1 / 5 (Kumano platform)") Signed-off-by: Douglas Anderson Reviewed-by: Andrew Halaney Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano.dtsi b/arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano.dtsi index 014fe3a31548..fb6e5a140c9f 100644 --- a/arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano.dtsi @@ -348,6 +348,9 @@ vreg_l6c_2p9: ldo6 { regulator-max-microvolt = <2960000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l7c_3p0: ldo7 { @@ -367,6 +370,9 @@ vreg_l9c_2p9: ldo9 { regulator-max-microvolt = <2960000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l10c_3p3: ldo10 { From patchwork Thu Aug 25 16:42:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Anderson X-Patchwork-Id: 600051 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 DF745ECAA28 for ; Thu, 25 Aug 2022 16:44:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243225AbiHYQn5 (ORCPT ); Thu, 25 Aug 2022 12:43:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243178AbiHYQnS (ORCPT ); Thu, 25 Aug 2022 12:43:18 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57181BC100 for ; Thu, 25 Aug 2022 09:42:43 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id pm13so11950614pjb.5 for ; Thu, 25 Aug 2022 09:42:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=0DBKrfU7DKgiI1KvvX+nAyw8m6/xO7rbgXWQBFaRlQ0=; b=Szgb9TcjMgWUBloz/Bd70+z+Ca4DwaJwdHfO79Q4ccB7TeuASUY6ak87QH11edK4Ar ZhDZbV9bFwyl+XMz2l9Thhddo/w3Bg6h/HLOPzZ8JGBeK1RmCoB7HbjSgexqN/rI1uVS uBDsyK14RegRz4UTjO/Jd1zv1isEVpQUNOkd0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=0DBKrfU7DKgiI1KvvX+nAyw8m6/xO7rbgXWQBFaRlQ0=; b=HY8wtnab0ObEIdrhDQvZV4TosfDDtdA6UHXRdS0P8QLcp7Fk4J5YO6qISsLow6XMJO G+mqMD1980muNHwR22PcMS8cX7xg162NwNBfeCpI2OdAtIgxMSOImOBb0cU0ok/bQgtf OzjX7hQheEJxNVBEbHK4fmR6UAOUqGq61QQ7pFTTe/2MBo90wK8sxQ/M4bXSmHFF5zTM Z6oJpySoK9dPMzMn25anxtegcPYuRdkXLpuc4iG0L+nSnJtcy+PJ8u97Kxe9kit9ERkg vgnPPDtJUy211WOvnACi+lwS0dNJhbLlb5q6x3cctcMn1pydPJ1xTRXRKVw/vts3+x50 9fiQ== X-Gm-Message-State: ACgBeo1A683IYBXOy8ES4IWHp1ZLEX6lwaR2fDGsyfoP2hb/iDK7qIxs sClU7M3TQwajcc7Rb03XH2as+A== X-Google-Smtp-Source: AA6agR48VwQ1Xt0g/fUB0eDVNvZ2JmBrdgqoaBEuMTjDRP86CaSN8IWRrY57abEO3okNsLrgA9tilg== X-Received: by 2002:a17:90b:3c82:b0:1fb:8ef:5ddb with SMTP id pv2-20020a17090b3c8200b001fb08ef5ddbmr14404195pjb.11.1661445762064; Thu, 25 Aug 2022 09:42:42 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:201:b7f2:d739:e847:6e53]) by smtp.gmail.com with ESMTPSA id y13-20020a17090a154d00b001f2ef3c7956sm3775799pja.25.2022.08.25.09.42.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 09:42:41 -0700 (PDT) From: Douglas Anderson To: Bjorn Andersson Cc: Andrew Halaney , Mark Brown , Douglas Anderson , Andy Gross , Konrad Dybcio , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/7] arm64: dts: qcom: sm8250-xperia-edo: Specify which LDO modes are allowed Date: Thu, 25 Aug 2022 09:42:04 -0700 Message-Id: <20220825094155.6.Ie446d5183d8b1e9ec4e32228ca300e604e3315eb@changeid> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog In-Reply-To: <20220825164205.4060647-1-dianders@chromium.org> References: <20220825164205.4060647-1-dianders@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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: 69cdb97ef652 ("arm64: dts: qcom: sm8250: Add support for SONY Xperia 1 II / 5 II (Edo platform)") Signed-off-by: Douglas Anderson Reviewed-by: Andrew Halaney Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi b/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi index 549e0a2aa9fe..5428aab3058d 100644 --- a/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi @@ -317,6 +317,9 @@ vreg_l6c_2p9: ldo6 { regulator-max-microvolt = <2960000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l7c_2p85: ldo7 { @@ -339,6 +342,9 @@ vreg_l9c_2p9: ldo9 { regulator-max-microvolt = <2960000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l10c_3p3: ldo10 { From patchwork Thu Aug 25 16:42:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Anderson X-Patchwork-Id: 600373 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 76389ECAA25 for ; Thu, 25 Aug 2022 16:43:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243082AbiHYQns (ORCPT ); Thu, 25 Aug 2022 12:43:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243229AbiHYQnP (ORCPT ); Thu, 25 Aug 2022 12:43:15 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18321BB037 for ; Thu, 25 Aug 2022 09:42:44 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id 142so1221342pfu.10 for ; Thu, 25 Aug 2022 09:42:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=0TbBYS0Nqh3bgSdnakQbiIorETtqlVR3C7+nG6SfSzA=; b=A1CPNa0ANiPIdOyEFNl/pcWWHZNCIdrC1EKRfKXZhZ3NFYRg1PtX1Htujhmy2fze4Z /sL7i/WiChF1ZA4G4yrV3SHo/peV+S3COXHuyBg9SJMbLojnHVFCdT51DvjJWG2SbJWJ VCq61CHAOGfIFj/j+Bbdp4F9a0Ndbywt3RpXI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=0TbBYS0Nqh3bgSdnakQbiIorETtqlVR3C7+nG6SfSzA=; b=u8PRbAHZy4oEoT5aPu0qtX6szQynpZHQGp8vQ5nZHz88hnWAZEoP3ErwDoskTb93sV SHmU1iN4T9lb69y0IIBz5M6I+ZRha9Kd8jLEI0a9/uslds7RKfg4zLlukaBFcCohT16X vHlZCt+7qOYVMUbIG2SI8iK7TgPUAurh2R+T+0rdWjpHaSb+LKAephO3r2MVdyJok1Ua iB/b/ea+gmuIzWgbMsQ3GbyZDbih7cvP8i85y/XJqiQ58TSCxu0tUROgoxvEcbjRjDWE jKJP+R+Vn0JwaXE0lnb1maL+Sg8HOkNSdaKW1lPf+WCwigShbKWR1nNbQxb/dzWel6+o l9Qg== X-Gm-Message-State: ACgBeo13pHA4S4CT/twhoQb9V7EI/Un8y85/WoD8bKNJKpoPGghsJbom 0hvC0yHGMpo4wSa0HStRirrVBA== X-Google-Smtp-Source: AA6agR5MmHBCUIcOi+TPd/VfpEsc9JppoQPMwYiyP0TdPFlQEA0rngeqizMGLf0HZoAfvsUcrLLL8Q== X-Received: by 2002:a63:e102:0:b0:41b:3901:990e with SMTP id z2-20020a63e102000000b0041b3901990emr3893320pgh.107.1661445764637; Thu, 25 Aug 2022 09:42:44 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:201:b7f2:d739:e847:6e53]) by smtp.gmail.com with ESMTPSA id y13-20020a17090a154d00b001f2ef3c7956sm3775799pja.25.2022.08.25.09.42.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 09:42:43 -0700 (PDT) From: Douglas Anderson To: Bjorn Andersson Cc: Andrew Halaney , Mark Brown , Douglas Anderson , Andy Gross , Konrad Dybcio , Krzysztof Kozlowski , Rob Herring , Vinod Koul , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/7] arm64: dts: qcom: sm8350-hdk: Specify which LDO modes are allowed Date: Thu, 25 Aug 2022 09:42:05 -0700 Message-Id: <20220825094155.7.I6799be85cf36d3b494f803cba767a569080624f5@changeid> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog In-Reply-To: <20220825164205.4060647-1-dianders@chromium.org> References: <20220825164205.4060647-1-dianders@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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: 9208c19f2124 ("arm64: dts: qcom: Introduce SM8350 HDK") Signed-off-by: Douglas Anderson Reviewed-by: Vinod Koul --- arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts index 0fcf5bd88fc7..69ae6503c2f6 100644 --- a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts +++ b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts @@ -107,6 +107,9 @@ vreg_l5b_0p88: ldo5 { regulator-max-microvolt = <888000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l6b_1p2: ldo6 { @@ -115,6 +118,9 @@ vreg_l6b_1p2: ldo6 { regulator-max-microvolt = <1208000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l7b_2p96: ldo7 { @@ -123,6 +129,9 @@ vreg_l7b_2p96: ldo7 { regulator-max-microvolt = <2504000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; vreg_l9b_1p2: ldo9 { @@ -131,6 +140,9 @@ vreg_l9b_1p2: ldo9 { regulator-max-microvolt = <1200000>; regulator-initial-mode = ; regulator-allow-set-load; + regulator-allowed-modes = + ; }; };