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

title: StarFive JHB100 Peripheral-0 Clock and Reset Generator

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

properties:
  compatible:
    const: starfive,jhb100-per0crg

  reg:
    maxItems: 1

  clocks:
    items:
      - description: Main Oscillator (25 MHz)
      - description: PLL6
      - description: Configure 400MHz
      - description: Configure 800MHZ
      - description: Non Coherent NOC Initiator
      - description: Non Coherent NOC Target

  clock-names:
    items:
      - const: osc
      - const: pll6
      - const: cfg_400
      - const: cfg_800
      - const: ncnoc_init
      - const: ncnoc_targ

  '#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@11a08000 {
      compatible = "starfive,jhb100-per0crg";
      reg = <0x11a08000 0x1000>;
      clocks = <&osc>, <&pll6>, <&sys0crg 71>,
               <&sys0crg 72>, <&sys0crg 70>,
               <&sys2crg 23>;
      clock-names = "osc", "pll6", "cfg_400",
                    "cfg_800", "ncnoc_init",
                    "ncnoc_targ";
      #clock-cells = <1>;
      #reset-cells = <1>;
    };