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

title: StarFive JHB100 Peripheral-3 Clock and Reset Generator

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

properties:
  compatible:
    const: starfive,jhb100-per3crg

  reg:
    maxItems: 1

  clocks:
    items:
      - description: Non Coherent NOC Initiator
      - description: Non Coherent NOC Target
      - description: Configure 125MHz
      - description: GMAC0 RMII Reference clock
      - description: GMAC1 SGMII TX
      - description: GMAC1 SGMII RX
      - description: Main Oscillator (25 MHz)

  clock-names:
    items:
      - const: ncnoc_init
      - const: ncnoc_targ
      - const: cfg_125
      - const: gmac0_rmii_rclki
      - const: gmac1_sgmii_tx
      - const: gmac1_sgmii_rx
      - const: osc

  '#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@11c40000 {
      compatible = "starfive,jhb100-per3crg";
      reg = <0x11c40000 0x1000>;
      clocks = <&sys0crg 65>,
               <&sys1crg 18>,
               <&sys1crg 19>,
               <&per3_gmac0_rmii_rclki>,
               <&per3_gmac1_sgmii_tx>,
               <&per3_gmac1_sgmii_rx>,
               <&osc>;
      clock-names = "ncnoc_init", "ncnoc_targ", "cfg_125",
                    "gmac0_rmii_rclki", "gmac1_sgmii_tx",
                    "gmac1_sgmii_rx", "osc";
      #clock-cells = <1>;
      #reset-cells = <1>;
    };