Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge series "Add frequency / voltage scaling support for IPQ6018 SoC" from Kathiravan T <kathirav@codeaurora.org>:

IPQ6018 SoC uses the PMIC MP5496. SMPA2 and LDOA2 regulator of MP5496
controls the APSS and SDCC voltage scaling respectively. Add support
for the same.

changes since V1:
- Moved YAML conversion to the last as per Mark's comments

Kathiravan T (6):
dt-bindings: soc: qcom: Add IPQ6018 compatible
soc: qcom: smd-rpm: Add IPQ6018 compatible
dt-bindings: regulator: add MP5496 regulator compatible
regulator: qcom_smd: Add MP5496 regulators
dt-bindings: soc: qcom: convert the SMD-RPM document to YAML schema
dt-bindings: regulator: convert QCOM SMD-RPM regulator document to
YAML schema

.../bindings/regulator/qcom,smd-rpm-regulator.txt | 320 ---------------------
.../bindings/regulator/qcom,smd-rpm-regulator.yaml | 106 +++++++
.../devicetree/bindings/soc/qcom/qcom,smd-rpm.txt | 62 ----
.../devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml | 92 ++++++
drivers/regulator/qcom_smd-regulator.c | 34 +++
drivers/soc/qcom/smd-rpm.c | 1 +
6 files changed, 233 insertions(+), 382 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt
create mode 100644 Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
delete mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.txt
create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml

--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation

+35
+1
Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt
··· 19 19 Usage: required 20 20 Value type: <string> 21 21 Definition: must be one of: 22 + "qcom,rpm-mp5496-regulators" 22 23 "qcom,rpm-pm8841-regulators" 23 24 "qcom,rpm-pm8916-regulators" 24 25 "qcom,rpm-pm8941-regulators"
+34
drivers/regulator/qcom_smd-regulator.c
··· 198 198 .set_voltage = rpm_reg_set_voltage, 199 199 }; 200 200 201 + static const struct regulator_ops rpm_mp5496_ops = { 202 + .enable = rpm_reg_enable, 203 + .disable = rpm_reg_disable, 204 + .is_enabled = rpm_reg_is_enabled, 205 + .list_voltage = regulator_list_voltage_linear_range, 206 + 207 + .set_voltage = rpm_reg_set_voltage, 208 + }; 209 + 201 210 static const struct regulator_desc pma8084_hfsmps = { 202 211 .linear_ranges = (struct linear_range[]) { 203 212 REGULATOR_LINEAR_RANGE(375000, 0, 95, 12500), ··· 595 586 .ops = &rpm_smps_ldo_ops, 596 587 }; 597 588 589 + static const struct regulator_desc mp5496_smpa2 = { 590 + .linear_ranges = (struct linear_range[]) { 591 + REGULATOR_LINEAR_RANGE(725000, 0, 27, 12500), 592 + }, 593 + .n_linear_ranges = 1, 594 + .n_voltages = 28, 595 + .ops = &rpm_mp5496_ops, 596 + }; 597 + 598 + static const struct regulator_desc mp5496_ldoa2 = { 599 + .linear_ranges = (struct linear_range[]) { 600 + REGULATOR_LINEAR_RANGE(1800000, 0, 60, 25000), 601 + }, 602 + .n_linear_ranges = 1, 603 + .n_voltages = 61, 604 + .ops = &rpm_mp5496_ops, 605 + }; 606 + 598 607 struct rpm_regulator_data { 599 608 const char *name; 600 609 u32 type; 601 610 u32 id; 602 611 const struct regulator_desc *desc; 603 612 const char *supply; 613 + }; 614 + 615 + static const struct rpm_regulator_data rpm_mp5496_regulators[] = { 616 + { "s2", QCOM_SMD_RPM_SMPA, 2, &mp5496_smpa2, "s2" }, 617 + { "l2", QCOM_SMD_RPM_LDOA, 2, &mp5496_ldoa2, "l2" }, 618 + {} 604 619 }; 605 620 606 621 static const struct rpm_regulator_data rpm_pm8841_regulators[] = { ··· 925 892 }; 926 893 927 894 static const struct of_device_id rpm_of_match[] = { 895 + { .compatible = "qcom,rpm-mp5496-regulators", .data = &rpm_mp5496_regulators }, 928 896 { .compatible = "qcom,rpm-pm8841-regulators", .data = &rpm_pm8841_regulators }, 929 897 { .compatible = "qcom,rpm-pm8916-regulators", .data = &rpm_pm8916_regulators }, 930 898 { .compatible = "qcom,rpm-pm8941-regulators", .data = &rpm_pm8941_regulators },