Allwinner A31 RTC
Schema identifier ($id): "http://devicetree.org/schemas/rtc/allwinner,sun6i-a31-rtc.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Chen-Yu Tsai <wens@csie.org>", "Maxime Ripard <mripard@kernel.org>"
Properties and child nodes (properties) #
#clock-cells — required here #
Exact value (const): 1
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Allowed values (
enum):"allwinner,sun6i-a31-rtc","allwinner,sun8i-a23-rtc","allwinner,sun8i-h3-rtc","allwinner,sun8i-r40-rtc","allwinner,sun8i-v3-rtc","allwinner,sun50i-h5-rtc","allwinner,sun50i-h6-rtc","allwinner,sun50i-h616-rtc","allwinner,sun50i-r329-rtc"
Rule 2
Array item rules (
items)Item 1
Exact value (
const):"allwinner,sun50i-a64-rtc"Item 2
Exact value (
const):"allwinner,sun8i-h3-rtc"
Rule 3
Array item rules (
items)Item 1
Allowed values (
enum):"allwinner,sun20i-d1-rtc","allwinner,sun55i-a523-rtc"Item 2
Exact value (
const):"allwinner,sun50i-r329-rtc"
reg — required here #
Maximum number of items (maxItems): 1
interrupts — required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
RTC Alarm 0
Item 2
RTC Alarm 1
clocks — not listed as required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 4
clock-names — not listed as required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 4
clock-output-names — not listed as required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 3
The RTC provides up to three clocks - the Low Frequency Oscillator or LOSC, at index 0, - the Low Frequency Oscillator External output (X32KFOUT in the datasheet), at index 1, - the Internal Oscillator, at index 2.
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):rtc.yaml#
Rule 2 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"allwinner,sun6i-a31-rtc"When the condition matches (
then) #Properties and child nodes (
properties)
clock-output-names— not listed as required hereMaximum number of items (
maxItems):1
Rule 3 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Allowed values (
enum):"allwinner,sun8i-a23-rtc","allwinner,sun8i-r40-rtc","allwinner,sun8i-v3-rtc"When the condition matches (
then) #Properties and child nodes (
properties)
clock-output-names— not listed as required hereMinimum number of items (
minItems):2Maximum number of items (
maxItems):2
Rule 4 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Allowed values (
enum):"allwinner,sun8i-h3-rtc","allwinner,sun50i-h5-rtc","allwinner,sun50i-h6-rtc"When the condition matches (
then) #Properties and child nodes (
properties)
clock-output-names— not listed as required hereMinimum number of items (
minItems):3
Rule 5 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"allwinner,sun50i-h616-rtc"When the condition matches (
then) #Properties and child nodes (
properties)
clocks— required hereArray item rules (
items)Item 1
Bus clock for register access
Item 2
24 MHz oscillator
Item 3
32 kHz clock from the CCU
clock-names— required hereArray item rules (
items)Item 1
Exact value (
const):"bus"Item 2
Exact value (
const):"hosc"Item 3
Exact value (
const):"pll-32k"
Rule 6 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"allwinner,sun50i-r329-rtc"When the condition matches (
then) #Properties and child nodes (
properties)
clocks— required hereMinimum number of items (
minItems):3Array item rules (
items)Item 1
Bus clock for register access
Item 2
24 MHz oscillator
Item 3
AHB parent for internal SPI clock
Item 4
External 32768 Hz oscillator
clock-names— required hereMinimum number of items (
minItems):3Array item rules (
items)Item 1
Exact value (
const):"bus"Item 2
Exact value (
const):"hosc"Item 3
Exact value (
const):"ahb"Item 4
Exact value (
const):"ext-osc32k"
Rule 7 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Allowed values (
enum):"allwinner,sun8i-r40-rtc","allwinner,sun50i-h616-rtc","allwinner,sun50i-r329-rtc"When the condition matches (
then) #Properties and child nodes (
properties)
interrupts— not listed as required hereMaximum number of items (
maxItems):1When the condition does not match (
else) #Properties and child nodes (
properties)
interrupts— not listed as required hereMinimum number of items (
minItems):2
Required in this object (required): "#clock-cells", "compatible", "reg", "interrupts"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
rtc: rtc@1f00000 {
compatible = "allwinner,sun6i-a31-rtc";
reg = <0x01f00000 0x400>;
interrupts = <0 40 4>, <0 41 4>;
clock-output-names = "osc32k";
clocks = <&ext_osc32k>;
#clock-cells = <1>;
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: GPL-2.0