summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml
blob: c1bdcd9058edf0fb4f49df1178fd87665714b63f (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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/atmel,at91rm9200-pmc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Atmel Power Management Controller (PMC)

maintainers:
  - Claudiu Beznea <claudiu.beznea@microchip.com>

description:
  The power management controller optimizes power consumption by controlling all
  system and user peripheral clocks. The PMC enables/disables the clock inputs
  to many of the peripherals and to the processor.

properties:
  compatible:
    oneOf:
      - items:
          - const: atmel,at91sam9g20-pmc
          - const: atmel,at91sam9260-pmc
          - const: syscon
      - items:
          - enum:
              - atmel,at91sam9g15-pmc
              - atmel,at91sam9g25-pmc
              - atmel,at91sam9g35-pmc
              - atmel,at91sam9x25-pmc
              - atmel,at91sam9x35-pmc
          - const: atmel,at91sam9x5-pmc
          - const: syscon
      - items:
          - enum:
              - atmel,at91rm9200-pmc
              - atmel,at91sam9260-pmc
              - atmel,at91sam9g45-pmc
              - atmel,at91sam9n12-pmc
              - atmel,at91sam9rl-pmc
              - atmel,at91sam9x5-pmc
              - atmel,sama5d2-pmc
              - atmel,sama5d3-pmc
              - atmel,sama5d4-pmc
              - microchip,sam9x60-pmc
              - microchip,sama7g5-pmc
          - const: syscon

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  "#clock-cells":
    description: |
      - 1st cell is the clock type, one of PMC_TYPE_CORE, PMC_TYPE_SYSTEM,
        PMC_TYPE_PERIPHERAL, PMC_TYPE_GCK, PMC_TYPE_PROGRAMMABLE (as defined
        in <dt-bindings/clock/at91.h>)
      - 2nd cell is the clock identifier as defined in <dt-bindings/clock/at91.h
        (for core clocks) or as defined in datasheet (for system, peripheral,
        gck and programmable clocks).
    const: 2

  clocks:
    minItems: 2
    maxItems: 3

  clock-names:
    minItems: 2
    maxItems: 3

  atmel,osc-bypass:
    description: set when a clock signal is directly provided on XIN
    type: boolean

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

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - microchip,sam9x60-pmc
              - microchip,sama7g5-pmc
    then:
      properties:
        clocks:
          minItems: 3
          maxItems: 3
        clock-names:
          items:
            - const: td_slck
            - const: md_slck
            - const: main_xtal

  - if:
      properties:
        compatible:
          contains:
            enum:
              - atmel,at91rm9200-pmc
              - atmel,at91sam9260-pmc
              - atmel,at91sam9g20-pmc
    then:
      properties:
        clocks:
          minItems: 2
          maxItems: 2
        clock-names:
          items:
            - const: slow_xtal
            - const: main_xtal

  - if:
      properties:
        compatible:
          contains:
            enum:
              - atmel,sama5d2-pmc
              - atmel,sama5d3-pmc
              - atmel,sama5d4-pmc
    then:
      properties:
        clocks:
          minItems: 2
          maxItems: 2
        clock-names:
          items:
            - const: slow_clk
            - const: main_xtal

additionalProperties: false

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

    pmc: clock-controller@f0018000 {
        compatible = "atmel,sama5d4-pmc", "syscon";
        reg = <0xf0018000 0x120>;
        interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
        #clock-cells = <2>;
        clocks = <&clk32k>, <&main_xtal>;
        clock-names = "slow_clk", "main_xtal";
    };

...