xref: /linux/Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml (revision 1d777b05da6adf970c2cd2e07f5f1953685df110)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/clock/atmel,at91rm9200-pmc.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Atmel Power Management Controller (PMC)
8
9maintainers:
10  - Claudiu Beznea <claudiu.beznea@microchip.com>
11
12description:
13  The power management controller optimizes power consumption by controlling all
14  system and user peripheral clocks. The PMC enables/disables the clock inputs
15  to many of the peripherals and to the processor.
16
17properties:
18  compatible:
19    oneOf:
20      - items:
21          - const: atmel,at91sam9g20-pmc
22          - const: atmel,at91sam9260-pmc
23          - const: syscon
24      - items:
25          - enum:
26              - atmel,at91sam9g15-pmc
27              - atmel,at91sam9g25-pmc
28              - atmel,at91sam9g35-pmc
29              - atmel,at91sam9x25-pmc
30              - atmel,at91sam9x35-pmc
31          - const: atmel,at91sam9x5-pmc
32          - const: syscon
33      - items:
34          - enum:
35              - atmel,at91rm9200-pmc
36              - atmel,at91sam9260-pmc
37              - atmel,at91sam9g45-pmc
38              - atmel,at91sam9n12-pmc
39              - atmel,at91sam9rl-pmc
40              - atmel,at91sam9x5-pmc
41              - atmel,sama5d2-pmc
42              - atmel,sama5d3-pmc
43              - atmel,sama5d4-pmc
44              - microchip,sam9x60-pmc
45              - microchip,sam9x7-pmc
46              - microchip,sama7g5-pmc
47          - const: syscon
48
49  reg:
50    maxItems: 1
51
52  interrupts:
53    maxItems: 1
54
55  "#clock-cells":
56    description: |
57      - 1st cell is the clock type, one of PMC_TYPE_CORE, PMC_TYPE_SYSTEM,
58        PMC_TYPE_PERIPHERAL, PMC_TYPE_GCK, PMC_TYPE_PROGRAMMABLE (as defined
59        in <dt-bindings/clock/at91.h>)
60      - 2nd cell is the clock identifier as defined in <dt-bindings/clock/at91.h
61        (for core clocks) or as defined in datasheet (for system, peripheral,
62        gck and programmable clocks).
63    const: 2
64
65  clocks:
66    minItems: 2
67    maxItems: 3
68
69  clock-names:
70    minItems: 2
71    maxItems: 3
72
73  atmel,osc-bypass:
74    description: set when a clock signal is directly provided on XIN
75    type: boolean
76
77required:
78  - compatible
79  - reg
80  - interrupts
81  - "#clock-cells"
82  - clocks
83  - clock-names
84
85allOf:
86  - if:
87      properties:
88        compatible:
89          contains:
90            enum:
91              - microchip,sam9x60-pmc
92              - microchip,sam9x7-pmc
93              - microchip,sama7g5-pmc
94    then:
95      properties:
96        clocks:
97          minItems: 3
98          maxItems: 3
99        clock-names:
100          items:
101            - const: td_slck
102            - const: md_slck
103            - const: main_xtal
104
105  - if:
106      properties:
107        compatible:
108          contains:
109            enum:
110              - atmel,at91rm9200-pmc
111              - atmel,at91sam9260-pmc
112              - atmel,at91sam9g20-pmc
113    then:
114      properties:
115        clocks:
116          minItems: 2
117          maxItems: 2
118        clock-names:
119          items:
120            - const: slow_xtal
121            - const: main_xtal
122
123  - if:
124      properties:
125        compatible:
126          contains:
127            enum:
128              - atmel,sama5d2-pmc
129              - atmel,sama5d3-pmc
130              - atmel,sama5d4-pmc
131    then:
132      properties:
133        clocks:
134          minItems: 2
135          maxItems: 2
136        clock-names:
137          items:
138            - const: slow_clk
139            - const: main_xtal
140
141additionalProperties: false
142
143examples:
144  - |
145    #include <dt-bindings/interrupt-controller/irq.h>
146
147    pmc: clock-controller@f0018000 {
148        compatible = "atmel,sama5d4-pmc", "syscon";
149        reg = <0xf0018000 0x120>;
150        interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
151        #clock-cells = <2>;
152        clocks = <&clk32k>, <&main_xtal>;
153        clock-names = "slow_clk", "main_xtal";
154    };
155
156...
157