15a079759SMaxime Ripard# SPDX-License-Identifier: GPL-2.0 25a079759SMaxime Ripard%YAML 1.2 35a079759SMaxime Ripard--- 45a079759SMaxime Ripard$id: http://devicetree.org/schemas/rtc/allwinner,sun6i-a31-rtc.yaml# 55a079759SMaxime Ripard$schema: http://devicetree.org/meta-schemas/core.yaml# 65a079759SMaxime Ripard 7dd3cb467SAndrew Lunntitle: Allwinner A31 RTC 85a079759SMaxime Ripard 95a079759SMaxime Ripardmaintainers: 105a079759SMaxime Ripard - Chen-Yu Tsai <wens@csie.org> 115c7404bbSMaxime Ripard - Maxime Ripard <mripard@kernel.org> 125a079759SMaxime Ripard 135a079759SMaxime Ripardproperties: 145a079759SMaxime Ripard "#clock-cells": 155a079759SMaxime Ripard const: 1 165a079759SMaxime Ripard 175a079759SMaxime Ripard compatible: 185a079759SMaxime Ripard oneOf: 19f720002dSSamuel Holland - enum: 20f720002dSSamuel Holland - allwinner,sun6i-a31-rtc 21f720002dSSamuel Holland - allwinner,sun8i-a23-rtc 22f720002dSSamuel Holland - allwinner,sun8i-h3-rtc 23f720002dSSamuel Holland - allwinner,sun8i-r40-rtc 24f720002dSSamuel Holland - allwinner,sun8i-v3-rtc 25f720002dSSamuel Holland - allwinner,sun50i-h5-rtc 26f720002dSSamuel Holland - allwinner,sun50i-h6-rtc 278487614aSSamuel Holland - allwinner,sun50i-h616-rtc 288487614aSSamuel Holland - allwinner,sun50i-r329-rtc 295a079759SMaxime Ripard - items: 305a079759SMaxime Ripard - const: allwinner,sun50i-a64-rtc 315a079759SMaxime Ripard - const: allwinner,sun8i-h3-rtc 328487614aSSamuel Holland - items: 338487614aSSamuel Holland - const: allwinner,sun20i-d1-rtc 348487614aSSamuel Holland - const: allwinner,sun50i-r329-rtc 355a079759SMaxime Ripard 365a079759SMaxime Ripard reg: 375a079759SMaxime Ripard maxItems: 1 385a079759SMaxime Ripard 395a079759SMaxime Ripard interrupts: 40f5a33649SMaxime Ripard minItems: 1 415a079759SMaxime Ripard items: 425a079759SMaxime Ripard - description: RTC Alarm 0 435a079759SMaxime Ripard - description: RTC Alarm 1 445a079759SMaxime Ripard 455a079759SMaxime Ripard clocks: 468487614aSSamuel Holland minItems: 1 478487614aSSamuel Holland maxItems: 4 488487614aSSamuel Holland 498487614aSSamuel Holland clock-names: 508487614aSSamuel Holland minItems: 1 518487614aSSamuel Holland maxItems: 4 525a079759SMaxime Ripard 535a079759SMaxime Ripard clock-output-names: 545a079759SMaxime Ripard minItems: 1 555a079759SMaxime Ripard maxItems: 3 565a079759SMaxime Ripard description: 575a079759SMaxime Ripard The RTC provides up to three clocks 585a079759SMaxime Ripard - the Low Frequency Oscillator or LOSC, at index 0, 595a079759SMaxime Ripard - the Low Frequency Oscillator External output (X32KFOUT in 605a079759SMaxime Ripard the datasheet), at index 1, 615a079759SMaxime Ripard - the Internal Oscillator, at index 2. 625a079759SMaxime Ripard 635a079759SMaxime RipardallOf: 64*ab0fccc3SRob Herring - $ref: rtc.yaml# 655a079759SMaxime Ripard - if: 665a079759SMaxime Ripard properties: 675a079759SMaxime Ripard compatible: 685a079759SMaxime Ripard contains: 695a079759SMaxime Ripard const: allwinner,sun6i-a31-rtc 705a079759SMaxime Ripard 715a079759SMaxime Ripard then: 725a079759SMaxime Ripard properties: 735a079759SMaxime Ripard clock-output-names: 745a079759SMaxime Ripard maxItems: 1 755a079759SMaxime Ripard 765a079759SMaxime Ripard - if: 775a079759SMaxime Ripard properties: 785a079759SMaxime Ripard compatible: 795a079759SMaxime Ripard contains: 805a079759SMaxime Ripard enum: 815a079759SMaxime Ripard - allwinner,sun8i-a23-rtc 82f5a33649SMaxime Ripard - allwinner,sun8i-r40-rtc 835a079759SMaxime Ripard - allwinner,sun8i-v3-rtc 845a079759SMaxime Ripard 855a079759SMaxime Ripard then: 865a079759SMaxime Ripard properties: 875a079759SMaxime Ripard clock-output-names: 885a079759SMaxime Ripard minItems: 2 895a079759SMaxime Ripard maxItems: 2 905a079759SMaxime Ripard 915a079759SMaxime Ripard - if: 925a079759SMaxime Ripard properties: 935a079759SMaxime Ripard compatible: 945a079759SMaxime Ripard contains: 955a079759SMaxime Ripard enum: 965a079759SMaxime Ripard - allwinner,sun8i-h3-rtc 975a079759SMaxime Ripard - allwinner,sun50i-h5-rtc 98f720002dSSamuel Holland - allwinner,sun50i-h6-rtc 99903e259fSOndrej Jirman 100903e259fSOndrej Jirman then: 101903e259fSOndrej Jirman properties: 102903e259fSOndrej Jirman clock-output-names: 103903e259fSOndrej Jirman minItems: 3 104903e259fSOndrej Jirman 105903e259fSOndrej Jirman - if: 106903e259fSOndrej Jirman properties: 107903e259fSOndrej Jirman compatible: 108903e259fSOndrej Jirman contains: 1098487614aSSamuel Holland const: allwinner,sun50i-h616-rtc 1108487614aSSamuel Holland 1118487614aSSamuel Holland then: 1128487614aSSamuel Holland properties: 1138487614aSSamuel Holland clocks: 1148487614aSSamuel Holland items: 1158487614aSSamuel Holland - description: Bus clock for register access 1168487614aSSamuel Holland - description: 24 MHz oscillator 1178487614aSSamuel Holland - description: 32 kHz clock from the CCU 1188487614aSSamuel Holland 1198487614aSSamuel Holland clock-names: 1208487614aSSamuel Holland items: 1218487614aSSamuel Holland - const: bus 1228487614aSSamuel Holland - const: hosc 1238487614aSSamuel Holland - const: pll-32k 1248487614aSSamuel Holland 1258487614aSSamuel Holland required: 1268487614aSSamuel Holland - clocks 1278487614aSSamuel Holland - clock-names 1288487614aSSamuel Holland 1298487614aSSamuel Holland - if: 1308487614aSSamuel Holland properties: 1318487614aSSamuel Holland compatible: 1328487614aSSamuel Holland contains: 1338487614aSSamuel Holland const: allwinner,sun50i-r329-rtc 1348487614aSSamuel Holland 1358487614aSSamuel Holland then: 1368487614aSSamuel Holland properties: 1378487614aSSamuel Holland clocks: 1388487614aSSamuel Holland minItems: 3 1398487614aSSamuel Holland items: 1408487614aSSamuel Holland - description: Bus clock for register access 1418487614aSSamuel Holland - description: 24 MHz oscillator 1428487614aSSamuel Holland - description: AHB parent for internal SPI clock 1438487614aSSamuel Holland - description: External 32768 Hz oscillator 1448487614aSSamuel Holland 1458487614aSSamuel Holland clock-names: 1468487614aSSamuel Holland minItems: 3 1478487614aSSamuel Holland items: 1488487614aSSamuel Holland - const: bus 1498487614aSSamuel Holland - const: hosc 1508487614aSSamuel Holland - const: ahb 1518487614aSSamuel Holland - const: ext-osc32k 1528487614aSSamuel Holland 1538487614aSSamuel Holland required: 1548487614aSSamuel Holland - clocks 1558487614aSSamuel Holland - clock-names 1568487614aSSamuel Holland 1578487614aSSamuel Holland - if: 1588487614aSSamuel Holland properties: 1598487614aSSamuel Holland compatible: 1608487614aSSamuel Holland contains: 1618487614aSSamuel Holland enum: 1628487614aSSamuel Holland - allwinner,sun8i-r40-rtc 1638487614aSSamuel Holland - allwinner,sun50i-h616-rtc 1648487614aSSamuel Holland - allwinner,sun50i-r329-rtc 165f5a33649SMaxime Ripard 166f5a33649SMaxime Ripard then: 167f5a33649SMaxime Ripard properties: 168f5a33649SMaxime Ripard interrupts: 169f5a33649SMaxime Ripard maxItems: 1 170f5a33649SMaxime Ripard 171f5a33649SMaxime Ripard else: 172f5a33649SMaxime Ripard properties: 173f5a33649SMaxime Ripard interrupts: 174f5a33649SMaxime Ripard minItems: 2 175f5a33649SMaxime Ripard 1765a079759SMaxime Ripardrequired: 1775a079759SMaxime Ripard - "#clock-cells" 1785a079759SMaxime Ripard - compatible 1795a079759SMaxime Ripard - reg 1805a079759SMaxime Ripard - interrupts 1815a079759SMaxime Ripard 1825a079759SMaxime RipardadditionalProperties: false 1835a079759SMaxime Ripard 1845a079759SMaxime Ripardexamples: 1855a079759SMaxime Ripard - | 1865a079759SMaxime Ripard rtc: rtc@1f00000 { 1875a079759SMaxime Ripard compatible = "allwinner,sun6i-a31-rtc"; 1885a079759SMaxime Ripard reg = <0x01f00000 0x400>; 1895a079759SMaxime Ripard interrupts = <0 40 4>, <0 41 4>; 1905a079759SMaxime Ripard clock-output-names = "osc32k"; 1915a079759SMaxime Ripard clocks = <&ext_osc32k>; 1925a079759SMaxime Ripard #clock-cells = <1>; 1935a079759SMaxime Ripard }; 1945a079759SMaxime Ripard 1955a079759SMaxime Ripard... 196