summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml
blob: e1d716df5dfa6679304fb6459cfc32354f368ebd (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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/soc/samsung/exynos-pmu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Samsung Exynos SoC series Power Management Unit (PMU)

maintainers:
  - Krzysztof Kozlowski <krzk@kernel.org>

# Custom select to avoid matching all nodes with 'syscon'
select:
  properties:
    compatible:
      contains:
        enum:
          - samsung,exynos3250-pmu
          - samsung,exynos4210-pmu
          - samsung,exynos4212-pmu
          - samsung,exynos4412-pmu
          - samsung,exynos5250-pmu
          - samsung,exynos5260-pmu
          - samsung,exynos5410-pmu
          - samsung,exynos5420-pmu
          - samsung,exynos5433-pmu
          - samsung,exynos7-pmu
          - samsung,exynos850-pmu
          - samsung-s5pv210-pmu
  required:
    - compatible

properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - samsung,exynos3250-pmu
              - samsung,exynos4210-pmu
              - samsung,exynos4212-pmu
              - samsung,exynos4412-pmu
              - samsung,exynos5250-pmu
              - samsung,exynos5260-pmu
              - samsung,exynos5410-pmu
              - samsung,exynos5420-pmu
              - samsung,exynos5433-pmu
              - samsung,exynos7-pmu
              - samsung,exynos850-pmu
              - samsung-s5pv210-pmu
          - const: syscon
      - items:
          - enum:
              - samsung,exynos3250-pmu
              - samsung,exynos4210-pmu
              - samsung,exynos4212-pmu
              - samsung,exynos4412-pmu
              - samsung,exynos5250-pmu
              - samsung,exynos5420-pmu
              - samsung,exynos5433-pmu
          - const: simple-mfd
          - const: syscon

  reg:
    maxItems: 1

  '#clock-cells':
    const: 1

  clock-names:
    description:
      List of clock names for particular CLKOUT mux inputs
    minItems: 1
    maxItems: 32
    items:
      pattern: '^clkout([0-9]|[12][0-9]|3[0-1])$'

  clocks:
    minItems: 1
    maxItems: 32

  dp-phy:
    $ref: /schemas/phy/samsung,dp-video-phy.yaml
    unevaluatedProperties: false

  interrupt-controller:
    description:
      Some PMUs are capable of behaving as an interrupt controller (mostly
      to wake up a suspended PMU).

  '#interrupt-cells':
    description:
      Must be identical to the that of the parent interrupt controller.
    const: 3

  mipi-phy:
    $ref: /schemas/phy/samsung,mipi-video-phy.yaml
    unevaluatedProperties: false

  reboot-mode:
    $ref: /schemas/power/reset/syscon-reboot-mode.yaml
    type: object
    description:
      Reboot mode to alter bootloader behavior for the next boot

  syscon-poweroff:
    $ref: /schemas/power/reset/syscon-poweroff.yaml#
    type: object
    description:
      Node for power off method

  syscon-reboot:
    $ref: /schemas/power/reset/syscon-reboot.yaml#
    type: object
    description:
      Node for reboot method

required:
  - compatible
  - reg

additionalProperties: false

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - samsung,exynos3250-pmu
              - samsung,exynos4210-pmu
              - samsung,exynos4212-pmu
              - samsung,exynos4412-pmu
              - samsung,exynos5250-pmu
              - samsung,exynos5410-pmu
              - samsung,exynos5420-pmu
              - samsung,exynos5433-pmu
    then:
      required:
        - '#clock-cells'
        - clock-names
        - clocks

  - if:
      properties:
        compatible:
          contains:
            enum:
              - samsung,exynos3250-pmu
              - samsung,exynos4210-pmu
              - samsung,exynos4212-pmu
              - samsung,exynos4412-pmu
              - samsung,exynos5250-pmu
              - samsung,exynos5420-pmu
              - samsung,exynos5433-pmu
    then:
      properties:
        mipi-phy: true
    else:
      properties:
        mipi-phy: false

  - if:
      properties:
        compatible:
          contains:
            enum:
              - samsung,exynos5250-pmu
              - samsung,exynos5420-pmu
              - samsung,exynos5433-pmu
    then:
      properties:
        dp-phy: true
    else:
      properties:
        dp-phy: false

examples:
  - |
    #include <dt-bindings/clock/exynos5250.h>

    pmu_system_controller: system-controller@10040000 {
        compatible = "samsung,exynos5250-pmu", "syscon";
        reg = <0x10040000 0x5000>;
        interrupt-controller;
        #interrupt-cells = <3>;
        interrupt-parent = <&gic>;
        #clock-cells = <1>;
        clock-names = "clkout16";
        clocks = <&clock CLK_FIN_PLL>;

        dp-phy {
            compatible = "samsung,exynos5250-dp-video-phy";
            #phy-cells = <0>;
        };

        mipi-phy {
            compatible = "samsung,s5pv210-mipi-video-phy";
            #phy-cells = <1>;
        };
    };