From patchwork Mon Jun 7 11:38:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 455285 Delivered-To: patch@linaro.org Received: by 2002:a17:906:72d5:0:0:0:0 with SMTP id m21csp3224513ejl; Mon, 7 Jun 2021 04:40:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0tpQp9YOzO7OWRlbsIWAUBHSC4j7XJEUAZsz9Xk46JV3FlKG4hKKmMfTKWy1C8hZHfLM4 X-Received: by 2002:a05:6402:1c83:: with SMTP id cy3mr19193472edb.108.1623066042912; Mon, 07 Jun 2021 04:40:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623066042; cv=none; d=google.com; s=arc-20160816; b=Y3jVG5Gbm0HgmQlEeoyuTKPAQg334P9SUrfkADV4u0GiXOUGTa7lh8UFCENyNtIh75 u4xdD7bSW+0kiXIxbDqr7f8W9YiM8Y9A5y7Dq/obVSKR/paui4D9mEwIMvMhYWNbu61G acPbZXJNDFC/V2ZFgEa2TvkTq8kNEjiUjAIzQMCO0TbZMZlWKwUSZsgRtPTHvtRgo2Bo q4LhAQVo+0Cw58vtEFamr1GRFP/42+XOvr9RzZaPOKoTroqUK+MHHS3q/ckvwSgF/7H4 FOuLCs0+sjX+mjXtpvLv9NSvQT0pzXgiwd3o6eY3Uo/cJRnGBmIOhIOgVpKIF4R7MZ0q g0UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KI3tTCluotO+HmvYcfUBTi934M7YmjMqNpLlbV1t4KU=; b=iBcil0/cThEZqVG+4lleYmdCHlc3XO9iQZSq03mP5hnxqz3lyK5gcn/en+PmLzaiHR adRxPoe+Q6l2BidB446MSqN8WjMENYNX9Kk41FLFTFrT1VcGJG38fP4Dni9AUTYwF6eJ dySCwf5W5B9aK0qbcktNI3CzZ41T620QxoupV3DYh1vOh7arnurIf0nlBQi/QXeXKM1J xa2z8DLF5qqmUJhAe/8BCmiR/488za4VC2FOMtrHMIntyAm0UktBTu2D7+H/NqyL4GUI AJdAYz9P783IdSK9QFmMw6YbWtlx2GrEn2p7qUkqjAWdNaRCwE5WUGpm2LVPw3jb3Kte MMrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XaTWaIIY; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a11si12939836edn.126.2021.06.07.04.40.42; Mon, 07 Jun 2021 04:40:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XaTWaIIY; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231565AbhFGLmU (ORCPT + 17 others); Mon, 7 Jun 2021 07:42:20 -0400 Received: from mail-pf1-f169.google.com ([209.85.210.169]:37620 "EHLO mail-pf1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231556AbhFGLmU (ORCPT ); Mon, 7 Jun 2021 07:42:20 -0400 Received: by mail-pf1-f169.google.com with SMTP id y15so12853568pfl.4 for ; Mon, 07 Jun 2021 04:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KI3tTCluotO+HmvYcfUBTi934M7YmjMqNpLlbV1t4KU=; b=XaTWaIIY2PCj+spbqrB9N4s+slLdiAKp28JmsLJfi5Pu/M5A9amdLfbp0xhsMUg+WZ cGhEdPgo5Hb5qZ7oonQYajxNpsMjUAe0hJhUAUNWau7pkxRcGr2Rsm4qfW84zqp3JZv8 NGBlCuGU/XgXgPNJbEAGPo4nA+b/Fgs52Emq5S3ylgViQZZMnq0oSyzUsDMZMwYK+9jh HFDBj1rZCh6/KBLFFdTkPWcWZxTPbyhtqyBa7Gf2yxt7oGRNSROle8oaevBaVZ63slBs I94OeXBESwJV7CwfFAE4LHFAQeIKp9+mMqR/XirqVe2H2ImHij6wtBypjekr8HELYCoZ XBhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KI3tTCluotO+HmvYcfUBTi934M7YmjMqNpLlbV1t4KU=; b=ELtex6ocizY47faHo/KO3RcCqqsiNW3lGdatPFJsrNYyf6IQzlt6gDwnoBM2VdLbt7 uHddHtvITjLqJKkOtolJDR4Jl0gEfN8++9Un4DvQCw6A5RpxqOLLmpl5p+Pac8+ebOq9 sJ9rLpMr53dTaYTVehDZIwMRVarBDlnb6qbvM0dlEoY772wX3HZ3NVgMEakPEiYjR+jc 4IGOXDRcy+o/T3pi1g4io8XMQwaju9qlCL3A8ulaaByGroE8+lcpFcidSwA4m43ScEiB xOY6OzJD/+zVz/+RBSNTwJ6u1cZNX0GRZokDuhb5OImXqoSDiHDS3MAp8MvgL0oBjiLx tM7A== X-Gm-Message-State: AOAM533TXrprTKmswsBSb1+NJs3Wtc8+et5IjmLQbbzYFzYl2919Ltn5 HHhCx1pRQqhgpi0P2ltpOeFiWYpj+CHA7A== X-Received: by 2002:a63:d709:: with SMTP id d9mr17511794pgg.337.1623065968803; Mon, 07 Jun 2021 04:39:28 -0700 (PDT) Received: from localhost.localdomain.name ([122.177.177.211]) by smtp.gmail.com with ESMTPSA id j7sm7223939pjf.0.2021.06.07.04.39.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Jun 2021 04:39:28 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org Cc: bhupesh.sharma@linaro.org, Linus Walleij , Liam Girdwood , Mark Brown , Bjorn Andersson , Vinod Koul , Rob Herring , Andy Gross , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, bhupesh.linux@gmail.com Subject: [PATCH 4/8] regulator: qcom-rpmh: Add new regulator types found on SA8155p adp board Date: Mon, 7 Jun 2021 17:08:36 +0530 Message-Id: <20210607113840.15435-5-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210607113840.15435-1-bhupesh.sharma@linaro.org> References: <20210607113840.15435-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org SA8155p-adp board has two new regulator types - pmm8155au_1 and pmm8155au_2. The output power management circuits in these regulators include: - FTS510 smps, - HFS510 smps, and - LDO510 linear regulators Cc: Linus Walleij Cc: Liam Girdwood Cc: Mark Brown Cc: Bjorn Andersson Cc: Vinod Koul Cc: Rob Herring Cc: Andy Gross Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-gpio@vger.kernel.org Cc: bhupesh.linux@gmail.com Signed-off-by: Bhupesh Sharma --- drivers/regulator/qcom-rpmh-regulator.c | 72 +++++++++++++++++++++++++ 1 file changed, 72 insertions(+) -- 2.31.1 diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c index 22fec370fa61..d0a3c6527568 100644 --- a/drivers/regulator/qcom-rpmh-regulator.c +++ b/drivers/regulator/qcom-rpmh-regulator.c @@ -883,6 +883,70 @@ static const struct rpmh_vreg_init_data pm8150l_vreg_data[] = { {}, }; +static const struct rpmh_vreg_init_data pmm8155au_1_vreg_data[] = { + RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps510, "vdd-s1"), + RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps510, "vdd-s2"), + RPMH_VREG("smps3", "smp%s3", &pmic5_ftsmps510, "vdd-s3"), + RPMH_VREG("smps4", "smp%s4", &pmic5_hfsmps510, "vdd-s4"), + RPMH_VREG("smps5", "smp%s5", &pmic5_hfsmps510, "vdd-s5"), + RPMH_VREG("smps6", "smp%s6", &pmic5_ftsmps510, "vdd-s6"), + RPMH_VREG("smps7", "smp%s7", &pmic5_ftsmps510, "vdd-s7"), + RPMH_VREG("smps8", "smp%s8", &pmic5_ftsmps510, "vdd-s8"), + RPMH_VREG("smps9", "smp%s9", &pmic5_ftsmps510, "vdd-s9"), + RPMH_VREG("smps10", "smp%s10", &pmic5_ftsmps510, "vdd-s10"), + RPMH_VREG("ldo1", "ldo%s1", &pmic5_nldo, "vdd-l1-l8-l11"), + RPMH_VREG("ldo2", "ldo%s2", &pmic5_pldo, "vdd-l2-l10"), + RPMH_VREG("ldo3", "ldo%s3", &pmic5_nldo, "vdd-l3-l4-l5-l18"), + RPMH_VREG("ldo4", "ldo%s4", &pmic5_nldo, "vdd-l3-l4-l5-l18"), + RPMH_VREG("ldo5", "ldo%s5", &pmic5_nldo, "vdd-l3-l4-l5-l18"), + RPMH_VREG("ldo6", "ldo%s6", &pmic5_nldo, "vdd-l6-l9"), + RPMH_VREG("ldo7", "ldo%s7", &pmic5_pldo_lv, "vdd-l7-l12-l14-l15"), + RPMH_VREG("ldo8", "ldo%s8", &pmic5_nldo, "vdd-l1-l8-l11"), + RPMH_VREG("ldo9", "ldo%s9", &pmic5_nldo, "vdd-l6-l9"), + RPMH_VREG("ldo10", "ldo%s10", &pmic5_pldo, "vdd-l2-l10"), + RPMH_VREG("ldo11", "ldo%s11", &pmic5_nldo, "vdd-l1-l8-l11"), + RPMH_VREG("ldo12", "ldo%s12", &pmic5_pldo_lv, "vdd-l7-l12-l14-l15"), + RPMH_VREG("ldo13", "ldo%s13", &pmic5_pldo, "vdd-l13-l16-l17"), + RPMH_VREG("ldo14", "ldo%s14", &pmic5_pldo_lv, "vdd-l7-l12-l14-l15"), + RPMH_VREG("ldo15", "ldo%s15", &pmic5_pldo_lv, "vdd-l7-l12-l14-l15"), + RPMH_VREG("ldo16", "ldo%s16", &pmic5_pldo, "vdd-l13-l16-l17"), + RPMH_VREG("ldo17", "ldo%s17", &pmic5_pldo, "vdd-l13-l16-l17"), + RPMH_VREG("ldo18", "ldo%s18", &pmic5_nldo, "vdd-l3-l4-l5-l18"), + {}, +}; + +static const struct rpmh_vreg_init_data pmm8155au_2_vreg_data[] = { + RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps510, "vdd-s1"), + RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps510, "vdd-s2"), + RPMH_VREG("smps3", "smp%s3", &pmic5_ftsmps510, "vdd-s3"), + RPMH_VREG("smps4", "smp%s4", &pmic5_hfsmps510, "vdd-s4"), + RPMH_VREG("smps5", "smp%s5", &pmic5_hfsmps510, "vdd-s5"), + RPMH_VREG("smps6", "smp%s6", &pmic5_ftsmps510, "vdd-s6"), + RPMH_VREG("smps7", "smp%s7", &pmic5_ftsmps510, "vdd-s7"), + RPMH_VREG("smps8", "smp%s8", &pmic5_ftsmps510, "vdd-s8"), + RPMH_VREG("smps9", "smp%s9", &pmic5_ftsmps510, "vdd-s9"), + RPMH_VREG("smps10", "smp%s10", &pmic5_ftsmps510, "vdd-s10"), + RPMH_VREG("ldo1", "ldo%s1", &pmic5_nldo, "vdd-l1-l8-l11"), + RPMH_VREG("ldo2", "ldo%s2", &pmic5_pldo, "vdd-l2-l10"), + RPMH_VREG("ldo3", "ldo%s3", &pmic5_nldo, "vdd-l3-l4-l5-l18"), + RPMH_VREG("ldo4", "ldo%s4", &pmic5_nldo, "vdd-l3-l4-l5-l18"), + RPMH_VREG("ldo5", "ldo%s5", &pmic5_nldo, "vdd-l3-l4-l5-l18"), + RPMH_VREG("ldo6", "ldo%s6", &pmic5_nldo, "vdd-l6-l9"), + RPMH_VREG("ldo7", "ldo%s7", &pmic5_pldo_lv, "vdd-l7-l12-l14-l15"), + RPMH_VREG("ldo8", "ldo%s8", &pmic5_nldo, "vdd-l1-l8-l11"), + RPMH_VREG("ldo9", "ldo%s9", &pmic5_nldo, "vdd-l6-l9"), + RPMH_VREG("ldo10", "ldo%s10", &pmic5_pldo, "vdd-l2-l10"), + RPMH_VREG("ldo11", "ldo%s11", &pmic5_nldo, "vdd-l1-l8-l11"), + RPMH_VREG("ldo12", "ldo%s12", &pmic5_pldo_lv, "vdd-l7-l12-l14-l15"), + RPMH_VREG("ldo13", "ldo%s13", &pmic5_pldo, "vdd-l13-l16-l17"), + RPMH_VREG("ldo14", "ldo%s14", &pmic5_pldo_lv, "vdd-l7-l12-l14-l15"), + RPMH_VREG("ldo15", "ldo%s15", &pmic5_pldo_lv, "vdd-l7-l12-l14-l15"), + RPMH_VREG("ldo16", "ldo%s16", &pmic5_pldo, "vdd-l13-l16-l17"), + RPMH_VREG("ldo17", "ldo%s17", &pmic5_pldo, "vdd-l13-l16-l17"), + RPMH_VREG("ldo18", "ldo%s18", &pmic5_nldo, "vdd-l3-l4-l5-l18"), + {}, +}; + static const struct rpmh_vreg_init_data pm8350_vreg_data[] = { RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps510, "vdd-s1"), RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps510, "vdd-s2"), @@ -1143,6 +1207,14 @@ static const struct of_device_id __maybe_unused rpmh_regulator_match_table[] = { .compatible = "qcom,pm8150l-rpmh-regulators", .data = pm8150l_vreg_data, }, + { + .compatible = "qcom,pmm8155au-1-rpmh-regulators", + .data = pmm8155au_1_vreg_data, + }, + { + .compatible = "qcom,pmm8155au-2-rpmh-regulators", + .data = pmm8155au_2_vreg_data, + }, { .compatible = "qcom,pm8350-rpmh-regulators", .data = pm8350_vreg_data,