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

title: Regulator cooling device.

maintainers:
  - Nitesh Kumar <quic_nitekuma@quicinc.com>

description: |
 The regulator cooling device, will be used to place a voltage floor
 restriction on a rail.


properties:
  compatible:
    const: qcom,regulator-cooling-device

  cdev-supply:
    description: |
      phandle to the regulator to which the cooling device will
      place a floor mitigation.

  regulator-levels:
    description: |
      Array of regulator voltages the cooling device should
      use to place a floor restriction. The voltages should be specified
      in descending order.

  "#cooling-cells":
    const: 2
    description: |
      Must be 2. Please refer to
      <devicetree/bindings/thermal/thermal.txt> for more details.

required:
  - compatible
  - cdev-supply
  - regulator-levels
  - "#cooling-cells"

additionalProperties: false

examples:
  - |
    mx_cdev: mx-cdev-lvl {
      compatible = "qcom,regulator-cooling-device";
      cdev-supply = <&regulator-cdev-supply>;
      regulator-levels = <RPMH_REGULATOR_LEVEL_NOM RPMH_REGULATOR_LEVEL_OFF>;
      #cooling-cells = <2>;
    };
