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

title: StarFive JHB100 System-2 Clock and Reset Generator

maintainers:
  - Changhuang Liang <changhuang.liang@starfivetech.com>

properties:
  compatible:
    const: starfive,jhb100-sys2crg

  reg:
    maxItems: 1

  clocks:
    items:
      - description: Main Oscillator (25 MHz)
      - description: PLL1
      - description: GPU0 Non Coherent NOC Initiator
      - description: GPU1 Non Coherent NOC Initiator

  clock-names:
    items:
      - const: osc
      - const: pll1
      - const: gpu0_ncnoc_init
      - const: gpu1_ncnoc_init

  '#clock-cells':
    const: 1
    description:
      See <dt-bindings/clock/starfive,jhb100-crg.h> for valid indices.

  '#reset-cells':
    const: 1
    description:
      See <dt-bindings/reset/starfive,jhb100-crg.h> for valid indices.

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - '#clock-cells'
  - '#reset-cells'

additionalProperties: false

examples:
  - |
    clock-controller@13008000 {
      compatible = "starfive,jhb100-sys2crg";
      reg = <0x13008000 0x4000>;
      clocks = <&osc>, <&pll1>, <&sys0crg 73>,
               <&sys0crg 74>;
      clock-names = "osc", "pll1", "gpu0_ncnoc_init",
                    "gpu1_ncnoc_init";
      #clock-cells = <1>;
      #reset-cells = <1>;
    };