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