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

title: Texas Instruments FAPLL clock

maintainers:
  - Tony Lindgren <tony@atomide.com>
  - Tero Kristo <kristo@kernel.org>

description:
  FAPLL is register-mapped with usually two selectable input clocks
  (reference clock and bypass clock), and one or more child synthesizers.

properties:
  compatible:
    const: ti,dm816-fapll-clock

  "#clock-cells":
    const: 1

  reg:
    maxItems: 1

  clocks:
    items:
      - description: parent clock clk-ref
      - description: parent clock clk-bypass

  clock-indices:
    description:
      Maps child synthesizers to physical indices 1-7. Index 0 is physically
      reserved for the Master PLL.
    minItems: 1
    maxItems: 7
    items:
      minimum: 1
      maximum: 7

  clock-output-names:
    description:
      Names of the child synthesizer outputs. The length of this array must
      match clock-indices.
    minItems: 1
    maxItems: 7

required:
  - compatible
  - reg
  - clocks
  - "#clock-cells"
  - clock-indices
  - clock-output-names

additionalProperties: false

examples:
  - |
    clock-controller@400 {
        #clock-cells = <1>;
        compatible = "ti,dm816-fapll-clock";
        reg = <0x400 0x40>;
        clocks = <&sys_clkin_ck &sys_clkin_ck>;
        clock-indices = <1>, <2>, <3>, <4>, <5>, <6>, <7>;
        clock-output-names = "main_pll_clk1", "main_pll_clk2", "main_pll_clk3",
                             "main_pll_clk4", "main_pll_clk5", "main_pll_clk6",
                             "main_pll_clk7";

    };