Skip to content

Commit afec1ab

Browse files
prabhakarladgeertu
authored andcommitted
dt-bindings: clock: renesas: Document RZ/V2H(P) SoC CPG
Document the device tree bindings for the Renesas RZ/V2H(P) SoC Clock Pulse Generator (CPG). CPG block handles the below operations: - Generation and control of clock signals for the IP modules - Generation and control of resets - Control over booting - Low power consumption and power supply domains Also define constants for the core clocks of the RZ/V2H(P) SoC. Note the core clocks are a subset of the ones which are listed as part of section 4.4.2 of HW manual Rev.1.01 which cannot be controlled by CLKON register. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20240729202645.263525-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
1 parent 8400291 commit afec1ab

File tree

2 files changed

+101
-0
lines changed

2 files changed

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

0 commit comments

Comments
 (0)