xref: /freebsd/sys/contrib/device-tree/Bindings/clock/renesas,rzv2h-cpg.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1*b2d2a78aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*b2d2a78aSEmmanuel Vadot%YAML 1.2
3*b2d2a78aSEmmanuel Vadot---
4*b2d2a78aSEmmanuel Vadot$id: http://devicetree.org/schemas/clock/renesas,rzv2h-cpg.yaml#
5*b2d2a78aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*b2d2a78aSEmmanuel Vadot
7*b2d2a78aSEmmanuel Vadottitle: Renesas RZ/V2H(P) Clock Pulse Generator (CPG)
8*b2d2a78aSEmmanuel Vadot
9*b2d2a78aSEmmanuel Vadotmaintainers:
10*b2d2a78aSEmmanuel Vadot  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
11*b2d2a78aSEmmanuel Vadot
12*b2d2a78aSEmmanuel Vadotdescription:
13*b2d2a78aSEmmanuel Vadot  On Renesas RZ/V2H(P) SoCs, the CPG (Clock Pulse Generator) handles generation
14*b2d2a78aSEmmanuel Vadot  and control of clock signals for the IP modules, generation and control of resets,
15*b2d2a78aSEmmanuel Vadot  and control over booting, low power consumption and power supply domains.
16*b2d2a78aSEmmanuel Vadot
17*b2d2a78aSEmmanuel Vadotproperties:
18*b2d2a78aSEmmanuel Vadot  compatible:
19*b2d2a78aSEmmanuel Vadot    const: renesas,r9a09g057-cpg
20*b2d2a78aSEmmanuel Vadot
21*b2d2a78aSEmmanuel Vadot  reg:
22*b2d2a78aSEmmanuel Vadot    maxItems: 1
23*b2d2a78aSEmmanuel Vadot
24*b2d2a78aSEmmanuel Vadot  clocks:
25*b2d2a78aSEmmanuel Vadot    items:
26*b2d2a78aSEmmanuel Vadot      - description: AUDIO_EXTAL clock input
27*b2d2a78aSEmmanuel Vadot      - description: RTXIN clock input
28*b2d2a78aSEmmanuel Vadot      - description: QEXTAL clock input
29*b2d2a78aSEmmanuel Vadot
30*b2d2a78aSEmmanuel Vadot  clock-names:
31*b2d2a78aSEmmanuel Vadot    items:
32*b2d2a78aSEmmanuel Vadot      - const: audio_extal
33*b2d2a78aSEmmanuel Vadot      - const: rtxin
34*b2d2a78aSEmmanuel Vadot      - const: qextal
35*b2d2a78aSEmmanuel Vadot
36*b2d2a78aSEmmanuel Vadot  '#clock-cells':
37*b2d2a78aSEmmanuel Vadot    description: |
38*b2d2a78aSEmmanuel Vadot      - For CPG core clocks, the two clock specifier cells must be "CPG_CORE"
39*b2d2a78aSEmmanuel Vadot        and a core clock reference, as defined in
40*b2d2a78aSEmmanuel Vadot        <dt-bindings/clock/renesas,r9a09g057-cpg.h>,
41*b2d2a78aSEmmanuel Vadot      - For module clocks, the two clock specifier cells must be "CPG_MOD" and
42*b2d2a78aSEmmanuel Vadot        a module number.  The module number is calculated as the CLKON register
43*b2d2a78aSEmmanuel Vadot        offset index multiplied by 16, plus the actual bit in the register
44*b2d2a78aSEmmanuel Vadot        used to turn the CLK ON. For example, for CGC_GIC_0_GICCLK, the
45*b2d2a78aSEmmanuel Vadot        calculation is (1 * 16 + 3) = 0x13.
46*b2d2a78aSEmmanuel Vadot    const: 2
47*b2d2a78aSEmmanuel Vadot
48*b2d2a78aSEmmanuel Vadot  '#power-domain-cells':
49*b2d2a78aSEmmanuel Vadot    const: 0
50*b2d2a78aSEmmanuel Vadot
51*b2d2a78aSEmmanuel Vadot  '#reset-cells':
52*b2d2a78aSEmmanuel Vadot    description:
53*b2d2a78aSEmmanuel Vadot      The single reset specifier cell must be the reset number. The reset number
54*b2d2a78aSEmmanuel Vadot      is calculated as the reset register offset index multiplied by 16, plus the
55*b2d2a78aSEmmanuel Vadot      actual bit in the register used to reset the specific IP block. For example,
56*b2d2a78aSEmmanuel Vadot      for SYS_0_PRESETN, the calculation is (3 * 16 + 0) = 0x30.
57*b2d2a78aSEmmanuel Vadot    const: 1
58*b2d2a78aSEmmanuel Vadot
59*b2d2a78aSEmmanuel Vadotrequired:
60*b2d2a78aSEmmanuel Vadot  - compatible
61*b2d2a78aSEmmanuel Vadot  - reg
62*b2d2a78aSEmmanuel Vadot  - clocks
63*b2d2a78aSEmmanuel Vadot  - clock-names
64*b2d2a78aSEmmanuel Vadot  - '#clock-cells'
65*b2d2a78aSEmmanuel Vadot  - '#power-domain-cells'
66*b2d2a78aSEmmanuel Vadot  - '#reset-cells'
67*b2d2a78aSEmmanuel Vadot
68*b2d2a78aSEmmanuel VadotadditionalProperties: false
69*b2d2a78aSEmmanuel Vadot
70*b2d2a78aSEmmanuel Vadotexamples:
71*b2d2a78aSEmmanuel Vadot  - |
72*b2d2a78aSEmmanuel Vadot    clock-controller@10420000 {
73*b2d2a78aSEmmanuel Vadot        compatible = "renesas,r9a09g057-cpg";
74*b2d2a78aSEmmanuel Vadot        reg = <0x10420000 0x10000>;
75*b2d2a78aSEmmanuel Vadot        clocks = <&audio_extal_clk>, <&rtxin_clk>, <&qextal_clk>;
76*b2d2a78aSEmmanuel Vadot        clock-names = "audio_extal", "rtxin", "qextal";
77*b2d2a78aSEmmanuel Vadot        #clock-cells = <2>;
78*b2d2a78aSEmmanuel Vadot        #power-domain-cells = <0>;
79*b2d2a78aSEmmanuel Vadot        #reset-cells = <1>;
80*b2d2a78aSEmmanuel Vadot    };
81