From patchwork Sun Feb 20 22:30:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 544480 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 BA8DDC43217 for ; Sun, 20 Feb 2022 22:30:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245155AbiBTWbH (ORCPT ); Sun, 20 Feb 2022 17:31:07 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:52882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244533AbiBTWbF (ORCPT ); Sun, 20 Feb 2022 17:31:05 -0500 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABD324B871; Sun, 20 Feb 2022 14:30:43 -0800 (PST) Received: from localhost.localdomain (ip-213-127-118-180.ip.prioritytelecom.net [213.127.118.180]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 0ED12C6D5A; Sun, 20 Feb 2022 22:30:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1645396242; bh=OKXxgRFsXOpr2FPUaX4QNjWA+N8erkfnFKPqK8ueCMo=; h=From:To:Cc:Subject:Date; b=HbnRNE72DtEmUTK0PlO1INwXm78DROVMgCgI2HgbIWYhxQgqBzhHC91xFq4gBkgTu 9Jy5OiYiYLoHNuRnoH09hAU5LfjcSZDnZUjxSGFb14Ej0zzGxOAYRTBuzt5LtV36uX Ip4z8dy4qP/zGUMtUTsYWBB9dfuMyQWBGTZQ1PA4= From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Andy Gross , Bjorn Andersson , Rob Herring , Rajendra Nayak , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] dt-bindings: power: rpmpd: Add MSM8226 to rpmpd binding Date: Sun, 20 Feb 2022 23:30:01 +0100 Message-Id: <20220220223004.507739-1-luca@z3ntu.xyz> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add compatible and constants for the power domains exposed by the MSM8226 RPM. Signed-off-by: Luca Weiss --- Documentation/devicetree/bindings/power/qcom,rpmpd.yaml | 1 + include/dt-bindings/power/qcom-rpmpd.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml index f48bc41d81ec..940e97b565bf 100644 --- a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml @@ -17,6 +17,7 @@ properties: compatible: enum: - qcom,mdm9607-rpmpd + - qcom,msm8226-rpmpd - qcom,msm8916-rpmpd - qcom,msm8939-rpmpd - qcom,msm8953-rpmpd diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h index edfc1ff2acb3..c002cc6ddf55 100644 --- a/include/dt-bindings/power/qcom-rpmpd.h +++ b/include/dt-bindings/power/qcom-rpmpd.h @@ -139,6 +139,11 @@ #define MDM9607_VDDMX_AO 4 #define MDM9607_VDDMX_VFL 5 +/* MSM8226 Power Domain Indexes */ +#define MSM8226_VDDCX 0 +#define MSM8226_VDDCX_AO 1 +#define MSM8226_VDDCX_VFC 2 + /* MSM8939 Power Domains */ #define MSM8939_VDDMDCX 0 #define MSM8939_VDDMDCX_AO 1 From patchwork Sun Feb 20 22:30:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 544283 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 26D46C433EF for ; Sun, 20 Feb 2022 22:30:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245126AbiBTWbG (ORCPT ); Sun, 20 Feb 2022 17:31:06 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:52884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244570AbiBTWbF (ORCPT ); Sun, 20 Feb 2022 17:31:05 -0500 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 027F84B873; Sun, 20 Feb 2022 14:30:44 -0800 (PST) Received: from localhost.localdomain (ip-213-127-118-180.ip.prioritytelecom.net [213.127.118.180]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 84A4FC83D5; Sun, 20 Feb 2022 22:30:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1645396242; bh=Z5QyXYJWluQNgIrdnzlQ4wsGTvrvV8OZI8S3n9fVWDc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=VrmjH+NWxb72osI6sMg+QGUlxa27NpwFsjA5gZCKFfTGFa0FNAo3IqPFzzBL05Hct BrXvSzIyIqo9or+3qIcmSvw9Q2ffcuvIVyqVAOwWfqpWKDKSoG72CvFVXYYLYm+lDu CF0T3GKlGsS6LPjFpN/8wueE/HKEd+K36dbi2Y1o= From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Andy Gross , Bjorn Andersson , linux-kernel@vger.kernel.org Subject: [PATCH 2/3] soc: qcom: rpmpd: Add MSM8226 support Date: Sun, 20 Feb 2022 23:30:02 +0100 Message-Id: <20220220223004.507739-2-luca@z3ntu.xyz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220220223004.507739-1-luca@z3ntu.xyz> References: <20220220223004.507739-1-luca@z3ntu.xyz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the power domains preset in MSM8226. Signed-off-by: Luca Weiss --- drivers/soc/qcom/rpmpd.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 0a8d8d24bfb7..95a2b4a64801 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -138,6 +138,22 @@ static const struct rpmpd_desc mdm9607_desc = { .max_state = RPM_SMD_LEVEL_TURBO, }; +/* msm8226 RPM Power Domains */ +DEFINE_RPMPD_PAIR(msm8226, vddcx, vddcx_ao, SMPA, CORNER, 1); +DEFINE_RPMPD_VFC(msm8226, vddcx_vfc, SMPA, 1); + +static struct rpmpd *msm8226_rpmpds[] = { + [MSM8226_VDDCX] = &msm8226_vddcx, + [MSM8226_VDDCX_AO] = &msm8226_vddcx_ao, + [MSM8226_VDDCX_VFC] = &msm8226_vddcx_vfc, +}; + +static const struct rpmpd_desc msm8226_desc = { + .rpmpds = msm8226_rpmpds, + .num_pds = ARRAY_SIZE(msm8226_rpmpds), + .max_state = MAX_CORNER_RPMPD_STATE, +}; + /* msm8939 RPM Power Domains */ DEFINE_RPMPD_PAIR(msm8939, vddmd, vddmd_ao, SMPA, CORNER, 1); DEFINE_RPMPD_VFC(msm8939, vddmd_vfc, SMPA, 1); @@ -436,6 +452,7 @@ static const struct rpmpd_desc qcm2290_desc = { static const struct of_device_id rpmpd_match_table[] = { { .compatible = "qcom,mdm9607-rpmpd", .data = &mdm9607_desc }, + { .compatible = "qcom,msm8226-rpmpd", .data = &msm8226_desc }, { .compatible = "qcom,msm8916-rpmpd", .data = &msm8916_desc }, { .compatible = "qcom,msm8939-rpmpd", .data = &msm8939_desc }, { .compatible = "qcom,msm8953-rpmpd", .data = &msm8953_desc }, From patchwork Sun Feb 20 22:30:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 544282 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 080A6C43219 for ; Sun, 20 Feb 2022 22:30:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245159AbiBTWbH (ORCPT ); Sun, 20 Feb 2022 17:31:07 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:52898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244739AbiBTWbG (ORCPT ); Sun, 20 Feb 2022 17:31:06 -0500 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F5734B874; Sun, 20 Feb 2022 14:30:44 -0800 (PST) Received: from localhost.localdomain (ip-213-127-118-180.ip.prioritytelecom.net [213.127.118.180]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 052BEC83D6; Sun, 20 Feb 2022 22:30:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1645396243; bh=V2nhvOAtYi4w252RToFuWOCUJqBe5w1V1/MDMkrhuKI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=JAj3RFFH5XFLE8i4H2+ea/NsgZUV+nQ7+/kyGJgwjhIfpWX/Ps2+k3ckg12Al7gwY t7cTeT1x1+mhaKjtEATEY3ij1d46G/XZ7CIFgbnS4nF5bNE5Dxqac39AwJG+PwGai4 vOSndS6s71jbtS8cQi+m7vk/QysCVzDxc1GQoZ0k= From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Andy Gross , Bjorn Andersson , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] ARM: dts: qcom: msm8226: add power domains Date: Sun, 20 Feb 2022 23:30:03 +0100 Message-Id: <20220220223004.507739-3-luca@z3ntu.xyz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220220223004.507739-1-luca@z3ntu.xyz> References: <20220220223004.507739-1-luca@z3ntu.xyz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add a node for the power domain controller found in MSM8226. At the same time remove any existing usages of pm8226_s1 as this regulator is now handled by power domains. Signed-off-by: Luca Weiss --- arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts | 4 --- arch/arm/boot/dts/qcom-msm8226.dtsi | 29 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts b/arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts index 42467f705b26..2b7e52fda6a7 100644 --- a/arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts +++ b/arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts @@ -105,10 +105,6 @@ &rpm_requests { pm8226-regulators { compatible = "qcom,rpm-pm8226-regulators"; - pm8226_s1: s1 { - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1275000>; - }; pm8226_s3: s3 { regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1350000>; diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom-msm8226.dtsi index e24e53438b4d..28eca15b5712 100644 --- a/arch/arm/boot/dts/qcom-msm8226.dtsi +++ b/arch/arm/boot/dts/qcom-msm8226.dtsi @@ -73,6 +73,35 @@ rpm { rpm_requests: rpm-requests { compatible = "qcom,rpm-msm8226"; qcom,smd-channels = "rpm_requests"; + + rpmpd: power-controller { + compatible = "qcom,msm8226-rpmpd"; + #power-domain-cells = <1>; + operating-points-v2 = <&rpmpd_opp_table>; + + rpmpd_opp_table: opp-table { + compatible = "operating-points-v2"; + + rpmpd_opp_ret: opp1 { + opp-level = <1>; + }; + rpmpd_opp_svs_krait: opp2 { + opp-level = <2>; + }; + rpmpd_opp_svs_soc: opp3 { + opp-level = <3>; + }; + rpmpd_opp_nom: opp4 { + opp-level = <4>; + }; + rpmpd_opp_turbo: opp5 { + opp-level = <5>; + }; + rpmpd_opp_super_turbo: opp6 { + opp-level = <6>; + }; + }; + }; }; }; };