| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
# Copyright (C) 2024 Amlogic, Inc. All rights reserved |
| 3 |
%YAML 1.2 |
| 4 |
--- |
| 5 |
$id: http://devicetree.org/schemas/rtc/amlogic,a4-rtc.yaml# |
| 6 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 7 |
|
| 8 |
title: Amlogic A4 and A5 RTC |
| 9 |
|
| 10 |
maintainers: |
| 11 |
- Yiting Deng <[email protected]> |
| 12 |
- Xianwei Zhao <[email protected]> |
| 13 |
|
| 14 |
allOf: |
| 15 |
- $ref: rtc.yaml# |
| 16 |
|
| 17 |
properties: |
| 18 |
compatible: |
| 19 |
oneOf: |
| 20 |
- enum: |
| 21 |
- amlogic,a4-rtc |
| 22 |
- amlogic,a5-rtc |
| 23 |
- items: |
| 24 |
- enum: |
| 25 |
- amlogic,c3-rtc |
| 26 |
- const: amlogic,a5-rtc |
| 27 |
|
| 28 |
reg: |
| 29 |
maxItems: 1 |
| 30 |
|
| 31 |
clocks: |
| 32 |
items: |
| 33 |
- description: RTC clock source, available 24M or 32K crystal |
| 34 |
oscillator source. when using 24M, need to divide 24M into 32K. |
| 35 |
- description: RTC module accesses the clock of the apb bus. |
| 36 |
|
| 37 |
clock-names: |
| 38 |
items: |
| 39 |
- const: osc |
| 40 |
- const: sys |
| 41 |
|
| 42 |
interrupts: |
| 43 |
maxItems: 1 |
| 44 |
|
| 45 |
required: |
| 46 |
- compatible |
| 47 |
- reg |
| 48 |
- clocks |
| 49 |
- clock-names |
| 50 |
- interrupts |
| 51 |
|
| 52 |
additionalProperties: false |
| 53 |
|
| 54 |
examples: |
| 55 |
- | |
| 56 |
#include <dt-bindings/interrupt-controller/arm-gic.h> |
| 57 |
apb { |
| 58 |
#address-cells = <2>; |
| 59 |
#size-cells = <2>; |
| 60 |
|
| 61 |
rtc@8e600 { |
| 62 |
compatible = "amlogic,a4-rtc"; |
| 63 |
reg = <0x0 0x8e600 0x0 0x38>; |
| 64 |
clocks = <&xtal_32k>, <&clkc_periphs 1>; |
| 65 |
clock-names = "osc", "sys"; |
| 66 |
interrupts = <GIC_SPI 131 IRQ_TYPE_EDGE_RISING>; |
| 67 |
}; |
| 68 |
}; |