From patchwork Sat Sep 21 09:50:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 11155387 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D664E15E6 for ; Sat, 21 Sep 2019 09:51:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B3FA921928 for ; Sat, 21 Sep 2019 09:51:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FCSPBVZp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404309AbfIUJvY (ORCPT ); Sat, 21 Sep 2019 05:51:24 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:43842 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391840AbfIUJvY (ORCPT ); Sat, 21 Sep 2019 05:51:24 -0400 Received: by mail-wr1-f67.google.com with SMTP id q17so9081327wrx.10 for ; Sat, 21 Sep 2019 02:51:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TTWhGlfQoIcDWIQ6V6w3XJDTatobCF4pJ0zw9P4Oqcc=; b=FCSPBVZpLXy8SjtQexkvU5fv0PHXbse0xmO/ztLV4mT6cEOVpRNTKrpxGf+yV8qfUb N5BFvJU7V7nTH+oudsWkbRVRM+WEuNdka4tESVWhJibtq/7UgH3PaYeeqFS14oqs9svQ RHGaVLqS/q9ihtBlzbAVru8cBGVG2aacl6VbgcrhD999Y9WO1JFwaG+6orOtsOplqYW0 OgUjwdynZx545XgXMyo+jX7JERYI8750srZ/gF8UdeDDC3A+Smo/LfbPED/4cH4Rag7v d5LtV1rSOWH7GHRn/YC3jPN2VIsADeZidy5sJ6zFKKDv2528jKBksg6jLsl4HMWeogMW tGgA== 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=TTWhGlfQoIcDWIQ6V6w3XJDTatobCF4pJ0zw9P4Oqcc=; b=NwOFLEosfnr8RykYdSnmpb0Cu0KyytjAOi72VGjTTy9AhbEgikcfY3MuHxcnomyueu 7dokMgR2RG/q8c+XXXl/5EwFsE+4osEltLViu60+rck5UPq3URPVwX2jiR1gXBWMa6WI dh8/Jal+qDKGFRJBFFf1n9Y8mc9ahe8PlYb4lhIEDehivoXd4U6rbHMR8pJtSQujlaCY H2qDpLhgymtRist5HtQMH38D6V7aB/uTIQy7/cHBG+W6IYujib8BDqqLuayfwu0C8d8Z 4182IQLum99xx/FasPLl7zBn25imLkkELdEvk3f4YmwqnqQRZNkH+RaUVk+jYw7a2/Ah QfmQ== X-Gm-Message-State: APjAAAXxj2St/oomCN7FI5axS/tPmZXMZ3EA6Qcsb628OyZwyxAP/VQx bbffcXkLpp5v5eIdS0yM2kjfyDw+CHg= X-Google-Smtp-Source: APXvYqx0yJj+109W5ssYuusAnYqbfiIGKd7D32xTIOg71MDeCKQ8kHc3WA4rMsJpv6WN06tL0d6GJw== X-Received: by 2002:a5d:4d8c:: with SMTP id b12mr14496557wru.198.1569059481643; Sat, 21 Sep 2019 02:51:21 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu ([93.51.16.173]) by smtp.gmail.com with ESMTPSA id c8sm4947094wrr.49.2019.09.21.02.51.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Sep 2019 02:51:21 -0700 (PDT) From: kholk11@gmail.com To: linux-arm-msm@vger.kernel.org Cc: kholk11@gmail.com, marijns95@gmail.com, broonie@kernel.org, lgirdwood@gmail.com, mark.rutland@arm.com, robh+dt@kernel.org, lee.jones@linaro.org, agross@kernel.org Subject: [PATCH 1/5] qcom: spmi-regulator: Add support for ULT LV_P50 and ULT P300 Date: Sat, 21 Sep 2019 11:50:39 +0200 Message-Id: <20190921095043.62593-2-kholk11@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190921095043.62593-1-kholk11@gmail.com> References: <20190921095043.62593-1-kholk11@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: "Angelo G. Del Regno" The ULT LV_P50 shares the same configuration as the other ULT LV_Pxxx and the ULT P300 shares the same as the other ULT Pxxx. These two regulator types are found on PM8950 and its variants. Signed-off-by: Angelo G. Del Regno --- drivers/regulator/qcom_spmi-regulator.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 7f51c5fc8194..5a269ec46963 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -1466,10 +1466,12 @@ static const struct spmi_regulator_mapping supported_regulators[] = { SPMI_VREG(ULT_LDO, N600_ST, 0, INF, ULT_LDO, ult_ldo, ult_nldo, 10000), SPMI_VREG(ULT_LDO, N900_ST, 0, INF, ULT_LDO, ult_ldo, ult_nldo, 10000), SPMI_VREG(ULT_LDO, N1200_ST, 0, INF, ULT_LDO, ult_ldo, ult_nldo, 10000), + SPMI_VREG(ULT_LDO, LV_P50, 0, INF, ULT_LDO, ult_ldo, ult_pldo, 10000), SPMI_VREG(ULT_LDO, LV_P150, 0, INF, ULT_LDO, ult_ldo, ult_pldo, 10000), SPMI_VREG(ULT_LDO, LV_P300, 0, INF, ULT_LDO, ult_ldo, ult_pldo, 10000), SPMI_VREG(ULT_LDO, LV_P450, 0, INF, ULT_LDO, ult_ldo, ult_pldo, 10000), SPMI_VREG(ULT_LDO, P600, 0, INF, ULT_LDO, ult_ldo, ult_pldo, 10000), + SPMI_VREG(ULT_LDO, P300, 0, INF, ULT_LDO, ult_ldo, ult_pldo, 10000), SPMI_VREG(ULT_LDO, P150, 0, INF, ULT_LDO, ult_ldo, ult_pldo, 10000), SPMI_VREG(ULT_LDO, P50, 0, INF, ULT_LDO, ult_ldo, ult_pldo, 5000), }; From patchwork Sat Sep 21 09:50:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 11155393 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 82744197C for ; Sat, 21 Sep 2019 09:51:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6128D2196E for ; Sat, 21 Sep 2019 09:51:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JFoS5ykB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405563AbfIUJv1 (ORCPT ); Sat, 21 Sep 2019 05:51:27 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:39204 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405234AbfIUJv1 (ORCPT ); Sat, 21 Sep 2019 05:51:27 -0400 Received: by mail-wr1-f66.google.com with SMTP id r3so9104917wrj.6 for ; Sat, 21 Sep 2019 02:51:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gUvB2IDVhucqoDU2QjHJoWGF/q3qwY0/f00xRAU61Xc=; b=JFoS5ykBI8PzvRpm+qwTIXfFfXGXJOqQQUJh1GiZhfPKHago+sJ0Q1KjyZ4NbrvBub V1kFCKpw4kBZcaEjLFWrk8xNwH2UZtwbxWdCu0QzKwD/8a277WYNDT9XxWTgwBGJq+ZA HBSZ1VZRmQLUngV9x7MKa89u7oqtvs8eIeaoR9efIzuJRzkugH191hw2mL7TgWTX1/O8 KU+ar7NvpvIKQviu0ZSUEpSQtshnshfdNOal2jNnIQZTJ34ClaLsr+k251+eBdLxKfvY XPmshK+vkYQHJSWybIcnWT48hqJS0wDw+ll0QUmi4EMD2zB9X+UfEbOxqPF4YZLU3h1K ubFQ== 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=gUvB2IDVhucqoDU2QjHJoWGF/q3qwY0/f00xRAU61Xc=; b=KbTPm998ogKSzmfUaf5rhgN2wrNLcuQ8fDhX8EmsJfR+Bjy+r7BFXYyDwMgwAbeuOw 7m8fC3i3wusTc0gav6Qumn/Vz03b4vVW1hXyD7LZ/ayCa3VISgKNWyjps13LMTU/AXBz DyWhfnLIO7MdKlE6Hip9btSSd/KMCJQV470TW3xFCgE5ch0Ev4kPWc+E3nw6NY1aixHg HOcuWgS4p7NjwLkl77USo8HB8H57SlOlrJHYtXeVGPYVAtwws9QBqXOxAtJSAGq62bP0 EfR7Ldt60GUIb9fSwj5XIlAx/GBPpQofeic9XBh59+9gZgJw2gZQF1LVJfH9tnq791pY 5ScQ== X-Gm-Message-State: APjAAAWU4chv41izsBtOYtpym8DMfcXri86U/RbU/l8m7ylUMoucmdGY lBLMNqIYuU11THF/6ui75HAaSRSjbZc= X-Google-Smtp-Source: APXvYqz1tKsCSD3IpVNWl/0D5wILgSZMUp65qPJpU/7eDyy2OF+IE0ziKvsHgFrNg6WCqeHddeDaeA== X-Received: by 2002:adf:f112:: with SMTP id r18mr15470191wro.88.1569059482543; Sat, 21 Sep 2019 02:51:22 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu ([93.51.16.173]) by smtp.gmail.com with ESMTPSA id c8sm4947094wrr.49.2019.09.21.02.51.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Sep 2019 02:51:21 -0700 (PDT) From: kholk11@gmail.com To: linux-arm-msm@vger.kernel.org Cc: kholk11@gmail.com, marijns95@gmail.com, broonie@kernel.org, lgirdwood@gmail.com, mark.rutland@arm.com, robh+dt@kernel.org, lee.jones@linaro.org, agross@kernel.org Subject: [PATCH 2/5] regulator: qcom_spmi: Add PM8950 SPMI regulator Date: Sat, 21 Sep 2019 11:50:40 +0200 Message-Id: <20190921095043.62593-3-kholk11@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190921095043.62593-1-kholk11@gmail.com> References: <20190921095043.62593-1-kholk11@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: "Angelo G. Del Regno" The PM8950 has 5 HFSMPS, 1 FTSMPS2.5 (s5, controlling APC voltage) and 23 LDO regulators. Add the configuration for this chip. Signed-off-by: Angelo G. Del Regno --- .../regulator/qcom,spmi-regulator.txt | 21 ++++++++++++ drivers/regulator/qcom_spmi-regulator.c | 34 +++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt index 430b8622bda1..76885fd8a3c9 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt @@ -8,6 +8,7 @@ Qualcomm SPMI Regulators "qcom,pm8841-regulators" "qcom,pm8916-regulators" "qcom,pm8941-regulators" + "qcom,pm8950-regulators" "qcom,pm8994-regulators" "qcom,pmi8994-regulators" "qcom,pms405-regulators" @@ -72,6 +73,26 @@ Qualcomm SPMI Regulators Definition: Reference to regulator supplying the input pin, as described in the data sheet. +- vdd_s1-supply: +- vdd_s2-supply: +- vdd_s3-supply: +- vdd_s4-supply: +- vdd_s4-supply: +- vdd_s5-supply: +- vdd_s6-supply: +- vdd_l1_l19-supply: +- vdd_l2_l23-supply: +- vdd_l3-supply: +- vdd_l4_l5_l6_l7_l16-supply: +- vdd_l8_l11_l12_l17_l22-supply: +- vdd_l9_l10_l13_l14_l15_l18-supply: +- vdd_l20-supply: +- vdd_l21-supply: + Usage: optional (pm8950 only) + Value type: + Definition: reference to regulator supplying the input pin, as + described in the data sheet + - vdd_s1-supply: - vdd_s2-supply: - vdd_s3-supply: diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 5a269ec46963..3504d9054df1 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -1871,6 +1871,39 @@ static const struct spmi_regulator_data pm8916_regulators[] = { { } }; +static const struct spmi_regulator_data pm8950_regulators[] = { + { "s1", 0x1400, "vdd_s1", }, + { "s2", 0x1700, "vdd_s2", }, + { "s3", 0x1a00, "vdd_s3", }, + { "s4", 0x1d00, "vdd_s4", }, + { "s5", 0x2000, "vdd_s5", }, + { "s6", 0x2300, "vdd_s6", }, + { "l1", 0x4000, "vdd_l1_l19", }, + { "l2", 0x4100, "vdd_l2_l23", }, + { "l3", 0x4200, "vdd_l3", }, + { "l4", 0x4300, "vdd_l4_l5_l6_l7_l16", }, + { "l5", 0x4400, "vdd_l4_l5_l6_l7_l16", }, + { "l6", 0x4500, "vdd_l4_l5_l6_l7_l16", }, + { "l7", 0x4600, "vdd_l4_l5_l6_l7_l16", }, + { "l8", 0x4700, "vdd_l8_l11_l12_l17_l22", }, + { "l9", 0x4800, "vdd_l9_l10_l13_l14_l15_l18", }, + { "l10", 0x4900, "vdd_l9_l10_l13_l14_l15_l18", }, + { "l11", 0x4a00, "vdd_l8_l11_l12_l17_l22", }, + { "l12", 0x4b00, "vdd_l8_l11_l12_l17_l22", }, + { "l13", 0x4c00, "vdd_l9_l10_l13_l14_l15_l18", }, + { "l14", 0x4d00, "vdd_l9_l10_l13_l14_l15_l18", }, + { "l15", 0x4e00, "vdd_l9_l10_l13_l14_l15_l18", }, + { "l16", 0x4f00, "vdd_l4_l5_l6_l7_l16", }, + { "l17", 0x5000, "vdd_l8_l11_l12_l17_l22", }, + { "l18", 0x5100, "vdd_l9_l10_l13_l14_l15_l18", }, + { "l19", 0x5200, "vdd_l1_l19", }, + { "l20", 0x5300, "vdd_l20", }, + { "l21", 0x5400, "vdd_l21", }, + { "l22", 0x5500, "vdd_l8_l11_l12_l17_l22", }, + { "l23", 0x5600, "vdd_l2_l23", }, + { } +}; + static const struct spmi_regulator_data pm8994_regulators[] = { { "s1", 0x1400, "vdd_s1", }, { "s2", 0x1700, "vdd_s2", }, @@ -1947,6 +1980,7 @@ static const struct of_device_id qcom_spmi_regulator_match[] = { { .compatible = "qcom,pm8841-regulators", .data = &pm8841_regulators }, { .compatible = "qcom,pm8916-regulators", .data = &pm8916_regulators }, { .compatible = "qcom,pm8941-regulators", .data = &pm8941_regulators }, + { .compatible = "qcom,pm8950-regulators", .data = &pm8950_regulators }, { .compatible = "qcom,pm8994-regulators", .data = &pm8994_regulators }, { .compatible = "qcom,pmi8994-regulators", .data = &pmi8994_regulators }, { .compatible = "qcom,pms405-regulators", .data = &pms405_regulators }, From patchwork Sat Sep 21 09:50:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 11155389 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 212DD15E6 for ; Sat, 21 Sep 2019 09:51:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EA17B21928 for ; Sat, 21 Sep 2019 09:51:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iN44MZGh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405562AbfIUJv1 (ORCPT ); Sat, 21 Sep 2019 05:51:27 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:44601 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405436AbfIUJv1 (ORCPT ); Sat, 21 Sep 2019 05:51:27 -0400 Received: by mail-wr1-f65.google.com with SMTP id i18so9056787wru.11 for ; Sat, 21 Sep 2019 02:51:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NX5OSIPn5P4G+m7Kvbj+EXa/e5zf+0aUXiYf+I4+xpg=; b=iN44MZGhre8O2zbPZkc89lIMx7nJR4peTcJDwIxVLMu4Es7O5Z4qc9dBVu4mbFaEAD 7Fovsg6Fr7awR7c50vduzk8Xjbw8TxvtyVYiOfsBwl8+aQ3NRr8ojMYwHxDyITgvm0Iz PG3PyL79hJO8vPV61mmJqZHtg3nyjbJhvnRr39KfdNAeh40o7EKuPc6juErz0n8m57/H kqwZEaDtF//79xXQNY/gynrcqfe8sTUf1fUjelW0CgYsi5MfXYjs5XT3n7jd6wU+twvz nFyDhOH4L+Cze32iRgpT4tepf8ITzW2itOMQEFR8kGNAhKqnX0CN8MgQhNGXYWPfJeh9 tcJg== 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=NX5OSIPn5P4G+m7Kvbj+EXa/e5zf+0aUXiYf+I4+xpg=; b=b3D6km4w9aNcDPuUxAXC/0VqhFsd4DNepKiofTthX6yyIvxR7y2vepVfL5oiu23aUd O7Bz18I1hSk7R4WPYt0PHChQnXGZUuMpKPwMRklV3r10ZImiig7Xjkks9sEC+MP3GTI+ nUPQ2gfLFvHBkmMDWsY7K3WD5whdCgYZGWl5iOZVj51rN5BiKO9OXjU4ccBtKAyk4DSC cmZaZH0AEkRJ4YXaiFyvZIvKP6NDOvjfHvSn0CgJPOSdokd49rAry3iO/VEfRx8MO6gE H+XhRueVnwwlMAu6mngodnt+0p5ce8t3O/+fsiWl8sMNV2/gkSSiosJkGSvtQ9iPF8Wk fXiw== X-Gm-Message-State: APjAAAXZ1DQ0GhFMA1JcTz74BUU+ATUg/wCR4ECJNmAt6Scb0dg1XHGP kVWIbW4UIW3VO45j5Fhz77NeW6247Wc= X-Google-Smtp-Source: APXvYqw8aSkPgi4t5JZsZWR1GPSMfZQ68hj3jG/9YJsuL4F3657INL0Tiaxn+Al0B04mgmtdWXd5vQ== X-Received: by 2002:adf:e84c:: with SMTP id d12mr2405526wrn.373.1569059483423; Sat, 21 Sep 2019 02:51:23 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu ([93.51.16.173]) by smtp.gmail.com with ESMTPSA id c8sm4947094wrr.49.2019.09.21.02.51.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Sep 2019 02:51:22 -0700 (PDT) From: kholk11@gmail.com To: linux-arm-msm@vger.kernel.org Cc: kholk11@gmail.com, marijns95@gmail.com, broonie@kernel.org, lgirdwood@gmail.com, mark.rutland@arm.com, robh+dt@kernel.org, lee.jones@linaro.org, agross@kernel.org Subject: [PATCH 3/5] regulator: qcom_smd: Add PM8950 regulators Date: Sat, 21 Sep 2019 11:50:41 +0200 Message-Id: <20190921095043.62593-4-kholk11@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190921095043.62593-1-kholk11@gmail.com> References: <20190921095043.62593-1-kholk11@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: "Angelo G. Del Regno" The PM8950 provides 6 SMPS regulators, of which 5 HFSMPS and one FTSMPS2.5 (s5), and 23 LDOs. Add these to the RPM regulator driver. Signed-off-by: Angelo G. Del Regno --- .../regulator/qcom,smd-rpm-regulator.txt | 21 +++++ drivers/regulator/qcom_smd-regulator.c | 92 +++++++++++++++++++ 2 files changed, 113 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt index 45025b5b67f6..d126df043403 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt @@ -22,6 +22,7 @@ Regulator nodes are identified by their compatible: "qcom,rpm-pm8841-regulators" "qcom,rpm-pm8916-regulators" "qcom,rpm-pm8941-regulators" + "qcom,rpm-pm8950-regulators" "qcom,rpm-pm8994-regulators" "qcom,rpm-pm8998-regulators" "qcom,rpm-pma8084-regulators" @@ -54,6 +55,26 @@ Regulator nodes are identified by their compatible: Definition: reference to regulator supplying the input pin, as described in the data sheet +- vdd_s1-supply: +- vdd_s2-supply: +- vdd_s3-supply: +- vdd_s4-supply: +- vdd_s4-supply: +- vdd_s5-supply: +- vdd_s6-supply: +- vdd_l1_l19-supply: +- vdd_l2_l23-supply: +- vdd_l3-supply: +- vdd_l4_l5_l6_l7_l16-supply: +- vdd_l8_l11_l12_l17_l22-supply: +- vdd_l9_l10_l13_l14_l15_l18-supply: +- vdd_l20-supply: +- vdd_l21-supply: + Usage: optional (pm8950 only) + Value type: + Definition: reference to regulator supplying the input pin, as + described in the data sheet + - vdd_s1-supply: - vdd_s2-supply: - vdd_s3-supply: diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c index 3b0828c79e2b..fff8d5fdef6a 100644 --- a/drivers/regulator/qcom_smd-regulator.c +++ b/drivers/regulator/qcom_smd-regulator.c @@ -338,6 +338,63 @@ static const struct regulator_desc pm8916_buck_hvo_smps = { .ops = &rpm_smps_ldo_ops, }; +static const struct regulator_desc pm8950_hfsmps = { + .linear_ranges = (struct regulator_linear_range[]) { + REGULATOR_LINEAR_RANGE(375000, 0, 95, 12500), + REGULATOR_LINEAR_RANGE(1550000, 96, 127, 25000), + }, + .n_linear_ranges = 2, + .n_voltages = 128, + .ops = &rpm_smps_ldo_ops, +}; + +static const struct regulator_desc pm8950_ftsmps2p5 = { + .linear_ranges = (struct regulator_linear_range[]) { + REGULATOR_LINEAR_RANGE(80000, 0, 255, 5000), + REGULATOR_LINEAR_RANGE(160000, 256, 460, 10000), + }, + .n_linear_ranges = 2, + .n_voltages = 461, + .ops = &rpm_smps_ldo_ops, +}; + +static const struct regulator_desc pm8950_ult_nldo = { + .linear_ranges = (struct regulator_linear_range[]) { + REGULATOR_LINEAR_RANGE(375000, 0, 202, 12500), + }, + .n_linear_ranges = 1, + .n_voltages = 203, + .ops = &rpm_smps_ldo_ops, +}; + +static const struct regulator_desc pm8950_ult_pldo = { + .linear_ranges = (struct regulator_linear_range[]) { + REGULATOR_LINEAR_RANGE(1750000, 0, 127, 12500), + }, + .n_linear_ranges = 1, + .n_voltages = 128, + .ops = &rpm_smps_ldo_ops, +}; + +static const struct regulator_desc pm8950_pldo_lv = { + .linear_ranges = (struct regulator_linear_range[]) { + REGULATOR_LINEAR_RANGE(1500000, 0, 16, 25000), + }, + .n_linear_ranges = 1, + .n_voltages = 17, + .ops = &rpm_smps_ldo_ops, +}; + +static const struct regulator_desc pm8950_pldo = { + .linear_ranges = (struct regulator_linear_range[]) { + REGULATOR_LINEAR_RANGE(975000, 0, 164, 12500), + }, + .n_linear_ranges = 1, + .n_voltages = 165, + .ops = &rpm_smps_ldo_ops, +}; + + static const struct regulator_desc pm8994_hfsmps = { .linear_ranges = (struct regulator_linear_range[]) { REGULATOR_LINEAR_RANGE( 375000, 0, 95, 12500), @@ -638,6 +695,40 @@ static const struct rpm_regulator_data rpm_pma8084_regulators[] = { {} }; +static const struct rpm_regulator_data rpm_pm8950_regulators[] = { + { "s1", QCOM_SMD_RPM_SMPA, 1, &pm8950_hfsmps, "vdd_s1" }, + { "s2", QCOM_SMD_RPM_SMPA, 2, &pm8950_hfsmps, "vdd_s2" }, + { "s3", QCOM_SMD_RPM_SMPA, 3, &pm8950_hfsmps, "vdd_s3" }, + { "s4", QCOM_SMD_RPM_SMPA, 4, &pm8950_hfsmps, "vdd_s4" }, + { "s5", QCOM_SMD_RPM_SMPA, 5, &pm8950_ftsmps2p5, "vdd_s5" }, + { "s6", QCOM_SMD_RPM_SMPA, 6, &pm8950_hfsmps, "vdd_s6" }, + + { "l1", QCOM_SMD_RPM_LDOA, 1, &pm8950_ult_nldo, "vdd_l1_l19" }, + { "l2", QCOM_SMD_RPM_LDOA, 2, &pm8950_ult_nldo, "vdd_l2_l23" }, + { "l3", QCOM_SMD_RPM_LDOA, 3, &pm8950_ult_nldo, "vdd_l3" }, + { "l4", QCOM_SMD_RPM_LDOA, 4, &pm8950_ult_pldo, "vdd_l4_l5_l6_l7_l16" }, + { "l5", QCOM_SMD_RPM_LDOA, 5, &pm8950_pldo_lv, "vdd_l4_l5_l6_l7_l16" }, + { "l6", QCOM_SMD_RPM_LDOA, 6, &pm8950_pldo_lv, "vdd_l4_l5_l6_l7_l16" }, + { "l7", QCOM_SMD_RPM_LDOA, 7, &pm8950_pldo_lv, "vdd_l4_l5_l6_l7_l16" }, + { "l8", QCOM_SMD_RPM_LDOA, 8, &pm8950_ult_pldo, "vdd_l8_l11_l12_l17_l22" }, + { "l9", QCOM_SMD_RPM_LDOA, 9, &pm8950_ult_pldo, "vdd_l9_l10_l13_l14_l15_l18" }, + { "l10", QCOM_SMD_RPM_LDOA, 10, &pm8950_ult_nldo, "vdd_l9_l10_l13_l14_l15_l18"}, + { "l11", QCOM_SMD_RPM_LDOA, 11, &pm8950_ult_pldo, "vdd_l8_l11_l12_l17_l22"}, + { "l12", QCOM_SMD_RPM_LDOA, 12, &pm8950_ult_pldo, "vdd_l8_l11_l12_l17_l22"}, + { "l13", QCOM_SMD_RPM_LDOA, 13, &pm8950_ult_pldo, "vdd_l9_l10_l13_l14_l15_l18"}, + { "l14", QCOM_SMD_RPM_LDOA, 14, &pm8950_ult_pldo, "vdd_l9_l10_l13_l14_l15_l18"}, + { "l15", QCOM_SMD_RPM_LDOA, 15, &pm8950_ult_pldo, "vdd_l9_l10_l13_l14_l15_l18"}, + { "l16", QCOM_SMD_RPM_LDOA, 16, &pm8950_ult_pldo, "vdd_l4_l5_l6_l7_l16"}, + { "l17", QCOM_SMD_RPM_LDOA, 17, &pm8950_ult_pldo, "vdd_l8_l11_l12_l17_l22"}, + { "l18", QCOM_SMD_RPM_LDOA, 18, &pm8950_ult_pldo, "vdd_l9_l10_l13_l14_l15_l18"}, + { "l19", QCOM_SMD_RPM_LDOA, 18, &pm8950_pldo, "vdd_l1_l19"}, + { "l20", QCOM_SMD_RPM_LDOA, 18, &pm8950_pldo, "vdd_l20"}, + { "l21", QCOM_SMD_RPM_LDOA, 18, &pm8950_pldo, "vdd_l21"}, + { "l22", QCOM_SMD_RPM_LDOA, 18, &pm8950_pldo, "vdd_l8_l11_l12_l17_l22"}, + { "l23", QCOM_SMD_RPM_LDOA, 18, &pm8950_pldo, "vdd_l2_l23"}, + {} +}; + static const struct rpm_regulator_data rpm_pm8994_regulators[] = { { "s1", QCOM_SMD_RPM_SMPA, 1, &pm8994_ftsmps, "vdd_s1" }, { "s2", QCOM_SMD_RPM_SMPA, 2, &pm8994_ftsmps, "vdd_s2" }, @@ -767,6 +858,7 @@ static const struct of_device_id rpm_of_match[] = { { .compatible = "qcom,rpm-pm8841-regulators", .data = &rpm_pm8841_regulators }, { .compatible = "qcom,rpm-pm8916-regulators", .data = &rpm_pm8916_regulators }, { .compatible = "qcom,rpm-pm8941-regulators", .data = &rpm_pm8941_regulators }, + { .compatible = "qcom,rpm-pm8950-regulators", .data = &rpm_pm8950_regulators }, { .compatible = "qcom,rpm-pm8994-regulators", .data = &rpm_pm8994_regulators }, { .compatible = "qcom,rpm-pm8998-regulators", .data = &rpm_pm8998_regulators }, { .compatible = "qcom,rpm-pma8084-regulators", .data = &rpm_pma8084_regulators }, From patchwork Sat Sep 21 09:50:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 11155391 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 54A821747 for ; Sat, 21 Sep 2019 09:51:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2AD9C2196E for ; Sat, 21 Sep 2019 09:51:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="X0AvqD7Z" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405436AbfIUJv1 (ORCPT ); Sat, 21 Sep 2019 05:51:27 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:35750 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405440AbfIUJv1 (ORCPT ); Sat, 21 Sep 2019 05:51:27 -0400 Received: by mail-wm1-f66.google.com with SMTP id y21so4477813wmi.0 for ; Sat, 21 Sep 2019 02:51:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Jmzhv0DcxS1wnuv+FFRJ18wJXKFJBKQZi54zSp+QSrg=; b=X0AvqD7ZnPweyNvQ6wpbX1Lq7xU03M/laYRS1MFQLLKsjdgjSwzZueWQhGGuzX+v0J p18ji2hVF3xR2gcT55WTk6wG4iCtg3bMIkR+xO4SUnGPGOsgFYlt+3KbGHSxRFMub79I MaYGm7qasqD9juKB5mKtndOJJhnEJI8kFmfuOp2nzsrOZik3d4C1gYfuyZALPo5Lhelw m1Ef9MiD7BM63fnRIeIIvFopqtIhFXsjKfAkqmxZWPvk1XsN7PKV+PkoJWFWXXumcWFQ FjzBYgZZE6u7vc6TVm9qrBqWvp/J9jgPvn47Zl/kmKVqVctuOGFRBx709E7anf5yXUIO LGBQ== 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=Jmzhv0DcxS1wnuv+FFRJ18wJXKFJBKQZi54zSp+QSrg=; b=WTuMF/WZsNes8CkysjGzyXKLsWK+2ZoVthNr4ilG2OPxOn7F9jUc20Op/SGaA9vc4G R9HL1vE1OPmJQAhWSgwrmvY1kMejwkpfwLC6RtxKaG/7tH8FpOATfP3idBNRD1lQatgp xV6jo0tmLQgDV/IH+qyIQStWBEKyw46Fz6dXMNnR1EmDLGaTIsqk0wMl0kVd9xMhVJV8 OglhbgXnJ4eH928QQdmbl5peHRxFUMK1zukSo++hMSupaioXXMsxK94q392zLRb9pRri 5tIJc32kvuf4JBw2oNsl+gInrBm4xd09gcglNVc5YbCeiN0rSjJGTKv5gOfrpHVoycy8 5viQ== X-Gm-Message-State: APjAAAUCshtIVfDv5wl49aEwbn43ZT6S/PS2tEfBc3YN7JThLmMde1jY 0sfR2W+nh0ltgB8ZWYjZxwVCC0yvnlQ= X-Google-Smtp-Source: APXvYqwMlwVK4IsiorAV7SdzI22+V4K1q5V4eK+ddVZdS+dHTr3dv96xQcp6NMed4wUlRkO6afGikQ== X-Received: by 2002:a1c:7f4f:: with SMTP id a76mr6638131wmd.117.1569059484400; Sat, 21 Sep 2019 02:51:24 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu ([93.51.16.173]) by smtp.gmail.com with ESMTPSA id c8sm4947094wrr.49.2019.09.21.02.51.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Sep 2019 02:51:23 -0700 (PDT) From: kholk11@gmail.com To: linux-arm-msm@vger.kernel.org Cc: kholk11@gmail.com, marijns95@gmail.com, broonie@kernel.org, lgirdwood@gmail.com, mark.rutland@arm.com, robh+dt@kernel.org, lee.jones@linaro.org, agross@kernel.org Subject: [PATCH 4/5] mfd: qcom-spmi-pmic: Add support for PM/PMI8950 Date: Sat, 21 Sep 2019 11:50:42 +0200 Message-Id: <20190921095043.62593-5-kholk11@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190921095043.62593-1-kholk11@gmail.com> References: <20190921095043.62593-1-kholk11@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: "Angelo G. Del Regno" Add the subtype and compatible strings for PM8950 and PMI8950, found in various SoCs, including MSM8953, MSM8956, MSM8976 and APQ variants. Signed-off-by: Angelo G. Del Regno --- Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt | 2 ++ drivers/mfd/qcom-spmi-pmic.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt index 143706222a51..fffc8fde3302 100644 --- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt +++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt @@ -29,6 +29,8 @@ Required properties: "qcom,pm8916", "qcom,pm8004", "qcom,pm8909", + "qcom,pm8950", + "qcom,pmi8950", "qcom,pm8998", "qcom,pmi8998", "qcom,pm8005", diff --git a/drivers/mfd/qcom-spmi-pmic.c b/drivers/mfd/qcom-spmi-pmic.c index e8fe705073fa..1df1a2711328 100644 --- a/drivers/mfd/qcom-spmi-pmic.c +++ b/drivers/mfd/qcom-spmi-pmic.c @@ -31,6 +31,8 @@ #define PM8916_SUBTYPE 0x0b #define PM8004_SUBTYPE 0x0c #define PM8909_SUBTYPE 0x0d +#define PM8950_SUBTYPE 0x10 +#define PMI8950_SUBTYPE 0x11 #define PM8998_SUBTYPE 0x14 #define PMI8998_SUBTYPE 0x15 #define PM8005_SUBTYPE 0x18 @@ -50,6 +52,8 @@ static const struct of_device_id pmic_spmi_id_table[] = { { .compatible = "qcom,pm8916", .data = (void *)PM8916_SUBTYPE }, { .compatible = "qcom,pm8004", .data = (void *)PM8004_SUBTYPE }, { .compatible = "qcom,pm8909", .data = (void *)PM8909_SUBTYPE }, + { .compatible = "qcom,pm8950", .data = (void *)PM8950_SUBTYPE }, + { .compatible = "qcom,pmi8950", .data = (void *)PMI8950_SUBTYPE }, { .compatible = "qcom,pm8998", .data = (void *)PM8998_SUBTYPE }, { .compatible = "qcom,pmi8998", .data = (void *)PMI8998_SUBTYPE }, { .compatible = "qcom,pm8005", .data = (void *)PM8005_SUBTYPE }, From patchwork Sat Sep 21 09:50:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 11155395 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A29C916B1 for ; Sat, 21 Sep 2019 09:51:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7F4EE2086A for ; Sat, 21 Sep 2019 09:51:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TaCP+vgC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405234AbfIUJv3 (ORCPT ); Sat, 21 Sep 2019 05:51:29 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:36789 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405440AbfIUJv2 (ORCPT ); Sat, 21 Sep 2019 05:51:28 -0400 Received: by mail-wr1-f65.google.com with SMTP id y19so9115090wrd.3 for ; Sat, 21 Sep 2019 02:51:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vVJvBclMyuRvPJqXx7DYYb5mol1nE8l67gPoZ0nMZWw=; b=TaCP+vgCAscjViMEDysUrg01ykmCKZuGgxSRi2Da0Qn160L/Ov73TFAkgw5XT76m+H Y8CiF6aKSfIU4oPW5wofcYNDGDc8l+wxgBYdLSsuwTh7LcQ7fKC25d1hBHDZf8O1ubxy URLQa7LLjn1Tc+CZXf20wCKge3QYuE+bJn5bhKpHwJadIpsydVPhpbqvTDNRxah9GdVx I05XGJkEIACrq4hSsj1n7UUWxvoU5Q+mxya4PSjOM+mN7cJ/SL5I6/O/IZ61rMpXSMOv SWw30+3aEYRSttaqhklrorlqKNXMmtyyy/broHqkPtAdZcpbH8KENzB3rLoOPnusWD0a tXFw== 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=vVJvBclMyuRvPJqXx7DYYb5mol1nE8l67gPoZ0nMZWw=; b=cQtOrPu2T5dXf2L6pOfFlJGoy8SB0UcgusL+Q7sxvQ0SkIPshdZPhqMUDMamfdua2B 82aG+ETRgyIISEHopbVcA6V3NJnEr8Zz1r5VmP9eRYz/o01wgAITP9GRzypMdZyOTa7P CMVOrwAsbxJEHJnLgCWqvfkQb4706HNkjkhk5jl8oEwPQzS4SGOQ5OGqSWrACRIPVwjF 7LZ8ncXDB4EjEErxgD3+2QLjB0uafCEsjhJLPbn5VZCy01V56ndIb0Xnnpg/x3jbkIRy /+uh60sAGvQ7c2LUZhnIqdbOntr7tMIxrDYSr/X1c8rKT6FV08U0NP+CS8mXah6NFYxP w6Kw== X-Gm-Message-State: APjAAAXz1EuaFnnaF30sN51QXTSi9bjFaktoqBDygDQIgruCopJMUsyS cLHc4xtbmr7WAuE7FFIoQAAHTqBgjP0= X-Google-Smtp-Source: APXvYqxeveJxUycvDgHZzB1sNuVURFfk/ZmWFIGSv5wcr1Dnn6zp9zaGVCbD1gIBx6JpcvYGALiB9A== X-Received: by 2002:a05:6000:45:: with SMTP id k5mr15315340wrx.259.1569059485399; Sat, 21 Sep 2019 02:51:25 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu ([93.51.16.173]) by smtp.gmail.com with ESMTPSA id c8sm4947094wrr.49.2019.09.21.02.51.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Sep 2019 02:51:24 -0700 (PDT) From: kholk11@gmail.com To: linux-arm-msm@vger.kernel.org Cc: kholk11@gmail.com, marijns95@gmail.com, broonie@kernel.org, lgirdwood@gmail.com, mark.rutland@arm.com, robh+dt@kernel.org, lee.jones@linaro.org, agross@kernel.org Subject: [PATCH 5/5] regulator: qcom_spmi: Add support for PM8004 regulators Date: Sat, 21 Sep 2019 11:50:43 +0200 Message-Id: <20190921095043.62593-6-kholk11@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190921095043.62593-1-kholk11@gmail.com> References: <20190921095043.62593-1-kholk11@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: "Angelo G. Del Regno" This Power IC is used in combination with various PMIC combos, generally found on boards with MSM8992, MSM8994, MSM8996, MSM8956, MSM8976 and others, usually at address 0x5 on the SPMI bus, and its usual usage is to provide power to the GPU and/or to the CPU clusters (APC0/APC1). Signed-off-by: Angelo G. Del Regno --- .../devicetree/bindings/regulator/qcom,spmi-regulator.txt | 4 ++++ drivers/regulator/qcom_spmi-regulator.c | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt index 76885fd8a3c9..f5cdac8b2847 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt @@ -4,6 +4,7 @@ Qualcomm SPMI Regulators Usage: required Value type: Definition: must be one of: + "qcom,pm8004-regulators" "qcom,pm8005-regulators" "qcom,pm8841-regulators" "qcom,pm8916-regulators" @@ -160,6 +161,9 @@ The regulator node houses sub-nodes for each regulator within the device. Each sub-node is identified using the node's name, with valid values listed for each of the PMICs below. +pm8005: + s2, s5 + pm8005: s1, s2, s3, s4 diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 3504d9054df1..7433dc807bfb 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -1962,6 +1962,12 @@ static const struct spmi_regulator_data pmi8994_regulators[] = { { } }; +static const struct spmi_regulator_data pm8004_regulators[] = { + { "s2", 0x1700, "vdd_s2", }, + { "s5", 0x2000, "vdd_s5", }, + { } +}; + static const struct spmi_regulator_data pm8005_regulators[] = { { "s1", 0x1400, "vdd_s1", }, { "s2", 0x1700, "vdd_s2", }, @@ -1976,6 +1982,7 @@ static const struct spmi_regulator_data pms405_regulators[] = { }; static const struct of_device_id qcom_spmi_regulator_match[] = { + { .compatible = "qcom,pm8004-regulators", .data = &pm8004_regulators }, { .compatible = "qcom,pm8005-regulators", .data = &pm8005_regulators }, { .compatible = "qcom,pm8841-regulators", .data = &pm8841_regulators }, { .compatible = "qcom,pm8916-regulators", .data = &pm8916_regulators },