Commit 0175ec3a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull regulator updates from Mark Brown:
 "This has been a very quiet release for the regulator API: there's one
  new driver for the Maxim MAX20411, some DT schema conversions and some
  small tweaks and improvements but really nothing major at all"

* tag 'regulator-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (22 commits)
  regulator: max597x: Align for simple_mfd_i2c driver
  regulator: max20411: Fix off-by-one for n_voltages setting
  regulator: max597x: Remove unused variable
  regulator: tps65219: use generic set_bypass()
  regulator: s5m8767: Bounds check id indexing into arrays
  regulator: max77802: Bounds check regulator id against opmode
  regulator: max20411: Convert to i2c's .probe_new()
  regulator: scmi: Allow for zero voltage domains
  regulator: max20411: Directly include bitfield.h
  regulator: Introduce Maxim MAX20411 Step-Down converter
  regulator: dt-bindings: Describe Maxim MAX20411
  regulator: dt-bindings: qcom-labibb: Allow regulator-common properties
  regulator: dt-bindings: fixed-regulator: allow gpios property
  regulator: tps65219: use IS_ERR() to detect an error pointer
  regulator: mcp16502: add enum MCP16502_REG_HPM description
  regulator: fixed-helper: use the correct function name in comment
  regulator: act8945a: fix non-kernel-doc comments
  dt-bindings: regulators: convert non-smd RPM Regulators bindings to dt-schema
  regulator: dt-bindings: Convert Fairchild FAN53555 to DT schema
  regulator: dt-bindings: qcom,usb-vbus-regulator: change node name
  ...
parents 603ac530 7f62cb88
Loading
Loading
Loading
Loading
+0 −117
Original line number Diff line number Diff line
ACT88xx regulators
-------------------

Required properties:
- compatible: "active-semi,act8846" or "active-semi,act8865" or "active-semi,act8600"
- reg: I2C slave address

Optional properties:
- system-power-controller: Telling whether or not this pmic is controlling
  the system power. See Documentation/devicetree/bindings/power/power-controller.txt .
- active-semi,vsel-high: Indicates the VSEL pin is high.
  If this property is missing, assume the VSEL pin is low(0).

Optional input supply properties:
- for act8600:
  - vp1-supply: The input supply for DCDC_REG1
  - vp2-supply: The input supply for DCDC_REG2
  - vp3-supply: The input supply for DCDC_REG3
  - inl-supply: The input supply for LDO_REG5, LDO_REG6, LDO_REG7 and LDO_REG8
  SUDCDC_REG4, LDO_REG9 and LDO_REG10 do not have separate supplies.
- for act8846:
  - vp1-supply: The input supply for REG1
  - vp2-supply: The input supply for REG2
  - vp3-supply: The input supply for REG3
  - vp4-supply: The input supply for REG4
  - inl1-supply: The input supply for REG5, REG6 and REG7
  - inl2-supply: The input supply for REG8 and LDO_REG9
  - inl3-supply: The input supply for REG10, REG11 and REG12
- for act8865:
  - vp1-supply: The input supply for DCDC_REG1
  - vp2-supply: The input supply for DCDC_REG2
  - vp3-supply: The input supply for DCDC_REG3
  - inl45-supply: The input supply for LDO_REG1 and LDO_REG2
  - inl67-supply: The input supply for LDO_REG3 and LDO_REG4

Any standard regulator properties can be used to configure the single regulator.
regulator-initial-mode, regulator-allowed-modes and regulator-mode could be specified
for act8865 using mode values from dt-bindings/regulator/active-semi,8865-regulator.h
file.

The valid names for regulators are:
	- for act8846:
	REG1, REG2, REG3, REG4, REG5, REG6, REG7, REG8, REG9, REG10, REG11, REG12
	- for act8865:
	DCDC_REG1, DCDC_REG2, DCDC_REG3, LDO_REG1, LDO_REG2, LDO_REG3, LDO_REG4.
	- for act8600:
	DCDC_REG1, DCDC_REG2, DCDC_REG3, SUDCDC_REG4, LDO_REG5, LDO_REG6, LDO_REG7,
	LDO_REG8, LDO_REG9, LDO_REG10,

Example:
--------

#include <dt-bindings/regulator/active-semi,8865-regulator.h>

		i2c1: i2c@f0018000 {
			pmic: act8865@5b {
				compatible = "active-semi,act8865";
				reg = <0x5b>;
				active-semi,vsel-high;

				regulators {
					vcc_1v8_reg: DCDC_REG1 {
						regulator-name = "VCC_1V8";
						regulator-min-microvolt = <1800000>;
						regulator-max-microvolt = <1800000>;
						regulator-always-on;
					};

					vcc_1v2_reg: DCDC_REG2 {
						regulator-name = "VCC_1V2";
						regulator-min-microvolt = <1100000>;
						regulator-max-microvolt = <1300000>;
						regulator-always-on;

						regulator-allowed-modes = <ACT8865_REGULATOR_MODE_FIXED>,
									  <ACT8865_REGULATOR_MODE_LOWPOWER>;
						regulator-initial-mode = <ACT8865_REGULATOR_MODE_FIXED>;

						regulator-state-mem {
							regulator-on-in-suspend;
							regulator-suspend-min-microvolt = <1150000>;
							regulator-suspend-max-microvolt = <1150000>;
							regulator-changeable-in-suspend;
							regulator-mode = <ACT8865_REGULATOR_MODE_LOWPOWER>;
						};
					};

					vcc_3v3_reg: DCDC_REG3 {
						regulator-name = "VCC_3V3";
						regulator-min-microvolt = <3300000>;
						regulator-max-microvolt = <3300000>;
						regulator-always-on;
					};

					vddana_reg: LDO_REG1 {
						regulator-name = "VDDANA";
						regulator-min-microvolt = <3300000>;
						regulator-max-microvolt = <3300000>;
						regulator-always-on;

						regulator-allowed-modes = <ACT8865_REGULATOR_MODE_NORMAL>,
									  <ACT8865_REGULATOR_MODE_LOWPOWER>;
						regulator-initial-mode = <ACT8865_REGULATOR_MODE_NORMAL>;

						regulator-state-mem {
							regulator-off-in-suspend;
						};
					};

					vddfuse_reg: LDO_REG2 {
						regulator-name = "FUSE_2V5";
						regulator-min-microvolt = <2500000>;
						regulator-max-microvolt = <2500000>;
					};
				};
			};
		};
+0 −113
Original line number Diff line number Diff line
Device-Tree bindings for regulators of Active-semi ACT8945A Multi-Function Device

Required properties:
 - compatible: "active-semi,act8945a", please refer to ../mfd/act8945a.txt.

Optional properties:
- active-semi,vsel-high: Indicates if the VSEL pin is set to logic-high.
  If this property is missing, assume the VSEL pin is set to logic-low.

Optional input supply properties:
  - vp1-supply: The input supply for REG_DCDC1
  - vp2-supply: The input supply for REG_DCDC2
  - vp3-supply: The input supply for REG_DCDC3
  - inl45-supply: The input supply for REG_LDO1 and REG_LDO2
  - inl67-supply: The input supply for REG_LDO3 and REG_LDO4

Any standard regulator properties can be used to configure the single regulator.
regulator-initial-mode, regulator-allowed-modes and regulator-mode could be
specified using mode values from dt-bindings/regulator/active-semi,8945a-regulator.h
file.

The valid names for regulators are:
	REG_DCDC1, REG_DCDC2, REG_DCDC3, REG_LDO1, REG_LDO2, REG_LDO3, REG_LDO4.

Example:

#include <dt-bindings/regulator/active-semi,8945a-regulator.h>

	pmic@5b {
		compatible = "active-semi,act8945a";
		reg = <0x5b>;

		active-semi,vsel-high;

		regulators {
			vdd_1v35_reg: REG_DCDC1 {
				regulator-name = "VDD_1V35";
				regulator-min-microvolt = <1350000>;
				regulator-max-microvolt = <1350000>;
				regulator-always-on;

				regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>,
							  <ACT8945A_REGULATOR_MODE_LOWPOWER>;
				regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>;

				regulator-state-mem {
					regulator-on-in-suspend;
					regulator-suspend-min-microvolt=<1400000>;
					regulator-suspend-max-microvolt=<1400000>;
					regulator-changeable-in-suspend;
					regulator-mode=<ACT8945A_REGULATOR_MODE_LOWPOWER>;
				};
			};

			vdd_1v2_reg: REG_DCDC2 {
				regulator-name = "VDD_1V2";
				regulator-min-microvolt = <1100000>;
				regulator-max-microvolt = <1300000>;
				regulator-always-on;

				regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>,
							  <ACT8945A_REGULATOR_MODE_LOWPOWER>;
				regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>;

				regulator-state-mem {
					regulator-off-in-suspend;
				};
			};

			vdd_3v3_reg: REG_DCDC3 {
				regulator-name = "VDD_3V3";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vdd_fuse_reg: REG_LDO1 {
				regulator-name = "VDD_FUSE";
				regulator-min-microvolt = <2500000>;
				regulator-max-microvolt = <2500000>;
				regulator-always-on;

				regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>,
							  <ACT8945A_REGULATOR_MODE_LOWPOWER>;
				regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>;

				regulator-state-mem {
					regulator-off-in-suspend;
				};
			};

			vdd_3v3_lp_reg: REG_LDO2 {
				regulator-name = "VDD_3V3_LP";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vdd_led_reg: REG_LDO3 {
				regulator-name = "VDD_LED";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vdd_sdhc_1v8_reg: REG_LDO4 {
				regulator-name = "VDD_SDHC_1V8";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-always-on;
			};
		};
	};
+139 −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/regulator/active-semi,act8600.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Active-semi ACT8600 regulator

maintainers:
  - Paul Cercueil <paul@crapouillou.net>

properties:
  compatible:
    const: active-semi,act8600

  reg:
    maxItems: 1

  system-power-controller:
    description:
      Indicates that the ACT8600 is responsible for powering OFF
      the system.
    type: boolean

  active-semi,vsel-high:
    description:
      Indicates the VSEL pin is high. If this property is missing,
      the VSEL pin is assumed to be low.
    type: boolean

  regulators:
    type: object
    additionalProperties: false

    properties:
      DCDC1:
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          vp1-supply:
            description: Handle to the VP1 input supply

      DCDC2:
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          vp2-supply:
            description: Handle to the VP2 input supply

      DCDC3:
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          vp3-supply:
            description: Handle to the VP3 input supply

    patternProperties:
      "^(SUDCDC_REG4|LDO_REG9|LDO_REG10)$":
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

      "^LDO[5-8]$":
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          inl-supply:
            description: Handle to the INL input supply

additionalProperties: false

required:
  - reg
  - compatible
  - regulators

examples:
  - |
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      pmic@5a {
        compatible = "active-semi,act8600";
        reg = <0x5a>;

        regulators {
          SUDCDC_REG4 {
            regulator-min-microvolt = <5300000>;
            regulator-max-microvolt = <5300000>;
            inl-supply = <&vcc>;
          };

          LDO5 {
            regulator-min-microvolt = <2500000>;
            regulator-max-microvolt = <2500000>;
            inl-supply = <&vcc>;
          };

          LDO6 {
            regulator-min-microvolt = <3300000>;
            regulator-max-microvolt = <3300000>;
            inl-supply = <&vcc>;
          };

          LDO7 {
            regulator-min-microvolt = <3300000>;
            regulator-max-microvolt = <3300000>;
            inl-supply = <&vcc>;
          };

          LDO8 {
            regulator-min-microvolt = <1800000>;
            regulator-max-microvolt = <1800000>;
            regulator-always-on;
            inl-supply = <&vcc>;
          };

          LDO_REG9 {
            regulator-min-microvolt = <3300000>;
            regulator-max-microvolt = <3300000>;
            regulator-always-on;
            inl-supply = <&vcc>;
          };

          LDO_REG10 {
            inl-supply = <&vcc>;
          };
        };
      };
    };
+205 −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/regulator/active-semi,act8846.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Active-semi ACT8846 regulator

maintainers:
  - Paul Cercueil <paul@crapouillou.net>

properties:
  compatible:
    const: active-semi,act8846

  reg:
    maxItems: 1

  system-power-controller:
    description:
      Indicates that the ACT8846 is responsible for powering OFF
      the system.
    type: boolean

  active-semi,vsel-high:
    description:
      Indicates the VSEL pin is high. If this property is missing,
      the VSEL pin is assumed to be low.
    type: boolean

  regulators:
    type: object
    additionalProperties: false

    properties:
      REG1:
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          vp1-supply:
            description: Handle to the VP1 input supply

      REG2:
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          vp2-supply:
            description: Handle to the VP2 input supply

      REG3:
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          vp3-supply:
            description: Handle to the VP3 input supply

      REG4:
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          vp4-supply:
            description: Handle to the VP4 input supply

    patternProperties:
      "^REG[5-7]$":
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          inl1-supply:
            description: Handle to the INL1 input supply

      "^REG[8-9]$":
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          inl2-supply:
            description: Handle to the INL2 input supply

      "^REG1[0-2]$":
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          inl3-supply:
            description: Handle to the INL3 input supply

additionalProperties: false

required:
  - reg
  - compatible
  - regulators

examples:
  - |
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      pmic@5a {
        compatible = "active-semi,act8846";
        reg = <0x5a>;

        system-power-controller;

        regulators {
          REG1 {
            regulator-name = "VCC_DDR";
            regulator-min-microvolt = <1200000>;
            regulator-max-microvolt = <1200000>;
            regulator-always-on;
          };

          REG2 {
            regulator-name = "VCC_IO";
            regulator-min-microvolt = <3300000>;
            regulator-max-microvolt = <3300000>;
            regulator-always-on;
          };

          REG3 {
            regulator-name = "VDD_LOG";
            regulator-min-microvolt = <1000000>;
            regulator-max-microvolt = <1000000>;
            regulator-always-on;
          };

          REG4 {
            regulator-name = "VCC_20";
            regulator-min-microvolt = <2000000>;
            regulator-max-microvolt = <2000000>;
            regulator-always-on;
          };

          REG5 {
            regulator-name = "VCCIO_SD";
            regulator-min-microvolt = <3300000>;
            regulator-max-microvolt = <3300000>;
            regulator-always-on;
          };

          REG6 {
            regulator-name = "VDD10_LCD";
            regulator-min-microvolt = <1000000>;
            regulator-max-microvolt = <1000000>;
            regulator-always-on;
          };

          REG7 {
            regulator-name = "VCC_WL";
            regulator-min-microvolt = <3300000>;
            regulator-max-microvolt = <3300000>;
            regulator-always-on;
          };

          REG8 {
            regulator-name = "VCCA_33";
            regulator-min-microvolt = <3300000>;
            regulator-max-microvolt = <3300000>;
            regulator-always-on;
          };

          REG9 {
            regulator-name = "VCC_LAN";
            regulator-min-microvolt = <3300000>;
            regulator-max-microvolt = <3300000>;
            regulator-always-on;
          };

          REG10 {
            regulator-name = "VDD_10";
            regulator-min-microvolt = <1000000>;
            regulator-max-microvolt = <1000000>;
            regulator-always-on;
          };

          REG11 {
            regulator-name = "VCC_18";
            regulator-min-microvolt = <1800000>;
            regulator-max-microvolt = <1800000>;
            regulator-always-on;
          };

          REG12 {
            regulator-name = "VCC18_LCD";
            regulator-min-microvolt = <1800000>;
            regulator-max-microvolt = <1800000>;
            regulator-always-on;
          };
        };
      };
    };
+158 −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/regulator/active-semi,act8865.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Active-semi ACT8865 regulator

maintainers:
  - Paul Cercueil <paul@crapouillou.net>

properties:
  compatible:
    const: active-semi,act8865

  reg:
    maxItems: 1

  system-power-controller:
    description:
      Indicates that the ACT8865 is responsible for powering OFF
      the system.
    type: boolean

  active-semi,vsel-high:
    description:
      Indicates the VSEL pin is high. If this property is missing,
      the VSEL pin is assumed to be low.
    type: boolean

  regulators:
    type: object
    additionalProperties: false

    properties:
      DCDC_REG1:
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          vp1-supply:
            description: Handle to the VP1 input supply

      DCDC_REG2:
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          vp2-supply:
            description: Handle to the VP2 input supply

      DCDC_REG3:
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          vp3-supply:
            description: Handle to the VP3 input supply

    patternProperties:
      "^LDO_REG[1-2]$":
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          inl45-supply:
            description: Handle to the INL45 input supply

      "^LDO_REG[3-4]$":
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          inl67-supply:
            description: Handle to the INL67 input supply

additionalProperties: false

required:
  - reg
  - compatible
  - regulators

examples:
  - |
    #include <dt-bindings/regulator/active-semi,8865-regulator.h>

    i2c1 {
      #address-cells = <1>;
      #size-cells = <0>;

      pmic@5b {
        compatible = "active-semi,act8865";
        reg = <0x5b>;
        active-semi,vsel-high;

        regulators {
          DCDC_REG1 {
            regulator-name = "VCC_1V8";
            regulator-min-microvolt = <1800000>;
            regulator-max-microvolt = <1800000>;
            regulator-always-on;
          };

          DCDC_REG2 {
            regulator-name = "VCC_1V2";
            regulator-min-microvolt = <1100000>;
            regulator-max-microvolt = <1300000>;
            regulator-always-on;

            regulator-allowed-modes = <ACT8865_REGULATOR_MODE_FIXED>,
                                      <ACT8865_REGULATOR_MODE_LOWPOWER>;
            regulator-initial-mode = <ACT8865_REGULATOR_MODE_FIXED>;

            regulator-state-mem {
              regulator-on-in-suspend;
              regulator-suspend-min-microvolt = <1150000>;
              regulator-suspend-max-microvolt = <1150000>;
              regulator-changeable-in-suspend;
              regulator-mode = <ACT8865_REGULATOR_MODE_LOWPOWER>;
            };
          };

          DCDC_REG3 {
            regulator-name = "VCC_3V3";
            regulator-min-microvolt = <3300000>;
            regulator-max-microvolt = <3300000>;
            regulator-always-on;
          };

          LDO_REG1 {
            regulator-name = "VDDANA";
            regulator-min-microvolt = <3300000>;
            regulator-max-microvolt = <3300000>;
            regulator-always-on;

            regulator-allowed-modes = <ACT8865_REGULATOR_MODE_NORMAL>,
                                      <ACT8865_REGULATOR_MODE_LOWPOWER>;
            regulator-initial-mode = <ACT8865_REGULATOR_MODE_NORMAL>;

            regulator-state-mem {
              regulator-off-in-suspend;
            };
          };

          LDO_REG2 {
            regulator-name = "FUSE_2V5";
            regulator-min-microvolt = <2500000>;
            regulator-max-microvolt = <2500000>;
          };
        };
      };
    };
Loading