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

title: ROHM BD73800 Power Management Integrated Circuit regulators

maintainers:
  - Matti Vaittinen <mazziesaccount@gmail.com>

description: |
  This module is part of the ROHM BD73800 MFD device. For more details
  see Documentation/devicetree/bindings/mfd/rohm,bd73800-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 BD73800 regulator nodes are
  buck1, buck2, buck3, buck4, buck5, buck6, buck7, buck8
  ldo1, ldo2, ldo3, ldo4

patternProperties:
  "^buck[1-8]$":
    type: object
    description:
      Properties for a single BUCK regulator.
    allOf:
      - $ref: regulator.yaml#
      - $ref: rohm,pmic-states.yaml#

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

      rohm,dvs-run-voltage:
        minimum: 0
        maximum: 3500000

      rohm,dvs-idle-voltage:
        minimum: 0
        maximum: 3500000

      rohm,dvs-suspend-voltage:
        minimum: 0
        maximum: 3500000

        # BUCKs 1,2,3,4 and 8 support voltages 0.5 - 1.3V
        # BUCK 5 supports voltages 0.3 - 1.3V
        # BUCKs 6 and 7 support voltages 1.5 - 3.5V

    required:
      - regulator-name

    unevaluatedProperties: false

  "^ldo[1-4]$":
    type: object
    description:
      Properties for single LDO regulator.
    allOf:
      - $ref: regulator.yaml#
      - $ref: rohm,pmic-states.yaml#

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

      rohm,dvs-run-voltage:
        minimum: 0
        maximum: 1

      rohm,dvs-idle-voltage:
        minimum: 0
        maximum: 1

      rohm,dvs-suspend-voltage:
        minimum: 0
        maximum: 1

      rohm,ldo-range-high:
        type: boolean
        description:
          LDO1 and LDO3 voltage ranges can be "high" or "low" depending on
          OTP. Indicate that the "high" range is used. See comment below
          for voltages.

        # LDOs 2 and 4 support voltages 0.75 - 3.3V
        # LDOs 1 and 3 may support different ranges depending on OTP.
        # either 0.6 - 1.8V or 0.75 - 3.3V.

    unevaluatedProperties: false

additionalProperties: false