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