Commit 1260d242 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull regulator updates from Mark Brown:
 "Thanks to the removal of the unused TPS80021 driver the regulator
  updates for this cycle actually have a negative diffstat.

  Otherwise it's been quite a quiet release, lots of fixes and small
  improvements with the biggest individual changes being several
  conversions of DT bindings to YAML format"

* tag 'regulator-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (34 commits)
  regulator: Don't error out fixed regulator in regulator_sync_voltage()
  regulator: tps80031: Remove driver
  regulator: Fix SY7636A breakage
  regulator: uniphier: Add binding for NX1 SoC
  regulator: uniphier: Add USB-VBUS compatible string for NX1 SoC
  regulator: qcom,rpmh: Add compatible for PM6350
  regulator: qcom-rpmh: Add PM6350 regulators
  regulator: sy7636a: Remove requirement on sy7636a mfd
  regulator: tps62360: replacing legacy gpio interface for gpiod
  regulator: lp872x: Remove lp872x_dvs_state
  regulator: lp872x: replacing legacy gpio interface for gpiod
  regulator: dt-bindings: samsung,s5m8767: convert to dtschema
  regulator: dt-bindings: samsung,s2mpa01: convert to dtschema
  regulator: dt-bindings: samsung,s2m: convert to dtschema
  dt-bindings: clock: samsung,s2mps11: convert to dtschema
  regulator: dt-bindings: samsung,s5m8767: correct s5m8767,pmic-buck-default-dvs-idx property
  regulator: s5m8767: do not use reset value as DVS voltage if GPIO DVS is disabled
  regulator: dt-bindings: maxim,max8973: convert to dtschema
  regulator: dt-bindings: maxim,max8997: convert to dtschema
  regulator: dt-bindings: maxim,max8952: convert to dtschema
  ...
parents d2cdb122 7492b724
Loading
Loading
Loading
Loading
+0 −49
Original line number Diff line number Diff line
Binding for Samsung S2M and S5M family clock generator block
============================================================

This is a part of device tree bindings for S2M and S5M family multi-function
devices.
More information can be found in bindings/mfd/sec-core.txt file.

The S2MPS11/13/15 and S5M8767 provide three(AP/CP/BT) buffered 32.768 kHz
outputs. The S2MPS14 provides two (AP/BT) buffered 32.768 KHz outputs.

To register these as clocks with common clock framework instantiate under
main device node a sub-node named "clocks".

It uses the common clock binding documented in:
 - Documentation/devicetree/bindings/clock/clock-bindings.txt


Required properties of the "clocks" sub-node:
 - #clock-cells: should be 1.
 - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk",
               "samsung,s2mps14-clk", "samsung,s5m8767-clk"
   The S2MPS15 uses the same compatible as S2MPS13, as both provides similar
   clocks.


Each clock is assigned an identifier and client nodes use this identifier
to specify the clock which they consume.
    Clock               ID           Devices
    ----------------------------------------------------------
    32KhzAP		0            S2MPS11/13/14/15, S5M8767
    32KhzCP		1            S2MPS11/13/15, S5M8767
    32KhzBT		2            S2MPS11/13/14/15, S5M8767

Include dt-bindings/clock/samsung,s2mps11.h file to use preprocessor defines
in device tree sources.


Example:

	s2mps11_pmic@66 {
		compatible = "samsung,s2mps11-pmic";
		reg = <0x66>;

		s2m_osc: clocks {
			compatible = "samsung,s2mps11-clk";
			#clock-cells = <1>;
			clock-output-names = "xx", "yy", "zz";
		};
	};
+45 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/samsung,s2mps11.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Samsung S2M and S5M family clock generator block

maintainers:
  - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

description: |
  This is a part of device tree bindings for S2M and S5M family of Power
  Management IC (PMIC).

  The S2MPS11/13/15 and S5M8767 provide three(AP/CP/BT) buffered 32.768 kHz
  outputs. The S2MPS14 provides two (AP/BT) buffered 32.768 KHz outputs.

  All available clocks are defined as preprocessor macros in
  dt-bindings/clock/samsung,s2mps11.h header.

  See also Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml for
  additional information and example.

properties:
  compatible:
    enum:
      - samsung,s2mps11-clk
      - samsung,s2mps13-clk # S2MPS13 and S2MPS15
      - samsung,s2mps14-clk
      - samsung,s5m8767-clk

  "#clock-cells":
    const: 1

  clock-output-names:
    minItems: 3
    maxItems: 3
    description: Names for AP, CP and BT clocks.

required:
  - compatible
  - "#clock-cells"

additionalProperties: false
+0 −52
Original line number Diff line number Diff line
Maxim MAX8952 voltage regulator

Required properties:
- compatible: must be equal to "maxim,max8952"
- reg: I2C slave address, usually 0x60
- max8952,dvs-mode-microvolt: array of 4 integer values defining DVS voltages
  in microvolts. All values must be from range <770000, 1400000>
- any required generic properties defined in regulator.txt

Optional properties:
- max8952,vid-gpios: array of two GPIO pins used for DVS voltage selection
- max8952,en-gpio: GPIO used to control enable status of regulator
- max8952,default-mode: index of default DVS voltage, from <0, 3> range
- max8952,sync-freq: sync frequency, must be one of following values:
    - 0: 26 MHz
    - 1: 13 MHz
    - 2: 19.2 MHz
  Defaults to 26 MHz if not specified.
- max8952,ramp-speed: voltage ramp speed, must be one of following values:
    - 0: 32mV/us
    - 1: 16mV/us
    - 2: 8mV/us
    - 3: 4mV/us
    - 4: 2mV/us
    - 5: 1mV/us
    - 6: 0.5mV/us
    - 7: 0.25mV/us
  Defaults to 32mV/us if not specified.
- any available generic properties defined in regulator.txt

Example:

	vdd_arm_reg: pmic@60 {
		compatible = "maxim,max8952";
		reg = <0x60>;

		/* max8952-specific properties */
		max8952,vid-gpios = <&gpx0 3 0>, <&gpx0 4 0>;
		max8952,en-gpio = <&gpx0 1 0>;
		max8952,default-mode = <0>;
		max8952,dvs-mode-microvolt = <1250000>, <1200000>,
						<1050000>, <950000>;
		max8952,sync-freq = <0>;
		max8952,ramp-speed = <0>;

		/* generic regulator properties */
		regulator-name = "vdd_arm";
		regulator-min-microvolt = <770000>;
		regulator-max-microvolt = <1400000>;
		regulator-always-on;
		regulator-boot-on;
	};
+0 −52
Original line number Diff line number Diff line
* Maxim MAX8973 Voltage Regulator

Required properties:

- compatible:	must be one of following:
			"maxim,max8973"
			"maxim,max77621".
- reg:		the i2c slave address of the regulator. It should be 0x1b.

Any standard regulator properties can be used to configure the single max8973
DCDC.

Optional properties:

-maxim,externally-enable: boolean, externally control the regulator output
		enable/disable.
-maxim,enable-gpio: GPIO for enable control. If the valid GPIO is provided
		then externally enable control will be considered.
-maxim,dvs-gpio: GPIO which is connected to DVS pin of device.
-maxim,dvs-default-state: Default state of GPIO during initialisation.
		1 for HIGH and 0 for LOW.
-maxim,enable-remote-sense: boolean, enable reote sense.
-maxim,enable-falling-slew-rate: boolean, enable falling slew rate.
-maxim,enable-active-discharge: boolean: enable active discharge.
-maxim,enable-frequency-shift: boolean, enable 9% frequency shift.
-maxim,enable-bias-control: boolean, enable bias control. By enabling this
		startup delay can be reduce to 20us from 220us.
-maxim,enable-etr: boolean, enable Enhanced Transient Response.
-maxim,enable-high-etr-sensitivity: boolean, Enhanced transient response
		circuit is enabled and set for high sensitivity. If this
		property is available then etr will be enable default.

Enhanced transient response (ETR) will affect the configuration of CKADV.

-junction-warn-millicelsius: u32, junction warning temperature threshold
		in millicelsius. If die temperature crosses this level then
		device generates the warning interrupts.

Please note that thermal functionality is only supported on MAX77621. The
supported threshold warning temperature for MAX77621 are 120 degC and 140 degC.

Example:

	max8973@1b {
		compatible = "maxim,max8973";
		reg = <0x1b>;

		regulator-min-microvolt = <935000>;
		regulator-max-microvolt = <1200000>;
		regulator-boot-on;
		regulator-always-on;
	};
+0 −145
Original line number Diff line number Diff line
* Maxim MAX8997 Voltage and Current Regulator

The Maxim MAX8997 is a multi-function device which includes voltage and
current regulators, rtc, charger controller and other sub-blocks. It is
interfaced to the host controller using a i2c interface. Each sub-block is
addressed by the host system using different i2c slave address. This document
describes the bindings for 'pmic' sub-block of max8997.

Required properties:
- compatible: Should be "maxim,max8997-pmic".
- reg: Specifies the i2c slave address of the pmic block. It should be 0x66.

- max8997,pmic-buck1-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
  units for buck1 when changing voltage using gpio dvs. Refer to [1] below
  for additional information.

- max8997,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
  units for buck2 when changing voltage using gpio dvs. Refer to [1] below
  for additional information.

- max8997,pmic-buck5-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
  units for buck5 when changing voltage using gpio dvs. Refer to [1] below
  for additional information.

[1] If none of the 'max8997,pmic-buck[1/2/5]-uses-gpio-dvs' optional
    property is specified, the 'max8997,pmic-buck[1/2/5]-dvs-voltage'
    property should specify atleast one voltage level (which would be a
    safe operating voltage).

    If either of the 'max8997,pmic-buck[1/2/5]-uses-gpio-dvs' optional
    property is specified, then all the eight voltage values for the
    'max8997,pmic-buck[1/2/5]-dvs-voltage' should be specified.

Optional properties:
- interrupts: Interrupt specifiers for two interrupt sources.
  - First interrupt specifier is for 'irq1' interrupt.
  - Second interrupt specifier is for 'alert' interrupt.
- charger-supply: regulator node for charging current.
- max8997,pmic-buck1-uses-gpio-dvs: 'buck1' can be controlled by gpio dvs.
- max8997,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs.
- max8997,pmic-buck5-uses-gpio-dvs: 'buck5' can be controlled by gpio dvs.

Additional properties required if either of the optional properties are used:
- max8997,pmic-ignore-gpiodvs-side-effect: When GPIO-DVS mode is used for
  multiple bucks, changing the voltage value of one of the bucks may affect
  that of another buck, which is the side effect of the change (set_voltage).
  Use this property to ignore such side effects and change the voltage.

- max8997,pmic-buck125-default-dvs-idx: Default voltage setting selected from
  the possible 8 options selectable by the dvs gpios. The value of this
  property should be between 0 and 7. If not specified or if out of range, the
  default value of this property is set to 0.

- max8997,pmic-buck125-dvs-gpios: GPIO specifiers for three host gpio's used
  for dvs. The format of the gpio specifier depends in the gpio controller.

Regulators: The regulators of max8997 that have to be instantiated should be
included in a sub-node named 'regulators'. Regulator nodes included in this
sub-node should be of the format as listed below.

	regulator_name {
		standard regulator bindings here
	};

The following are the names of the regulators that the max8997 pmic block
supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
as per the datasheet of max8997.

	- LDOn
		  - valid values for n are 1 to 18 and 21
		  - Example: LDO0, LD01, LDO2, LDO21
	- BUCKn
		  - valid values for n are 1 to 7.
		  - Example: BUCK1, BUCK2, BUCK3, BUCK7

	- ENVICHG: Battery Charging Current Monitor Output. This is a fixed
		   voltage type regulator

	- ESAFEOUT1: (ldo19)
	- ESAFEOUT2: (ld020)

	- CHARGER_CV: main battery charger voltage control
	- CHARGER: main battery charger current control
	- CHARGER_TOPOFF: end of charge current threshold level

The bindings inside the regulator nodes use the standard regulator bindings
which are documented elsewhere.

Example:

	max8997_pmic@66 {
		compatible = "maxim,max8997-pmic";
		interrupt-parent = <&wakeup_eint>;
		reg = <0x66>;
		interrupts = <4 0>, <3 0>;

		max8997,pmic-buck1-uses-gpio-dvs;
		max8997,pmic-buck2-uses-gpio-dvs;
		max8997,pmic-buck5-uses-gpio-dvs;

		max8997,pmic-ignore-gpiodvs-side-effect;
		max8997,pmic-buck125-default-dvs-idx = <0>;

		max8997,pmic-buck125-dvs-gpios = <&gpx0 0 1 0 0>, /* SET1 */
						 <&gpx0 1 1 0 0>, /* SET2 */
						 <&gpx0 2 1 0 0>; /* SET3 */

		max8997,pmic-buck1-dvs-voltage = <1350000>, <1300000>,
						 <1250000>, <1200000>,
						 <1150000>, <1100000>,
						 <1000000>, <950000>;

		max8997,pmic-buck2-dvs-voltage = <1100000>, <1100000>,
						 <1100000>, <1100000>,
						 <1000000>, <1000000>,
						 <1000000>, <1000000>;

		max8997,pmic-buck5-dvs-voltage = <1200000>, <1200000>,
						 <1200000>, <1200000>,
						 <1200000>, <1200000>,
						 <1200000>, <1200000>;

		regulators {
			ldo1_reg: LDO1 {
				regulator-name = "VDD_ABB_3.3V";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
			};

			ldo2_reg: LDO2 {
				regulator-name = "VDD_ALIVE_1.1V";
				regulator-min-microvolt = <1100000>;
				regulator-max-microvolt = <1100000>;
				regulator-always-on;
			};

			buck1_reg: BUCK1 {
				regulator-name = "VDD_ARM_1.2V";
				regulator-min-microvolt = <950000>;
				regulator-max-microvolt = <1350000>;
				regulator-always-on;
				regulator-boot-on;
			};
		};
	};
Loading