Unverified Commit c6e70a6f authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branch 'regulator/for-5.10' into regulator-next

parents 549738f1 184cdb8f
Loading
Loading
Loading
Loading
+0 −27
Original line number Diff line number Diff line
Monolithic Power Systems MP8867/MP8869 voltage regulator

Required properties:
- compatible: Must be one of the following.
	"mps,mp8867"
	"mps,mp8869"
- reg: I2C slave address.
- enable-gpios: enable gpios.
- mps,fb-voltage-divider: An array of two integers containing the resistor
  values R1 and R2 of the feedback voltage divider in kilo ohms.

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

Example:

	vcpu: regulator@62 {
		compatible = "mps,mp8869";
		regulator-name = "vcpu";
		regulator-min-microvolt = <700000>;
		regulator-max-microvolt = <850000>;
		regulator-always-on;
		regulator-boot-on;
		enable-gpios = <&porta 1 GPIO_ACTIVE_LOW>;
		mps,fb-voltage-divider = <80 240>;
		reg = <0x62>;
	};
+61 −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/mps,mp886x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Monolithic Power Systems MP8867/MP8869 voltage regulator

maintainers:
  - Jisheng Zhang <jszhang@kernel.org>

allOf:
  - $ref: regulator.yaml#

properties:
  compatible:
    enum:
      - mps,mp8867
      - mps,mp8869

  reg:
    maxItems: 1

  enable-gpios:
    description: GPIO to enable/disable the regulator.
    maxItems: 1

  mps,fb-voltage-divider:
    description: An array of two integers containing the resistor
      values R1 and R2 of the feedback voltage divider in kilo ohms.
    $ref: "/schemas/types.yaml#/definitions/uint32-array"
    maxItems: 2

  mps,switch-frequency-hz:
    description: The valid switch frequency in Hertz.
    enum: [500000, 750000, 1000000, 1250000, 1500000]

required:
  - compatible
  - reg
  - enable-gpios
  - mps,fb-voltage-divider

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
        regulator@62 {
          compatible = "mps,mp8869";
          regulator-name = "vcpu";
          regulator-min-microvolt = <800000>;
          regulator-max-microvolt = <1150000>;
          enable-gpios = <&porta 1 GPIO_ACTIVE_LOW>;
          mps,fb-voltage-divider = <80 240>;
          reg = <0x62>;
        };
    };

...
+113 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/mt6360-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: MT6360 Regulator from MediaTek Integrated

maintainers:
  - Gene Chen <gene_chen@richtek.com>

description: |
  list of regulators provided by this controller, must be named
  after their hardware counterparts buck1/2 or ldo1/2/3/5/6/7

properties:
  compatible:
    const: mediatek,mt6360-regulator

  LDO_VIN1-supply:
    description: Input supply phandle(s) for LDO1/2/3
  LDO_VIN2-supply:
    description: Input supply phandle(s) for LDO5
  LDO_VIN3-supply:
    description: Input supply phandle(s) for LDO6/7

patternProperties:
  "^buck[12]$":
    $ref: "regulator.yaml#"

  "^ldo[123567]$":
    $ref: "regulator.yaml#"

required:
  - compatible

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/regulator/mediatek,mt6360-regulator.h>
    regulator {
      compatible = "mediatek,mt6360-regulator";
      LDO_VIN3-supply = <&BUCK2>;
      buck1 {
        regulator-compatible = "BUCK1";
        regulator-name = "mt6360,buck1";
        regulator-min-microvolt = <300000>;
        regulator-max-microvolt = <1300000>;
        regulator-allowed-modes = <MT6360_OPMODE_NORMAL
             MT6360_OPMODE_LP
             MT6360_OPMODE_ULP>;
      };
      BUCK2: buck2 {
        regulator-compatible = "BUCK2";
        regulator-name = "mt6360,buck2";
        regulator-min-microvolt = <300000>;
        regulator-max-microvolt = <1300000>;
        regulator-allowed-modes = <MT6360_OPMODE_NORMAL
             MT6360_OPMODE_LP
             MT6360_OPMODE_ULP>;
      };
      ldo6 {
        regulator-compatible = "LDO6";
        regulator-name = "mt6360,ldo6";
        regulator-min-microvolt = <500000>;
        regulator-max-microvolt = <2100000>;
        regulator-allowed-modes = <MT6360_OPMODE_NORMAL
             MT6360_OPMODE_LP>;
      };
      ldo7 {
        regulator-compatible = "LDO7";
        regulator-name = "mt6360,ldo7";
        regulator-min-microvolt = <500000>;
        regulator-max-microvolt = <2100000>;
        regulator-allowed-modes = <MT6360_OPMODE_NORMAL
             MT6360_OPMODE_LP>;
      };
      ldo1 {
        regulator-compatible = "LDO1";
        regulator-name = "mt6360,ldo1";
        regulator-min-microvolt = <1200000>;
        regulator-max-microvolt = <3600000>;
        regulator-allowed-modes = <MT6360_OPMODE_NORMAL
             MT6360_OPMODE_LP>;
      };
        ldo2 {
        regulator-compatible = "LDO2";
        regulator-name = "mt6360,ldo2";
        regulator-min-microvolt = <1200000>;
        regulator-max-microvolt = <3600000>;
        regulator-allowed-modes = <MT6360_OPMODE_NORMAL
             MT6360_OPMODE_LP>;
      };
      ldo3 {
        regulator-compatible = "LDO3";
        regulator-name = "mt6360,ldo3";
        regulator-min-microvolt = <1200000>;
        regulator-max-microvolt = <3600000>;
        regulator-allowed-modes = <MT6360_OPMODE_NORMAL
             MT6360_OPMODE_LP>;
      };
      ldo5 {
        regulator-compatible = "LDO5";
        regulator-name = "mt6360,ldo5";
        regulator-min-microvolt = <2700000>;
        regulator-max-microvolt = <3600000>;
        regulator-allowed-modes = <MT6360_OPMODE_NORMAL
             MT6360_OPMODE_LP>;
      };
    };
...
+0 −394
Original line number Diff line number Diff line
PFUZE100 family of regulators

Required properties:
- compatible: "fsl,pfuze100", "fsl,pfuze200", "fsl,pfuze3000", "fsl,pfuze3001"
- reg: I2C slave address

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 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".
- fsl,pmic-stby-poweroff: if present, configure the PMIC to shutdown all
  power rails when PMIC_STBY_REQ line is asserted during the power off sequence.
  Use this option if the SoC should be powered off by external power
  management IC (PMIC) on PMIC_STBY_REQ signal.
  As opposite to PMIC_STBY_REQ boards can implement PMIC_ON_REQ signal.

Required child node:
- regulators: This is the list of child nodes that specify the regulator
  initialization data for defined regulators. Please refer to below doc
  Documentation/devicetree/bindings/regulator/regulator.txt.

  The valid names for regulators are:
  --PFUZE100
  sw1ab,sw1c,sw2,sw3a,sw3b,sw4,swbst,vsnvs,vrefddr,vgen1~vgen6
  --PFUZE200
  sw1ab,sw2,sw3a,sw3b,swbst,vsnvs,vrefddr,vgen1~vgen6,coin
  --PFUZE3000
  sw1a,sw1b,sw2,sw3,swbst,vsnvs,vrefddr,vldo1,vldo2,vccsd,v33,vldo3,vldo4
  --PFUZE3001
  sw1,sw2,sw3,vsnvs,vldo1,vldo2,vccsd,v33,vldo3,vldo4

Each regulator is defined using the standard binding for regulators.

Example 1: PFUZE100

	pfuze100: pmic@8 {
		compatible = "fsl,pfuze100";
		reg = <0x08>;

		regulators {
			sw1a_reg: sw1ab {
				regulator-min-microvolt = <300000>;
				regulator-max-microvolt = <1875000>;
				regulator-boot-on;
				regulator-always-on;
				regulator-ramp-delay = <6250>;
			};

			sw1c_reg: sw1c {
				regulator-min-microvolt = <300000>;
				regulator-max-microvolt = <1875000>;
				regulator-boot-on;
				regulator-always-on;
			};

			sw2_reg: sw2 {
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <3300000>;
				regulator-boot-on;
				regulator-always-on;
			};

			sw3a_reg: sw3a {
				regulator-min-microvolt = <400000>;
				regulator-max-microvolt = <1975000>;
				regulator-boot-on;
				regulator-always-on;
			};

			sw3b_reg: sw3b {
				regulator-min-microvolt = <400000>;
				regulator-max-microvolt = <1975000>;
				regulator-boot-on;
				regulator-always-on;
			};

			sw4_reg: sw4 {
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <3300000>;
			};

			swbst_reg: swbst {
				regulator-min-microvolt = <5000000>;
				regulator-max-microvolt = <5150000>;
			};

			snvs_reg: vsnvs {
				regulator-min-microvolt = <1000000>;
				regulator-max-microvolt = <3000000>;
				regulator-boot-on;
				regulator-always-on;
			};

			vref_reg: vrefddr {
				regulator-boot-on;
				regulator-always-on;
			};

			vgen1_reg: vgen1 {
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <1550000>;
			};

			vgen2_reg: vgen2 {
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <1550000>;
			};

			vgen3_reg: vgen3 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
			};

			vgen4_reg: vgen4 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vgen5_reg: vgen5 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vgen6_reg: vgen6 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};
		};
	};


Example 2: PFUZE200

	pfuze200: pmic@8 {
		compatible = "fsl,pfuze200";
		reg = <0x08>;

		regulators {
			sw1a_reg: sw1ab {
				regulator-min-microvolt = <300000>;
				regulator-max-microvolt = <1875000>;
				regulator-boot-on;
				regulator-always-on;
				regulator-ramp-delay = <6250>;
			};

			sw2_reg: sw2 {
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <3300000>;
				regulator-boot-on;
				regulator-always-on;
			};

			sw3a_reg: sw3a {
				regulator-min-microvolt = <400000>;
				regulator-max-microvolt = <1975000>;
				regulator-boot-on;
				regulator-always-on;
			};

			sw3b_reg: sw3b {
				regulator-min-microvolt = <400000>;
				regulator-max-microvolt = <1975000>;
				regulator-boot-on;
				regulator-always-on;
			};

			swbst_reg: swbst {
				regulator-min-microvolt = <5000000>;
				regulator-max-microvolt = <5150000>;
			};

			snvs_reg: vsnvs {
				regulator-min-microvolt = <1000000>;
				regulator-max-microvolt = <3000000>;
				regulator-boot-on;
				regulator-always-on;
			};

			vref_reg: vrefddr {
				regulator-boot-on;
				regulator-always-on;
			};

			vgen1_reg: vgen1 {
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <1550000>;
			};

			vgen2_reg: vgen2 {
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <1550000>;
			};

			vgen3_reg: vgen3 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
			};

			vgen4_reg: vgen4 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vgen5_reg: vgen5 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vgen6_reg: vgen6 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			coin_reg: coin {
				regulator-min-microvolt = <2500000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};
		};
	};

Example 3: PFUZE3000

	pfuze3000: pmic@8 {
		compatible = "fsl,pfuze3000";
		reg = <0x08>;

		regulators {
			sw1a_reg: sw1a {
				regulator-min-microvolt = <700000>;
				regulator-max-microvolt = <1475000>;
				regulator-boot-on;
				regulator-always-on;
				regulator-ramp-delay = <6250>;
			};
			/* use sw1c_reg to align with pfuze100/pfuze200 */
			sw1c_reg: sw1b {
				regulator-min-microvolt = <700000>;
				regulator-max-microvolt = <1475000>;
				regulator-boot-on;
				regulator-always-on;
				regulator-ramp-delay = <6250>;
			};

			sw2_reg: sw2 {
				regulator-min-microvolt = <2500000>;
				regulator-max-microvolt = <3300000>;
				regulator-boot-on;
				regulator-always-on;
			};

			sw3a_reg: sw3 {
				regulator-min-microvolt = <900000>;
				regulator-max-microvolt = <1650000>;
				regulator-boot-on;
				regulator-always-on;
			};

			swbst_reg: swbst {
				regulator-min-microvolt = <5000000>;
				regulator-max-microvolt = <5150000>;
			};

			snvs_reg: vsnvs {
				regulator-min-microvolt = <1000000>;
				regulator-max-microvolt = <3000000>;
				regulator-boot-on;
				regulator-always-on;
			};

			vref_reg: vrefddr {
				regulator-boot-on;
				regulator-always-on;
			};

			vgen1_reg: vldo1 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vgen2_reg: vldo2 {
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <1550000>;
			};

			vgen3_reg: vccsd {
				regulator-min-microvolt = <2850000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vgen4_reg: v33 {
				regulator-min-microvolt = <2850000>;
				regulator-max-microvolt = <3300000>;
			};

			vgen5_reg: vldo3 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vgen6_reg: vldo4 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};
		};
	};

Example 4: PFUZE 3001

	pfuze3001: pmic@8 {
		compatible = "fsl,pfuze3001";
		reg = <0x08>;

		regulators {
			sw1_reg: sw1 {
				regulator-min-microvolt = <700000>;
				regulator-max-microvolt = <3300000>;
				regulator-boot-on;
				regulator-always-on;
			};

			sw2_reg: sw2 {
				regulator-min-microvolt = <1500000>;
				regulator-max-microvolt = <3300000>;
				regulator-boot-on;
				regulator-always-on;
			};

			sw3_reg: sw3 {
				regulator-min-microvolt = <900000>;
				regulator-max-microvolt = <1650000>;
				regulator-boot-on;
				regulator-always-on;
			};

			snvs_reg: vsnvs {
				regulator-min-microvolt = <1000000>;
				regulator-max-microvolt = <3000000>;
				regulator-boot-on;
				regulator-always-on;
			};

			vgen1_reg: vldo1 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vgen2_reg: vldo2 {
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <1550000>;
				regulator-always-on;
			};

			vgen3_reg: vccsd {
				regulator-min-microvolt = <2850000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vgen4_reg: v33 {
				regulator-min-microvolt = <2850000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vgen5_reg: vldo3 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vgen6_reg: vldo4 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};
		};
	};
+186 −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/pfuze100.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: PFUZE100 family of regulators

maintainers:
  - Robin Gong <yibin.gong@nxp.com>

description: |
  The valid names for regulators are:
  --PFUZE100
  sw1ab,sw1c,sw2,sw3a,sw3b,sw4,swbst,vsnvs,vrefddr,vgen1~vgen6
  --PFUZE200
  sw1ab,sw2,sw3a,sw3b,swbst,vsnvs,vrefddr,vgen1~vgen6,coin
  --PFUZE3000
  sw1a,sw1b,sw2,sw3,swbst,vsnvs,vrefddr,vldo1,vldo2,vccsd,v33,vldo3,vldo4
  --PFUZE3001
  sw1,sw2,sw3,vsnvs,vldo1,vldo2,vccsd,v33,vldo3,vldo4

  Each regulator is defined using the standard binding for regulators.

properties:
  $nodename:
    pattern: "^pmic@[0-9]$"

  compatible:
    enum:
      - fsl,pfuze100
      - fsl,pfuze200
      - fsl,pfuze3000
      - fsl,pfuze3001

  reg:
    maxItems: 1

  fsl,pfuze-support-disable-sw:
    $ref: /schemas/types.yaml#/definitions/flag
    description: |
      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 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".

  fsl,pmic-stby-poweroff:
    $ref: /schemas/types.yaml#/definitions/flag
    description: |
      if present, configure the PMIC to shutdown all
      power rails when PMIC_STBY_REQ line is asserted during the power off sequence.
      Use this option if the SoC should be powered off by external power management
      IC (PMIC) on PMIC_STBY_REQ signal.
      As opposite to PMIC_STBY_REQ boards can implement PMIC_ON_REQ signal.

  regulators:
    type: object
    description: |
      list of regulators provided by this controller.

    patternProperties:
      "^sw([1-4]|[1-4][a-c]|[1-4][a-c][a-c])$":
        $ref: "regulator.yaml#"
        type: object

      "^vgen[1-6]$":
        $ref: "regulator.yaml#"
        type: object

      "^(vsnvs|vref|vrefddr|swbst|coin)$":
        $ref: "regulator.yaml#"
        type: object

    additionalProperties: false

required:
  - compatible
  - reg

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

        pmic@8 {
            compatible = "fsl,pfuze100";
            reg = <0x08>;

            regulators {
                sw1a_reg: sw1ab {
                    regulator-min-microvolt = <300000>;
                    regulator-max-microvolt = <1875000>;
                    regulator-boot-on;
                    regulator-always-on;
                    regulator-ramp-delay = <6250>;
                };

                sw1c_reg: sw1c {
                    regulator-min-microvolt = <300000>;
                    regulator-max-microvolt = <1875000>;
                    regulator-boot-on;
                    regulator-always-on;
                };

                sw2_reg: sw2 {
                    regulator-min-microvolt = <800000>;
                    regulator-max-microvolt = <3300000>;
                    regulator-boot-on;
                    regulator-always-on;
                };

                sw3a_reg: sw3a {
                    regulator-min-microvolt = <400000>;
                    regulator-max-microvolt = <1975000>;
                    regulator-boot-on;
                    regulator-always-on;
                };

                sw3b_reg: sw3b {
                    regulator-min-microvolt = <400000>;
                    regulator-max-microvolt = <1975000>;
                    regulator-boot-on;
                    regulator-always-on;
                };

                sw4_reg: sw4 {
                    regulator-min-microvolt = <800000>;
                    regulator-max-microvolt = <3300000>;
                };

                swbst_reg: swbst {
                    regulator-min-microvolt = <5000000>;
                    regulator-max-microvolt = <5150000>;
                };

                snvs_reg: vsnvs {
                    regulator-min-microvolt = <1000000>;
                    regulator-max-microvolt = <3000000>;
                    regulator-boot-on;
                    regulator-always-on;
                };

                vref_reg: vrefddr {
                    regulator-boot-on;
                    regulator-always-on;
                };

                vgen1_reg: vgen1 {
                    regulator-min-microvolt = <800000>;
                    regulator-max-microvolt = <1550000>;
                };

                vgen2_reg: vgen2 {
                    regulator-min-microvolt = <800000>;
                    regulator-max-microvolt = <1550000>;
                };

                vgen3_reg: vgen3 {
                    regulator-min-microvolt = <1800000>;
                    regulator-max-microvolt = <3300000>;
                };

                vgen4_reg: vgen4 {
                    regulator-min-microvolt = <1800000>;
                    regulator-max-microvolt = <3300000>;
                    regulator-always-on;
                };

                vgen5_reg: vgen5 {
                    regulator-min-microvolt = <1800000>;
                    regulator-max-microvolt = <3300000>;
                    regulator-always-on;
                };

                vgen6_reg: vgen6 {
                    regulator-min-microvolt = <1800000>;
                    regulator-max-microvolt = <3300000>;
                    regulator-always-on;
                };
            };
        };
    };
Loading