18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
28c2ecf20Sopenharmony_ci%YAML 1.2
38c2ecf20Sopenharmony_ci---
48c2ecf20Sopenharmony_ci$id: http://devicetree.org/schemas/regulator/rohm,bd71837-regulator.yaml#
58c2ecf20Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cititle: ROHM BD71837 Power Management Integrated Circuit regulators
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_cimaintainers:
108c2ecf20Sopenharmony_ci  - Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_cidescription: |
138c2ecf20Sopenharmony_ci  List of regulators provided by this controller. BD71837 regulators node
148c2ecf20Sopenharmony_ci  should be sub node of the BD71837 MFD node. See BD71837 MFD bindings at
158c2ecf20Sopenharmony_ci  Documentation/devicetree/bindings/mfd/rohm,bd71837-pmic.yaml
168c2ecf20Sopenharmony_ci  Regulator nodes should be named to BUCK_<number> and LDO_<number>. The
178c2ecf20Sopenharmony_ci  definition for each of these nodes is defined using the standard
188c2ecf20Sopenharmony_ci  binding for regulators at
198c2ecf20Sopenharmony_ci  Documentation/devicetree/bindings/regulator/regulator.txt.
208c2ecf20Sopenharmony_ci  Note that if BD71837 starts at RUN state you probably want to use
218c2ecf20Sopenharmony_ci  regulator-boot-on at least for BUCK6 and BUCK7 so that those are not
228c2ecf20Sopenharmony_ci  disabled by driver at startup. LDO5 and LDO6 are supplied by those and
238c2ecf20Sopenharmony_ci  if they are disabled at startup the voltage monitoring for LDO5/LDO6 will
248c2ecf20Sopenharmony_ci  cause PMIC to reset.
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci#The valid names for BD71837 regulator nodes are:
278c2ecf20Sopenharmony_ci#BUCK1, BUCK2, BUCK3, BUCK4, BUCK5, BUCK6, BUCK7, BUCK8
288c2ecf20Sopenharmony_ci#LDO1, LDO2, LDO3, LDO4, LDO5, LDO6, LDO7
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_cipatternProperties:
318c2ecf20Sopenharmony_ci  "^LDO[1-7]$":
328c2ecf20Sopenharmony_ci    type: object
338c2ecf20Sopenharmony_ci    $ref: regulator.yaml#
348c2ecf20Sopenharmony_ci    description:
358c2ecf20Sopenharmony_ci      Properties for single LDO regulator.
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci    properties:
388c2ecf20Sopenharmony_ci      regulator-name:
398c2ecf20Sopenharmony_ci        pattern: "^ldo[1-7]$"
408c2ecf20Sopenharmony_ci        description:
418c2ecf20Sopenharmony_ci          should be "ldo1", ..., "ldo7"
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci    unevaluatedProperties: false
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci  "^BUCK[1-8]$":
468c2ecf20Sopenharmony_ci    type: object
478c2ecf20Sopenharmony_ci    $ref: regulator.yaml#
488c2ecf20Sopenharmony_ci    description:
498c2ecf20Sopenharmony_ci      Properties for single BUCK regulator.
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci    properties:
528c2ecf20Sopenharmony_ci      regulator-name:
538c2ecf20Sopenharmony_ci        pattern: "^buck[1-8]$"
548c2ecf20Sopenharmony_ci        description:
558c2ecf20Sopenharmony_ci          should be "buck1", ..., "buck8"
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ci      rohm,dvs-run-voltage:
588c2ecf20Sopenharmony_ci        $ref: "/schemas/types.yaml#/definitions/uint32"
598c2ecf20Sopenharmony_ci        minimum: 0
608c2ecf20Sopenharmony_ci        maximum: 1300000
618c2ecf20Sopenharmony_ci        description:
628c2ecf20Sopenharmony_ci          PMIC default "RUN" state voltage in uV. See below table for
638c2ecf20Sopenharmony_ci          bucks which support this. 0 means disabled.
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci      rohm,dvs-idle-voltage:
668c2ecf20Sopenharmony_ci        $ref: "/schemas/types.yaml#/definitions/uint32"
678c2ecf20Sopenharmony_ci        minimum: 0
688c2ecf20Sopenharmony_ci        maximum: 1300000
698c2ecf20Sopenharmony_ci        description:
708c2ecf20Sopenharmony_ci          PMIC default "IDLE" state voltage in uV. See below table for
718c2ecf20Sopenharmony_ci          bucks which support this. 0 means disabled.
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ci      rohm,dvs-suspend-voltage:
748c2ecf20Sopenharmony_ci        $ref: "/schemas/types.yaml#/definitions/uint32"
758c2ecf20Sopenharmony_ci        minimum: 0
768c2ecf20Sopenharmony_ci        maximum: 1300000
778c2ecf20Sopenharmony_ci        description:
788c2ecf20Sopenharmony_ci          PMIC default "SUSPEND" state voltage in uV. See below table for
798c2ecf20Sopenharmony_ci          bucks which support this. 0 means disabled.
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ci        # Supported default DVS states:
828c2ecf20Sopenharmony_ci        #
838c2ecf20Sopenharmony_ci        # BD71837:
848c2ecf20Sopenharmony_ci        # buck | dvs-run-voltage | dvs-idle-voltage | dvs-suspend-voltage
858c2ecf20Sopenharmony_ci        # ----------------------------------------------------------------
868c2ecf20Sopenharmony_ci        # 1    | supported       | supported        | supported
878c2ecf20Sopenharmony_ci        # ----------------------------------------------------------------
888c2ecf20Sopenharmony_ci        # 2    | supported       | supported        | not supported
898c2ecf20Sopenharmony_ci        # ----------------------------------------------------------------
908c2ecf20Sopenharmony_ci        # 3    | supported       | not supported    | not supported
918c2ecf20Sopenharmony_ci        # ----------------------------------------------------------------
928c2ecf20Sopenharmony_ci        # 4    | supported       | not supported    | not supported
938c2ecf20Sopenharmony_ci        # ----------------------------------------------------------------
948c2ecf20Sopenharmony_ci        # rest | not supported   | not supported    | not supported
958c2ecf20Sopenharmony_ci
968c2ecf20Sopenharmony_ci      # BD71837 power outputs can either be controlled by the PMIC internal
978c2ecf20Sopenharmony_ci      # hardware state machine or by software. If you need regulators to be
988c2ecf20Sopenharmony_ci      # turned ON/OFF for example based on PMIC_STBY_REQ line (which toggles
998c2ecf20Sopenharmony_ci      # PMIC HW state machine) - then you should set this property.
1008c2ecf20Sopenharmony_ci      # Tradeoff is that then SW can't control the ON/OFF state for this
1018c2ecf20Sopenharmony_ci      # regulator (other than invoking a PMIC state change).
1028c2ecf20Sopenharmony_ci      rohm,no-regulator-enable-control:
1038c2ecf20Sopenharmony_ci        description: |
1048c2ecf20Sopenharmony_ci          Enable/Disable control of this regulator must be left to the
1058c2ecf20Sopenharmony_ci          PMIC hardware state machine.
1068c2ecf20Sopenharmony_ci        type: boolean
1078c2ecf20Sopenharmony_ci
1088c2ecf20Sopenharmony_ci    required:
1098c2ecf20Sopenharmony_ci      - regulator-name
1108c2ecf20Sopenharmony_ci
1118c2ecf20Sopenharmony_ci    unevaluatedProperties: false
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ciadditionalProperties: false
114