Skip to content

Commit

Permalink
Merge tag 'regulator-v5.3' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/broonie/regulator

Pull regulator updates from Mark Brown:
 "A couple of new features in the core, the most interesting one being
  support for complex regulator coupling configurations initially
  targeted at nVidia Tegra SoCs, and some new drivers but otherwise
  quite a quiet release.

  Summary:

   - Core support for gradual ramping of voltages for devices that can't
     manage large changes in hardware from Bartosz Golaszewski.

   - Core support for systems that have complex coupling requirements
     best described via code, contributed by Dmitry Osipenko.

   - New drivers for Dialog SLG51000, Qualcomm PM8005 and ST
     Microelectronics STM32-Booster"

* tag 'regulator-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (52 commits)
  regulator: max77650: use vsel_step
  regulator: implement selector stepping
  regulator: max77650: add MODULE_ALIAS()
  regulator: max77620: remove redundant assignment to variable ret
  dt-bindings: regulator: add support for the stm32-booster
  regulator: add support for the stm32-booster
  regulator: s2mps11: Adjust supported buck voltages to real values
  regulator: s2mps11: Fix buck7 and buck8 wrong voltages
  gpio: Fix return value mismatch of function gpiod_get_from_of_node()
  regulator: core: Expose some of core functions needed by couplers
  regulator: core: Introduce API for regulators coupling customization
  regulator: s2mps11: Add support for disabling S2MPS11 regulators in suspend
  regulator: s2mps11: Reduce number of rdev_get_id() calls
  regulator: qcom_spmi: Do NULL check for lvs
  regulator: qcom_spmi: Fix math of spmi_regulator_set_voltage_time_sel
  regulator: da9061/62: Adjust LDO voltage selection minimum value
  regulator: s2mps11: Fix ERR_PTR dereference on GPIO lookup failure
  regulator: qcom_spmi: add PMS405 SPMI regulator
  dt-bindings: qcom_spmi: Document pms405 support
  arm64: dts: msm8998-mtp: Add pm8005_s1 regulator
  ...
  • Loading branch information
torvalds committed Jul 9, 2019
2 parents 12a5146 + 0ed4513 commit 98537ee
Show file tree
Hide file tree
Showing 50 changed files with 2,862 additions and 762 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ of analogue I/O.

This document lists regulator specific bindings, see the primary binding
document:
../mfd/arizona.txt
For Wolfson Microelectronic Arizona codecs: ../mfd/arizona.txt
For Cirrus Logic Madera codecs: ../mfd/madera.txt

Optional properties:
- wlf,ldoena : GPIO specifier for the GPIO controlling LDOENA
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ maintainers:

description:
Any property defined as part of the core regulator binding, defined in
regulator.txt, can also be used. However a fixed voltage regulator is
regulator.yaml, can also be used. However a fixed voltage regulator is
expected to have the regulator-min-microvolt and regulator-max-microvolt
to be the same.

allOf:
- $ref: "regulator.yaml#"

properties:
compatible:
const: regulator-fixed
Expand Down
57 changes: 0 additions & 57 deletions Documentation/devicetree/bindings/regulator/gpio-regulator.txt

This file was deleted.

118 changes: 118 additions & 0 deletions Documentation/devicetree/bindings/regulator/gpio-regulator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/gpio-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: GPIO controlled regulators

maintainers:
- Liam Girdwood <lgirdwood@gmail.com>
- Mark Brown <broonie@kernel.org>

description:
Any property defined as part of the core regulator binding, defined in
regulator.txt, can also be used.

allOf:
- $ref: "regulator.yaml#"

properties:
compatible:
const: regulator-gpio

regulator-name: true

enable-gpios:
description: GPIO to use to enable/disable the regulator.
Warning, the GPIO phandle flags are ignored and the GPIO polarity is
controlled solely by the presence of "enable-active-high" DT property.
This is due to compatibility with old DTs.
maxItems: 1

gpios:
description: Array of one or more GPIO pins used to select the regulator
voltage/current listed in "states".
minItems: 1
maxItems: 8 # Should be enough...

gpios-states:
description: |
On operating systems, that don't support reading back gpio values in
output mode (most notably linux), this array provides the state of GPIO
pins set when requesting them from the gpio controller. Systems, that are
capable of preserving state when requesting the lines, are free to ignore
this property.
0: LOW
1: HIGH
Default is LOW if nothing else is specified.
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32-array
- maxItems: 8
items:
enum: [ 0, 1 ]
default: 0

states:
description: Selection of available voltages/currents provided by this
regulator and matching GPIO configurations to achieve them. If there are
no states in the "states" array, use a fixed regulator instead.
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32-matrix
- maxItems: 8
items:
items:
- description: Voltage in microvolts
- description: GPIO group state value

startup-delay-us:
description: startup time in microseconds

enable-active-high:
description: Polarity of "enable-gpio" GPIO is active HIGH. Default is
active LOW.
type: boolean

gpio-open-drain:
description:
GPIO is open drain type. If this property is missing then default
assumption is false.
type: boolean

regulator-type:
description: Specifies what is being regulated.
allOf:
- $ref: /schemas/types.yaml#/definitions/string
- enum:
- voltage
- current
default: voltage

required:
- compatible
- regulator-name
- gpios
- states

examples:
- |
gpio-regulator {
compatible = "regulator-gpio";
regulator-name = "mmci-gpio-supply";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2600000>;
regulator-boot-on;
enable-gpios = <&gpio0 23 0x4>;
gpios = <&gpio0 24 0x4
&gpio0 25 0x4>;
states = <1800000 0x3>,
<2200000 0x2>,
<2600000 0x1>,
<2900000 0x0>;
startup-delay-us = <100000>;
enable-active-high;
};
...
47 changes: 0 additions & 47 deletions Documentation/devicetree/bindings/regulator/max8660.txt

This file was deleted.

77 changes: 77 additions & 0 deletions Documentation/devicetree/bindings/regulator/max8660.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/max8660.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Maxim MAX8660 voltage regulator

maintainers:
- Daniel Mack <zonque@gmail.com>

properties:
$nodename:
pattern: "pmic@[0-9a-f]{1,2}"
compatible:
enum:
- maxim,max8660
- maxim,max8661

reg:
maxItems: 1

regulators:
type: object

patternProperties:
"regulator-.+":
$ref: "regulator.yaml#"

additionalProperties: false

additionalProperties: false

examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
pmic@34 {
compatible = "maxim,max8660";
reg = <0x34>;
regulators {
regulator-V3 {
regulator-compatible= "V3(DCDC)";
regulator-min-microvolt = <725000>;
regulator-max-microvolt = <1800000>;
};
regulator-V4 {
regulator-compatible= "V4(DCDC)";
regulator-min-microvolt = <725000>;
regulator-max-microvolt = <1800000>;
};
regulator-V5 {
regulator-compatible= "V5(LDO)";
regulator-min-microvolt = <1700000>;
regulator-max-microvolt = <2000000>;
};
regulator-V6 {
regulator-compatible= "V6(LDO)";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
};
regulator-V7 {
regulator-compatible= "V7(LDO)";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
};
};
};
};
...
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ Qualcomm SPMI Regulators
Usage: required
Value type: <string>
Definition: must be one of:
"qcom,pm8005-regulators"
"qcom,pm8841-regulators"
"qcom,pm8916-regulators"
"qcom,pm8941-regulators"
"qcom,pm8994-regulators"
"qcom,pmi8994-regulators"
"qcom,pms405-regulators"

- interrupts:
Usage: optional
Expand Down Expand Up @@ -110,6 +112,23 @@ Qualcomm SPMI Regulators
Definition: Reference to regulator supplying the input pin, as
described in the data sheet.

- vdd_l1_l2-supply:
- vdd_l3_l8-supply:
- vdd_l4-supply:
- vdd_l5_l6-supply:
- vdd_l10_l11_l12_l13-supply:
- vdd_l7-supply:
- vdd_l9-supply:
- vdd_s1-supply:
- vdd_s2-supply:
- vdd_s3-supply:
- vdd_s4-supply:
- vdd_s5-supply
Usage: optional (pms405 only)
Value type: <phandle>
Definition: Reference to regulator supplying the input pin, as
described in the data sheet.

- qcom,saw-reg:
Usage: optional
Value type: <phandle>
Expand All @@ -120,6 +139,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:
s1, s2, s3, s4

pm8841:
s1, s2, s3, s4, s5, s6, s7, s8

Expand Down
Loading

0 comments on commit 98537ee

Please sign in to comment.