summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/mfd/x-powers,ac100.yaml
blob: f3d8394b27e7e98de469553b2a2eb055d7bcccc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/x-powers,ac100.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: X-Powers AC100

maintainers:
  - Chen-Yu Tsai <wens@csie.org>

properties:
  compatible:
    const: x-powers,ac100

  reg:
    maxItems: 1

  codec:
    type: object

    properties:
      "#clock-cells":
        const: 0

      compatible:
        const: x-powers,ac100-codec

      interrupts:
        maxItems: 1

      clock-output-names:
        maxItems: 1
        description: >
          Name of the 4M_adda clock exposed by the codec

    required:
      - "#clock-cells"
      - compatible
      - interrupts
      - clock-output-names

    additionalProperties: false

  rtc:
    type: object

    properties:
      "#clock-cells":
        const: 1

      compatible:
        const: x-powers,ac100-rtc

      interrupts:
        maxItems: 1

      clocks:
        maxItems: 1
        description: >
           A phandle to the codec's "4M_adda" clock

      clock-output-names:
        maxItems: 3
        description: >
          Name of the cko1, cko2 and cko3 clocks exposed by the codec

    required:
      - "#clock-cells"
      - compatible
      - interrupts
      - clocks
      - clock-output-names

    additionalProperties: false

required:
  - compatible
  - reg
  - codec
  - rtc

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>

    rsb {
        #address-cells = <1>;
        #size-cells = <0>;

        codec@e89 {
            compatible = "x-powers,ac100";
            reg = <0xe89>;

            ac100_codec: codec {
                compatible = "x-powers,ac100-codec";
                interrupt-parent = <&r_pio>;
                interrupts = <0 9 IRQ_TYPE_LEVEL_LOW>; /* PL9 */
                #clock-cells = <0>;
                clock-output-names = "4M_adda";
            };

            ac100_rtc: rtc {
                compatible = "x-powers,ac100-rtc";
                interrupt-parent = <&nmi_intc>;
                interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
                clocks = <&ac100_codec>;
                #clock-cells = <1>;
                clock-output-names = "cko1_rtc", "cko2_rtc", "cko3_rtc";
            };
        };
    };

...