1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/soc/samsung/exynos-pmu.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Samsung Exynos SoC series Power Management Unit (PMU)
8
9maintainers:
10  - Krzysztof Kozlowski <krzk@kernel.org>
11
12# Custom select to avoid matching all nodes with 'syscon'
13select:
14  properties:
15    compatible:
16      contains:
17        enum:
18          - samsung,exynos3250-pmu
19          - samsung,exynos4210-pmu
20          - samsung,exynos4412-pmu
21          - samsung,exynos5250-pmu
22          - samsung,exynos5260-pmu
23          - samsung,exynos5410-pmu
24          - samsung,exynos5420-pmu
25          - samsung,exynos5433-pmu
26          - samsung,exynos7-pmu
27          - samsung,exynos850-pmu
28          - samsung-s5pv210-pmu
29  required:
30    - compatible
31
32properties:
33  compatible:
34    oneOf:
35      - items:
36          - enum:
37              - samsung,exynos3250-pmu
38              - samsung,exynos4210-pmu
39              - samsung,exynos4412-pmu
40              - samsung,exynos5250-pmu
41              - samsung,exynos5260-pmu
42              - samsung,exynos5410-pmu
43              - samsung,exynos5420-pmu
44              - samsung,exynos5433-pmu
45              - samsung,exynos7-pmu
46              - samsung,exynos850-pmu
47              - samsung-s5pv210-pmu
48          - const: syscon
49      - items:
50          - enum:
51              - samsung,exynos3250-pmu
52              - samsung,exynos4210-pmu
53              - samsung,exynos4412-pmu
54              - samsung,exynos5250-pmu
55              - samsung,exynos5420-pmu
56              - samsung,exynos5433-pmu
57          - const: simple-mfd
58          - const: syscon
59
60  reg:
61    maxItems: 1
62
63  '#clock-cells':
64    const: 1
65
66  clock-names:
67    description:
68      List of clock names for particular CLKOUT mux inputs
69    minItems: 1
70    maxItems: 32
71    items:
72      pattern: '^clkout([0-9]|[12][0-9]|3[0-1])$'
73
74  clocks:
75    minItems: 1
76    maxItems: 32
77
78  dp-phy:
79    $ref: /schemas/phy/samsung,dp-video-phy.yaml
80    unevaluatedProperties: false
81
82  interrupt-controller:
83    description:
84      Some PMUs are capable of behaving as an interrupt controller (mostly
85      to wake up a suspended PMU).
86
87  '#interrupt-cells':
88    description:
89      Must be identical to the that of the parent interrupt controller.
90    const: 3
91
92  mipi-phy:
93    $ref: /schemas/phy/samsung,mipi-video-phy.yaml
94    unevaluatedProperties: false
95
96  reboot-mode:
97    $ref: /schemas/power/reset/syscon-reboot-mode.yaml
98    type: object
99    description:
100      Reboot mode to alter bootloader behavior for the next boot
101
102  syscon-poweroff:
103    $ref: /schemas/power/reset/syscon-poweroff.yaml#
104    type: object
105    description:
106      Node for power off method
107
108  syscon-reboot:
109    $ref: /schemas/power/reset/syscon-reboot.yaml#
110    type: object
111    description:
112      Node for reboot method
113
114required:
115  - compatible
116  - reg
117
118additionalProperties: false
119
120allOf:
121  - if:
122      properties:
123        compatible:
124          contains:
125            enum:
126              - samsung,exynos3250-pmu
127              - samsung,exynos4210-pmu
128              - samsung,exynos4412-pmu
129              - samsung,exynos5250-pmu
130              - samsung,exynos5410-pmu
131              - samsung,exynos5420-pmu
132              - samsung,exynos5433-pmu
133    then:
134      required:
135        - '#clock-cells'
136        - clock-names
137        - clocks
138
139  - if:
140      properties:
141        compatible:
142          contains:
143            enum:
144              - samsung,exynos3250-pmu
145              - samsung,exynos4210-pmu
146              - samsung,exynos4412-pmu
147              - samsung,exynos5250-pmu
148              - samsung,exynos5420-pmu
149              - samsung,exynos5433-pmu
150    then:
151      properties:
152        mipi-phy: true
153    else:
154      properties:
155        mipi-phy: false
156
157  - if:
158      properties:
159        compatible:
160          contains:
161            enum:
162              - samsung,exynos5250-pmu
163              - samsung,exynos5420-pmu
164              - samsung,exynos5433-pmu
165    then:
166      properties:
167        dp-phy: true
168    else:
169      properties:
170        dp-phy: false
171
172examples:
173  - |
174    #include <dt-bindings/clock/exynos5250.h>
175
176    pmu_system_controller: system-controller@10040000 {
177        compatible = "samsung,exynos5250-pmu", "syscon";
178        reg = <0x10040000 0x5000>;
179        interrupt-controller;
180        #interrupt-cells = <3>;
181        interrupt-parent = <&gic>;
182        #clock-cells = <1>;
183        clock-names = "clkout16";
184        clocks = <&clock CLK_FIN_PLL>;
185
186        dp-phy {
187            compatible = "samsung,exynos5250-dp-video-phy";
188            #phy-cells = <0>;
189        };
190
191        mipi-phy {
192            compatible = "samsung,s5pv210-mipi-video-phy";
193            #phy-cells = <1>;
194        };
195    };
196