Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3345820rwe; Mon, 29 Aug 2022 09:52:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR7t+9ZpECFWq6Hnp35HqEGE6ewVE+N9QgPBwAJsEc2ki8uWUAodBaUWIgTOgnnZkqAK+9G9 X-Received: by 2002:a05:6402:184:b0:442:fd54:2a21 with SMTP id r4-20020a056402018400b00442fd542a21mr17185826edv.129.1661791956581; Mon, 29 Aug 2022 09:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661791956; cv=none; d=google.com; s=arc-20160816; b=Nq5w8FQH64VFcQ08NB7D4L5DD9PINlCoMe/eEFt93lcZ5bin2K3ojrzKu7LZeWlAXS fVyrkNNgj30KuHbBNKz1qxIYbr74hu5lt0h5kM/97PMqQ0Txn30GV87PGx+5AgRilZbl W/h1RPuWp7wg0WiRWe8kN7sxzO7Y8U7bRNvMkkdcNYXuE3HMiftfkizBs5hY5znOnuYw U0UO5ZFJ0c0UIdKNn/5aTjLQ8NiHjqjriDM9i49S0QgPB6phdL0245/FQ/Ov65xRzDRI gSUeEDAzUVvebkA166VX/6X1smBfbBEhpf+w7LBki8k5G/Al/5vVutoeb4jyyMNbOTEV SBeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=WdT08CN76zbi8+HJMBir9MGBrfnlLBceDmXsuG7Luf4=; b=alfgLfDuNI8QFHC4uTcdMPk0Q68vFo211d9eVB5pW5SQoDCD/lO3Kvjn0rCGEM4x5g lRwL+iVb8raYJRMsmnYObeNX0aIERR5NjiHPyhkppxyS4Qbvps3T9DSQRyxuRPIRnFmI 0oQ4//+lOZtPrSphFMvxC8t3q9DMkWxkDyX16L1Hhmbe0agcVWhQBuiuN7tFvfVb2PId tQCW1yC9Y5I1zhxRI9Navcbhh2qVcBi8wqFsV0Rxjzy7c7qD5+ev4DR9B96tp9zS6I2j 78CezpOVp8jZqEgzDdEGwt7ajihocFHA4vDzAW4H2DWEmaCdzZLDHVd1ti+8LtoSh3Do jVFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EMjaz9gf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l18-20020a056402255200b0043de73e065bsi8211986edb.269.2022.08.29.09.52.10; Mon, 29 Aug 2022 09:52:36 -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; dkim=pass header.i=@chromium.org header.s=google header.b=EMjaz9gf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229694AbiH2QuU (ORCPT + 99 others); Mon, 29 Aug 2022 12:50:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229579AbiH2QuR (ORCPT ); Mon, 29 Aug 2022 12:50:17 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB20D4E623 for ; Mon, 29 Aug 2022 09:50:15 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id u9-20020a17090a1f0900b001fde6477464so2143463pja.4 for ; Mon, 29 Aug 2022 09:50:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=WdT08CN76zbi8+HJMBir9MGBrfnlLBceDmXsuG7Luf4=; b=EMjaz9gf/N0gQmFFKxu/k4K51Yv5rhEtOECIFUfnOwlSFz//c1if/lWbGti1g++PgF vovlJeXhMuV/Kg32YDwUDEF2qq5gzLr1/Low3JTovpnfvOOJn17fKdur0SaqG1lfllLQ sahRUUv5AtWW0Bfnm4cchhFM6e1XsIB9U7LBI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=WdT08CN76zbi8+HJMBir9MGBrfnlLBceDmXsuG7Luf4=; b=mVifPjDBd4cQKSh8lggxRRseuB92v+JChzOXp04u6Sd9FdJ8cXcPUWKgOQFyMGRyxO ISH+yLSu2tOyu5SYLKWVzDiQF1bVZ+6yKBTcjk975ZfT8xkYW0MIg2L0EB8BrRR7x83u oXnjL5EhsAbldAKrRzkAvjf/xTbdyOKDAvY6LQpfYtReHyfdx3xuJWOMxH3TTLApgjKc yq+6PvlhCFqvL/3RHLiKQqQxjtgzltXKozCkAgfZabbc81osvXA5T/PMTbOYOEkCehQG VQsF3n+GgMRMu8vYcb4gxRNi+6hmKTTnIHHrXxI63uFxFQ3AfPOwpnQLsV97E1YhpEGe neSQ== X-Gm-Message-State: ACgBeo3xowvP7/5jQ8pW3YTpRO9IEy7lpeq2zMxa8qKtlBWLvgKwFeAc v6QDIu6SOU8gT/TBu/RJT7oBcw== X-Received: by 2002:a17:902:f684:b0:172:d54d:6f9e with SMTP id l4-20020a170902f68400b00172d54d6f9emr17386370plg.174.1661791815325; Mon, 29 Aug 2022 09:50:15 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:201:3a97:5017:7e33:8964]) by smtp.gmail.com with ESMTPSA id l1-20020a170902f68100b001729db603bcsm7864238plg.126.2022.08.29.09.50.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Aug 2022 09:50:14 -0700 (PDT) From: Douglas Anderson To: Bjorn Andersson Cc: Johan Hovold , Andrew Halaney , Mark Brown , Douglas Anderson , Andy Gross , AngeloGioacchino Del Regno , Bhupesh Sharma , Johan Hovold , 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 v2 0/6] arm64: dts: qcom: Fix broken regulator spec on RPMH boards Date: Mon, 29 Aug 2022 09:49:46 -0700 Message-Id: <20220829164952.2672848-1-dianders@chromium.org> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Prior to commit efb0cb50c427 ("regulator: qcom-rpmh: Implement get_optimum_mode(), not set_load()") several boards were able to change their regulator mode even though they had nothing listed in "regulator-allowed-modes". After that commit (and fixes [1]) we'll be stuck at the initial mode. Discussion of this (again, see [1]) has resulted in the decision that the old dts files were wrong and should be fixed to fully restore old functionality. This series attempts to fix everyone. I've kept each board in a separate patch to make stable / backports work easier. Affected boards were found with: rpmh_users=$(git grep -l -i rpmh -- arch/arm*/boot/dts/qcom) set_modes=$(grep -l regulator-allow-set-load ${rpmh_users}) but_no_allowed_modes=$(grep -l -v regulator-allowed-modes ${set_modes}) Fix was applied with: for f in ${but_no_allowed_modes}; do sed -i~ -e \ 's/^\(\s*\)regulator-allow-set-load;/\1regulator-allow-set-load;\n\1regulator-allowed-modes =\n\1 ;/'\ $f done Then results were manually inspected. In one board I removed a "regulator-allow-set-load" from a fixed regulator since that was clearly wrong. v2 of this series adds tags and also rebases atop Johan's series [2] as requested [3]. This ends up turning the series into a 6-part series instead of a 7-part one. It should also be noted that as of the v2 posting that the related regulator fixes have all landed in the regulator tree. [1] https://lore.kernel.org/r/20220824142229.RFT.v2.2.I6f77860e5cd98bf5c67208fa9edda4a08847c304@changeid [2] https://lore.kernel.org/r/20220803121942.30236-1-johan+linaro@kernel.org/ [3] https://lore.kernel.org/r/YwhwIX+Ib8epUYWS@hovoldconsulting.com/ Changes in v2: - Added note about removing regulator-allow-set-load from vreg_s4a_1p8 - Rebased atop ("...: sa8295p-adp: disallow regulator mode switches") - Rebased atop ("...: sc8280xp-crd: disallow regulator mode switches") Douglas Anderson (6): arm64: dts: qcom: sa8155p-adp: Specify which LDO modes are allowed arm64: dts: qcom: sa8295p-adp: Specify which LDO modes are allowed arm64: dts: qcom: sc8280xp-crd: Specify which LDO modes are allowed arm64: dts: qcom: sm8150-xperia-kumano: Specify which LDO modes are allowed arm64: dts: qcom: sm8250-xperia-edo: Specify which LDO modes are allowed arm64: dts: qcom: sm8350-hdk: Specify which LDO modes are allowed arch/arm64/boot/dts/qcom/sa8155p-adp.dts | 13 ++++++++++++- arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 12 ++++++++++++ arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 6 ++++++ .../boot/dts/qcom/sm8150-sony-xperia-kumano.dtsi | 6 ++++++ .../arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi | 6 ++++++ arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 12 ++++++++++++ 6 files changed, 54 insertions(+), 1 deletion(-) -- 2.37.2.672.g94769d06f0-goog