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,sama7g5-pmc
46          - const: syscon
47
48  reg:
49    maxItems: 1
50
51  interrupts:
52    maxItems: 1
53
54  "#clock-cells":
55    description: |
56      - 1st cell is the clock type, one of PMC_TYPE_CORE, PMC_TYPE_SYSTEM,
57        PMC_TYPE_PERIPHERAL, PMC_TYPE_GCK, PMC_TYPE_PROGRAMMABLE (as defined
58        in <dt-bindings/clock/at91.h>)
59      - 2nd cell is the clock identifier as defined in <dt-bindings/clock/at91.h
60        (for core clocks) or as defined in datasheet (for system, peripheral,
61        gck and programmable clocks).
62    const: 2
63
64  clocks:
65    minItems: 2
66    maxItems: 3
67
68  clock-names:
69    minItems: 2
70    maxItems: 3
71
72  atmel,osc-bypass:
73    description: set when a clock signal is directly provided on XIN
74    type: boolean
75
76required:
77  - compatible
78  - reg
79  - interrupts
80  - "#clock-cells"
81  - clocks
82  - clock-names
83
84allOf:
85  - if:
86      properties:
87        compatible:
88          contains:
89            enum:
90              - microchip,sam9x60-pmc
91              - microchip,sama7g5-pmc
92    then:
93      properties:
94        clocks:
95          minItems: 3
96          maxItems: 3
97        clock-names:
98          items:
99            - const: td_slck
100            - const: md_slck
101            - const: main_xtal
102
103  - if:
104      properties:
105        compatible:
106          contains:
107            enum:
108              - atmel,at91rm9200-pmc
109              - atmel,at91sam9260-pmc
110              - atmel,at91sam9g20-pmc
111    then:
112      properties:
113        clocks:
114          minItems: 2
115          maxItems: 2
116        clock-names:
117          items:
118            - const: slow_xtal
119            - const: main_xtal
120
121  - if:
122      properties:
123        compatible:
124          contains:
125            enum:
126              - atmel,sama5d2-pmc
127              - atmel,sama5d3-pmc
128              - atmel,sama5d4-pmc
129    then:
130      properties:
131        clocks:
132          minItems: 2
133          maxItems: 2
134        clock-names:
135          items:
136            - const: slow_clk
137            - const: main_xtal
138
139additionalProperties: false
140
141examples:
142  - |
143    #include <dt-bindings/interrupt-controller/irq.h>
144
145    pmc: clock-controller@f0018000 {
146        compatible = "atmel,sama5d4-pmc", "syscon";
147        reg = <0xf0018000 0x120>;
148        interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
149        #clock-cells = <2>;
150        clocks = <&clk32k>, <&main_xtal>;
151        clock-names = "slow_clk", "main_xtal";
152    };
153
154...
155