Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp251178pxb; Wed, 24 Feb 2021 00:42:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJzxKltgwfx4MHjE+EHaUN+0DiOWJWGCjupQoR0w2ZhuB5XW3jfrx44Ve4vdwyQwOZ8B1ONr X-Received: by 2002:a05:6402:5194:: with SMTP id q20mr10240775edd.267.1614156164575; Wed, 24 Feb 2021 00:42:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614156164; cv=none; d=google.com; s=arc-20160816; b=nrvEK/V6d8LSUw7SloTTCtA2KvmkTdoTOtRvY+yOtWwfKs761qIC0hkWKtip6Do210 +HoGoTSgpiBHzEErSTyXHfoPWieUi/s+9mGqKmzlX19bT2WMCXiiOi0iuu5f0akRg0Bk 93WSZPwTEUn0pYLmkfPQKRK2hBmB+XrjJrHaiaVw/iE7zR9VixaY6qEOXLAfC1NQiTqv PEZRWErXCz7pYcm5hYE8mExzMyob+5sJBI0IqsSUAsf27nG9lo+y1Rnw1IyH5ttXa1Wh RexEhQR/ONHGQH9NS6wGrPutbFTb6vrxM2F/Ope323FzmkaHfG5OAYidIz9IiDgPxKkq QtNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=wcUs7Ji5CyFLTHOC2SzyfuCqC4H43fePN2oz2Cgz6XU=; b=qynxZCtkbUS+w0L2boNkrfNyG5eTgueyfe+pzOyXg/a6nw6ZYke4FIgAJYeGmcceOx vp3P7KfwQisqRS67YTrPVaGzaAbUPkc9Y26+0cIL2fCuspT0ekqfCdFM6xHVtlWhdxmu jINNAIIEdAllNMePmbVn+kPHl9sTr8DrR1FBOBhEOZ3C44j+K1kGO5FrFdtkWbGL0gCQ 4ZhnIEkElMk+cGiNnupnmC3CLC4O89zoYelsIn2qHt7eUIZuJVSrGO7q/OE01gkFC2xz 3y/tAuBSqUcLKw1lklyH98k0Pkfwe7E9FPdol+dQCyB8NaEUx3ACVXpj1ERNtP0wbtnQ /5Ng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz4si948762ejc.195.2021.02.24.00.42.17; Wed, 24 Feb 2021 00:42:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234550AbhBXIhp (ORCPT + 99 others); Wed, 24 Feb 2021 03:37:45 -0500 Received: from alexa-out.qualcomm.com ([129.46.98.28]:47054 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234453AbhBXIft (ORCPT ); Wed, 24 Feb 2021 03:35:49 -0500 Received: from ironmsg08-lv.qualcomm.com ([10.47.202.152]) by alexa-out.qualcomm.com with ESMTP; 24 Feb 2021 00:34:04 -0800 X-QCInternal: smtphost Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by ironmsg08-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 24 Feb 2021 00:34:02 -0800 X-QCInternal: smtphost Received: from c-skakit-linux.ap.qualcomm.com (HELO c-skakit-linux.qualcomm.com) ([10.242.51.242]) by ironmsg01-blr.qualcomm.com with ESMTP; 24 Feb 2021 14:03:33 +0530 Received: by c-skakit-linux.qualcomm.com (Postfix, from userid 2344709) id A60BA3D40; Wed, 24 Feb 2021 14:03:31 +0530 (IST) From: satya priya To: Andy Gross , Bjorn Andersson Cc: Liam Girdwood , Mark Brown , Rob Herring , rnayak@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kgunda@codeaurora.org, satya priya Subject: [PATCH 5/7] regulator: qcom-rpmh: Add PM7325/PMR735A regulator support Date: Wed, 24 Feb 2021 14:03:10 +0530 Message-Id: <1614155592-14060-6-git-send-email-skakit@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614155592-14060-1-git-send-email-skakit@codeaurora.org> References: <1614155592-14060-1-git-send-email-skakit@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for PM7325/PMR735A regulators. This ensures that consumers are able to modify the physical state of PMIC regulators. Signed-off-by: satya priya --- drivers/regulator/qcom-rpmh-regulator.c | 53 ++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c index ed70046..2d0cd23 100644 --- a/drivers/regulator/qcom-rpmh-regulator.c +++ b/drivers/regulator/qcom-rpmh-regulator.c @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 -// Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. +// Copyright (c) 2018-2021, The Linux Foundation. All rights reserved. #define pr_fmt(fmt) "%s: " fmt, __func__ @@ -1042,6 +1042,49 @@ static const struct rpmh_vreg_init_data pmx55_vreg_data[] = { {}, }; +static const struct rpmh_vreg_init_data pm7325_vreg_data[] = { + RPMH_VREG("smps1", "smp%s1", &pmic5_hfsmps510, "vdd-s1"), + RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps520, "vdd-s2"), + RPMH_VREG("smps3", "smp%s3", &pmic5_ftsmps520, "vdd-s3"), + RPMH_VREG("smps4", "smp%s4", &pmic5_ftsmps520, "vdd-s4"), + RPMH_VREG("smps5", "smp%s5", &pmic5_ftsmps520, "vdd-s5"), + RPMH_VREG("smps6", "smp%s6", &pmic5_ftsmps520, "vdd-s6"), + RPMH_VREG("smps7", "smp%s7", &pmic5_ftsmps520, "vdd-s7"), + RPMH_VREG("smps8", "smp%s8", &pmic5_hfsmps510, "vdd-s8"), + RPMH_VREG("ldo1", "ldo%s1", &pmic5_nldo, "vdd-l1-l4-l12-l15"), + RPMH_VREG("ldo2", "ldo%s2", &pmic5_pldo, "vdd-l2-l7"), + RPMH_VREG("ldo3", "ldo%s3", &pmic5_nldo, "vdd-l3"), + RPMH_VREG("ldo4", "ldo%s4", &pmic5_nldo, "vdd-l1-l4-l12-l15"), + RPMH_VREG("ldo5", "ldo%s5", &pmic5_nldo, "vdd-l5"), + RPMH_VREG("ldo6", "ldo%s6", &pmic5_nldo, "vdd-l6-l9-l10"), + RPMH_VREG("ldo7", "ldo%s7", &pmic5_pldo, "vdd-l2-l7"), + RPMH_VREG("ldo8", "ldo%s8", &pmic5_nldo, "vdd-l8"), + RPMH_VREG("ldo9", "ldo%s9", &pmic5_nldo, "vdd-l6-l9-l10"), + RPMH_VREG("ldo10", "ldo%s10", &pmic5_nldo, "vdd-l6-l9-l10"), + RPMH_VREG("ldo11", "ldo%s11", &pmic5_pldo_lv, "vdd-l11-l17-l18-l19"), + RPMH_VREG("ldo12", "ldo%s12", &pmic5_nldo, "vdd-l1-l4-l12-l15"), + RPMH_VREG("ldo13", "ldo%s13", &pmic5_nldo, "vdd-l13"), + RPMH_VREG("ldo14", "ldo%s14", &pmic5_nldo, "vdd-l14-l16"), + RPMH_VREG("ldo15", "ldo%s15", &pmic5_nldo, "vdd-l1-l4-l12-l15"), + RPMH_VREG("ldo16", "ldo%s16", &pmic5_nldo, "vdd-l14-l16"), + RPMH_VREG("ldo17", "ldo%s17", &pmic5_pldo_lv, "vdd-l11-l17-l18-l19"), + RPMH_VREG("ldo18", "ldo%s18", &pmic5_pldo_lv, "vdd-l11-l17-l18-l19"), + RPMH_VREG("ldo19", "ldo%s19", &pmic5_pldo_lv, "vdd-l11-l17-l18-l19"), +}; + +static const struct rpmh_vreg_init_data pmr735a_vreg_data[] = { + RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps520, "vdd-s1"), + RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps520, "vdd-s2"), + RPMH_VREG("smps3", "smp%s3", &pmic5_hfsmps510, "vdd-s3"), + RPMH_VREG("ldo1", "ldo%s1", &pmic5_nldo, "vdd-l1-l2"), + RPMH_VREG("ldo2", "ldo%s2", &pmic5_nldo, "vdd-l1-l2"), + RPMH_VREG("ldo3", "ldo%s3", &pmic5_nldo, "vdd-l3"), + RPMH_VREG("ldo4", "ldo%s4", &pmic5_pldo_lv, "vdd-l4"), + RPMH_VREG("ldo5", "ldo%s5", &pmic5_nldo, "vdd-l5-l6"), + RPMH_VREG("ldo6", "ldo%s6", &pmic5_nldo, "vdd-l5-l6"), + RPMH_VREG("ldo7", "ldo%s7", &pmic5_pldo, "vdd-l7-bob"), +}; + static int rpmh_regulator_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -1136,6 +1179,14 @@ static const struct of_device_id __maybe_unused rpmh_regulator_match_table[] = { .compatible = "qcom,pmx55-rpmh-regulators", .data = pmx55_vreg_data, }, + { + .compatible = "qcom,pm7325-rpmh-regulators", + .data = pm7325_vreg_data, + }, + { + .compatible = "qcom,pmr735a-rpmh-regulators", + .data = pmr735a_vreg_data, + }, {} }; MODULE_DEVICE_TABLE(of, rpmh_regulator_match_table); -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation