From patchwork Thu Aug 25 16:41:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 600054 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 EEEC7ECAA25 for ; Thu, 25 Aug 2022 16:43:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243256AbiHYQnU (ORCPT ); Thu, 25 Aug 2022 12:43:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243133AbiHYQm7 (ORCPT ); Thu, 25 Aug 2022 12:42:59 -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 44AD3BB904 for ; Thu, 25 Aug 2022 09:42:32 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id g19so2040284pfb.0 for ; Thu, 25 Aug 2022 09:42:32 -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=1RT2iBx43NFnjKdHIG/TzkNxgoE8HvvMK/6A5nGIZY8=; b=mgSd+WoXDWNWU0XwWzElQKlmWtID7KaY+b+/WeMIkVePriS+QaXgUQm4is+ZAH4EID 3sX8UGeLlpZqV+H48zhiX5nbKwVU2mEHKd985xZ0t4Z5+Xf6AsvMXSTgt7ygtfsCCuob sABCZmpD6MLcY9ShL6GmALPKF4LK+fN+/A8SE= 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=1RT2iBx43NFnjKdHIG/TzkNxgoE8HvvMK/6A5nGIZY8=; b=Q/69tkGmi58kr6CuQDK4kj+U0TU8pKjvqR3TT7CwhiQhvWBaEGUMsyV/ejzFNQ9q6N zaZo2nBNX4ex6CSDsrL/fqHKgef9ZBFicIRHohtGKzEaRBLk7jDbptbUTYV9pDLfIx1y /ihygePXBzcEHLYDzWNflx9G8kFizl18+L+dqveekiFlBc2vCS/ZIdxHAWhD5hfFj1Np 5Lj3DvH+YJkQvMwxReVw7Ho69IH6+T+t9PK3ygNOFDXNKBqqUBxydGjV228fp7Y9Y5VZ Zs9PRroVzsjmLQPk5mctD+rHibGwGr1GDuoPGjb01uMFGWim5asZ4lYXZGenIyTv2P1d tmRg== X-Gm-Message-State: ACgBeo1E1BsO0uD6Ecr+PXGuojFbQvY8WN9qIJOrqPcMgBao0d9UuH0B dQ2bsxQ2D2kEWi47eY5p7tnC8w== X-Google-Smtp-Source: AA6agR406ztk6+TEctlehR5sbJcg72II+iivP+WveLx1DRge8yz0O+tAvdkI3RzGAAfLeaoHgO2yEw== X-Received: by 2002:a65:6755:0:b0:41d:70c1:be0 with SMTP id c21-20020a656755000000b0041d70c10be0mr4043646pgu.99.1661445750998; Thu, 25 Aug 2022 09:42:30 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 09:42:30 -0700 (PDT) From: Douglas Anderson To: Bjorn Andersson Cc: 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 0/7] arm64: dts: qcom: Fix broken regulator spec on RPMH boards Date: Thu, 25 Aug 2022 09:41:58 -0700 Message-Id: <20220825164205.4060647-1-dianders@chromium.org> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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. [1] https://lore.kernel.org/r/20220824142229.RFT.v2.2.I6f77860e5cd98bf5c67208fa9edda4a08847c304@changeid Douglas Anderson (7): 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: sc8280xp-thinkpad-x13s: 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 | 45 +++++++++++++++++++ arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 33 ++++++++++++++ .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 30 +++++++++++++ .../dts/qcom/sm8150-sony-xperia-kumano.dtsi | 6 +++ .../boot/dts/qcom/sm8250-sony-xperia-edo.dtsi | 6 +++ arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 12 +++++ 7 files changed, 144 insertions(+), 1 deletion(-) Reviewed-by: Andrew Halaney Reviewed-by: Andrew Halaney Reviewed-by: Andrew Halaney Reviewed-by: Konrad Dybcio Reviewed-by: Konrad Dybcio Reviewed-by: Konrad Dybcio