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 75a079759SMaxime Ripardtitle: Allwinner A31 RTC Device Tree Bindings 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 27*8487614aSSamuel Holland - allwinner,sun50i-h616-rtc 28*8487614aSSamuel Holland - allwinner,sun50i-r329-rtc 295a079759SMaxime Ripard - items: 305a079759SMaxime Ripard - const: allwinner,sun50i-a64-rtc 315a079759SMaxime Ripard - const: allwinner,sun8i-h3-rtc 32*8487614aSSamuel Holland - items: 33*8487614aSSamuel Holland - const: allwinner,sun20i-d1-rtc 34*8487614aSSamuel 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: 46*8487614aSSamuel Holland minItems: 1 47*8487614aSSamuel Holland maxItems: 4 48*8487614aSSamuel Holland 49*8487614aSSamuel Holland clock-names: 50*8487614aSSamuel Holland minItems: 1 51*8487614aSSamuel 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: 645a079759SMaxime Ripard - $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 minItems: 1 755a079759SMaxime Ripard maxItems: 1 765a079759SMaxime Ripard 775a079759SMaxime Ripard - if: 785a079759SMaxime Ripard properties: 795a079759SMaxime Ripard compatible: 805a079759SMaxime Ripard contains: 815a079759SMaxime Ripard enum: 825a079759SMaxime Ripard - allwinner,sun8i-a23-rtc 83f5a33649SMaxime Ripard - allwinner,sun8i-r40-rtc 845a079759SMaxime Ripard - allwinner,sun8i-v3-rtc 855a079759SMaxime Ripard 865a079759SMaxime Ripard then: 875a079759SMaxime Ripard properties: 885a079759SMaxime Ripard clock-output-names: 895a079759SMaxime Ripard minItems: 2 905a079759SMaxime Ripard maxItems: 2 915a079759SMaxime Ripard 925a079759SMaxime Ripard - if: 935a079759SMaxime Ripard properties: 945a079759SMaxime Ripard compatible: 955a079759SMaxime Ripard contains: 965a079759SMaxime Ripard enum: 975a079759SMaxime Ripard - allwinner,sun8i-h3-rtc 985a079759SMaxime Ripard - allwinner,sun50i-h5-rtc 99f720002dSSamuel Holland - allwinner,sun50i-h6-rtc 100903e259fSOndrej Jirman 101903e259fSOndrej Jirman then: 102903e259fSOndrej Jirman properties: 103903e259fSOndrej Jirman clock-output-names: 104903e259fSOndrej Jirman minItems: 3 105903e259fSOndrej Jirman maxItems: 3 106903e259fSOndrej Jirman 107903e259fSOndrej Jirman - if: 108903e259fSOndrej Jirman properties: 109903e259fSOndrej Jirman compatible: 110903e259fSOndrej Jirman contains: 111*8487614aSSamuel Holland const: allwinner,sun50i-h616-rtc 112*8487614aSSamuel Holland 113*8487614aSSamuel Holland then: 114*8487614aSSamuel Holland properties: 115*8487614aSSamuel Holland clocks: 116*8487614aSSamuel Holland minItems: 3 117*8487614aSSamuel Holland maxItems: 3 118*8487614aSSamuel Holland items: 119*8487614aSSamuel Holland - description: Bus clock for register access 120*8487614aSSamuel Holland - description: 24 MHz oscillator 121*8487614aSSamuel Holland - description: 32 kHz clock from the CCU 122*8487614aSSamuel Holland 123*8487614aSSamuel Holland clock-names: 124*8487614aSSamuel Holland minItems: 3 125*8487614aSSamuel Holland maxItems: 3 126*8487614aSSamuel Holland items: 127*8487614aSSamuel Holland - const: bus 128*8487614aSSamuel Holland - const: hosc 129*8487614aSSamuel Holland - const: pll-32k 130*8487614aSSamuel Holland 131*8487614aSSamuel Holland required: 132*8487614aSSamuel Holland - clocks 133*8487614aSSamuel Holland - clock-names 134*8487614aSSamuel Holland 135*8487614aSSamuel Holland - if: 136*8487614aSSamuel Holland properties: 137*8487614aSSamuel Holland compatible: 138*8487614aSSamuel Holland contains: 139*8487614aSSamuel Holland const: allwinner,sun50i-r329-rtc 140*8487614aSSamuel Holland 141*8487614aSSamuel Holland then: 142*8487614aSSamuel Holland properties: 143*8487614aSSamuel Holland clocks: 144*8487614aSSamuel Holland minItems: 3 145*8487614aSSamuel Holland maxItems: 4 146*8487614aSSamuel Holland items: 147*8487614aSSamuel Holland - description: Bus clock for register access 148*8487614aSSamuel Holland - description: 24 MHz oscillator 149*8487614aSSamuel Holland - description: AHB parent for internal SPI clock 150*8487614aSSamuel Holland - description: External 32768 Hz oscillator 151*8487614aSSamuel Holland 152*8487614aSSamuel Holland clock-names: 153*8487614aSSamuel Holland minItems: 3 154*8487614aSSamuel Holland maxItems: 4 155*8487614aSSamuel Holland items: 156*8487614aSSamuel Holland - const: bus 157*8487614aSSamuel Holland - const: hosc 158*8487614aSSamuel Holland - const: ahb 159*8487614aSSamuel Holland - const: ext-osc32k 160*8487614aSSamuel Holland 161*8487614aSSamuel Holland required: 162*8487614aSSamuel Holland - clocks 163*8487614aSSamuel Holland - clock-names 164*8487614aSSamuel Holland 165*8487614aSSamuel Holland - if: 166*8487614aSSamuel Holland properties: 167*8487614aSSamuel Holland compatible: 168*8487614aSSamuel Holland contains: 169*8487614aSSamuel Holland enum: 170*8487614aSSamuel Holland - allwinner,sun8i-r40-rtc 171*8487614aSSamuel Holland - allwinner,sun50i-h616-rtc 172*8487614aSSamuel Holland - allwinner,sun50i-r329-rtc 173f5a33649SMaxime Ripard 174f5a33649SMaxime Ripard then: 175f5a33649SMaxime Ripard properties: 176f5a33649SMaxime Ripard interrupts: 177f5a33649SMaxime Ripard minItems: 1 178f5a33649SMaxime Ripard maxItems: 1 179f5a33649SMaxime Ripard 180f5a33649SMaxime Ripard else: 181f5a33649SMaxime Ripard properties: 182f5a33649SMaxime Ripard interrupts: 183f5a33649SMaxime Ripard minItems: 2 184f5a33649SMaxime Ripard maxItems: 2 185f5a33649SMaxime Ripard 1865a079759SMaxime Ripardrequired: 1875a079759SMaxime Ripard - "#clock-cells" 1885a079759SMaxime Ripard - compatible 1895a079759SMaxime Ripard - reg 1905a079759SMaxime Ripard - interrupts 1915a079759SMaxime Ripard 1925a079759SMaxime RipardadditionalProperties: false 1935a079759SMaxime Ripard 1945a079759SMaxime Ripardexamples: 1955a079759SMaxime Ripard - | 1965a079759SMaxime Ripard rtc: rtc@1f00000 { 1975a079759SMaxime Ripard compatible = "allwinner,sun6i-a31-rtc"; 1985a079759SMaxime Ripard reg = <0x01f00000 0x400>; 1995a079759SMaxime Ripard interrupts = <0 40 4>, <0 41 4>; 2005a079759SMaxime Ripard clock-output-names = "osc32k"; 2015a079759SMaxime Ripard clocks = <&ext_osc32k>; 2025a079759SMaxime Ripard #clock-cells = <1>; 2035a079759SMaxime Ripard }; 2045a079759SMaxime Ripard 2055a079759SMaxime Ripard... 206