| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/rtc/renesas,rz-rtca3.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: Renesas RTCA-3 Real Time Clock |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Claudiu Beznea <[email protected]> |
| 11 |
|
| 12 |
properties: |
| 13 |
compatible: |
| 14 |
items: |
| 15 |
- enum: |
| 16 |
- renesas,r9a08g045-rtca3 # RZ/G3S |
| 17 |
- renesas,r9a09g056-rtca3 # RZ/V2N |
| 18 |
- renesas,r9a09g057-rtca3 # RZ/V2H |
| 19 |
- const: renesas,rz-rtca3 |
| 20 |
|
| 21 |
reg: |
| 22 |
maxItems: 1 |
| 23 |
|
| 24 |
interrupts: |
| 25 |
items: |
| 26 |
- description: Alarm interrupt |
| 27 |
- description: Periodic interrupt |
| 28 |
- description: Carry interrupt |
| 29 |
|
| 30 |
interrupt-names: |
| 31 |
items: |
| 32 |
- const: alarm |
| 33 |
- const: period |
| 34 |
- const: carry |
| 35 |
|
| 36 |
clocks: |
| 37 |
items: |
| 38 |
- description: RTC bus clock |
| 39 |
- description: RTC counter clock |
| 40 |
|
| 41 |
clock-names: |
| 42 |
items: |
| 43 |
- const: bus |
| 44 |
- const: counter |
| 45 |
|
| 46 |
power-domains: |
| 47 |
maxItems: 1 |
| 48 |
|
| 49 |
resets: |
| 50 |
minItems: 1 |
| 51 |
maxItems: 2 |
| 52 |
|
| 53 |
reset-names: |
| 54 |
minItems: 1 |
| 55 |
maxItems: 2 |
| 56 |
|
| 57 |
required: |
| 58 |
- compatible |
| 59 |
- reg |
| 60 |
- interrupts |
| 61 |
- interrupt-names |
| 62 |
- clocks |
| 63 |
- clock-names |
| 64 |
- power-domains |
| 65 |
- resets |
| 66 |
|
| 67 |
allOf: |
| 68 |
- $ref: rtc.yaml# |
| 69 |
|
| 70 |
- if: |
| 71 |
properties: |
| 72 |
compatible: |
| 73 |
contains: |
| 74 |
const: renesas,r9a08g045-rtca3 |
| 75 |
then: |
| 76 |
properties: |
| 77 |
resets: |
| 78 |
items: |
| 79 |
- description: VBATTB module reset |
| 80 |
reset-names: |
| 81 |
const: vbattb |
| 82 |
- if: |
| 83 |
properties: |
| 84 |
compatible: |
| 85 |
contains: |
| 86 |
enum: |
| 87 |
- renesas,r9a09g056-rtca3 |
| 88 |
- renesas,r9a09g057-rtca3 |
| 89 |
then: |
| 90 |
properties: |
| 91 |
resets: |
| 92 |
items: |
| 93 |
- description: RTC reset |
| 94 |
- description: Reset for the RTEST registers |
| 95 |
reset-names: |
| 96 |
items: |
| 97 |
- const: rtc |
| 98 |
- const: rtest |
| 99 |
required: |
| 100 |
- reset-names |
| 101 |
|
| 102 |
additionalProperties: false |
| 103 |
|
| 104 |
examples: |
| 105 |
- | |
| 106 |
#include <dt-bindings/clock/r9a08g045-cpg.h> |
| 107 |
#include <dt-bindings/clock/renesas,r9a08g045-vbattb.h> |
| 108 |
#include <dt-bindings/interrupt-controller/arm-gic.h> |
| 109 |
#include <dt-bindings/interrupt-controller/irq.h> |
| 110 |
|
| 111 |
rtc@1004ec00 { |
| 112 |
compatible = "renesas,r9a08g045-rtca3", "renesas,rz-rtca3"; |
| 113 |
reg = <0x1004ec00 0x400>; |
| 114 |
interrupts = <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>, |
| 115 |
<GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>, |
| 116 |
<GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>; |
| 117 |
interrupt-names = "alarm", "period", "carry"; |
| 118 |
clocks = <&cpg CPG_MOD R9A08G045_VBAT_BCLK>, <&vbattclk VBATTB_VBATTCLK>; |
| 119 |
clock-names = "bus", "counter"; |
| 120 |
power-domains = <&cpg>; |
| 121 |
resets = <&cpg R9A08G045_VBAT_BRESETN>; |
| 122 |
reset-names = "vbattb"; |
| 123 |
}; |