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,exynos5250-pmu
52              - samsung,exynos5420-pmu
53              - samsung,exynos5433-pmu
54          - const: simple-mfd
55          - const: syscon
56
57  reg:
58    maxItems: 1
59
60  '#clock-cells':
61    const: 1
62
63  clock-names:
64    description:
65      List of clock names for particular CLKOUT mux inputs
66    minItems: 1
67    maxItems: 32
68    items:
69      pattern: '^clkout([0-9]|[12][0-9]|3[0-1])$'
70
71  clocks:
72    minItems: 1
73    maxItems: 32
74
75  dp-phy:
76    $ref: /schemas/phy/samsung,dp-video-phy.yaml
77    unevaluatedProperties: false
78
79  interrupt-controller:
80    description:
81      Some PMUs are capable of behaving as an interrupt controller (mostly
82      to wake up a suspended PMU).
83
84  '#interrupt-cells':
85    description:
86      Must be identical to the that of the parent interrupt controller.
87    const: 3
88
89  mipi-phy:
90    $ref: /schemas/phy/samsung,mipi-video-phy.yaml
91    unevaluatedProperties: false
92
93  reboot-mode:
94    $ref: /schemas/power/reset/syscon-reboot-mode.yaml
95    type: object
96    description:
97      Reboot mode to alter bootloader behavior for the next boot
98
99  syscon-poweroff:
100    $ref: /schemas/power/reset/syscon-poweroff.yaml#
101    type: object
102    description:
103      Node for power off method
104
105  syscon-reboot:
106    $ref: /schemas/power/reset/syscon-reboot.yaml#
107    type: object
108    description:
109      Node for reboot method
110
111required:
112  - compatible
113  - reg
114
115additionalProperties: false
116
117allOf:
118  - if:
119      properties:
120        compatible:
121          contains:
122            enum:
123              - samsung,exynos3250-pmu
124              - samsung,exynos4210-pmu
125              - samsung,exynos4412-pmu
126              - samsung,exynos5250-pmu
127              - samsung,exynos5410-pmu
128              - samsung,exynos5420-pmu
129              - samsung,exynos5433-pmu
130    then:
131      required:
132        - '#clock-cells'
133        - clock-names
134        - clocks
135
136  - if:
137      properties:
138        compatible:
139          contains:
140            enum:
141              - samsung,exynos5250-pmu
142              - samsung,exynos5420-pmu
143              - samsung,exynos5433-pmu
144    then:
145      properties:
146        dp-phy: true
147        mipi-phy: true
148    else:
149      properties:
150        dp-phy: false
151        mipi-phy: false
152
153examples:
154  - |
155    #include <dt-bindings/clock/exynos5250.h>
156
157    pmu_system_controller: system-controller@10040000 {
158        compatible = "samsung,exynos5250-pmu", "syscon";
159        reg = <0x10040000 0x5000>;
160        interrupt-controller;
161        #interrupt-cells = <3>;
162        interrupt-parent = <&gic>;
163        #clock-cells = <1>;
164        clock-names = "clkout16";
165        clocks = <&clock CLK_FIN_PLL>;
166
167        dp-phy {
168            compatible = "samsung,exynos5250-dp-video-phy";
169            #phy-cells = <0>;
170        };
171
172        mipi-phy {
173            compatible = "samsung,s5pv210-mipi-video-phy";
174            #phy-cells = <1>;
175        };
176    };
177