Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3319082pxf; Mon, 15 Mar 2021 07:04:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWZAmzWl/xXp+u3aZddCisxNBxCh6mbTStenX7I1BUr7ci+wewFYbkcMYl7GYsvMBQppeR X-Received: by 2002:a17:906:3088:: with SMTP id 8mr23663321ejv.499.1615817048636; Mon, 15 Mar 2021 07:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615817048; cv=none; d=google.com; s=arc-20160816; b=tkiBcYGd9cYK2X7nqD0MXqMKBBbuv0C7X+KuFQyAH/7FlPqK9UtDxi4S8Pd0q7vh2h 6ufyjSjLXHVt9MBw4um1T7pflPl4ISOmjlcXl+tQZ++ebQnwP6zJI4sG+72NUgBPiOsX AxJuvKWA3xxFP+zjWKNXAu/5M8tdYr2ktLhDY1rtxNr1j/bwyJP7rZfW3o3pz56GYHoW bKTfwSF/rPcbO0yIxBxJGPE1t5hux7uSc9zQ+8gIR1RpyWzTH+9n+mFv9iV5XNWtJYO1 CDF/ryMfIoP5H9aSyeoTFqSdRNlmp+1NiwDv15KbS4lFp+NvpTK4piyq99VI5u/9vNMu Q6Xw== 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=5iFHcbhz00NgaTyg7jN2tT9OKakFW1bagQtmHGuIWx8=; b=jP8kojwTAc5w223uf4/2qfz74dRgCvaRcn7zm3flxuld9A/G8r74DQ8nSlVhoC+V5X ysd5KSRP/uxGFIuIFEfppagYplwQdK2AcZsruwIvUl9PfMFas8zbQ7j2Um6jWvFPXg67 srHN7DqpmCwFQhU/92VhwIQ4gypORX1doobtWQPzY1QA5aSOfAs4yocqToWc4virBhlf XhXpO3N6guGRSntQtJjSTVX+M+mbheg7VUmZEvycC0ny0/Ghb2F0SnodL3zgxpLeYuf+ ANFUg22NHMxZcSd0kMEb0oBnJGyR9tkEde9zddAUS9diWPThapQ9KpZqxTfDieJqhYRn ZIyA== 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 q23si11081774edr.167.2021.03.15.07.03.44; Mon, 15 Mar 2021 07:04:08 -0700 (PDT) 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 S232840AbhCOOAB (ORCPT + 99 others); Mon, 15 Mar 2021 10:00:01 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:58629 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231682AbhCONzI (ORCPT ); Mon, 15 Mar 2021 09:55:08 -0400 Received: from ironmsg07-lv.qualcomm.com (HELO ironmsg07-lv.qulacomm.com) ([10.47.202.151]) by alexa-out.qualcomm.com with ESMTP; 15 Mar 2021 06:55:07 -0700 X-QCInternal: smtphost Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by ironmsg07-lv.qulacomm.com with ESMTP/TLS/AES256-SHA; 15 Mar 2021 06:55:06 -0700 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; 15 Mar 2021 19:24:34 +0530 Received: by c-skakit-linux.qualcomm.com (Postfix, from userid 2344709) id 5A44C49BC; Mon, 15 Mar 2021 19:24:33 +0530 (IST) From: satya priya To: Andy Gross , Bjorn Andersson Cc: Liam Girdwood , Mark Brown , Rob Herring , mka@chromium.org, rnayak@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kgunda@codeaurora.org, David Collins , satya priya Subject: [PATCH V2 2/5] regulator: qcom-rpmh: Add PM7325/PMR735A regulator support Date: Mon, 15 Mar 2021 19:24:11 +0530 Message-Id: <1615816454-1733-3-git-send-email-skakit@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615816454-1733-1-git-send-email-skakit@codeaurora.org> References: <1615816454-1733-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 --- Changes in V2: - No change. 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 9471890..3509523 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