code:
# 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

      "^vldo[1-4]$":
        $ref: "regulator.yaml#"
        type: object

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

    additionalProperties: false

required:
  - compatible
  - reg

additionalProperties: false

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;
                };
            };
        };
    };


code:
* Powerventure Semiconductor PV88060 Voltage Regulator

Required properties:
- compatible: "pvs,pv88060".
- reg: I2C slave address, usually 0x49.
- interrupts: the interrupt outputs of the controller
- regulators: A node that houses a sub-node for each regulator within the
  device. Each sub-node is identified using the node's name, with valid
  values listed below. The content of each sub-node is defined by the
  standard binding for regulators; see regulator.txt.
  BUCK1, LDO1, LDO2, LDO3, LDO4, LDO5, LDO6, LDO7, SW1, SW2, SW3, SW4,
  SW5, and SW6.

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

Example

	pmic: pv88060@49 {
		compatible = "pvs,pv88060";
		reg = <0x49>;
		interrupt-parent = <&gpio>;
		interrupts = <24 24>;

		regulators {
			BUCK1 {
				regulator-name = "buck1";
				regulator-min-microvolt = <2800000>;
				regulator-max-microvolt = <4387500>;
				regulator-min-microamp 	= <1496000>;
				regulator-max-microamp 	= <4189000>;
				regulator-boot-on;
			};

			LDO1 {
				regulator-name = "ldo1";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3350000>;
				regulator-boot-on;
			};

			LDO2 {
				regulator-name = "ldo2";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3350000>;
				regulator-boot-on;
			};

			LDO3 {
				regulator-name = "ldo3";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3350000>;
				regulator-boot-on;
			};

			LDO4 {
				regulator-name = "ldo4";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3350000>;
				regulator-boot-on;
			};

			LDO5 {
				regulator-name = "ldo5";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3350000>;
				regulator-boot-on;
			};

			LDO6 {
				regulator-name = "ldo6";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3350000>;
				regulator-boot-on;
			};

			LDO7 {
				regulator-name = "ldo7";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3350000>;
				regulator-boot-on;
			};

			SW1 {
				regulator-name = "sw1";
				regulator-min-microvolt = <5000000>;
				regulator-max-microvolt = <5000000>;
			};

			SW2 {
				regulator-name = "sw2";
				regulator-min-microvolt = <5000000>;
				regulator-max-microvolt = <5000000>;
				regulator-boot-on;
			};

			SW3 {
				regulator-name = "sw3";
				regulator-min-microvolt = <5000000>;
				regulator-max-microvolt = <5000000>;
				regulator-boot-on;
			};

			SW4 {
				regulator-name = "sw4";
				regulator-min-microvolt = <5000000>;
				regulator-max-microvolt = <5000000>;
				regulator-boot-on;
			};

			SW5 {
				regulator-name = "sw5";
				regulator-min-microvolt = <5000000>;
				regulator-max-microvolt = <5000000>;
				regulator-boot-on;
			};

			SW6 {
				regulator-name = "sw6";
				regulator-min-microvolt = <5000000>;
				regulator-max-microvolt = <5000000>;
			};
		};
	};

repo_name: angery/linux


code:
* Powerventure Semiconductor PV88080 Voltage Regulator

Required properties:
- compatible: Must be one of the following, depending on the
  silicon version:
	- "pvs,pv88080" (DEPRECATED)

	- "pvs,pv88080-aa" for PV88080 AA or AB silicon
	- "pvs,pv88080-ba" for PV88080 BA or BB silicon
  NOTE: The use of the compatibles with no silicon version is deprecated.
- reg: I2C slave address, usually 0x49
- interrupts: the interrupt outputs of the controller
- regulators: A node that houses a sub-node for each regulator within the
  device. Each sub-node is identified using the node's name, with valid
  values listed below. The content of each sub-node is defined by the
  standard binding for regulators; see regulator.txt.
  BUCK1, BUCK2, BUCK3 and HVBUCK.

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

Example:

	pmic: pv88080@49 {
		compatible = "pvs,pv88080-ba";
		reg = <0x49>;
		interrupt-parent = <&gpio>;
		interrupts = <24 24>;

		regulators {
			BUCK1 {
				regulator-name = "buck1";
				regulator-min-microvolt = < 600000>;
				regulator-max-microvolt = <1393750>;
				regulator-min-microamp 	= < 220000>;
				regulator-max-microamp 	= <7040000>;
			};

			BUCK2 {
				regulator-name = "buck2";
				regulator-min-microvolt = < 600000>;
				regulator-max-microvolt = <1393750>;
				regulator-min-microamp 	= <1496000>;
				regulator-max-microamp 	= <4189000>;
			};

			BUCK3 {
				regulator-name = "buck3";
				regulator-min-microvolt = <1400000>;
				regulator-max-microvolt = <2193750>;
				regulator-min-microamp 	= <1496000>;
				regulator-max-microamp 	= <4189000>;
			};

			HVBUCK {
				regulator-name = "hvbuck";
				regulator-min-microvolt = <   5000>;
				regulator-max-microvolt = <1275000>;
 			};
		};
	};


code:
* Powerventure Semiconductor PV88090 Voltage Regulator

Required properties:
- compatible: "pvs,pv88090".
- reg: I2C slave address, usually 0x48.
- interrupts: the interrupt outputs of the controller
- regulators: A node that houses a sub-node for each regulator within the
  device. Each sub-node is identified using the node's name, with valid
  values listed below. The content of each sub-node is defined by the
  standard binding for regulators; see regulator.txt.
  BUCK1, BUCK2, BUCK3, LDO1, and LDO2.

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

Example

	pmic: pv88090@48 {
		compatible = "pvs,pv88090";
		reg = <0x48>;
		interrupt-parent = <&gpio>;
		interrupts = <24 24>;

		regulators {
			BUCK1 {
				regulator-name = "buck1";
				regulator-min-microvolt = < 600000>;
				regulator-max-microvolt = <1393750>;
				regulator-min-microamp 	= < 220000>;
				regulator-max-microamp 	= <7040000>;
				regulator-boot-on;
			};

			BUCK2 {
				regulator-name = "buck2";
				regulator-min-microvolt = < 600000>;
				regulator-max-microvolt = <1393750>;
				regulator-min-microamp 	= <1496000>;
				regulator-max-microamp 	= <4189000>;
			};

			BUCK3 {
				regulator-name = "buck3";
				regulator-min-microvolt = <600000>;
				regulator-max-microvolt = <1393750>;
				regulator-min-microamp 	= <1496000>;
				regulator-max-microamp 	= <4189000>;
				regulator-boot-on;
			};

			LDO1 {
				regulator-name = "ldo1";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <4350000>;
				regulator-boot-on;
			};

			LDO2 {
				regulator-name = "ldo2";
				regulator-min-microvolt = < 650000>;
				regulator-max-microvolt = <2225000>;
				regulator-boot-on;
			};
		};
	};


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/pwm-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Bindings for the Generic PWM Regulator

maintainers:
  - Brian Norris <briannorris@chromium.org>
  - Lee Jones <lee@kernel.org>
  - Alexandre Courbot <acourbot@nvidia.com>

description: |
  Currently supports 2 modes of operation:

  Voltage Table:
    When in this mode, a voltage table (See below) of predefined voltage <=>
    duty-cycle values must be provided via DT. Limitations are that the
    regulator can only operate at the voltages supplied in the table.
    Intermediary duty-cycle values which would normally allow finer grained
    voltage selection are ignored and rendered useless.  Although more control
    is given to the user if the assumptions made in continuous-voltage mode do
    not reign true.

  Continuous Voltage:
    This mode uses the regulator's maximum and minimum supplied voltages
    specified in the regulator-{min,max}-microvolt properties to calculate
    appropriate duty-cycle values.  This allows for a much more fine grained
    solution when compared with voltage-table mode above.  This solution does
    make an assumption that a %50 duty-cycle value will cause the regulator
    voltage to run at half way between the supplied max_uV and min_uV values.

  If voltage-table is provided, then the device will be used in Voltage Table
  Mode.  If no voltage-table is provided, then the device will be used in
  Continuous Voltage Mode.

allOf:
  - $ref: regulator.yaml#

properties:
  compatible:
    const: pwm-regulator

  pwms:
    maxItems: 1

  voltage-table:
    description: Voltage and Duty-Cycle table.
    $ref: /schemas/types.yaml#/definitions/uint32-matrix
    items:
      items:
        - description: voltage in microvolts (uV)
        - description: duty-cycle in percent (%)

  enable-gpios:
    description: Regulator enable GPIO
    maxItems: 1

   # Optional properties for Continuous mode:
  pwm-dutycycle-unit:
    description:
      Integer value encoding the duty cycle unit. If not
        defined, <100> is assumed, meaning that
        pwm-dutycycle-range contains values expressed in
        percent.
    default: 100

  pwm-dutycycle-range:
    description:
      Should contain 2 entries. The first entry is encoding
        the dutycycle for regulator-min-microvolt and the
        second one the dutycycle for regulator-max-microvolt.
        Duty cycle values are expressed in pwm-dutycycle-unit.
        If not defined, <0 100> is assumed.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    items:
      - description: the dutycycle for regulator-min-microvolt
      - description: the dutycycle for regulator-max-microvolt
    default: [ 0 100 ]

required:
  - compatible
  - pwms

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>

    // Continuous Voltage With Enable GPIO Example:
    regulator {
        compatible = "pwm-regulator";
        pwms = <&pwm1 0 8448 0>;
        enable-gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
        regulator-min-microvolt = <1016000>;
        regulator-max-microvolt = <1114000>;
        regulator-name = "vdd_logic";
        /* unit == per-mille */
        pwm-dutycycle-unit = <1000>;
        /*
        * Inverted PWM logic, and the duty cycle range is limited
        * to 30%-70%.
        */
        pwm-dutycycle-range = <700 300>; /* */
    };

  - |
    // Voltage Table Example:
    regulator {
        compatible = "pwm-regulator";
        pwms = <&pwm1 0 8448 0>;
        regulator-min-microvolt = <1016000>;
        regulator-max-microvolt = <1114000>;
        regulator-name = "vdd_logic";

                /* Voltage Duty-Cycle */
        voltage-table = <1114000 0>,
            <1095000 10>,
            <1076000 20>,
            <1056000 30>,
            <1036000 40>,
            <1016000 50>;
    };
...


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/qcom,rpmh-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm Technologies, Inc. RPMh Regulators

maintainers:
  - Bjorn Andersson <bjorn.andersson@linaro.org>
  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

description: |
    rpmh-regulator devices support PMIC regulator management via the Voltage
    Regulator Manager (VRM) and Oscillator Buffer (XOB) RPMh accelerators.
    The APPS processor communicates with these hardware blocks via a
    Resource State Coordinator (RSC) using command packets.  The VRM allows
    changing three parameters for a given regulator, enable state, output
    voltage, and operating mode.  The XOB allows changing only a single
    parameter for a given regulator, its enable state.  Despite its name,
    the XOB is capable of controlling the enable state of any PMIC peripheral.
    It is used for clock buffers, low-voltage switches, and LDO/SMPS regulators
    which have a fixed voltage and mode.

    =======================
    Required Node Structure
    =======================

    RPMh regulators must be described in two levels of device nodes.  The first
    level describes the PMIC containing the regulators and must reside within an
    RPMh device node.  The second level describes each regulator within the PMIC
    which is to be used on the board.  Each of these regulators maps to a single
    RPMh resource.

    The names used for regulator nodes must match those supported by a given
    PMIC. Supported regulator node names are
      For PM6150, smps1 - smps5, ldo1 - ldo19
      For PM6150L, smps1 - smps8, ldo1 - ldo11, bob
      For PM6350, smps1 - smps5, ldo1 - ldo22
      For PM660, smps1 - smps6, ldo1 - ldo3, ldo5 - ldo19
      For PM660L, smps1 - smps3, smps5, ldo1 - ldo8, bob
      For PM7325, smps1 - smps8, ldo1 - ldo19
      For PM8005, smps1 - smps4
      For PM8009, smps1 - smps2, ldo1 - ldo7
      For PM8150, smps1 - smps10, ldo1 - ldo18
      For PM8150L, smps1 - smps8, ldo1 - ldo11, bob, flash, rgb
      For PM8350, smps1 - smps12, ldo1 - ldo10
      For PM8350C, smps1 - smps10, ldo1 - ldo13, bob
      For PM8450, smps1 - smps6, ldo1 - ldo4
      For PM8550, smps1 - smps6, ldo1 - ldo17, bob1 - bob2
      For PM8998, smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2
      For PMI8998, bob
      For PMR735A, smps1 - smps3, ldo1 - ldo7
      For PMX55, smps1 - smps7, ldo1 - ldo16
      For PMX65, smps1 - smps8, ldo1 - ldo21

properties:
  compatible:
    enum:
      - qcom,pm6150-rpmh-regulators
      - qcom,pm6150l-rpmh-regulators
      - qcom,pm6350-rpmh-regulators
      - qcom,pm660-rpmh-regulators
      - qcom,pm660l-rpmh-regulators
      - qcom,pm7325-rpmh-regulators
      - qcom,pm8005-rpmh-regulators
      - qcom,pm8009-rpmh-regulators
      - qcom,pm8009-1-rpmh-regulators
      - qcom,pm8150-rpmh-regulators
      - qcom,pm8150l-rpmh-regulators
      - qcom,pm8350-rpmh-regulators
      - qcom,pm8350c-rpmh-regulators
      - qcom,pm8450-rpmh-regulators
      - qcom,pm8550-rpmh-regulators
      - qcom,pm8550ve-rpmh-regulators
      - qcom,pm8550vs-rpmh-regulators
      - qcom,pm8998-rpmh-regulators
      - qcom,pmg1110-rpmh-regulators
      - qcom,pmi8998-rpmh-regulators
      - qcom,pmm8155au-rpmh-regulators
      - qcom,pmr735a-rpmh-regulators
      - qcom,pmx55-rpmh-regulators
      - qcom,pmx65-rpmh-regulators

  qcom,pmic-id:
    description: |
        RPMh resource name suffix used for the regulators found
        on this PMIC.
    $ref: /schemas/types.yaml#/definitions/string
    enum: [a, b, c, d, e, f, g, h, k]

  qcom,always-wait-for-ack:
    description: |
        Boolean flag which indicates that the application processor
        must wait for an ACK or a NACK from RPMh for every request
        sent for this regulator including those which are for a
        strictly lower power state.
    $ref: /schemas/types.yaml#/definitions/flag

  vdd-flash-supply:
    description: Input supply phandle of flash.

  vdd-rgb-supply:
    description: Input supply phandle of rgb.

  bob:
    type: object
    $ref: "regulator.yaml#"
    description: BOB regulator node.
    dependencies:
      regulator-allow-set-load: ["regulator-allowed-modes"]

patternProperties:
  "^(smps|ldo|lvs|bob)[0-9]+$":
    type: object
    $ref: "regulator.yaml#"
    description: smps/ldo regulator nodes(s).
    dependencies:
      regulator-allow-set-load: ["regulator-allowed-modes"]

required:
  - compatible
  - qcom,pmic-id

allOf:
  - if:
      properties:
        compatible:
          enum:
            - qcom,pm6150-rpmh-regulators
    then:
      properties:
        vdd-l2-l3-supply: true
        vdd-l4-l7-l8-supply: true
        vdd-l5-l16-l17-l18-l19-supply: true
        vdd-l10-l14-l15-supply: true
        vdd-l11-l12-l13-supply: true
      patternProperties:
        "^vdd-l[169]-supply$": true
        "^vdd-s[1-5]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm6150l-rpmh-regulators
    then:
      properties:
        vdd-bob-supply:
          description: BOB regulator parent supply phandle.
        vdd-l1-l8-supply: true
        vdd-l2-l3-supply: true
        vdd-l4-l5-l6-supply: true
        vdd-l7-l11-supply: true
        vdd-l9-l10-supply: true
      patternProperties:
        "^vdd-s[1-8]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm660-rpmh-regulators
    then:
      properties:
        vdd-l1-l6-l7-supply: true
        vdd-l2-l3-supply: true
        vdd-l5-supply: true
        vdd-l8-l9-l10-l11-l12-l13-l14-supply: true
        vdd-l15-l16-l17-l18-l19-supply: true
      patternProperties:
        "^vdd-s[1-6]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm660l-rpmh-regulators
    then:
      properties:
        vdd-bob-supply:
          description: BOB regulator parent supply phandle.
        vdd-l1-l9-l10-supply: true
        vdd-l2-supply: true
        vdd-l3-l5-l7-l8-supply: true
        vdd-l4-l6-supply: true
        vdd-s3-s4-supply: true
      patternProperties:
        "^vdd-s[125]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm7325-rpmh-regulators
    then:
      properties:
        vdd-l1-l4-l12-l15-supply: true
        vdd-l2-l7-supply: true
        vdd-l6-l9-l10-supply: true
        vdd-l11-l17-l18-l19-supply: true
        vdd-l13-supply: true
        vdd-l14-l16-supply: true
      patternProperties:
        "^vdd-l[358]-supply$": true
        "^vdd-s[1-8]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm8005-rpmh-regulators
    then:
      patternProperties:
        "^vdd-s[1-4]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm8009-rpmh-regulators
            - qcom,pm8009-1-rpmh-regulators
    then:
      properties:
        vdd-l5-l6-supply: true
      patternProperties:
        "^vdd-l[1-47]-supply$": true
        "^vdd-s[1-2]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm8150-rpmh-regulators
            - qcom,pmm8155au-rpmh-regulators
    then:
      properties:
        vdd-l1-l8-l11-supply: true
        vdd-l2-l10-supply: true
        vdd-l3-l4-l5-l18-supply: true
        vdd-l6-l9-supply: true
        vdd-l7-l12-l14-l15-supply: true
        vdd-l13-l16-l17-supply: true
      patternProperties:
        "^vdd-s([1-9]|10)-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm8150l-rpmh-regulators
    then:
      properties:
        vdd-bob-supply:
          description: BOB regulator parent supply phandle.
        vdd-l1-l8-supply: true
        vdd-l2-l3-supply: true
        vdd-l4-l5-l6-supply: true
        vdd-l7-l11-supply: true
        vdd-l9-l10-supply: true
      patternProperties:
        "^vdd-s[1-8]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm8350-rpmh-regulators
    then:
      properties:
        vdd-l1-l4-supply: true
        vdd-l2-l7-supply: true
        vdd-l3-l5-supply: true
        vdd-l6-l9-l10-supply: true
        vdd-l8-supply: true
      patternProperties:
        "^vdd-s([1-9]|1[0-2])-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm8350c-rpmh-regulators
    then:
      properties:
        vdd-bob-supply:
          description: BOB regulator parent supply phandle.
        vdd-l1-l12-supply: true
        vdd-l2-l8-supply: true
        vdd-l3-l4-l5-l7-l13-supply: true
        vdd-l6-l9-l11-supply: true
        vdd-l10-supply: true
      patternProperties:
        "^vdd-s([1-9]|10)-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm8450-rpmh-regulators
    then:
      patternProperties:
        "^vdd-l[1-4]-supply$": true
        "^vdd-s[1-6]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm8550-rpmh-regulators
            - qcom,pm8550ve-rpmh-regulators
            - qcom,pm8550vs-rpmh-regulators
    then:
      properties:
        vdd-l2-l13-l14-supply: true
        vdd-l5-l16-supply: true
        vdd-l6-l7-supply: true
        vdd-l8-l9-supply: true
      patternProperties:
        "^vdd-l([1-4]|1[0-7])-supply$": true
        "^vdd-s[1-6]-supply$": true
        "^vdd-bob[1-2]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm8998-rpmh-regulators
    then:
      properties:
        vdd-l1-l27-supply: true
        vdd-l2-l8-l17-supply: true
        vdd-l3-l11-supply: true
        vdd-l4-l5-supply: true
        vdd-l6-supply: true
        vdd-l7-l12-l14-l15-supply: true
        vdd-l9-supply: true
        vdd-l10-l23-l25-supply: true
        vdd-l13-l19-l21-supply: true
        vdd-l16-l28-supply: true
        vdd-l18-l22-supply: true
        vdd-l20-l24-supply: true
        vdd-l26-supply: true
        vin-lvs-1-2-supply: true
      patternProperties:
        "^vdd-s([1-9]|1[0-3])-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pmg1110-rpmh-regulators
    then:
      properties:
        vdd-s1-supply: true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pmi8998-rpmh-regulators
    then:
      properties:
        vdd-bob-supply:
          description: BOB regulator parent supply phandle.

  - if:
      properties:
        compatible:
          enum:
            - qcom,pmr735a-rpmh-regulators
    then:
      properties:
        vdd-l1-l2-supply: true
        vdd-l3-supply: true
        vdd-l4-supply: true
        vdd-l5-l6-supply: true
        vdd-l7-bob-supply: true
      patternProperties:
        "^vdd-s[1-3]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pmx55-rpmh-regulators
    then:
      properties:
        vdd-l1-l2-supply: true
        vdd-l3-l9-supply: true
        vdd-l4-l12-supply: true
        vdd-l5-l6-supply: true
        vdd-l7-l8-supply: true
        vdd-l10-l11-l13-supply: true
      patternProperties:
        "^vdd-l1[4-6]-supply$": true
        "^vdd-s[1-7]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pmx65-rpmh-regulators
    then:
      properties:
        vdd-l2-l18-supply: true
        vdd-l5-l6-l16-supply: true
        vdd-l8-l9-supply: true
        vdd-l11-l13-supply: true
      patternProperties:
        "^vdd-l[1347]-supply$": true
        "^vdd-l1[0245789]-supply$": true
        "^vdd-l2[01]-supply$": true
        "^vdd-s[1-8]-supply$": true

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/regulator/qcom,rpmh-regulator.h>

    pm8998-rpmh-regulators {
        compatible = "qcom,pm8998-rpmh-regulators";
        qcom,pmic-id = "a";

        vdd-l7-l12-l14-l15-supply = <&pm8998_s5>;

        smps2 {
            regulator-min-microvolt = <1100000>;
            regulator-max-microvolt = <1100000>;
        };

        ldo7 {
            regulator-min-microvolt = <1800000>;
            regulator-max-microvolt = <1800000>;
            regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
            regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
                                       RPMH_REGULATOR_MODE_HPM>;
            regulator-allow-set-load;
        };

        lvs1 {
            regulator-min-microvolt = <1800000>;
            regulator-max-microvolt = <1800000>;
        };
    };

    pmi8998-rpmh-regulators {
        compatible = "qcom,pmi8998-rpmh-regulators";
        qcom,pmic-id = "b";

        bob {
            regulator-min-microvolt = <3312000>;
            regulator-max-microvolt = <3600000>;
            regulator-allowed-modes = <RPMH_REGULATOR_MODE_AUTO
                                       RPMH_REGULATOR_MODE_HPM>;
            regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
        };
    };
...


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/qcom,smd-rpm-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: QCOM SMD RPM REGULATOR

description:
  The Qualcomm RPM over SMD regulator is modelled as a subdevice of the RPM.
  Because SMD is used as the communication transport mechanism, the RPM
  resides as a subnode of the SMD.  As such, the SMD-RPM regulator requires
  that the SMD and RPM nodes be present.

  Please refer to Documentation/devicetree/bindings/soc/qcom/qcom,smd.yaml for
  information pertaining to the SMD node.

  Please refer to Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml
  for information regarding the RPM node.

  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.

  For mp5496, s2

  For pm2250, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
  l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22

  For pm6125 s1, s2, s3, s4, s5, s6, s7, s8, l1, l2, l3, l5, l6, l7, l8, l9,
  l10, l22, l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24

  For pm660, s1, s2, s3, s4, s5, s6, l1, l2, l3, l5, l6, l7, l8, l9, l10, l22,
  l12, l13, l14, l15, l16, l17, l18, l19

  For pm660l s1, s2, s3, s5, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, bob

  For pm8226, s1, s2, s3, s4, s5, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10,
  l11, l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, l25,
  l26, l27, l28, lvs1

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

  For pm8909, s1, s2, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13,
  l14, l15, l17, l18

  For pm8916, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
  l12, l13, l14, l15, l16, l17, l18

  For pm8941, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
  l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, lvs1, lvs2,
  lvs3, 5vs1, 5vs2

  For pm8950 and pm8953, s1, s2, s3, s4, s5, s6, s7, l1, l2, l3, l4, l5, l6,
  l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22,
  l23

  For pm8994, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, l1, l2, l3,
  l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19,
  l20, l21, l22, l23, l24, l25, l26, l27, l28, l29, l30, l31, l32, lvs1, lvs2

  For pm8998, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, l1, l2,
  l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19,
  l20, l21, l22, l23, l24, l25, l26, l27, l28, lvs1, lvs2

  For pma8084, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, l1, l2, l3,
  l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19,
  l20, l21, l22, l23, l24, l25, l26, l27, lvs1, lvs2, lvs3, lvs4, 5vs1

  For pmi8994, s1, s2, s3, boost-bypass

  For pmi8998, bob

  For pmr735a, s1, s2, s3, l1, l2, l3, l4, l5, l6, l7

  For pms405, s1, s2, s3, s4, s5, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
  l12, l13

maintainers:
  - Andy Gross <agross@kernel.org>
  - Bjorn Andersson <bjorn.andersson@linaro.org>

properties:
  compatible:
    enum:
      - qcom,rpm-mp5496-regulators
      - qcom,rpm-pm2250-regulators
      - qcom,rpm-pm6125-regulators
      - qcom,rpm-pm660-regulators
      - qcom,rpm-pm660l-regulators
      - qcom,rpm-pm8226-regulators
      - qcom,rpm-pm8841-regulators
      - qcom,rpm-pm8909-regulators
      - qcom,rpm-pm8916-regulators
      - qcom,rpm-pm8941-regulators
      - qcom,rpm-pm8950-regulators
      - qcom,rpm-pm8953-regulators
      - qcom,rpm-pm8994-regulators
      - qcom,rpm-pm8998-regulators
      - qcom,rpm-pma8084-regulators
      - qcom,rpm-pmi8994-regulators
      - qcom,rpm-pmi8998-regulators
      - qcom,rpm-pmr735a-regulators
      - qcom,rpm-pms405-regulators

patternProperties:
  ".*-supply$":
    description: Input supply phandle(s) for this node

  "^((s|l|lvs|5vs)[0-9]*)|(boost-bypass)|(bob)$":
    description: List of regulators and its properties
    $ref: regulator.yaml#

additionalProperties: false

required:
  - compatible

examples:
  - |
    pm8941-regulators {
        compatible = "qcom,rpm-pm8941-regulators";
        vdd_l13_l20_l23_l24-supply = <&pm8941_boost>;

        pm8941_s3: s3 {
            regulator-min-microvolt = <1800000>;
            regulator-max-microvolt = <1800000>;
        };

        pm8941_boost: s4 {
            regulator-min-microvolt = <5000000>;
            regulator-max-microvolt = <5000000>;
        };

        pm8941_l20: l20 {
            regulator-min-microvolt = <2950000>;
            regulator-max-microvolt = <2950000>;
        };
    };
...


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/qcom,spmi-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm SPMI Regulators

maintainers:
  - Robert Marko <robimarko@gmail.com>

properties:
  compatible:
    enum:
      - qcom,pm6125-regulators
      - qcom,pm660-regulators
      - qcom,pm660l-regulators
      - qcom,pm8004-regulators
      - qcom,pm8005-regulators
      - qcom,pm8226-regulators
      - qcom,pm8841-regulators
      - qcom,pm8916-regulators
      - qcom,pm8941-regulators
      - qcom,pm8950-regulators
      - qcom,pm8994-regulators
      - qcom,pmi8994-regulators
      - qcom,pmp8074-regulators
      - qcom,pms405-regulators

  qcom,saw-reg:
    description: Reference to syscon node defining the SAW registers
    $ref: /schemas/types.yaml#/definitions/phandle

patternProperties:
  "^(5vs[1-2]|(l|s)[1-9][0-9]?|lvs[1-3])$":
    description: List of regulators and its properties
    type: object
    $ref: regulator.yaml#
    unevaluatedProperties: false

    properties:
      qcom,ocp-max-retries:
        description:
          Maximum number of times to try toggling a voltage switch off and
          back on as a result of consecutive over current events
        $ref: /schemas/types.yaml#/definitions/uint32

      qcom,ocp-retry-delay:
        description:
          Time to delay in milliseconds between each voltage switch toggle
          after an over current event takes place
        $ref: /schemas/types.yaml#/definitions/uint32

      qcom,pin-ctrl-enable:
        description:
          Bit mask specifying which hardware pins should be used to enable the
          regulator, if any.
          Supported bits are
          0 = ignore all hardware enable signals
          BIT(0) = follow HW0_EN signal
          BIT(1) = follow HW1_EN signal
          BIT(2) = follow HW2_EN signal
          BIT(3) = follow HW3_EN signal
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 0
        maximum: 15

      qcom,pin-ctrl-hpm:
        description:
          Bit mask specifying which hardware pins should be used to force the
          regulator into high power mode, if any.
          Supported bits are
          0 = ignore all hardware enable signals
          BIT(0) = follow HW0_EN signal
          BIT(1) = follow HW1_EN signal
          BIT(2) = follow HW2_EN signal
          BIT(3) = follow HW3_EN signal
          BIT(4) = follow PMIC awake state
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 0
        maximum: 31

      qcom,vs-soft-start-strength:
        description:
          This property sets the soft start strength for voltage switch type
          regulators.
          Supported values are
          0 = 0.05 uA
          1 = 0.25 uA
          2 = 0.55 uA
          3 = 0.75 uA
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 0
        maximum: 3

      qcom,saw-slave:
        description: SAW controlled gang slave. Will not be configured.
        type: boolean

      qcom,saw-leader:
        description:
          SAW controlled gang leader. Will be configured as SAW regulator.
        type: boolean

required:
  - compatible

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,pm6125-regulators
    then:
      properties:
        vdd_l1_l7_l17_l18-supply: true
        vdd_l2_l3_l4-supply: true
        vdd_l5_l15_l19_l20_l21_l22-supply: true
        vdd_l6_l8-supply: true
        vdd_l9_l11-supply: true
        vdd_l10_l13_l14-supply: true
        vdd_l12_l16-supply: true
        vdd_l23_l24-supply: true
      patternProperties:
        "^vdd_s[1-8]-supply$": true

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,pm660-regulators
    then:
      properties:
        vdd_l15_l16_l17_l18_l19-supply: true
        vdd_l1_l6_l7-supply: true
        vdd_l2_l3-supply: true
        vdd_l5-supply: true
        vdd_l8_l9_l10_l11_l12_l13_l14-supply: true
      patternProperties:
        "^vdd_s[1-6]-supply$": true

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,pm660l-regulators
    then:
      properties:
        vdd_l1_l9_l10-supply: true
        vdd_l2-supply: true
        vdd_l3_l5_l7_l8-supply: true
        vdd_l4_l6-supply: true
      patternProperties:
        "^vdd_s[1-5]-supply$": true

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,pm8004-regulators
    then:
      patternProperties:
        "^vdd_s[25]-supply$": true

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,pm8005-regulators
    then:
      patternProperties:
        "^vdd_s[1-4]-supply$": true

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,pm8226-regulators
    then:
      properties:
        vdd_l10_l11_l13-supply: true
        vdd_l12_l14-supply: true
        vdd_l15_l16_l17_l18-supply: true
        vdd_l19_l20_l21_l22_l23_l28-supply: true
        vdd_l1_l2_l4_l5-supply: true
        vdd_l25-supply: true
        vdd_l3_l24_l26-supply: true
        vdd_l6_l7_l8_l9_l27-supply: true
        vdd_lvs1-supply: true
      patternProperties:
        "^vdd_s[1-5]-supply$": true

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,pm8841-regulators
    then:
      patternProperties:
        "^vdd_s[1-8]-supply$": true

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,pm8916-regulators
    then:
      properties:
        vdd_l1_l3-supply: true
        vdd_l4_l5_l6-supply: true
        vdd_l8_l11_l14_l15_l16-supply: true
        vdd_l9_l10_l12_l13_l17_l18-supply: true
      patternProperties:
        "^vdd_l[27]-supply$": true
        "^vdd_s[1-4]-supply$": true

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,pm8941-regulators
    then:
      properties:
        interrupts:
          items:
            - description: Over-current protection interrupt for 5V S1
            - description: Over-current protection interrupt for 5V S2
        interrupt-names:
          items:
            - const: ocp-5vs1
            - const: ocp-5vs2
        vdd_l13_l20_l23_l24-supply: true
        vdd_l1_l3-supply: true
        vdd_l21-supply: true
        vdd_l2_lvs_1_2_3-supply: true
        vdd_l4_l11-supply: true
        vdd_l5_l7-supply: true
        vdd_l6_l12_l14_l15-supply: true
        vdd_l8_l16_l18_19-supply: true
        vdd_l9_l10_l17_l22-supply: true
        vin_5vs-supply: true
      patternProperties:
        "^vdd_s[1-3]-supply$": true

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,pm8950-regulators
    then:
      properties:
        vdd_l1_l19-supply: true
        vdd_l20-supply: true
        vdd_l21-supply: true
        vdd_l2_l23-supply: true
        vdd_l3-supply: true
        vdd_l4_l5_l6_l7_l16-supply: true
        vdd_l8_l11_l12_l17_l22-supply: true
        vdd_l9_l10_l13_l14_l15_l18-supply: true
      patternProperties:
        "^vdd_s[1-6]-supply$": true

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,pm8994-regulators
    then:
      properties:
        vdd_l1-supply: true
        vdd_l13_l19_l23_l24-supply: true
        vdd_l14_l15-supply: true
        vdd_l17_l29-supply: true
        vdd_l20_l21-supply: true
        vdd_l25-supply: true
        vdd_l2_l26_l28-supply: true
        vdd_l3_l11-supply: true
        vdd_l4_l27_l31-supply: true
        vdd_l5_l7-supply: true
        vdd_l6_l12_l32-supply: true
        vdd_l8_l16_l30-supply: true
        vdd_l9_l10_l18_l22-supply: true
        vdd_lvs_1_2-supply: true
      patternProperties:
        "^vdd_s[1-9][0-2]?-supply$": true

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,pmi8994-regulators
    then:
      properties:
        vdd_l1-supply: true
      patternProperties:
        "^vdd_s[1-3]-supply$": true

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,pmp8074-regulators
    then:
      properties:
        vdd_l10_l11_l12_l13-supply: true
        vdd_l1_l2-supply: true
        vdd_l3_l8-supply: true
        vdd_l5_l6_l15-supply: true
      patternProperties:
        "^vdd_l[479]-supply$": true
        "^vdd_s[1-5]-supply$": true

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,pms405-regulators
    then:
      properties:
        vdd_s3-supply: true

unevaluatedProperties: false

examples:
  - |
    regulators {
      compatible = "qcom,pm8941-regulators";
      vdd_l1_l3-supply = <&s1>;

      s1: s1 {
        regulator-min-microvolt = <1300000>;
        regulator-max-microvolt = <1400000>;
      };

      l1: l1 {
        regulator-min-microvolt = <1225000>;
        regulator-max-microvolt = <1300000>;
      };
    };
...


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/qcom,usb-vbus-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: The Qualcomm PMIC VBUS output regulator driver

maintainers:
  - Wesley Cheng <quic_wcheng@quicinc.com>

description: |
  This regulator driver controls the VBUS output by the Qualcomm PMIC.  This
  regulator will be enabled in situations where the device is required to
  provide power to the connected peripheral.

properties:
  compatible:
    enum:
      - qcom,pm8150b-vbus-reg

  reg:
    maxItems: 1
    description: VBUS output base address

required:
  - compatible

additionalProperties: false

examples:
  - |
     pm8150b {
        #address-cells = <1>;
        #size-cells = <0>;
        pm8150b_vbus: dcdc@1100 {
            compatible = "qcom,pm8150b-vbus-reg";
            reg = <0x1100>;
        };
     };
...


code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/qcom-labibb-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm's LAB(LCD AMOLED Boost)/IBB(Inverting Buck Boost) Regulator

maintainers:
  - Sumit Semwal <sumit.semwal@linaro.org>

description:
  LAB can be used as a positive boost power supply and IBB can be used as a
  negative boost power supply for display panels. Currently implemented for
  pmi8998.

properties:
  compatible:
    const: qcom,pmi8998-lab-ibb

  lab:
    type: object
    additionalProperties: false

    properties:
      qcom,soft-start-us:
        description: Regulator soft start time in microseconds.
        enum: [200, 400, 600, 800]
        default: 200

      interrupts:
        minItems: 1
        maxItems: 2
        description:
          Short-circuit and over-current interrupts for lab.

      interrupt-names:
        minItems: 1
        items:
          - const: sc-err
          - const: ocp

    required:
      - interrupts
      - interrupt-names

  ibb:
    type: object
    additionalProperties: false

    properties:
      qcom,discharge-resistor-kohms:
        $ref: /schemas/types.yaml#/definitions/uint32
        description: Discharge resistor value in KiloOhms.
        enum: [300, 64, 32, 16]
        default: 300

      interrupts:
        minItems: 1
        maxItems: 2
        description:
          Short-circuit and over-current interrupts for ibb.

      interrupt-names:
        minItems: 1
        items:
          - const: sc-err
          - const: ocp

    required:
      - interrupts
      - interrupt-names

required:
  - compatible

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>

    labibb {
      compatible = "qcom,pmi8998-lab-ibb";

      lab {
        interrupts = <0x3 0xde 0x1 IRQ_TYPE_EDGE_RISING>,
                     <0x3 0xde 0x0 IRQ_TYPE_LEVEL_LOW>;
        interrupt-names = "sc-err", "ocp";
      };

      ibb {
        interrupts = <0x3 0xdc 0x2 IRQ_TYPE_EDGE_RISING>,
                     <0x3 0xdc 0x0 IRQ_TYPE_LEVEL_LOW>;
        interrupt-names = "sc-err", "ocp";
      };
    };

...


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/raspberrypi,7inch-touchscreen-panel-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: RaspberryPi 7" display ATTINY88-based regulator/backlight controller

maintainers:
  - Marek Vasut <marex@denx.de>

description: |
  The RaspberryPi 7" display has an ATTINY88-based regulator/backlight
  controller on the PCB, which is used to turn the display unit on/off
  and control the backlight.

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

properties:
  compatible:
    const: raspberrypi,7inch-touchscreen-panel-regulator

  reg:
    maxItems: 1

additionalProperties: false

required:
  - compatible
  - reg

examples:
  - |
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      regulator@45 {
        compatible = "raspberrypi,7inch-touchscreen-panel-regulator";
        reg = <0x45>;
      };
    };

...


code:
Regulator DT binding for MAX77620 Power management IC from Maxim Semiconductor.

Device has multiple DCDC(sd[0-3] and LDOs(ldo[0-8]). The input supply
of these regulators are defined under parent device node.
Details of regulator properties are defined as child node under
sub-node "regulators" which is child node of device node.

Please refer file <Documentation/devicetree/bindings/regulator/regulator.txt>
for common regulator bindings used by client.

Following are properties of parent node related to regulators.

Optional properties:
-------------------
The input supply of regulators are the optional properties on the
parent device node. The input supply of these regulators are provided
through following properties:
in-sd0-supply:		Input supply for SD0, INA-SD0 or INB-SD0 pins.
in-sd1-supply:		Input supply for SD1.
in-sd2-supply:		Input supply for SD2.
in-sd3-supply:		Input supply for SD3.
in-ldo0-1-supply:	Input supply for LDO0 and LDO1.
in-ldo2-supply:		Input supply for LDO2.
in-ldo3-5-supply:	Input supply for LDO3 and LDO5
in-ldo4-6-supply:	Input supply for LDO4 and LDO6.
in-ldo7-8-supply:	Input supply for LDO7 and LDO8.

Optional sub nodes for regulators under "regulators" subnode:
------------------------------------------------------------
The subnodes name is the name of regulator and it must be one of:
	sd[0-3], ldo[0-8]

Each sub-node should contain the constraints and initialization
information for that regulator. The definition for each of these
nodes is defined using the standard binding for regulators found at
<Documentation/devicetree/bindings/regulator/regulator.txt>.

Theres are also additional properties for SD/LDOs. These additional properties
are required to configure FPS configuration parameters for SDs and LDOs.
Please refer <devicetree/bindings/mfd/max77620.txt> for more detail of Flexible
Power Sequence (FPS).
Following are additional properties:

- maxim,active-fps-source:		FPS source for the regulators to get
					enabled/disabled when system is in
					active state.  Valid values are:
					- MAX77620_FPS_SRC_0,
						FPS source is FPS0.
					- MAX77620_FPS_SRC_1,
						FPS source is FPS1
					- MAX77620_FPS_SRC_2 and
						FPS source is FPS2
					- MAX77620_FPS_SRC_NONE.
						Regulator is not controlled
						by FPS events and it gets
						enabled/disabled by register
						access.
					Absence of this property will leave
					the FPS configuration register for that
					regulator to default configuration.

- maxim,active-fps-power-up-slot:	Sequencing event slot number on which
					the regulator get enabled when
					master FPS input event set to HIGH.
					Valid values are 0 to 7.
					This is applicable if FPS source is
					selected as FPS0, FPS1 or FPS2.

- maxim,active-fps-power-down-slot:	Sequencing event slot number on which
					the regulator get disabled when master
					FPS input event set to LOW.
					Valid values are 0 to 7.
					This is applicable if FPS source is
					selected as FPS0, FPS1 or FPS2.

- maxim,suspend-fps-source:		This is same as property
					"maxim,active-fps-source" but value
					get configured when system enters in
					to suspend state.

- maxim,suspend-fps-power-up-slot:	This is same as property
					"maxim,active-fps-power-up-slot" but
					this value get configured into FPS
					configuration register when system
					enters into suspend.
					This is applicable if suspend state
					FPS source is selected as FPS0, FPS1 or

- maxim,suspend-fps-power-down-slot:	This is same as property
					"maxim,active-fps-power-down-slot" but
					this value get configured into FPS
					configuration register when system
					enters into suspend.
					This is applicable if suspend state
					FPS source is selected as FPS0, FPS1 or
					FPS2.
- maxim,ramp-rate-setting:		integer, ramp rate(uV/us) setting to be
					configured to the device.
					The platform may have different ramp
					rate than advertised ramp rate if it has
					design variation from Maxim's
					recommended. On this case, platform
					specific ramp rate is used for ramp time
					calculation and this property is used
					for device register configurations.
					The measured ramp rate of platform is
					provided by the regulator-ramp-delay
					as described in <devicetree/bindings/
					regulator/regulator.txt>.
					Maxim Max77620 supports following ramp
					delay:
					  SD: 13.75mV/us, 27.5mV/us, 55mV/us
					  LDOs: 5mV/us, 100mV/us

Note: If the measured ramp delay is same as advertised ramp delay then it is not
required to provide the ramp delay with property "maxim,ramp-rate-setting". The
ramp rate can be provided by the regulator-ramp-delay which will be used for
ramp time calculation for voltage change as well as for device configuration.

Example:
--------
#include <dt-bindings/mfd/max77620.h>
...
max77620@3c {
	in-ldo0-1-supply = <&max77620_sd2>;
	in-ldo7-8-supply = <&max77620_sd2>;
	regulators {
		sd0 {
			regulator-name = "vdd-core";
			regulator-min-microvolt = <600000>;
			regulator-max-microvolt = <1400000>;
			regulator-boot-on;
			regulator-always-on;
			maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
		};

		sd1 {
			regulator-name = "vddio-ddr";
			regulator-min-microvolt = <1200000>;
			regulator-max-microvolt = <1200000>;
			regulator-always-on;
			regulator-boot-on;
			maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
		};

		sd2 {
			regulator-name = "vdd-pre-reg";
			regulator-min-microvolt = <1350000>;
			regulator-max-microvolt = <1350000>;
		};

		sd3 {
			regulator-name = "vdd-1v8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
			regulator-always-on;
			regulator-boot-on;
		};

		ldo0 {
			regulator-name = "avdd-sys";
			regulator-min-microvolt = <1200000>;
			regulator-max-microvolt = <1200000>;
			regulator-always-on;
			regulator-boot-on;
		};

		ldo1 {
			regulator-name = "vdd-pex";
			regulator-min-microvolt = <1050000>;
			regulator-max-microvolt = <1050000>;
		};

		ldo2 {
			regulator-name = "vddio-sdmmc3";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <3300000>;
		};

		ldo3 {
			regulator-name = "vdd-cam-hv";
			regulator-min-microvolt = <2800000>;
			regulator-max-microvolt = <2800000>;
		};

		ldo4 {
			regulator-name = "vdd-rtc";
			regulator-min-microvolt = <1250000>;
			regulator-max-microvolt = <1250000>;
			regulator-always-on;
			regulator-boot-on;
		};

		ldo5 {
			regulator-name = "avdd-ts-hv";
			regulator-min-microvolt = <3000000>;
			regulator-max-microvolt = <3000000>;
		};

		ldo6 {
			regulator-name = "vdd-ts";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
			regulator-always-on;
			regulator-boot-on;
		};

		ldo7 {
			regulator-name = "vdd-gen-pll-edp";
			regulator-min-microvolt = <1050000>;
			regulator-max-microvolt = <1050000>;
			regulator-always-on;
			regulator-boot-on;
		};

		ldo8 {
			regulator-name = "vdd-hdmi-dp";
			regulator-min-microvolt = <1050000>;
			regulator-max-microvolt = <1050000>;
		};
	};
};


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---

$id: http://devicetree.org/schemas/regulator/regulator-output.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Regulator output connector

maintainers:
  - Zev Weiss <zev@bewilderbeest.net>

description: |
  This describes a power output connector supplied by a regulator,
  such as a power outlet on a power distribution unit (PDU).  The
  connector may be standalone or merely one channel or set of pins
  within a ganged physical connector carrying multiple independent
  power outputs.

properties:
  compatible:
    const: regulator-output

  vout-supply:
    description:
      Phandle of the regulator supplying the output.

required:
  - compatible
  - vout-supply

additionalProperties: false

examples:
  - |
      output {
          compatible = "regulator-output";
          vout-supply = <&output_reg>;
      };


code: This file has moved to regulator.yaml.


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Voltage/Current Regulators

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

properties:
  regulator-name:
    description: A string used as a descriptive name for regulator outputs
    $ref: "/schemas/types.yaml#/definitions/string"

  regulator-min-microvolt:
    description: smallest voltage consumers may set

  regulator-max-microvolt:
    description: largest voltage consumers may set

  regulator-microvolt-offset:
    description: Offset applied to voltages to compensate for voltage drops
    $ref: "/schemas/types.yaml#/definitions/uint32"

  regulator-min-microamp:
    description: smallest current consumers may set

  regulator-max-microamp:
    description: largest current consumers may set

  regulator-input-current-limit-microamp:
    description: maximum input current regulator allows

  regulator-always-on:
    description: boolean, regulator should never be disabled
    type: boolean

  regulator-boot-on:
    description: bootloader/firmware enabled regulator.
      It's expected that this regulator was left on by the bootloader.
      If the bootloader didn't leave it on then OS should turn it on
      at boot but shouldn't prevent it from being turned off later.
      This property is intended to only be used for regulators where
      software cannot read the state of the regulator.
    type: boolean

  regulator-allow-bypass:
    description: allow the regulator to go into bypass mode
    type: boolean

  regulator-allow-set-load:
    description: allow the regulator performance level to be configured
    type: boolean

  regulator-ramp-delay:
    description: ramp delay for regulator(in uV/us) For hardware which supports
      disabling ramp rate, it should be explicitly initialised to zero (regulator-ramp-delay
      = <0>) for disabling ramp delay.
    $ref: "/schemas/types.yaml#/definitions/uint32"

  regulator-enable-ramp-delay:
    description: The time taken, in microseconds, for the supply rail to
      reach the target voltage, plus/minus whatever tolerance the board
      design requires. This property describes the total system ramp time
      required due to the combination of internal ramping of the regulator
      itself, and board design issues such as trace capacitance and load
      on the supply.
    $ref: "/schemas/types.yaml#/definitions/uint32"

  regulator-settling-time-us:
    description: Settling time, in microseconds, for voltage change if regulator
      have the constant time for any level voltage change. This is useful
      when regulator have exponential voltage change.

  regulator-settling-time-up-us:
    description: Settling time, in microseconds, for voltage increase if
      the regulator needs a constant time to settle after voltage increases
      of any level. This is useful for regulators with exponential voltage
      changes.

  regulator-settling-time-down-us:
    description: Settling time, in microseconds, for voltage decrease if
      the regulator needs a constant time to settle after voltage decreases
      of any level. This is useful for regulators with exponential voltage
      changes.

  regulator-soft-start:
    description: Enable soft start so that voltage ramps slowly
    type: boolean

  regulator-initial-mode:
    description: initial operating mode. The set of possible operating modes
      depends on the capabilities of every hardware so each device binding
      documentation explains which values the regulator supports.
    $ref: "/schemas/types.yaml#/definitions/uint32"

  regulator-allowed-modes:
    description: list of operating modes that software is allowed to configure
      for the regulator at run-time.  Elements may be specified in any order.
      The set of possible operating modes depends on the capabilities of
      every hardware so each device binding document explains which values
      the regulator supports.
    $ref: "/schemas/types.yaml#/definitions/uint32-array"

  regulator-system-load:
    description: Load in uA present on regulator that is not captured by
      any consumer request.
    $ref: "/schemas/types.yaml#/definitions/uint32"

  regulator-pull-down:
    description: Enable pull down resistor when the regulator is disabled.
    type: boolean

  regulator-over-current-protection:
    description: Enable over current protection.
    type: boolean

  regulator-oc-protection-microamp:
    description: Set over current protection limit. This is a limit where
      hardware performs emergency shutdown. Zero can be passed to disable
      protection and value '1' indicates that protection should be enabled but
      limit setting can be omitted.

  regulator-oc-error-microamp:
    description: Set over current error limit. This is a limit where part of
      the hardware propably is malfunctional and damage prevention is requested.
      Zero can be passed to disable error detection and value '1' indicates
      that detection should be enabled but limit setting can be omitted.

  regulator-oc-warn-microamp:
    description: Set over current warning limit. This is a limit where hardware
      is assumed still to be functional but approaching limit where it gets
      damaged. Recovery actions should be initiated. Zero can be passed to
      disable detection and value '1' indicates that detection should
      be enabled but limit setting can be omitted.

  regulator-ov-protection-microvolt:
    description: Set over voltage protection limit. This is a limit where
      hardware performs emergency shutdown. Zero can be passed to disable
      protection and value '1' indicates that protection should be enabled but
      limit setting can be omitted. Limit is given as microvolt offset from
      voltage set to regulator.

  regulator-ov-error-microvolt:
    description: Set over voltage error limit. This is a limit where part of
      the hardware propably is malfunctional and damage prevention is requested
      Zero can be passed to disable error detection and value '1' indicates
      that detection should be enabled but limit setting can be omitted. Limit
      is given as microvolt offset from voltage set to regulator.

  regulator-ov-warn-microvolt:
    description: Set over voltage warning limit. This is a limit where hardware
      is assumed still to be functional but approaching limit where it gets
      damaged. Recovery actions should be initiated. Zero can be passed to
      disable detection and value '1' indicates that detection should
      be enabled but limit setting can be omitted. Limit is given as microvolt
      offset from voltage set to regulator.

  regulator-uv-protection-microvolt:
    description: Set over under voltage protection limit. This is a limit where
      hardware performs emergency shutdown. Zero can be passed to disable
      protection and value '1' indicates that protection should be enabled but
      limit setting can be omitted. Limit is given as microvolt offset from
      voltage set to regulator.

  regulator-uv-error-microvolt:
    description: Set under voltage error limit. This is a limit where part of
      the hardware propably is malfunctional and damage prevention is requested
      Zero can be passed to disable error detection and value '1' indicates
      that detection should be enabled but limit setting can be omitted. Limit
      is given as microvolt offset from voltage set to regulator.

  regulator-uv-warn-microvolt:
    description: Set over under voltage warning limit. This is a limit where
      hardware is assumed still to be functional but approaching limit where
      it gets damaged. Recovery actions should be initiated. Zero can be passed
      to disable detection and value '1' indicates that detection should
      be enabled but limit setting can be omitted. Limit is given as microvolt
      offset from voltage set to regulator.

  regulator-temp-protection-kelvin:
    description: Set over temperature protection limit. This is a limit where
      hardware performs emergency shutdown. Zero can be passed to disable
      protection and value '1' indicates that protection should be enabled but
      limit setting can be omitted.

  regulator-temp-error-kelvin:
    description: Set over temperature error limit. This is a limit where part of
      the hardware propably is malfunctional and damage prevention is requested
      Zero can be passed to disable error detection and value '1' indicates
      that detection should be enabled but limit setting can be omitted.

  regulator-temp-warn-kelvin:
    description: Set over temperature warning limit. This is a limit where
      hardware is assumed still to be functional but approaching limit where it
      gets damaged. Recovery actions should be initiated. Zero can be passed to
      disable detection and value '1' indicates that detection should
      be enabled but limit setting can be omitted.

  regulator-active-discharge:
    description: |
      tristate, enable/disable active discharge of regulators. The values are:
      0: Disable active discharge.
      1: Enable active discharge.
      Absence of this property will leave configuration to default.
    $ref: "/schemas/types.yaml#/definitions/uint32"
    enum: [0, 1]

  regulator-coupled-with:
    description: Regulators with which the regulator is coupled. The linkage
      is 2-way - all coupled regulators should be linked with each other.
      A regulator should not be coupled with its supplier.
    $ref: "/schemas/types.yaml#/definitions/phandle-array"
    items:
      maxItems: 1

  regulator-coupled-max-spread:
    description: Array of maximum spread between voltages of coupled regulators
      in microvolts, each value in the array relates to the corresponding
      couple specified by the regulator-coupled-with property.
    $ref: "/schemas/types.yaml#/definitions/uint32-array"

  regulator-max-step-microvolt:
    description: Maximum difference between current and target voltages
      that can be changed safely in a single step.

patternProperties:
  ".*-supply$":
    description: Input supply phandle(s) for this node

  "^regulator-state-(standby|mem|disk)$":
    type: object
    description:
      sub-nodes for regulator state in Standby, Suspend-to-RAM, and
      Suspend-to-DISK modes. Equivalent with standby, mem, and disk Linux
      sleep states.

    properties:
      regulator-on-in-suspend:
        description: regulator should be on in suspend state.
        type: boolean

      regulator-off-in-suspend:
        description: regulator should be off in suspend state.
        type: boolean

      regulator-suspend-min-microvolt:
        description: minimum voltage may be set in suspend state.

      regulator-suspend-max-microvolt:
        description: maximum voltage may be set in suspend state.

      regulator-suspend-microvolt:
        description: the default voltage which regulator would be set in
          suspend. This property is now deprecated, instead setting voltage
          for suspend mode via the API which regulator driver provides is
          recommended.

      regulator-changeable-in-suspend:
        description: whether the default voltage and the regulator on/off
          in suspend can be changed in runtime.
        type: boolean

      regulator-mode:
        description: operating mode in the given suspend state. The set
          of possible operating modes depends on the capabilities of every
          hardware so the valid modes are documented on each regulator device
          tree binding document.
        $ref: "/schemas/types.yaml#/definitions/uint32"

    additionalProperties: false

additionalProperties: true

examples:
  - |
    xyzreg: regulator {
      regulator-min-microvolt = <1000000>;
      regulator-max-microvolt = <2500000>;
      regulator-always-on;
      vin-supply = <&vin>;

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

...


code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/richtek,rt4801-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Richtek RT4801 Display Bias regulators

maintainers:
  - ChiYuan Huang <cy_huang@richtek.com>

description: |
  Regulator nodes should be named to DSVP and DSVN. The
  definition for each of these nodes is defined using the standard
  binding for regulators at
  Documentation/devicetree/bindings/regulator/regulator.txt.
  Datasheet is available at
  https://www.richtek.com/assets/product_file/RT4801H/DS4801H-00.pdf

properties:
  compatible:
    enum:
      - richtek,rt4801

  reg:
    maxItems: 1

  enable-gpios:
    description: GPIOs to use to enable DSVP/DSVN regulator.
      The first one is ENP to enable DSVP, and second one is ENM to enable DSVN.
      Number of GPIO in the array list could be 1 or 2.
      If only one gpio is specified, only one gpio used to control ENP/ENM.
      Else if both are specified, DSVP/DSVN could be controlled individually.
      If this property not specified, treat both as always-on regulators.

      Property is deprecated. Use enable-gpios in each regulator.
    minItems: 1
    maxItems: 2
    deprecated: true

patternProperties:
  "^DSV(P|N)$":
    type: object
    $ref: regulator.yaml#
    unevaluatedProperties: false
    description:
      Properties for single display bias regulator.

    properties:
      enable-gpios:
        description:
          GPIO to use to enable DSVP/DSVN regulator. One GPIO can be configured
          for controlling both regulators.  If this property not specified for
          any regulator, treat both as always-on regulators.
        maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

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

        rt4801@73 {
            compatible = "richtek,rt4801";
            reg = <0x73>;

            dsvp: DSVP {
                regulator-name = "rt4801,dsvp";
                regulator-min-microvolt = <4000000>;
                regulator-max-microvolt = <6000000>;
                regulator-boot-on;
                enable-gpios = <&gpio26 2 0>;
            };
            dsvn: DSVN {
                regulator-name = "rt4801,dsvn";
                regulator-min-microvolt = <4000000>;
                regulator-max-microvolt = <6000000>;
                regulator-boot-on;
                enable-gpios = <&gpio26 3 0>;
            };

        };
    };


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/richtek,rt4831-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Richtek RT4831 Display Bias Voltage Regulator

maintainers:
  - ChiYuan Huang <cy_huang@richtek.com>

description: |
  RT4831 is a multifunctional device that can provide power to the LCD display
  and LCD backlight.

  For Display Bias Voltage DSVP and DSVN, the output range is about 4V to 6.5V.
  It is sufficient to meet the current LCD power requirement.

  DSVLCM is a boost regulator in IC internal as DSVP and DSVN input power.
  Its voltage should be configured above 0.15V to 0.2V gap larger than the
  voltage needed for DSVP and DSVN. Too much voltage gap could improve the
  voltage drop from the heavy loading scenario. But it also make the power
  efficiency worse. It's a trade-off.

  Datasheet is available at
  https://www.richtek.com/assets/product_file/RT4831A/DS4831A-05.pdf

patternProperties:
  "^DSV(LCM|P|N)$":
    type: object
    $ref: regulator.yaml#
    description:
      Properties for single Display Bias Voltage regulator.

additionalProperties: false


code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/richtek,rt5190a-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Richtek RT5190A PMIC Regulator

maintainers:
  - ChiYuan Huang <cy_huang@richtek.com>

description: |
  The RT5190A integrates 1 channel buck controller, 3 channels high efficiency
  synchronous buck converters, 1 LDO, I2C control interface and peripherial
  logical control.

  It also supports mute AC OFF depop sound and quick setting storage while
  input power is removed.

properties:
  compatible:
    enum:
      - richtek,rt5190a

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  vin2-supply:
    description: phandle to buck2 input voltage.

  vin3-supply:
    description: phandle to buck3 input voltage.

  vin4-supply:
    description: phandle to buck4 input voltage.

  vinldo-supply:
    description: phandle to ldo input voltage

  richtek,mute-enable:
    description: |
      The mute function uses 'mutein', 'muteout', and 'vdet' pins as the control
      signal. When enabled, The normal behavior is to bypass the 'mutein' signal
      'muteout'. But if the power source removal is detected from 'vdet',
      whatever the 'mutein' signal is, it will pull down the 'muteout' to force
      speakers mute. this function is commonly used to prevent the speaker pop
      noise during AC power turned off in the modern TV system design.
    type: boolean

  regulators:
    type: object

    patternProperties:
      "^buck[1-4]$|^ldo$":
        type: object
        $ref: regulator.yaml#
        description: |
          regulator description for buck1 to buck4, and ldo.

        properties:
          regulator-allowed-modes:
            description: |
             buck operating mode, only buck1/4 support mode operating.
              0: auto mode
              1: force pwm mode
            items:
              enum: [0, 1]

          richtek,latchup-enable:
            type: boolean
            description: |
              If specified, undervolt protection mode changes from the default
              hiccup to latchup.

        unevaluatedProperties: false

    additionalProperties: false

required:
  - compatible
  - reg
  - regulators

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/regulator/richtek,rt5190a-regulator.h>

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

      pmic@64 {
        compatible = "richtek,rt5190a";
        reg = <0x64>;
        interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;
        vin2-supply = <&rt5190_buck1>;
        vin3-supply = <&rt5190_buck1>;
        vin4-supply = <&rt5190_buck1>;

        regulators {
          rt5190_buck1: buck1 {
            regulator-name = "rt5190a-buck1";
            regulator-min-microvolt = <5090000>;
            regulator-max-microvolt = <5090000>;
            regulator-allowed-modes = <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
            regulator-boot-on;
          };
          buck2 {
            regulator-name = "rt5190a-buck2";
            regulator-min-microvolt = <600000>;
            regulator-max-microvolt = <1400000>;
            regulator-boot-on;
          };
          buck3 {
            regulator-name = "rt5190a-buck3";
            regulator-min-microvolt = <600000>;
            regulator-max-microvolt = <1400000>;
            regulator-boot-on;
          };
          buck4 {
            regulator-name = "rt5190a-buck4";
            regulator-min-microvolt = <850000>;
            regulator-max-microvolt = <850000>;
            regulator-allowed-modes = <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
            regulator-boot-on;
          };
          ldo {
            regulator-name = "rt5190a-ldo";
            regulator-min-microvolt = <1200000>;
            regulator-max-microvolt = <1200000>;
            regulator-boot-on;
          };
        };
      };
    };


code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/richtek,rt5759-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Richtek RT5759 High Performance DCDC Converter

maintainers:
  - ChiYuan Huang <cy_huang@richtek.com>

description: |
  The RT5759 is a high-performance, synchronous step-down DC-DC converter that
  can deliver up to 9A output current from 3V to 6.5V input supply, The output
  voltage can be programmable with I2C controlled 7-Bit VID.

  Datasheet is available at
  https://www.richtek.com/assets/product_file/RT5759/DS5759-00.pdf

properties:
  compatible:
    enum:
      - richtek,rt5759
      - richtek,rt5759a

  reg:
    maxItems: 1

  regulator-allowed-modes:
    description: |
      buck allowed operating mode
        0: auto mode (PSKIP: pulse skipping)
        1: force pwm mode
    items:
      enum: [0, 1]

  richtek,watchdog-enable:
    description: enable the external watchdog reset pin listening
    type: boolean

allOf:
  - $ref: regulator.yaml#

  - if:
      properties:
        compatible:
          contains:
            const: richtek,rt5759
    then:
      properties:
        richtek,watchdog-enable: false

required:
  - compatible
  - reg

unevaluatedProperties: false

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

      regulator@62 {
        compatible = "richtek,rt5759";
        reg = <0x62>;
        regulator-name = "rt5759-buck";
        regulator-min-microvolt = <600000>;
        regulator-max-microvolt = <1500000>;
        regulator-boot-on;
      };
    };
  # example 2 for RT5759A
  - |
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      regulator@62 {
        compatible = "richtek,rt5759a";
        reg = <0x62>;
        regulator-name = "rt5759a-buck";
        regulator-min-microvolt = <600000>;
        regulator-max-microvolt = <1725000>;
        regulator-boot-on;
        richtek,watchdog-enable;
      };
    };


code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/richtek,rt6160-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Richtek RT6160 BuckBoost converter

maintainers:
  - ChiYuan Huang <cy_huang@richtek.com>

description: |
  The RT6160 is a high-efficiency buck-boost converter that can provide
  up to 3A output current from 2025mV to 5200mV. And it support the wide
  input voltage range from 2200mV to 5500mV.

  Datasheet is available at
  https://www.richtek.com/assets/product_file/RT6160A/DS6160A-00.pdf

allOf:
  - $ref: regulator.yaml#

properties:
  compatible:
    enum:
      - richtek,rt6160

  reg:
    maxItems: 1

  enable-gpios:
    description: A connection of the 'enable' gpio line.
    maxItems: 1

  richtek,vsel-active-low:
    description: |
      Used to indicate the 'vsel' pin active level. if not specified, use
      high active level as the default.
    type: boolean

required:
  - compatible
  - reg

unevaluatedProperties: false

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

      rt6160@75 {
        compatible = "richtek,rt6160";
        reg = <0x75>;
        enable-gpios = <&gpio26 2 0>;
        regulator-name = "rt6160-buckboost";
        regulator-min-microvolt = <2025000>;
        regulator-max-microvolt = <5200000>;
      };
    };


code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/richtek,rt6190.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Richtek RT6190 4-Switch BuckBoost controller

maintainers:
  - ChiYuan Huang <cy_huang@richtek.com>

description: |
  The RT6190 is 4-Switch BuckBoost controller designed for converting input
  voltage to output voltage that can be equal to, higher or lower than input
  voltage. It operates with wide input voltage range from 4.5V to 36V, and
  the output voltage can be set from 3V to 36V by external FB pin. It's commonly
  used for the application like as BuckBoost bus supply, docking station and USB
  power delivery product.

  Datasheet is available at
  https://www.richtek.com/assets/product_file/RT6190/DS6190-02.pdf

allOf:
  - $ref: regulator.yaml#

properties:
  compatible:
    enum:
      - richtek,rt6190

  reg:
    maxItems: 1

  enable-gpios:
    maxItems: 1

  wakeup-source: true

  interrupts:
    maxItems: 1

  regulator-allowed-modes:
    description: |
      buck allowed operating mode
        0: PSM mode (light load Power Saving Mode)
        1: FCCM mode (Forced-CCM mode)
    maxItems: 2
    items:
      enum: [0, 1]

required:
  - compatible
  - reg

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>

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

      regulator@2c {
        compatible = "richtek,rt6190";
        reg = <0x2c>;
        wakeup-source;
        interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;
        enable-gpios = <&gpio26 1 GPIO_ACTIVE_HIGH>;
        regulator-name = "richtek,rt6190-buckboost";
        regulator-min-microvolt = <3000000>;
        regulator-max-microvolt = <32000000>;
        regulator-min-microamp = <306000>;
        regulator-max-microamp = <12114000>;
        regulator-allowed-modes = <0 1>;
      };
    };


code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/richtek,rt6245-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Richtek RT6245 High Current Voltage Regulator

maintainers:
  - ChiYuan Huang <cy_huang@richtek.com>

description: |
  The RT6245 is a high-performance, synchronous step-down converter
  that can deliver up to 14A output current with an input supply
  voltage range of 4.5V to 17V.

allOf:
  - $ref: regulator.yaml#

properties:
  compatible:
    enum:
      - richtek,rt6245

  reg:
    maxItems: 1

  enable-gpios:
    description: |
      A connection of the chip 'enable' gpio line. If not provided,
      it will be treat as a default-on power.
    maxItems: 1

  richtek,oc-level-select:
    $ref: "/schemas/types.yaml#/definitions/uint8"
    enum: [0, 1, 2, 3]
    description: |
      Over current level selection. Each respective value means the current
      limit 8A, 14A, 12A, 10A. If this property is missing then keep in
      in chip default.

  richtek,ot-level-select:
    $ref: "/schemas/types.yaml#/definitions/uint8"
    enum: [0, 1, 2]
    description: |
      Over temperature level selection. Each respective value means the degree
      150'c, 130'c, 170'c. If this property is missing then keep in chip
      default.

  richtek,pgdly-time-select:
    $ref: "/schemas/types.yaml#/definitions/uint8"
    enum: [0, 1, 2, 3]
    description: |
      Power good signal delay time selection. Each respective value means the
      delay time 0us, 10us, 20us, 40us. If this property is missing then keep
      in chip default.

  richtek,switch-freq-select:
    $ref: "/schemas/types.yaml#/definitions/uint8"
    enum: [0, 1, 2]
    description: |
      Buck switch frequency selection. Each respective value means 400KHz,
      800KHz, 1200KHz. If this property is missing then keep in chip default.

required:
  - compatible
  - reg

unevaluatedProperties: false

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

      rt6245@34 {
        compatible = "richtek,rt6245";
        reg = <0x34>;
        enable-gpios = <&gpio26 2 0>;

        regulator-name = "rt6245-regulator";
        regulator-min-microvolt = <437500>;
        regulator-max-microvolt = <1387500>;
        regulator-boot-on;
      };
    };


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/richtek,rtmv20-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Richtek RTMV20 laser diode regulator

maintainers:
  - ChiYuan Huang <cy_huang@richtek.com>

description: |
  Richtek RTMV20 is a load switch current regulator that can supply up to 6A.
  It is used to drive laser diode. There're two signals for chip controls
  (Enable/Fail), Enable pin to turn chip on, and Fail pin as fault indication.
  There're still four pins for camera control, two inputs (strobe and vsync),
  the others for outputs (fsin1 and fsin2). Strobe input to start the current
  supply, vsync input from IR camera, and fsin1/fsin2 output for the optional.

properties:
  compatible:
    const: richtek,rtmv20

  reg:
    maxItems: 1

  wakeup-source: true

  interrupts:
    maxItems: 1

  enable-gpios:
    description: A connection of the 'enable' gpio line.
    maxItems: 1

  richtek,ld-pulse-delay-us:
    description: |
      load current pulse delay in microsecond after strobe pin pulse high.
    minimum: 0
    maximum: 100000
    default: 0

  richtek,ld-pulse-width-us:
    description: |
      Load current pulse width in microsecond after strobe pin pulse high.
    minimum: 0
    maximum: 10000
    default: 1200

  richtek,fsin1-delay-us:
    description: |
      Fsin1 pulse high delay in microsecond after vsync signal pulse high.
    minimum: 0
    maximum: 100000
    default: 23000

  richtek,fsin1-width-us:
    description: |
      Fsin1 pulse high width in microsecond after vsync signal pulse high.
    minimum: 40
    maximum: 10000
    default: 160

  richtek,fsin2-delay-us:
    description: |
      Fsin2 pulse high delay in microsecond after vsync signal pulse high.
    minimum: 0
    maximum: 100000
    default: 23000

  richtek,fsin2-width-us:
    description: |
      Fsin2 pulse high width in microsecond after vsync signal pulse high.
    minimum: 40
    maximum: 10000
    default: 160

  richtek,es-pulse-width-us:
    description: Eye safety function pulse width limit in microsecond.
    minimum: 0
    maximum: 10000
    default: 1200

  richtek,es-ld-current-microamp:
    description: Eye safety function load current limit in microamp.
    minimum: 0
    maximum: 6000000
    default: 3000000

  richtek,lbp-level-microvolt:
    description: Low battery protection level in microvolt.
    minimum: 2400000
    maximum: 3700000
    default: 2700000

  richtek,lbp-enable:
    description: Low battery protection function enable control.
    type: boolean

  richtek,strobe-polarity-high:
    description: Strobe pin active polarity control.
    type: boolean

  richtek,vsync-polarity-high:
    description: Vsync pin active polarity control.
    type: boolean

  richtek,fsin-enable:
    description: Fsin function enable control.
    type: boolean

  richtek,fsin-output:
    description: Fsin function output control.
    type: boolean

  richtek,es-enable:
    description: Eye safety function enable control.
    type: boolean

  lsw:
    description: load switch current regulator description.
    type: object
    $ref: "regulator.yaml#"

required:
  - compatible
  - reg
  - wakeup-source
  - interrupts
  - enable-gpios
  - lsw

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      rtmv20@34 {
        compatible = "richtek,rtmv20";
        reg = <0x34>;
        wakeup-source;
        interrupts-extended = <&gpio26 2 IRQ_TYPE_LEVEL_LOW>;
        enable-gpios = <&gpio26 3 0>;

        richtek,strobe-polarity-high;
        richtek,vsync-polarity-high;

        lsw {
                regulator-name = "rtmv20,lsw";
                regulator-min-microamp = <0>;
                regulator-max-microamp = <6000000>;
        };
      };
    };
...


code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/richtek,rtq2134-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Richtek RTQ2134 SubPMIC Regulator

maintainers:
  - ChiYuan Huang <cy_huang@richtek.com>

description: |
  The RTQ2134 is a multi-phase, programmable power management IC that
  integrates with four high efficient, synchronous step-down converter cores.

  Datasheet is available at
  https://www.richtek.com/assets/product_file/RTQ2134-QA/DSQ2134-QA-01.pdf

properties:
  compatible:
    enum:
      - richtek,rtq2134

  reg:
    maxItems: 1

  regulators:
    type: object

    patternProperties:
      "^buck[1-3]$":
        type: object
        $ref: regulator.yaml#
        description: |
          regulator description for buck[1-3].

        properties:
          richtek,use-vsel-dvs:
            type: boolean
            description: |
              If specified, buck will listen to 'vsel' pin for dvs config.
              Else, use dvs0 voltage by default.

          richtek,uv-shutdown:
            type: boolean
            description: |
              If specified, use shutdown as UV action. Else, hiccup by default.

        unevaluatedProperties: false

    additionalProperties: false

required:
  - compatible
  - reg
  - regulators

additionalProperties: false

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

      rtq2134@18 {
        compatible = "richtek,rtq2134";
        reg = <0x18>;

        regulators {
          buck1 {
            regulator-name = "rtq2134-buck1";
            regulator-min-microvolt = <300000>;
            regulator-max-microvolt = <1850000>;
            regulator-always-on;
            richtek,use-vsel-dvs;
            regulator-state-mem {
              regulator-suspend-min-microvolt = <550000>;
              regulator-suspend-max-microvolt = <550000>;
            };
          };
          buck2 {
            regulator-name = "rtq2134-buck2";
            regulator-min-microvolt = <1120000>;
            regulator-max-microvolt = <1120000>;
            regulator-always-on;
            richtek,use-vsel-dvs;
            regulator-state-mem {
              regulator-suspend-min-microvolt = <1120000>;
              regulator-suspend-max-microvolt = <1120000>;
            };
          };
          buck3 {
            regulator-name = "rtq2134-buck3";
            regulator-min-microvolt = <600000>;
            regulator-max-microvolt = <600000>;
            regulator-always-on;
            richtek,use-vsel-dvs;
            regulator-state-mem {
              regulator-suspend-min-microvolt = <600000>;
              regulator-suspend-max-microvolt = <600000>;
            };
          };
        };
      };
    };


code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/richtek,rtq6752-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Richtek RTQ6752 TFT LCD Voltage Regulator

maintainers:
  - ChiYuan Huang <cy_huang@richtek.com>

description: |
  The RTQ6752 is an I2C interface pgorammable power management IC. It includes
  two synchronous boost converter for PAVDD, and one synchronous NAVDD
  buck-boost. The device is suitable for automotive TFT-LCD panel.

properties:
  compatible:
    enum:
      - richtek,rtq6752

  reg:
    maxItems: 1

  enable-gpios:
    description: |
      A connection of the chip 'enable' gpio line. If not provided, treat it as
      external pull up.
    maxItems: 1

  regulators:
    type: object

    patternProperties:
      "^(p|n)avdd$":
        type: object
        $ref: regulator.yaml#
        description: |
          regulator description for pavdd and navdd.

    additionalProperties: false

required:
  - compatible
  - reg
  - regulators

additionalProperties: false

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

      rtq6752@6b {
        compatible = "richtek,rtq6752";
        reg = <0x6b>;
        enable-gpios = <&gpio26 2 0>;

        regulators {
          pavdd {
            regulator-name = "rtq6752-pavdd";
            regulator-min-microvolt = <5000000>;
            regulator-max-microvolt = <7300000>;
            regulator-boot-on;
          };
          navdd {
            regulator-name = "rtq6752-navdd";
            regulator-min-microvolt = <5000000>;
            regulator-max-microvolt = <7300000>;
            regulator-boot-on;
          };
        };
      };
    };


code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/rohm,bd71815-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ROHM BD71815 Power Management Integrated Circuit regulators

maintainers:
  - Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>

description: |
  This module is part of the ROHM BD718215 MFD device. For more details
  see Documentation/devicetree/bindings/mfd/rohm,bd71815-pmic.yaml.

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

  The valid names for BD71815 regulator nodes are
  buck1, buck2, buck3, buck4, buck5,
  ldo1, ldo2, ldo3, ldo4, ldo5,
  ldodvref, ldolpsr, wled

properties:
  wled:
    type: object
    description:
      properties for wled regulator
    $ref: regulator.yaml#
    unevaluatedProperties: false

    properties:
      regulator-name:
        const: wled

patternProperties:
  "^((ldo|buck)[1-5]|ldolpsr|ldodvref)$":
    type: object
    description:
      Properties for single LDO/BUCK regulator.
    $ref: regulator.yaml#

    properties:
      regulator-name:
        pattern: "^((ldo|buck)[1-5]|ldolpsr|ldodvref)$"
        description:
          should be "ldo1", ..., "ldo5", "buck1", ..., "buck5" and "ldolpsr"
          for ldolpsr regulator, "ldodvref" for ldodvref reglator.

      rohm,vsel-gpios:
        description:
          GPIO used to control ldo4 state (when ldo4 is controlled by GPIO).

      rohm,dvs-run-voltage:
        description:
          PMIC "RUN" state voltage in uV when PMIC HW states are used. See
          comments below for bucks/LDOs which support this. 0 means
          regulator should be disabled at RUN state.
        $ref: "/schemas/types.yaml#/definitions/uint32"
        minimum: 0
        maximum: 3300000

      rohm,dvs-snvs-voltage:
        description:
          Whether to keep regulator enabled at "SNVS" state or not.
          0 means regulator should be disabled at SNVS state, non zero voltage
          keeps regulator enabled. BD71815 does not change voltage level
          when PMIC transitions to SNVS.SNVS voltage depends on the previous
          state (from which the PMIC transitioned to SNVS).
        $ref: "/schemas/types.yaml#/definitions/uint32"
        minimum: 0
        maximum: 3300000

      rohm,dvs-suspend-voltage:
        description:
          PMIC "SUSPEND" state voltage in uV when PMIC HW states are used. See
          comments below for bucks/LDOs which support this. 0 means
          regulator should be disabled at SUSPEND state.
        $ref: "/schemas/types.yaml#/definitions/uint32"
        minimum: 0
        maximum: 3300000

      rohm,dvs-lpsr-voltage:
        description:
          PMIC "LPSR" state voltage in uV when PMIC HW states are used. See
          comments below for bucks/LDOs which support this. 0 means
          regulator should be disabled at LPSR state.
        $ref: "/schemas/types.yaml#/definitions/uint32"
        minimum: 0
        maximum: 3300000

        # Bucks 1 and 2 support giving separate voltages for operational states
        # (RUN /CLEAN according to data-sheet) and non operational states
        # (LPSR/SUSPEND). The voltage is automatically changed when HW
        # state changes. Omitting these properties from bucks 1 and 2 leave
        # buck voltages to not be toggled by HW state. Enable status may still
        # be toggled by state changes depending on HW default settings.
        #
        # Bucks 3-5 and ldos 1-5 support setting the RUN state voltage here.
        # Given RUN voltage is used at all states if regulator is enabled at
        # given state.
        # Values given for other states are regarded as enable/disable at
        # given state (see below).
        #
        # All regulators except WLED support specifying enable/disable status
        # for each of the HW states (RUN/SNVS/SUSPEND/LPSR). HW defaults can
        # be overridden by setting voltage to 0 (regulator disabled at given
        # state) or non-zero (regulator enabled at given state). Please note
        # that setting non zero voltages for bucks 1/2 will also enable voltage
        # changes according to state change.

    required:
      - regulator-name

    unevaluatedProperties: false

additionalProperties: false


code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/rohm,bd71828-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ROHM BD71828 Power Management Integrated Circuit regulators

maintainers:
  - Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>

description: |
  This module is part of the ROHM BD71828 MFD device. For more details
  see Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml.

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

  Regulator nodes should be named to BUCK_<number> and LDO_<number>.
  The valid names for BD71828 regulator nodes are
  BUCK1, BUCK2, BUCK3, BUCK4, BUCK5, BUCK6, BUCK7
  LDO1, LDO2, LDO3, LDO4, LDO5, LDO6, LDO7

patternProperties:
  "^LDO[1-7]$":
    type: object
    description:
      Properties for single LDO regulator.
    $ref: regulator.yaml#

    properties:
      regulator-name:
        pattern: "^ldo[1-7]$"
        description:
          should be "ldo1", ..., "ldo7"

    unevaluatedProperties: false

  "^BUCK[1-7]$":
    type: object
    description:
      Properties for single BUCK regulator.
    $ref: regulator.yaml#

    properties:
      regulator-name:
        pattern: "^buck[1-7]$"
        description:
          should be "buck1", ..., "buck7"

      rohm,dvs-run-voltage:
        description:
          PMIC default "RUN" state voltage in uV. See below table for
          bucks which support this. 0 means disabled.
        $ref: "/schemas/types.yaml#/definitions/uint32"
        minimum: 0
        maximum: 3300000

      rohm,dvs-idle-voltage:
        description:
          PMIC default "IDLE" state voltage in uV. See below table for
          bucks which support this. 0 means disabled.
        $ref: "/schemas/types.yaml#/definitions/uint32"
        minimum: 0
        maximum: 3300000

      rohm,dvs-suspend-voltage:
        description:
          PMIC default "SUSPEND" state voltage in uV. See below table for
          bucks which support this. 0 means disabled.
        $ref: "/schemas/types.yaml#/definitions/uint32"
        minimum: 0
        maximum: 3300000

      rohm,dvs-lpsr-voltage:
        description:
          PMIC default "LPSR" state voltage in uV. See below table for
          bucks which support this. 0 means disabled.
        $ref: "/schemas/types.yaml#/definitions/uint32"
        minimum: 0
        maximum: 3300000

        # Supported default DVS states:
        #     buck       |    run     |   idle    | suspend  | lpsr
        #--------------------------------------------------------------
        # 1, 2, 6, and 7 | supported  | supported | supported (*)
        #--------------------------------------------------------------
        # 3, 4, and 5    |                    supported (**)
        #--------------------------------------------------------------
        #
        #(*)  LPSR and SUSPEND states use same voltage but both states have own
        #     enable /
        #     disable settings. Voltage 0 can be specified for a state to make
        #     regulator disabled on that state.
        #
        #(**) All states use same voltage but have own enable / disable
        #     settings. Voltage 0 can be specified for a state to make
        #     regulator disabled on that state.

    required:
      - regulator-name

    unevaluatedProperties: false

additionalProperties: false