Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1231557 > unrolled thread
| Started by | Andy Gross <agross@codeaurora.org> |
|---|---|
| First post | 2015-09-23 19:00 +0200 |
| Last post | 2015-09-23 20:20 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[Patch v2 06/10] regulators: qcom-smd: Add PM8916 support Andy Gross <agross@codeaurora.org> - 2015-09-23 19:00 +0200
Re: [Patch v2 06/10] regulators: qcom-smd: Add PM8916 support Bjorn Andersson <bjorn.andersson@sonymobile.com> - 2015-09-23 19:30 +0200
Re: [Patch v2 06/10] regulators: qcom-smd: Add PM8916 support Andy Gross <agross@codeaurora.org> - 2015-09-23 20:20 +0200
| From | Andy Gross <agross@codeaurora.org> |
|---|---|
| Date | 2015-09-23 19:00 +0200 |
| Subject | [Patch v2 06/10] regulators: qcom-smd: Add PM8916 support |
| Message-ID | <qbVyF-1BU-1@gated-at.bofh.it> |
This patch adds support and documentation for the PM8916 regulators
found on MSM8916 platforms.
Signed-off-by: Andy Gross <agross@codeaurora.org>
---
.../bindings/soc/qcom/qcom,smd-rpm-regulator.txt | 18 ++++++
drivers/regulator/qcom_smd-regulator.c | 64 ++++++++++++++++++++
2 files changed, 82 insertions(+)
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm-regulator.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm-regulator.txt
index 7084474..05dfc1a 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm-regulator.txt
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm-regulator.txt
@@ -18,6 +18,7 @@ Regulator nodes are identified by their compatible:
Definition: must be one of:
"qcom,rpm-pm8841-regulators"
"qcom,rpm-pm8941-regulators"
+ "qcom,rpm-pm8916-regulators"
- vdd_s1-supply:
- vdd_s2-supply:
@@ -50,6 +51,19 @@ 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_l1_l2_l3-supply
+- vdd_l4_l5_l6-supply
+- vdd_l7-supply
+- vdd_l8_l9_l10_l11_l12_l13_l14_l15_l16_l17_l18-supply:
+ Usage: optional (pm8916 only)
+ Value type: <phandle>
+ Definition: reference to regulator supplying the input pin, as
+ described in the data sheet
+
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.
@@ -62,6 +76,10 @@ pm8941:
l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, lvs1, lvs2,
lvs3, 5vs1, 5vs2
+pm8916:
+ s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13,
+ l14, l15, l16, l17, l18
+
The content of each sub-node is defined by the standard binding for regulators -
see regulator.txt.
diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
index 9c6167d..0ba6712 100644
--- a/drivers/regulator/qcom_smd-regulator.c
+++ b/drivers/regulator/qcom_smd-regulator.c
@@ -211,6 +211,43 @@ static const struct regulator_desc pm8941_switch = {
.ops = &rpm_switch_ops,
};
+static const struct regulator_desc pm8916_pldo = {
+ .linear_ranges = (struct regulator_linear_range[]) {
+ REGULATOR_LINEAR_RANGE(750000, 0, 208, 12500),
+ },
+ .n_linear_ranges = 1,
+ .n_voltages = 209,
+ .ops = &rpm_smps_ldo_ops,
+};
+
+static const struct regulator_desc pm8916_nldo = {
+ .linear_ranges = (struct regulator_linear_range[]) {
+ REGULATOR_LINEAR_RANGE(375000, 0, 93, 12500),
+ },
+ .n_linear_ranges = 1,
+ .n_voltages = 94,
+ .ops = &rpm_smps_ldo_ops,
+};
+
+static const struct regulator_desc pm8916_buck_lvo_smps = {
+ .linear_ranges = (struct regulator_linear_range[]) {
+ REGULATOR_LINEAR_RANGE(375000, 0, 95, 12500),
+ REGULATOR_LINEAR_RANGE(750000, 96, 127, 25000),
+ },
+ .n_linear_ranges = 2,
+ .n_voltages = 128,
+ .ops = &rpm_smps_ldo_ops,
+};
+
+static const struct regulator_desc pm8916_buck_hvo_smps = {
+ .linear_ranges = (struct regulator_linear_range[]) {
+ REGULATOR_LINEAR_RANGE(1550000, 0, 31, 25000),
+ },
+ .n_linear_ranges = 1,
+ .n_voltages = 32,
+ .ops = &rpm_smps_ldo_ops,
+};
+
struct rpm_regulator_data {
const char *name;
u32 type;
@@ -219,6 +256,32 @@ struct rpm_regulator_data {
const char *supply;
};
+static const struct rpm_regulator_data rpm_pm8916_regulators[] = {
+ { "s1", QCOM_SMD_RPM_SMPA, 1, &pm8916_buck_lvo_smps, "vdd_s1" },
+ { "s2", QCOM_SMD_RPM_SMPA, 2, &pm8916_buck_lvo_smps, "vdd_s2" },
+ { "s3", QCOM_SMD_RPM_SMPA, 3, &pm8916_buck_lvo_smps, "vdd_s3" },
+ { "s4", QCOM_SMD_RPM_SMPA, 4, &pm8916_buck_hvo_smps, "vdd_s4" },
+ { "l1", QCOM_SMD_RPM_LDOA, 1, &pm8916_nldo, "vdd_l1_l2_l3" },
+ { "l2", QCOM_SMD_RPM_LDOA, 2, &pm8916_nldo, "vdd_l1_l2_l3" },
+ { "l3", QCOM_SMD_RPM_LDOA, 3, &pm8916_nldo, "vdd_l1_l2_l3" },
+ { "l4", QCOM_SMD_RPM_LDOA, 4, &pm8916_pldo, "vdd_l4_l5_l6" },
+ { "l5", QCOM_SMD_RPM_LDOA, 5, &pm8916_pldo, "vdd_l4_l5_l6" },
+ { "l6", QCOM_SMD_RPM_LDOA, 6, &pm8916_pldo, "vdd_l4_l5_l6" },
+ { "l7", QCOM_SMD_RPM_LDOA, 7, &pm8916_pldo, "vdd_l7" },
+ { "l8", QCOM_SMD_RPM_LDOA, 8, &pm8916_pldo, "vdd_l8_l9_l10_l11_l12_l13_l14_l15_l16_l17_l18" },
+ { "l9", QCOM_SMD_RPM_LDOA, 9, &pm8916_pldo, "vdd_l8_l9_l10_l11_l12_l13_l14_l15_l16_l17_l18" },
+ { "l10", QCOM_SMD_RPM_LDOA, 10, &pm8916_pldo, "vdd_l8_l9_l10_l11_l12_l13_l14_l15_l16_l17_l18"},
+ { "l11", QCOM_SMD_RPM_LDOA, 11, &pm8916_pldo, "vdd_l8_l9_l10_l11_l12_l13_l14_l15_l16_l17_l18"},
+ { "l12", QCOM_SMD_RPM_LDOA, 12, &pm8916_pldo, "vdd_l8_l9_l10_l11_l12_l13_l14_l15_l16_l17_l18"},
+ { "l13", QCOM_SMD_RPM_LDOA, 13, &pm8916_pldo, "vdd_l8_l9_l10_l11_l12_l13_l14_l15_l16_l17_l18"},
+ { "l14", QCOM_SMD_RPM_LDOA, 14, &pm8916_pldo, "vdd_l8_l9_l10_l11_l12_l13_l14_l15_l16_l17_l18"},
+ { "l15", QCOM_SMD_RPM_LDOA, 15, &pm8916_pldo, "vdd_l8_l9_l10_l11_l12_l13_l14_l15_l16_l17_l18"},
+ { "l16", QCOM_SMD_RPM_LDOA, 16, &pm8916_pldo, "vdd_l8_l9_l10_l11_l12_l13_l14_l15_l16_l17_l18"},
+ { "l17", QCOM_SMD_RPM_LDOA, 17, &pm8916_pldo, "vdd_l8_l9_l10_l11_l12_l13_l14_l15_l16_l17_l18"},
+ { "l18", QCOM_SMD_RPM_LDOA, 18, &pm8916_pldo, "vdd_l8_l9_l10_l11_l12_l13_l14_l15_l16_l17_l18"},
+ {}
+};
+
static const struct rpm_regulator_data rpm_pm8841_regulators[] = {
{ "s1", QCOM_SMD_RPM_SMPB, 1, &pm8x41_hfsmps, "vdd_s1" },
{ "s2", QCOM_SMD_RPM_SMPB, 2, &pm8841_ftsmps, "vdd_s2" },
@@ -273,6 +336,7 @@ static const struct rpm_regulator_data rpm_pm8941_regulators[] = {
};
static const struct of_device_id rpm_of_match[] = {
+ { .compatible = "qcom,rpm-pm8916-regulators", .data = &rpm_pm8916_regulators },
{ .compatible = "qcom,rpm-pm8841-regulators", .data = &rpm_pm8841_regulators },
{ .compatible = "qcom,rpm-pm8941-regulators", .data = &rpm_pm8941_regulators },
{}
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Bjorn Andersson <bjorn.andersson@sonymobile.com> |
|---|---|
| Date | 2015-09-23 19:30 +0200 |
| Message-ID | <qbW1K-2ph-33@gated-at.bofh.it> |
| In reply to | #1231557 |
On Wed 23 Sep 09:53 PDT 2015, Andy Gross wrote:
> This patch adds support and documentation for the PM8916 regulators
> found on MSM8916 platforms.
>
> Signed-off-by: Andy Gross <agross@codeaurora.org>
> ---
> .../bindings/soc/qcom/qcom,smd-rpm-regulator.txt | 18 ++++++
> drivers/regulator/qcom_smd-regulator.c | 64 ++++++++++++++++++++
> 2 files changed, 82 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm-regulator.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm-regulator.txt
> index 7084474..05dfc1a 100644
> --- a/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm-regulator.txt
> +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm-regulator.txt
> @@ -18,6 +18,7 @@ Regulator nodes are identified by their compatible:
> Definition: must be one of:
> "qcom,rpm-pm8841-regulators"
> "qcom,rpm-pm8941-regulators"
> + "qcom,rpm-pm8916-regulators"
Alphabetical please
>
> - vdd_s1-supply:
> - vdd_s2-supply:
> @@ -50,6 +51,19 @@ 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_l1_l2_l3-supply
> +- vdd_l4_l5_l6-supply
> +- vdd_l7-supply
End these with ':' as well
> +- vdd_l8_l9_l10_l11_l12_l13_l14_l15_l16_l17_l18-supply:
> + Usage: optional (pm8916 only)
> + Value type: <phandle>
> + Definition: reference to regulator supplying the input pin, as
> + described in the data sheet
> +
[..]
> diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
[..]
> static const struct of_device_id rpm_of_match[] = {
> + { .compatible = "qcom,rpm-pm8916-regulators", .data = &rpm_pm8916_regulators },
pm8916 > pm8841
> { .compatible = "qcom,rpm-pm8841-regulators", .data = &rpm_pm8841_regulators },
> { .compatible = "qcom,rpm-pm8941-regulators", .data = &rpm_pm8941_regulators },
> {}
With these nits:
Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Regards,
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Andy Gross <agross@codeaurora.org> |
|---|---|
| Date | 2015-09-23 20:20 +0200 |
| Message-ID | <qbWO6-3Bx-23@gated-at.bofh.it> |
| In reply to | #1231590 |
On Wed, Sep 23, 2015 at 10:23:58AM -0700, Bjorn Andersson wrote:
> On Wed 23 Sep 09:53 PDT 2015, Andy Gross wrote:
>
> > This patch adds support and documentation for the PM8916 regulators
> > found on MSM8916 platforms.
> >
> > Signed-off-by: Andy Gross <agross@codeaurora.org>
> > ---
> > .../bindings/soc/qcom/qcom,smd-rpm-regulator.txt | 18 ++++++
> > drivers/regulator/qcom_smd-regulator.c | 64 ++++++++++++++++++++
> > 2 files changed, 82 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm-regulator.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm-regulator.txt
> > index 7084474..05dfc1a 100644
> > --- a/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm-regulator.txt
> > +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm-regulator.txt
> > @@ -18,6 +18,7 @@ Regulator nodes are identified by their compatible:
> > Definition: must be one of:
> > "qcom,rpm-pm8841-regulators"
> > "qcom,rpm-pm8941-regulators"
> > + "qcom,rpm-pm8916-regulators"
>
> Alphabetical please
>
> >
> > - vdd_s1-supply:
> > - vdd_s2-supply:
> > @@ -50,6 +51,19 @@ 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_l1_l2_l3-supply
> > +- vdd_l4_l5_l6-supply
> > +- vdd_l7-supply
>
> End these with ':' as well
>
> > +- vdd_l8_l9_l10_l11_l12_l13_l14_l15_l16_l17_l18-supply:
> > + Usage: optional (pm8916 only)
> > + Value type: <phandle>
> > + Definition: reference to regulator supplying the input pin, as
> > + described in the data sheet
> > +
> [..]
> > diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
> [..]
> > static const struct of_device_id rpm_of_match[] = {
> > + { .compatible = "qcom,rpm-pm8916-regulators", .data = &rpm_pm8916_regulators },
>
> pm8916 > pm8841
>
> > { .compatible = "qcom,rpm-pm8841-regulators", .data = &rpm_pm8841_regulators },
> > { .compatible = "qcom,rpm-pm8941-regulators", .data = &rpm_pm8941_regulators },
> > {}
>
> With these nits:
>
> Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
>
> Regards,
> Bjorn
I'll fixup this when I apply it. Thanks!
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web