xref: /linux/Documentation/devicetree/bindings/clock/renesas,rzg2l-cpg.yaml (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1f8ec8912SLad Prabhakar# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2f8ec8912SLad Prabhakar%YAML 1.2
3f8ec8912SLad Prabhakar---
432671977SRob Herring$id: http://devicetree.org/schemas/clock/renesas,rzg2l-cpg.yaml#
532671977SRob Herring$schema: http://devicetree.org/meta-schemas/core.yaml#
6f8ec8912SLad Prabhakar
74a526957SPhil Edworthytitle: Renesas RZ/{G2L,V2L,V2M} Clock Pulse Generator / Module Standby Mode
8f8ec8912SLad Prabhakar
9f8ec8912SLad Prabhakarmaintainers:
10f8ec8912SLad Prabhakar  - Geert Uytterhoeven <geert+renesas@glider.be>
11f8ec8912SLad Prabhakar
12f8ec8912SLad Prabhakardescription: |
133733db1fSBiju Das  On Renesas RZ/{G2L,V2L}-alike SoC's, the CPG (Clock Pulse Generator) and Module
144a526957SPhil Edworthy  Standby Mode share the same register block. On RZ/V2M, the functionality is
154a526957SPhil Edworthy  similar, but does not have Clock Monitor Registers.
16f8ec8912SLad Prabhakar
17f8ec8912SLad Prabhakar  They provide the following functionalities:
18f8ec8912SLad Prabhakar    - The CPG block generates various core clocks,
19f8ec8912SLad Prabhakar    - The Module Standby Mode block provides two functions:
20f8ec8912SLad Prabhakar        1. Module Standby, providing a Clock Domain to control the clock supply
21f8ec8912SLad Prabhakar           to individual SoC devices,
22f8ec8912SLad Prabhakar        2. Reset Control, to perform a software reset of individual SoC devices.
23f8ec8912SLad Prabhakar
24f8ec8912SLad Prabhakarproperties:
25f8ec8912SLad Prabhakar  compatible:
26678eb675SBiju Das    enum:
27e312ae92SLad Prabhakar      - renesas,r9a07g043-cpg # RZ/G2UL{Type-1,Type-2} and RZ/Five
28678eb675SBiju Das      - renesas,r9a07g044-cpg # RZ/G2{L,LC}
29678eb675SBiju Das      - renesas,r9a07g054-cpg # RZ/V2L
30e372aee8SClaudiu Beznea      - renesas,r9a08g045-cpg # RZ/G3S
314a526957SPhil Edworthy      - renesas,r9a09g011-cpg # RZ/V2M
32f8ec8912SLad Prabhakar
33f8ec8912SLad Prabhakar  reg:
34f8ec8912SLad Prabhakar    maxItems: 1
35f8ec8912SLad Prabhakar
36f8ec8912SLad Prabhakar  clocks:
37f8ec8912SLad Prabhakar    maxItems: 1
38f8ec8912SLad Prabhakar
39f8ec8912SLad Prabhakar  clock-names:
40f8ec8912SLad Prabhakar    description:
41f8ec8912SLad Prabhakar      Clock source to CPG can be either from external clock input (EXCLK) or
42f8ec8912SLad Prabhakar      crystal oscillator (XIN/XOUT).
43f8ec8912SLad Prabhakar    const: extal
44f8ec8912SLad Prabhakar
45f8ec8912SLad Prabhakar  '#clock-cells':
46f8ec8912SLad Prabhakar    description: |
47f8ec8912SLad Prabhakar      - For CPG core clocks, the two clock specifier cells must be "CPG_CORE"
48f8ec8912SLad Prabhakar        and a core clock reference, as defined in
49fc9e0167SGeert Uytterhoeven        <dt-bindings/clock/r9a0*-cpg.h>,
50f8ec8912SLad Prabhakar      - For module clocks, the two clock specifier cells must be "CPG_MOD" and
51fc9e0167SGeert Uytterhoeven        a module number, as defined in <dt-bindings/clock/r9a0*-cpg.h>.
52f8ec8912SLad Prabhakar    const: 2
53f8ec8912SLad Prabhakar
54f8ec8912SLad Prabhakar  '#power-domain-cells':
55f8ec8912SLad Prabhakar    description:
56f8ec8912SLad Prabhakar      SoC devices that are part of the CPG/Module Standby Mode Clock Domain and
57f8ec8912SLad Prabhakar      can be power-managed through Module Standby should refer to the CPG device
58f8ec8912SLad Prabhakar      node in their "power-domains" property, as documented by the generic PM
59f8ec8912SLad Prabhakar      Domain bindings in Documentation/devicetree/bindings/power/power-domain.yaml.
60f33dca9eSClaudiu Beznea      The power domain specifiers defined in <dt-bindings/clock/r9a0*-cpg.h> could
61f33dca9eSClaudiu Beznea      be used to reference individual CPG power domains.
62f8ec8912SLad Prabhakar
63f8ec8912SLad Prabhakar  '#reset-cells':
64f8ec8912SLad Prabhakar    description:
65*d8abcb73SLad Prabhakar      The single reset specifier cell must be the reset number, as defined in
66fc9e0167SGeert Uytterhoeven      <dt-bindings/clock/r9a0*-cpg.h>.
67f8ec8912SLad Prabhakar    const: 1
68f8ec8912SLad Prabhakar
69f8ec8912SLad Prabhakarrequired:
70f8ec8912SLad Prabhakar  - compatible
71f8ec8912SLad Prabhakar  - reg
72f8ec8912SLad Prabhakar  - clocks
73f8ec8912SLad Prabhakar  - clock-names
74f8ec8912SLad Prabhakar  - '#clock-cells'
75f8ec8912SLad Prabhakar  - '#power-domain-cells'
76f8ec8912SLad Prabhakar  - '#reset-cells'
77f8ec8912SLad Prabhakar
78f8ec8912SLad PrabhakaradditionalProperties: false
79f8ec8912SLad Prabhakar
80f33dca9eSClaudiu BezneaallOf:
81f33dca9eSClaudiu Beznea  - if:
82f33dca9eSClaudiu Beznea      properties:
83f33dca9eSClaudiu Beznea        compatible:
84f33dca9eSClaudiu Beznea          contains:
85f33dca9eSClaudiu Beznea            const: renesas,r9a08g045-cpg
86f33dca9eSClaudiu Beznea    then:
87f33dca9eSClaudiu Beznea      properties:
88f33dca9eSClaudiu Beznea        '#power-domain-cells':
89f33dca9eSClaudiu Beznea          const: 1
90f33dca9eSClaudiu Beznea    else:
91f33dca9eSClaudiu Beznea      properties:
92f33dca9eSClaudiu Beznea        '#power-domain-cells':
93f33dca9eSClaudiu Beznea          const: 0
94f33dca9eSClaudiu Beznea
95f8ec8912SLad Prabhakarexamples:
96f8ec8912SLad Prabhakar  - |
97f8ec8912SLad Prabhakar    cpg: clock-controller@11010000 {
98f8ec8912SLad Prabhakar            compatible = "renesas,r9a07g044-cpg";
99f8ec8912SLad Prabhakar            reg = <0x11010000 0x10000>;
100f8ec8912SLad Prabhakar            clocks = <&extal_clk>;
101f8ec8912SLad Prabhakar            clock-names = "extal";
102f8ec8912SLad Prabhakar            #clock-cells = <2>;
103f8ec8912SLad Prabhakar            #power-domain-cells = <0>;
104f8ec8912SLad Prabhakar            #reset-cells = <1>;
105f8ec8912SLad Prabhakar    };
106