From patchwork Mon Mar 1 16:08:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 388722 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp3636418jap; Mon, 1 Mar 2021 11:36:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzAqaBRcHDoYgqkSo8hY2gDD+bHfTRrV3UgmuLzetmC5lCud9lwH6v9LPSaRavD01QU7qct X-Received: by 2002:a17:906:5044:: with SMTP id e4mr17266654ejk.445.1614627410768; Mon, 01 Mar 2021 11:36:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614627410; cv=none; d=google.com; s=arc-20160816; b=l1ICLgkXS1Tj2Tu8dih6JyB0tHRhxJIY6/ugkzHol4Aezt/pOCSs1OmyL5l4rbXzk7 /BN2AsxCRIkorCssgQDWOk4dnyni4RfE7vGLkPKTLZD0lLkGFkwIVD3NY7i3vfwZhurS sCMPpV7hbpQe8tSfMyicrEXpikj4BTdN8pA+tbsdd/aW0fTc3cp/LY0AVOQB8SQSSJVt +YWc6W5lDw/zlbFiW/VOIRgBQu2GdKadJNq7FHLLWwnoxLsW4wOfr4BgWSILSHkCxEZI Kl+Gy4igBz/WQuFS4WZn4smZNaMIQGs2KSuzk1ImzmY73isneq9EShwbZtBIUvSMyFip POHQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DoIJAE19e3Audd1EudxYnSzi7M/ViVo7mQ9halU5reQ=; b=JhTkKxPr3ii0vWGUaeEzbZPXKIJWpY9ZIleZGjjasbOrw+YtFxKQ2PBdMK8MCjNmXf DGq53fxvFijqr8F58LbA57/WdSk+dw5xB77JoL00ApaZGfViq4fdApCz3VfwgFqMwM1D PavNErNfBVBS0+sI2ndN+9xeDo6tgdVygGWOrfIpTSvQHlLQCGmUO3Ez7AOp8QOBuEHV NbiNnXbdOQ/dWDCb/P5LCpO91QOQK7tbrrRKPZnEZvdgnsBts4p4Aea/wW2cLlNLIDUc D/a9ixYDpuVp9bbfQBtx5c/DOZo+ljbKd26HVXKmeNnWsGSTro00Gq3YeustB0r2no4f sJdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="EC5/SDZo"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a2si13512896eda.350.2021.03.01.11.36.50; Mon, 01 Mar 2021 11:36:50 -0800 (PST) Received-SPF: pass (google.com: domain of stable-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=@linuxfoundation.org header.s=korg header.b="EC5/SDZo"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242021AbhCATe3 (ORCPT + 13 others); Mon, 1 Mar 2021 14:34:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:49714 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241752AbhCAT3G (ORCPT ); Mon, 1 Mar 2021 14:29:06 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B67A1651BF; Mon, 1 Mar 2021 17:16:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614618998; bh=Rh+Y3qbRoDXJ60BNGZS75Fm1ObrDfLuiNCMDohEsR+s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EC5/SDZo2rxyv29c2eqSlABdkZ0xqVuui8NwhCESmQFpGOrftWQWjqeFTeEhwMtng m4DVGLUKAE0h/WPX/zUW+B3KlQByV6Kepkfw0JgT1UH6lJlxowrjsCCcw+M9glb6Tt 6sEz9Uln6j3apKcpZ4bhw4MEX5jaNu5b/wtzshsw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Baryshkov , Vinod Koul , Mark Brown , Sasha Levin Subject: [PATCH 5.10 264/663] regulator: qcom-rpmh-regulator: add pm8009-1 chip revision Date: Mon, 1 Mar 2021 17:08:32 +0100 Message-Id: <20210301161154.876964311@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Dmitry Baryshkov [ Upstream commit 951384cabc5dfb09251d440dbc26058eba86f97e ] PM8009 has special revision (P=1), which is to be used for sm8250 platform. The major difference is the S2 regulator which supplies 0.95 V instead of 2.848V. Declare regulators data to be used for this chip revision. The datasheet calls the chip just pm8009-1, so use the same name. Signed-off-by: Dmitry Baryshkov Fixes: 06369bcc15a1 ("regulator: qcom-rpmh: Add support for SM8150") Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20201231122348.637917-4-dmitry.baryshkov@linaro.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/regulator/qcom-rpmh-regulator.c | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) -- 2.27.0 diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c index a22c4b5f64f7e..ba838c4cf2b8b 100644 --- a/drivers/regulator/qcom-rpmh-regulator.c +++ b/drivers/regulator/qcom-rpmh-regulator.c @@ -732,6 +732,15 @@ static const struct rpmh_vreg_hw_data pmic5_hfsmps515 = { .of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode, }; +static const struct rpmh_vreg_hw_data pmic5_hfsmps515_1 = { + .regulator_type = VRM, + .ops = &rpmh_regulator_vrm_ops, + .voltage_range = REGULATOR_LINEAR_RANGE(900000, 0, 4, 16000), + .n_voltages = 5, + .pmic_mode_map = pmic_mode_map_pmic5_smps, + .of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode, +}; + static const struct rpmh_vreg_hw_data pmic5_bob = { .regulator_type = VRM, .ops = &rpmh_regulator_vrm_bypass_ops, @@ -878,6 +887,19 @@ static const struct rpmh_vreg_init_data pm8009_vreg_data[] = { {}, }; +static const struct rpmh_vreg_init_data pm8009_1_vreg_data[] = { + RPMH_VREG("smps1", "smp%s1", &pmic5_hfsmps510, "vdd-s1"), + RPMH_VREG("smps2", "smp%s2", &pmic5_hfsmps515_1, "vdd-s2"), + RPMH_VREG("ldo1", "ldo%s1", &pmic5_nldo, "vdd-l1"), + RPMH_VREG("ldo2", "ldo%s2", &pmic5_nldo, "vdd-l2"), + RPMH_VREG("ldo3", "ldo%s3", &pmic5_nldo, "vdd-l3"), + RPMH_VREG("ldo4", "ldo%s4", &pmic5_nldo, "vdd-l4"), + RPMH_VREG("ldo5", "ldo%s5", &pmic5_pldo, "vdd-l5-l6"), + RPMH_VREG("ldo6", "ldo%s6", &pmic5_pldo, "vdd-l5-l6"), + RPMH_VREG("ldo7", "ldo%s6", &pmic5_pldo_lv, "vdd-l7"), + {}, +}; + static const struct rpmh_vreg_init_data pm6150_vreg_data[] = { RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps510, "vdd-s1"), RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps510, "vdd-s2"), @@ -976,6 +998,10 @@ static const struct of_device_id __maybe_unused rpmh_regulator_match_table[] = { .compatible = "qcom,pm8009-rpmh-regulators", .data = pm8009_vreg_data, }, + { + .compatible = "qcom,pm8009-1-rpmh-regulators", + .data = pm8009_1_vreg_data, + }, { .compatible = "qcom,pm8150-rpmh-regulators", .data = pm8150_vreg_data,