From patchwork Fri Dec 8 00:44:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 751809 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="eb61o3P1" Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 324BF171D for ; Thu, 7 Dec 2023 16:44:21 -0800 (PST) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2c9fbb846b7so16880161fa.2 for ; Thu, 07 Dec 2023 16:44:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701996259; x=1702601059; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ca1lCqRiuB+dn4eD6wRvmXrlOFXjwi+eXsVfOaPlfrY=; b=eb61o3P11+4hXCPfjAGjtVv/CxX5TePchhwBx/7zPho3UH2DRSit6wUQ9+4n/AtYk/ ik77Guv033ItRiYe4mOHc+Pi+5YSmo7md0hBDtllXXUCW5fKBdLVBeq438ZS9sH5Ndm0 5/5eSbdnEe2+Mhqd+VcTYSxSyS8IkQU3l8aZzOwkulNZ3vranqWQCfDUfUlZF8gf3FAK Cv7k+OiK1z0Q8zNicLfh9QjJBjMkVc8DO3o+Q9gJTRGo9C/KqiE0xMPtvQ2/hAf4piIn voAuzZluTN+RyEvdF/VmncMPbKnbgHmetzHvjPKw0dP6WS0LlTNkM6JxNAZQQns2unUq +QLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701996259; x=1702601059; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ca1lCqRiuB+dn4eD6wRvmXrlOFXjwi+eXsVfOaPlfrY=; b=uEU8CCHzLlRbnXo+KhiR79j05+Yt5TlRNu3Ome3T6tbXyggDNcI18job0BqDIVI4w1 ZOjlHNbt00CPgTMfhAi1w0eLrGJRxNuh1sOBUWK86ZpPbqjriYmhOZzv7vLlUarQtJTk ti6fKAt1a3ecfcMZ8tNk1ATX7E9VJ1uiMhlb11KGpLcvZrZnaE5Zpf33IvKvl8KbaYKV v9v3Fh+J7sG9zFyl3yvYK+TDgdY9vVpKXQM+xA8xQL/GYWwCsWY0/cZyljLGgU9HuJN8 g1tU0I6wCStaj9ESvzsONnLs2eYcsnf8zwlT/PQ6JRyQ46W4d0t9dByn5mmtqO8t1akN u2CA== X-Gm-Message-State: AOJu0Yy/tiLoSC/AKX7n9yxE4cj7brjgghubKpClq7KcsREQQUgZ8+YK pxiDyRaRjFBD9O112sF+zg/QoH5BYfTz+k86CCM= X-Google-Smtp-Source: AGHT+IEFazNrnvYA5a3Guuj3KHXNNT/+RZQ+KRsB3cEPCIUHghag79B7oCAMRCi4Bxov3H1KQll3jw== X-Received: by 2002:a2e:a40c:0:b0:2c9:fa34:332d with SMTP id p12-20020a2ea40c000000b002c9fa34332dmr1967525ljn.12.1701996259568; Thu, 07 Dec 2023 16:44:19 -0800 (PST) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id d1-20020a2eb041000000b002c9f2c7cdecsm82645ljl.22.2023.12.07.16.44.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 16:44:19 -0800 (PST) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring Subject: [PATCH v6 02/11] dt-bindings: soc: qcom: qcom,saw2: define optional regulator node Date: Fri, 8 Dec 2023 03:44:08 +0300 Message-Id: <20231208004417.3393299-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231208004417.3393299-1-dmitry.baryshkov@linaro.org> References: <20231208004417.3393299-1-dmitry.baryshkov@linaro.org> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The SAW2 device can optionally provide a voltage regulator supplying the CPU core, cluster or L2 cache. Change the boolean 'regulator' property into a proper regulator description. This breaks schema compatibility for the sake of properly describing the regulator. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov --- .../devicetree/bindings/soc/qcom/qcom,saw2.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,saw2.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,saw2.yaml index 84b3f01d590c..a2d871ba8c45 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,saw2.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,saw2.yaml @@ -47,7 +47,7 @@ properties: minItems: 1 regulator: - type: boolean + $ref: /schemas/regulator/regulator.yaml# description: Indicates that this SPM device acts as a regulator device device for the core (CPU or Cache) the SPM is attached to. @@ -96,4 +96,17 @@ examples: reg = <0x17912000 0x1000>; }; + - | + /* + * Example 3: SAW2 with the bundled regulator definition. + */ + power-manager@2089000 { + compatible = "qcom,apq8064-saw2-v1.1-cpu", "qcom,saw2"; + reg = <0x02089000 0x1000>, <0x02009000 0x1000>; + + regulator { + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1300000>; + }; + }; ... From patchwork Fri Dec 8 00:44:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 751810 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="P9YyjwDb" Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1C6C171E for ; Thu, 7 Dec 2023 16:44:21 -0800 (PST) Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2c9f8faf57bso18909821fa.3 for ; Thu, 07 Dec 2023 16:44:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701996260; x=1702601060; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DCU40ALOWDsZXoiCOjw9KENnIzzkFJPcQLg2I6Hj5pA=; b=P9YyjwDbJEyODNjeCPxjhSrVFbLxAuUQEzWHH7swCWd4dwzVNtQZqLQw968lEFaZqF XATLvEcpujN+ZM69WXtSMUb6rthq9uZIz+LYCw6+H5qD3crMuG8762VnUQ8Ctnvjl+du UitM4MHY8hZazBkvf1a6qFd3KUF9cXnG7ODC4biiqGg2C+EyT1tHiDvnJdnYDiTbIDJF az9S+xMEFjs7V1ROlH3lFufAdwfuLkAxI6/b7gw+CQ8dEZ1ZeEQiGv/mHMvqG6Y6JRiT k1PrC85WneMHmmm7/Vukx1DuApo449c2B9nrDcuPcBAUZSdfMaeKfi4JFchdMzZG5ZxG i6eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701996260; x=1702601060; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DCU40ALOWDsZXoiCOjw9KENnIzzkFJPcQLg2I6Hj5pA=; b=W66rwO/Cb1FzBZGLy1vfUZZdkxFHwIp0gujfWqnVt3PfgFxXTTQ1mTBI6+pkvbn0UE C4LqGJ7D7j3K2iGDeJFqMsHY1SNvvDR9C3bf7ArA0orgFBQ2dRtUml5gpQBLJu2YkcUu J1Ev8FUBT4sh5pWd2IJBXFMXowm72NojOu8Ct55M4ndhoaRRDyju1rOjDidmf9un5PEx dUK/dXu+WxZRYSzfDnWroVzd2+4ApLeIHH9PK8gb5+l5osGciePSeif4CDQeGCaUgY/v Os4vSot7RhNt18dTJekjbVVDGb35Vp3tfHHwNkc7j9+xBXzJSp++mSTnOtj7OWgsG2vE 2JlA== X-Gm-Message-State: AOJu0Yw0bfD3ShC9Cgr1cYMVpMikD1WnWYjge2U8HRVg2xT7ZLizWl4i UNrhI1evWbVY55BMumNSmi0T75lDwZHnxOw1U8U= X-Google-Smtp-Source: AGHT+IE7kfNE2PptHIiNIVO5NOCHpRFgtteK9nvPbLpCJ1u56VIPKSC4IfWQvsg2fedesjnB6xrEIg== X-Received: by 2002:a2e:9dda:0:b0:2c9:fc6c:f57f with SMTP id x26-20020a2e9dda000000b002c9fc6cf57fmr2453764ljj.44.1701996260154; Thu, 07 Dec 2023 16:44:20 -0800 (PST) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id d1-20020a2eb041000000b002c9f2c7cdecsm82645ljl.22.2023.12.07.16.44.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 16:44:19 -0800 (PST) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v6 03/11] soc: qcom: spm: remove driver-internal structures from the driver API Date: Fri, 8 Dec 2023 03:44:09 +0300 Message-Id: <20231208004417.3393299-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231208004417.3393299-1-dmitry.baryshkov@linaro.org> References: <20231208004417.3393299-1-dmitry.baryshkov@linaro.org> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Move internal SPM driver structures to the driver itself, removing them from the public API. The CPUidle driver doesn't use them at all. Signed-off-by: Dmitry Baryshkov --- drivers/soc/qcom/spm.c | 20 ++++++++++++++++++++ include/soc/qcom/spm.h | 23 +---------------------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c index 2f0b1bfe7658..b15435f7cb0d 100644 --- a/drivers/soc/qcom/spm.c +++ b/drivers/soc/qcom/spm.c @@ -36,6 +36,26 @@ enum spm_reg { SPM_REG_NR, }; +#define MAX_PMIC_DATA 2 +#define MAX_SEQ_DATA 64 + +struct spm_reg_data { + const u16 *reg_offset; + u32 spm_cfg; + u32 spm_dly; + u32 pmic_dly; + u32 pmic_data[MAX_PMIC_DATA]; + u32 avs_ctl; + u32 avs_limit; + u8 seq[MAX_SEQ_DATA]; + u8 start_index[PM_SLEEP_MODE_NR]; +}; + +struct spm_driver_data { + void __iomem *reg_base; + const struct spm_reg_data *reg_data; +}; + static const u16 spm_reg_offset_v4_1[SPM_REG_NR] = { [SPM_REG_AVS_CTL] = 0x904, [SPM_REG_AVS_LIMIT] = 0x908, diff --git a/include/soc/qcom/spm.h b/include/soc/qcom/spm.h index 4951f9d8b0bd..5b263c685812 100644 --- a/include/soc/qcom/spm.h +++ b/include/soc/qcom/spm.h @@ -7,11 +7,6 @@ #ifndef __SPM_H__ #define __SPM_H__ -#include - -#define MAX_PMIC_DATA 2 -#define MAX_SEQ_DATA 64 - enum pm_sleep_mode { PM_SLEEP_MODE_STBY, PM_SLEEP_MODE_RET, @@ -20,23 +15,7 @@ enum pm_sleep_mode { PM_SLEEP_MODE_NR, }; -struct spm_reg_data { - const u16 *reg_offset; - u32 spm_cfg; - u32 spm_dly; - u32 pmic_dly; - u32 pmic_data[MAX_PMIC_DATA]; - u32 avs_ctl; - u32 avs_limit; - u8 seq[MAX_SEQ_DATA]; - u8 start_index[PM_SLEEP_MODE_NR]; -}; - -struct spm_driver_data { - void __iomem *reg_base; - const struct spm_reg_data *reg_data; -}; - +struct spm_driver_data; void spm_set_low_power_mode(struct spm_driver_data *drv, enum pm_sleep_mode mode); From patchwork Fri Dec 8 00:44:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 751808 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Xk/EcsOz" Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1FD7121 for ; Thu, 7 Dec 2023 16:44:23 -0800 (PST) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2ca02def690so18086401fa.3 for ; Thu, 07 Dec 2023 16:44:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701996262; x=1702601062; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ofurekj2GsV9pEulhYImkibXZVuPtz//iePjOLcLr1Y=; b=Xk/EcsOzmwLaWyUXy8IOqAO/7ENgqfkiovtHGfgplXx/MJAzTveSl0JOz4Ne0/dW+5 i7rNCZHEMx11uYys4pAqWpLb/WqZJKdKkNo3NhN21KzBZtJ75MuP8TZKPHyWTaaKk9Zt fx7hwzdL8oCX2ugkthdS6yet0zedJlohSXb4ldGvbYxG+GwkE/OWPGKTfMurZSdgYoME dszWZvwXztkNugvL71IKpqUQzqxOVp7tCMWjpDzL7LD4TzjzXNgHRN2dBpqkfRvWzcFE 1nLlv0JM7MSfJqq4iWI/bSKHdWI9fn7GyIh1LHn1a5OIk787oF9O/p70/LD7kjfyeviT qf3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701996262; x=1702601062; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ofurekj2GsV9pEulhYImkibXZVuPtz//iePjOLcLr1Y=; b=e07RTIkT2Wjv52Yls51q+cY1sWurRyTNVRD51c7XSj1Z2mSwtj/jdOG9B8t4xphMoA MohQ/SSyUaGf61A6FfPRhQ9Aoh4xJfGa4BnORQkqPzdCdDgpp8T8HOCuEHxuN+bAchj+ OPJGwhZmst7HjqlXzfle+zkmrEj1wOjx94EjdN/noTOPmuZfJ83cx0D+Nu3O0XMcybL0 9k29jC5WI7r2du8EqDlWnD2GFTM64C+zpbp8WaqO1hz5BPiN+DBSKVainEYA//AvrAgo K2IQDiJYbZR38oiz0ZvcdCE4zTxDUVjGYVe2MxZnlRsLTTqM9t0aqOasWUyHo5cvj1zJ noIQ== X-Gm-Message-State: AOJu0YwAEJ0k/ZEaSxNZhgmM3IakO552xoqcXHx4mTlMpLOPrkfISa7W trvy/fvI7GhsKEchvyUj7r627Q== X-Google-Smtp-Source: AGHT+IEBki9ttzCfRNVVwIMSzeAndy7rLC9U4cqS870qRJL6yRAoMlY2KMPJWYfS5uxq8AePiNMjuQ== X-Received: by 2002:a2e:700b:0:b0:2ca:3591:6667 with SMTP id l11-20020a2e700b000000b002ca35916667mr724880ljc.82.1701996262324; Thu, 07 Dec 2023 16:44:22 -0800 (PST) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id d1-20020a2eb041000000b002c9f2c7cdecsm82645ljl.22.2023.12.07.16.44.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 16:44:21 -0800 (PST) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v6 06/11] ARM: dts: qcom: apq8064: declare SAW2 regulators Date: Fri, 8 Dec 2023 03:44:12 +0300 Message-Id: <20231208004417.3393299-7-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231208004417.3393299-1-dmitry.baryshkov@linaro.org> References: <20231208004417.3393299-1-dmitry.baryshkov@linaro.org> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The SAW2 (SPM and AVS Wrapper) among other things is yet another way to handle CPU-related PMIC regulators. Provide a way to control voltage of these regulators. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- arch/arm/boot/dts/qcom/qcom-apq8064.dtsi | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/qcom/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom/qcom-apq8064.dtsi index 6832030c2c88..44c65ebf6c73 100644 --- a/arch/arm/boot/dts/qcom/qcom-apq8064.dtsi +++ b/arch/arm/boot/dts/qcom/qcom-apq8064.dtsi @@ -368,25 +368,41 @@ acc3: clock-controller@20b8000 { saw0: power-manager@2089000 { compatible = "qcom,apq8064-saw2-v1.1-cpu", "qcom,saw2"; reg = <0x02089000 0x1000>, <0x02009000 0x1000>; - regulator; + + saw0_vreg: regulator { + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1300000>; + }; }; saw1: power-manager@2099000 { compatible = "qcom,apq8064-saw2-v1.1-cpu", "qcom,saw2"; reg = <0x02099000 0x1000>, <0x02009000 0x1000>; - regulator; + + saw1_vreg: regulator { + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1300000>; + }; }; saw2: power-manager@20a9000 { compatible = "qcom,apq8064-saw2-v1.1-cpu", "qcom,saw2"; reg = <0x020a9000 0x1000>, <0x02009000 0x1000>; - regulator; + + saw2_vreg: regulator { + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1300000>; + }; }; saw3: power-manager@20b9000 { compatible = "qcom,apq8064-saw2-v1.1-cpu", "qcom,saw2"; reg = <0x020b9000 0x1000>, <0x02009000 0x1000>; - regulator; + + saw3_vreg: regulator { + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1300000>; + }; }; sps_sic_non_secure: sps-sic-non-secure@12100000 { From patchwork Fri Dec 8 00:44:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 751807 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ZuGB66Er" Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B4421725 for ; Thu, 7 Dec 2023 16:44:24 -0800 (PST) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2ca208940b3so18228471fa.1 for ; Thu, 07 Dec 2023 16:44:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701996263; x=1702601063; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tRH0ltu/8xOeCYgi26zDqsTtGrYZ67tsC2xGcsHS4PY=; b=ZuGB66Erbwu7e2NdgoM4TcEDf0RobP0fogwVYjJ4twA+I7eugTTZP1Edmu0ZXzgDtl 32U61LV++2Aa0uZmvDfhTTeIW2qfg4ONxHeZqSZE398u4eJ6ChkS905pFmAJzUTfMLfC xjtx3zT/Lo3lPIs1vOHExr2/c6PrFStNE0AqtqOJuz3pt+GYB2Sv/YLPTtgw9TVYFP/4 LK71TJ++vcMjjsN41IXqoqu81BFlHiOErRMORonvkSiT3a2X2DgvO5DXuZmJDo6lSwsI yIWy2hmTatuOeZIQVHzFYoeloSXf2ApkpdWDff8CPVQhcfVYKIMgVFwofFrRV2spqZxX Ae3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701996263; x=1702601063; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tRH0ltu/8xOeCYgi26zDqsTtGrYZ67tsC2xGcsHS4PY=; b=OUZ3Y8tBZoOfckKqDX7NEolL/zz3Mx0yY6Rusk6saLX4DvR36SwkWrRrqTt1rgaipv mvFJuQsg/lJMC0O3Iagb/GmoA5joQ0WLOYeS8KRq/0M4mfjiBWFmOvs6fGL9aRhKFqxt 5wwHn2VeM+MDQ5VTpyajJZnDPgOsS6WUYsHBM6KvJ39I/mq27HCI5kRJlEL/RUGvGe4a GElXv81BmKSIU9h+yWC6Lm8kfpo0eO+OGVeV94ourtayf1BEC9J/7CuNvCr1tEvM27BH btTmUP7kn3+bWOM2VHund/qR3sZGSzTlWL1scGvuZ/aT2efxQWerkgiffbr5lJ/E8HjF mrKQ== X-Gm-Message-State: AOJu0YywvyABuaqE/zL/hu3zY0wKS2axzfS/bzqquh33r9Kf3FYQFJ0n 8tkTXXqrbWkfpiDBCBFjDpifMw== X-Google-Smtp-Source: AGHT+IHwybtxoLl4yQz0bsTFhOLvQQldFboYc0ShfFu2bASqXKvHxCiansYhsBkwtWa9B9cKK1N46w== X-Received: by 2002:a2e:808a:0:b0:2ca:1ddf:cbf5 with SMTP id i10-20020a2e808a000000b002ca1ddfcbf5mr2116960ljg.36.1701996262916; Thu, 07 Dec 2023 16:44:22 -0800 (PST) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id d1-20020a2eb041000000b002c9f2c7cdecsm82645ljl.22.2023.12.07.16.44.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 16:44:22 -0800 (PST) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v6 07/11] ARM: dts: qcom: msm8960: declare SAW2 regulators Date: Fri, 8 Dec 2023 03:44:13 +0300 Message-Id: <20231208004417.3393299-8-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231208004417.3393299-1-dmitry.baryshkov@linaro.org> References: <20231208004417.3393299-1-dmitry.baryshkov@linaro.org> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The SAW2 (SPM and AVS Wrapper) among other things is yet another way to handle CPU-related PMIC regulators. Provide a way to control voltage of these regulators. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- arch/arm/boot/dts/qcom/qcom-msm8960.dtsi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi index f420740e068e..0ab340405784 100644 --- a/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi +++ b/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi @@ -223,13 +223,21 @@ acc1: clock-controller@2098000 { saw0: regulator@2089000 { compatible = "qcom,saw2"; reg = <0x02089000 0x1000>, <0x02009000 0x1000>; - regulator; + + saw0_vreg: regulator { + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1300000>; + }; }; saw1: regulator@2099000 { compatible = "qcom,saw2"; reg = <0x02099000 0x1000>, <0x02009000 0x1000>; - regulator; + + saw1_vreg: regulator { + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1300000>; + }; }; gsbi5: gsbi@16400000 { From patchwork Fri Dec 8 00:44:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 751805 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="dXh0XOCK" Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBE7F1713 for ; Thu, 7 Dec 2023 16:44:25 -0800 (PST) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2ca0715f0faso20601581fa.0 for ; Thu, 07 Dec 2023 16:44:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701996264; x=1702601064; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=o0J8cjOv5k8AIvIFhvZ5YWOKOlem3yXviyX9wh+j9fA=; b=dXh0XOCKyw8w0dFTSjYKRx1lZ/m5UjO4RkKPZrcaGAD5QDwIuH2rYd3BA/wNArl/5g v+H5LvXSSba24m11Ozewk/QXbF3FrCXJFSa2DQ+wz0yXmrz1rRutLldl9yFjcbJyQa6E 2YnqZjjZexPT1CKZWS4MPqckZ0Z+/Owv6zbKtTK6jJE5TEtlaUnE07oSt8MOVwLzo+vu P0TiEmjPynPsUI/+JjNOPNjafAt3UfWNHHACphwhs796wdlQs4+0CaMT09J8HIsJyvFz IAIAASM/552vAuwqkDfKDls1NjKiFvKGFtcm925J+NCZsCY+ut2jND7om0m4h95ZcuWF 8zmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701996264; x=1702601064; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o0J8cjOv5k8AIvIFhvZ5YWOKOlem3yXviyX9wh+j9fA=; b=oTyBfW6eooDx0vGWA8sNMyZnjndsBZIwUF+Lu36fVx5WQFnMvKHRktVuzSy6ZCL/zV NpHrMXi2mKgdvn2iYjZVBCDFhdlsOXnRPdCrSIZkbdHWRYZXUQbaaMffNvBuYHdDSE99 PpeR/tKtrac4+t8vwI8TFrPAVqG1kjwwI1SIOcYI1unyNM5zqmLW3s/sTc9Ro3cklYTx LRRAl57mF3F9p+OG5jtHZPh8yarpygKov9rlCi9N04zlQrbmEjVcPoq5moYxNi2lSe+N IFa1PNT4wCsNfeXjtQvNRTjqFugZpYSlE9bW/J24E6yUwmjpA7XnksiJLBhf+LANW1g2 pD4g== X-Gm-Message-State: AOJu0Yz/1H1ivkUYq+9mxlxYabR1VvonjIr6pJmN8VE0IKtLX+aR/iWw wAQSqrwk4FAG/pV6saZuZmvuFA== X-Google-Smtp-Source: AGHT+IGYu+cg77dg5gaAt49n8XWkheQjTjDEp7wT2CxZ4HVGA8RukUV5/g6B4yxBqBXBtUe0cnCuaw== X-Received: by 2002:a2e:a410:0:b0:2ca:1009:7afe with SMTP id p16-20020a2ea410000000b002ca10097afemr1825777ljn.60.1701996264333; Thu, 07 Dec 2023 16:44:24 -0800 (PST) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id d1-20020a2eb041000000b002c9f2c7cdecsm82645ljl.22.2023.12.07.16.44.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 16:44:23 -0800 (PST) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v6 09/11] ARM: dts: qcom: msm8974: drop 'regulator' property from SAW2 device Date: Fri, 8 Dec 2023 03:44:15 +0300 Message-Id: <20231208004417.3393299-10-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231208004417.3393299-1-dmitry.baryshkov@linaro.org> References: <20231208004417.3393299-1-dmitry.baryshkov@linaro.org> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The SAW2 device should describe the regulator constraints rather than just declaring that it has the regulator. Drop the 'regulator' property. If/when CPU voltage scaling is implemented for this platform, proper regulator node show be added instead. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- arch/arm/boot/dts/qcom/qcom-msm8974.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi index ee202f3f161e..3e1e88d69c2e 100644 --- a/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi +++ b/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi @@ -349,7 +349,6 @@ apcs: syscon@f9011000 { saw_l2: power-controller@f9012000 { compatible = "qcom,saw2"; reg = <0xf9012000 0x1000>; - regulator; }; watchdog@f9017000 { From patchwork Fri Dec 8 00:44:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 751806 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="gx81vl4m" Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68A76171F for ; Thu, 7 Dec 2023 16:44:27 -0800 (PST) Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2c9fe0ef02aso14060211fa.0 for ; Thu, 07 Dec 2023 16:44:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701996265; x=1702601065; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Rzx9Bm824S2wRWYFO7S2MdJvHvf/jzSVekqRFumNr7k=; b=gx81vl4mbnjYuvyTzPM8r+NXJe1fKk7JyIs3MJKI9q5TtkIywPCn9CSFOlROaIWGmW yvcGNSXk31876aDx4MPYAsztBbxCwqcNC13twV7TSOALib6LRGeujh8N6BFUghubdXKF LW+SKElddZtB2nmXjau441qSKJ9llyvWdjLTjM4mzNB3tnSS7NuSa2Ay8uq+7k2tYuT4 ZvXASk5YTI6DaSMBZbBRH9f/WNxWYK2Vy0gbt96P2/1GePSyZYfuLsSVoYPR4C9TOO/Y RzoyEcQD+p1hOZp9UStVvPq8wLJFTB81LBalJL2+F1f/TOWGblmPy1/TXtAzx0SvmBms Y+NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701996266; x=1702601066; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Rzx9Bm824S2wRWYFO7S2MdJvHvf/jzSVekqRFumNr7k=; b=SPjcJO2jXW4mQlyNYr9RfV6c6+2Xo+ftUzThPgILb1mGhm4/gvPUz2p9yepyEIibhl HBqDgDSi58M4wme2UOeuYvXCEwV8MqhFSOEf+GvAMoACzIYXHC9NOvNO2GVLcsANneR7 sbX6MScQArN6QmBTEwU73gnAmeh9LfRJoIQKqSqV9KyERB5TJ5imhLi1ruiH2z8WfaVE mNAKENo3aesCDxNtx5jC0mCnC1kJbnpOsAXZNKFIU4ztOU6jvbsotGZIJjvh03lnUTyF 9RqK9QZoOxLYwMQdGS2UvSbMTXopfMeY7LIvqmkln8SLoID2vSR2xjIb5y7hDr0r3JUC m59A== X-Gm-Message-State: AOJu0Yz883+kIiaYaJK/KfF9MzSfGrb3AKXSzYEdPn1+ZbgYBIc3feRh 8dNROtNYdoCGGWpOEtgItgFXiA== X-Google-Smtp-Source: AGHT+IEkooQEzU6pVeFzojl2VJJrOAtyIQajir1ICI20uMrx+iVRPimyAZGrVwQtJd87ZGXaQb4sWg== X-Received: by 2002:a2e:3512:0:b0:2c9:f803:7c05 with SMTP id z18-20020a2e3512000000b002c9f8037c05mr35588ljz.1.1701996265804; Thu, 07 Dec 2023 16:44:25 -0800 (PST) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id d1-20020a2eb041000000b002c9f2c7cdecsm82645ljl.22.2023.12.07.16.44.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 16:44:25 -0800 (PST) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v6 11/11] ARM: dts: qcom: ipq8064: drop 'regulator' property from SAW2 devices Date: Fri, 8 Dec 2023 03:44:17 +0300 Message-Id: <20231208004417.3393299-12-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231208004417.3393299-1-dmitry.baryshkov@linaro.org> References: <20231208004417.3393299-1-dmitry.baryshkov@linaro.org> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The SAW2 device should describe the regulator constraints rather than just declaring that it has the regulator. Drop the 'regulator' property. If/when CPU voltage scaling is implemented for this platform, proper regulator nodes show be added instead. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi index c3677440b786..191d1cb27cb7 100644 --- a/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi +++ b/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi @@ -589,7 +589,6 @@ acc0: clock-controller@2088000 { saw0: regulator@2089000 { compatible = "qcom,saw2"; reg = <0x02089000 0x1000>, <0x02009000 0x1000>; - regulator; }; acc1: clock-controller@2098000 { @@ -604,7 +603,6 @@ acc1: clock-controller@2098000 { saw1: regulator@2099000 { compatible = "qcom,saw2"; reg = <0x02099000 0x1000>, <0x02009000 0x1000>; - regulator; }; nss_common: syscon@3000000 {