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

title: Qualcomm Graphics GX Power Domain Controller

maintainers:
  - Taniya Das <taniya.das@oss.qualcomm.com>

description: |
  The Qualcomm graphics GX clock controller (GXCLKCTL) contains PLLs, clocks
  and power domains (GDSC). This module provides the power domain control of
  GXCLKCTL on Qualcomm SoCs, which helps the recovery of the graphics
  subsystem.

  See also:
    include/dt-bindings/clock/qcom,kaanapali-gxclkctl.h

properties:
  compatible:
    oneOf:
      - enum:
          - qcom,glymur-gxclkctl
          - qcom,kaanapali-gxclkctl
          - qcom,sm8750-gxclkctl
      - items:
          - enum:
              - qcom,hawi-gxclkctl
              - qcom,maili-gxclkctl
          - const: qcom,kaanapali-gxclkctl

  power-domains:
    description:
      Power domains required for the clock controller to operate
    items:
      - description: GFX power domain
      - description: GMXC power domain
      - description: GPUCC(CX) power domain

  '#power-domain-cells':
    const: 1

  reg:
    maxItems: 1

required:
  - compatible
  - reg
  - power-domains
  - '#power-domain-cells'

additionalProperties: false

examples:
  - |
    #include <dt-bindings/power/qcom,rpmhpd.h>
    soc {
        #address-cells = <2>;
        #size-cells = <2>;

        clock-controller@3d64000 {
            compatible = "qcom,kaanapali-gxclkctl";
            reg = <0x0 0x03d64000 0x0 0x6000>;
            power-domains = <&rpmhpd RPMHPD_GFX>,
                            <&rpmhpd RPMHPD_GMXC>,
                            <&gpucc 0>;
            #power-domain-cells = <1>;
        };
    };
...