Skip to content

Commit

Permalink
Merge tag 'regulator-v5.1' 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:
 "The bulk of the standout changes in this release are cleanups, with
  the core work being a combination of factoring out common code into
  helpers and the completion of the conversion of the core to use GPIO
  descriptors.

  Summary:

   - Addition of helper functions for current limits and conversion of
     drivers to use them by Axel Lin.

   - Lots and lots of cleanups from Axel Lin.

   - Conversion of the core to use GPIO descriptors rather than numbers
     by Linus Walleij.

   - New drivers for Maxim MAX77650 and ROHM BD70528"

* tag 'regulator-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (131 commits)
  regulator: mc13xxx: Constify regulator_ops variables
  regulator: palmas: Constify palmas_smps_ramp_delay array
  regulator: wm831x-dcdc: Convert to use regulator_set/get_current_limit_regmap
  regulator: pv88090: Convert to use regulator_set/get_current_limit_regmap
  regulator: pv88080: Convert to use regulator_set/get_current_limit_regmap
  regulator: pv88060: Convert to use regulator_set/get_current_limit_regmap
  regulator: max77650: Convert to use regulator_set/get_current_limit_regmap
  regulator: lp873x: Convert to use regulator_set/get_current_limit_regmap
  regulator: lp872x: Convert to use regulator_set/get_current_limit_regmap
  regulator: da9210: Convert to use regulator_set/get_current_limit_regmap
  regulator: da9055: Convert to use regulator_set/get_current_limit_regmap
  regulator: core: Add set/get_current_limit helpers for regmap users
  regulator: Fix comment for csel_reg and csel_mask
  regulator: stm32-vrefbuf: add power management support
  regulator: 88pm8607: Remove unused fields from struct pm8607_regulator_info
  regulator: 88pm8607: Simplify pm8607_list_voltage implementation
  regulator: cpcap: Constify omap4_regulators and xoom_regulators
  regulator: cpcap: Remove unused vsel_shift from struct cpcap_regulator
  dt-bindings: regulator: tps65218: rectify units of LS3
  dt-bindings: regulator: add LS2 load switch documentation
  ...
  • Loading branch information
torvalds committed Mar 5, 2019
2 parents e48b044 + 88f268a commit 32c0ac3
Show file tree
Hide file tree
Showing 94 changed files with 2,489 additions and 1,521 deletions.
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ Mark Brown <[email protected]>
Mark Yao <[email protected]> <[email protected]>
Martin Kepplinger <[email protected]> <[email protected]>
Martin Kepplinger <[email protected]> <[email protected]>
Mathieu Othacehe <[email protected]>
Matthew Wilcox <[email protected]> <[email protected]>
Matthew Wilcox <[email protected]> <[email protected]>
Matthew Wilcox <[email protected]> <[email protected]>
Expand Down
17 changes: 17 additions & 0 deletions Documentation/devicetree/bindings/mfd/rohm,bd71837-pmic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ Required properties:

Optional properties:
- clock-output-names : Should contain name for output clock.
- rohm,reset-snvs-powered : Transfer BD718x7 to SNVS state at reset.

The BD718x7 supports two different HW states as reset target states. States
are called as SNVS and READY. At READY state all the PMIC power outputs go
down and OTP is reload. At the SNVS state all other logic and external
devices apart from the SNVS power domain are shut off. Please refer to NXP
i.MX8 documentation for further information regarding SNVS state. When a
reset is done via SNVS state the PMIC OTP data is not reload. This causes
power outputs that have been under SW control to stay down when reset has
switched power state to SNVS. If reset is done via READY state the power
outputs will be returned to HW control by OTP loading. Thus the reset
target state is set to READY by default. If SNVS state is used the boot
crucial regulators must have the regulator-always-on and regulator-boot-on
properties set in regulator node.

Example:

Expand All @@ -43,15 +57,18 @@ Example:
#clock-cells = <0>;
clocks = <&osc 0>;
clock-output-names = "bd71837-32k-out";
rohm,reset-snvs-powered;

regulators {
buck1: BUCK1 {
regulator-name = "buck1";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1300000>;
regulator-boot-on;
regulator-always-on;
regulator-ramp-delay = <1250>;
};
// [...]
};
};

Expand Down
3 changes: 2 additions & 1 deletion Documentation/devicetree/bindings/regulator/fan53555.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Binding for Fairchild FAN53555 regulators

Required properties:
- compatible: one of "fcs,fan53555", "silergy,syr827", "silergy,syr828"
- compatible: one of "fcs,fan53555", "fcs,fan53526", "silergy,syr827" or
"silergy,syr828"
- reg: I2C address

Optional properties:
Expand Down
35 changes: 0 additions & 35 deletions Documentation/devicetree/bindings/regulator/fixed-regulator.txt

This file was deleted.

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

title: Fixed Voltage regulators

maintainers:
- Liam Girdwood <[email protected]>
- Mark Brown <[email protected]>

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
expected to have the regulator-min-microvolt and regulator-max-microvolt
to be the same.

properties:
compatible:
const: regulator-fixed

regulator-name: true

gpio:
description: gpio to use for enable control
maxItems: 1

startup-delay-us:
description: startup time in microseconds
$ref: /schemas/types.yaml#/definitions/uint32

enable-active-high:
description:
Polarity of GPIO is Active high. If this property is missing,
the default assumed 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

vin-supply:
description: Input supply phandle.
$ref: /schemas/types.yaml#/definitions/phandle

required:
- compatible
- regulator-name

examples:
- |
reg_1v8: regulator-1v8 {
compatible = "regulator-fixed";
regulator-name = "1v8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
gpio = <&gpio1 16 0>;
startup-delay-us = <70000>;
enable-active-high;
regulator-boot-on;
gpio-open-drain;
vin-supply = <&parent_reg>;
};
...
41 changes: 41 additions & 0 deletions Documentation/devicetree/bindings/regulator/max77650-regulator.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Regulator driver for MAX77650 PMIC from Maxim Integrated.

This module is part of the MAX77650 MFD device. For more details
see Documentation/devicetree/bindings/mfd/max77650.txt.

The regulator controller is represented as a sub-node of the PMIC node
on the device tree.

The device has a single LDO regulator and a SIMO buck-boost regulator with
three independent power rails.

Required properties:
--------------------
- compatible: Must be "maxim,max77650-regulator"

Each rail must be instantiated under the regulators subnode of the top PMIC
node. Up to four regulators can be defined. For standard regulator properties
refer to Documentation/devicetree/bindings/regulator/regulator.txt.

Available regulator compatible strings are: "ldo", "sbb0", "sbb1", "sbb2".

Example:
--------

regulators {
compatible = "maxim,max77650-regulator";

max77650_ldo: regulator@0 {
regulator-compatible = "ldo";
regulator-name = "max77650-ldo";
regulator-min-microvolt = <1350000>;
regulator-max-microvolt = <2937500>;
};

max77650_sbb0: regulator@1 {
regulator-compatible = "sbb0";
regulator-name = "max77650-sbb0";
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1587500>;
};
};
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/regulator/pfuze100.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Optional properties:
- fsl,pfuze-support-disable-sw: Boolean, if present disable all unused switch
regulators to save power consumption. Attention, ensure that all important
regulators (e.g. DDR ref, DDR supply) has set the "regulator-always-on"
property. If not present, the switched regualtors are always on and can't be
property. If not present, the switched regulators are always on and can't be
disabled. This binding is a workaround to keep backward compatibility with
old dtb's which rely on the fact that the switched regulators are always on
and don't mark them explicit as "regulator-always-on".
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
ROHM BD70528 Power Management Integrated Circuit regulator bindings

Required properties:
- regulator-name: should be "buck1", "buck2", "buck3", "ldo1", "ldo2", "ldo3",
"led_ldo1", "led_ldo2"

List of regulators provided by this controller. BD70528 regulators node
should be sub node of the BD70528 MFD node. See BD70528 MFD bindings at
Documentation/devicetree/bindings/mfd/rohm,bd70528-pmic.txt

The valid names for BD70528 regulator nodes are:
BUCK1, BUCK2, BUCK3, LDO1, LDO2, LDO3, LED_LDO1, LED_LDO2

Optional properties:
- Any optional property defined in bindings/regulator/regulator.txt

Example:
regulators {
buck1: BUCK1 {
regulator-name = "buck1";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <3400000>;
regulator-boot-on;
regulator-ramp-delay = <125>;
};
buck2: BUCK2 {
regulator-name = "buck2";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
regulator-ramp-delay = <125>;
};
buck3: BUCK3 {
regulator-name = "buck3";
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1800000>;
regulator-boot-on;
regulator-ramp-delay = <250>;
};
ldo1: LDO1 {
regulator-name = "ldo1";
regulator-min-microvolt = <1650000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
};
ldo2: LDO2 {
regulator-name = "ldo2";
regulator-min-microvolt = <1650000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
};

ldo3: LDO3 {
regulator-name = "ldo3";
regulator-min-microvolt = <1650000>;
regulator-max-microvolt = <3300000>;
};
led_ldo1: LED_LDO1 {
regulator-name = "led_ldo1";
regulator-min-microvolt = <200000>;
regulator-max-microvolt = <300000>;
};
led_ldo2: LED_LDO2 {
regulator-name = "led_ldo2";
regulator-min-microvolt = <200000>;
regulator-max-microvolt = <300000>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,50 @@ BUCK1, BUCK2, BUCK3, BUCK4, BUCK5, BUCK6
LDO1, LDO2, LDO3, LDO4, LDO5, LDO6

Optional properties:
- rohm,dvs-run-voltage : PMIC default "RUN" state voltage in uV.
See below table for bucks which support this.
- rohm,dvs-idle-voltage : PMIC default "IDLE" state voltage in uV.
See below table for bucks which support this.
- rohm,dvs-suspend-voltage : PMIC default "SUSPEND" state voltage in uV.
See below table for bucks which support this.
- Any optional property defined in bindings/regulator/regulator.txt

Supported default DVS states:

BD71837:
buck | dvs-run-voltage | dvs-idle-voltage | dvs-suspend-voltage
-----------------------------------------------------------------------------
1 | supported | supported | supported
----------------------------------------------------------------------------
2 | supported | supported | not supported
----------------------------------------------------------------------------
3 | supported | not supported | not supported
----------------------------------------------------------------------------
4 | supported | not supported | not supported
----------------------------------------------------------------------------
rest | not supported | not supported | not supported

BD71847:
buck | dvs-run-voltage | dvs-idle-voltage | dvs-suspend-voltage
-----------------------------------------------------------------------------
1 | supported | supported | supported
----------------------------------------------------------------------------
2 | supported | supported | not supported
----------------------------------------------------------------------------
rest | not supported | not supported | not supported

Example:
regulators {
buck1: BUCK1 {
regulator-name = "buck1";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1300000>;
regulator-boot-on;
regulator-always-on;
regulator-ramp-delay = <1250>;
rohm,dvs-run-voltage = <900000>;
rohm,dvs-idle-voltage = <850000>;
rohm,dvs-suspend-voltage = <800000>;
};
buck2: BUCK2 {
regulator-name = "buck2";
Expand All @@ -45,18 +79,22 @@ regulators {
regulator-boot-on;
regulator-always-on;
regulator-ramp-delay = <1250>;
rohm,dvs-run-voltage = <1000000>;
rohm,dvs-idle-voltage = <900000>;
};
buck3: BUCK3 {
regulator-name = "buck3";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1300000>;
regulator-boot-on;
rohm,dvs-run-voltage = <1000000>;
};
buck4: BUCK4 {
regulator-name = "buck4";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1300000>;
regulator-boot-on;
rohm,dvs-run-voltage = <1000000>;
};
buck5: BUCK5 {
regulator-name = "buck5";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,14 @@ Switches are fixed voltage regulators with only enable/disable capability.
Optional properties:
- st,mask-reset: mask reset for this regulator: the regulator configuration
is maintained during pmic reset.
- regulator-pull-down: enable high pull down
if not specified light pull down is used
- regulator-over-current-protection:
if set, all regulators are switched off in case of over-current detection
on this regulator,
if not set, the driver only sends an over-current event.
- interrupt-parent: phandle to the parent interrupt controller
- interrupts: index of current limit detection interrupt
- <regulator>-supply: phandle to the parent supply/regulator node
each regulator supply can be described except vref_ddr.
- regulator-active-discharge: can be used on pwr_sw1 and pwr_sw2.

Example:
regulators {
Expand All @@ -43,7 +41,6 @@ regulators {
vdd_core: buck1 {
regulator-name = "vdd_core";
interrupts = <IT_CURLIM_BUCK1 0>;
interrupt-parent = <&pmic>;
st,mask-reset;
regulator-pull-down;
regulator-min-microvolt = <700000>;
Expand All @@ -53,7 +50,6 @@ regulators {
v3v3: buck4 {
regulator-name = "v3v3";
interrupts = <IT_CURLIM_BUCK4 0>;
interrupt-parent = <&mypmic>;

regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
Expand Down
Loading

0 comments on commit 32c0ac3

Please sign in to comment.