xref: /freebsd/sys/contrib/device-tree/Bindings/power/amlogic,meson-ee-pwrc.yaml (revision 848ee2a3a8b47c9905fc51fefcf60eb371edbb98)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2# Copyright 2019 BayLibre, SAS
3%YAML 1.2
4---
5$id: "http://devicetree.org/schemas/power/amlogic,meson-ee-pwrc.yaml#"
6$schema: "http://devicetree.org/meta-schemas/core.yaml#"
7
8title: Amlogic Meson Everything-Else Power Domains
9
10maintainers:
11  - Neil Armstrong <narmstrong@baylibre.com>
12
13description: |+
14  The Everything-Else Power Domains node should be the child of a syscon
15  node with the required property:
16
17  - compatible: Should be the following:
18                "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon"
19
20  Refer to the the bindings described in
21  Documentation/devicetree/bindings/mfd/syscon.yaml
22
23properties:
24  compatible:
25    enum:
26      - amlogic,meson8-pwrc
27      - amlogic,meson8b-pwrc
28      - amlogic,meson8m2-pwrc
29      - amlogic,meson-gxbb-pwrc
30      - amlogic,meson-axg-pwrc
31      - amlogic,meson-g12a-pwrc
32      - amlogic,meson-sm1-pwrc
33
34  clocks:
35    minItems: 1
36    maxItems: 2
37
38  clock-names:
39    minItems: 1
40    maxItems: 2
41    items:
42      - const: vpu
43      - const: vapb
44
45  resets:
46    minItems: 5
47    maxItems: 12
48
49  reset-names:
50    minItems: 5
51    maxItems: 12
52
53  "#power-domain-cells":
54    const: 1
55
56  amlogic,ao-sysctrl:
57    description: phandle to the AO sysctrl node
58    $ref: /schemas/types.yaml#/definitions/phandle
59
60allOf:
61  - if:
62      properties:
63        compatible:
64          enum:
65            - amlogic,meson8b-pwrc
66            - amlogic,meson8m2-pwrc
67    then:
68      properties:
69        reset-names:
70          items:
71            - const: dblk
72            - const: pic_dc
73            - const: hdmi_apb
74            - const: hdmi_system
75            - const: venci
76            - const: vencp
77            - const: vdac
78            - const: vencl
79            - const: viu
80            - const: venc
81            - const: rdma
82      required:
83        - resets
84        - reset-names
85
86  - if:
87      properties:
88        compatible:
89          enum:
90            - amlogic,meson-gxbb-pwrc
91    then:
92      properties:
93        reset-names:
94          items:
95            - const: viu
96            - const: venc
97            - const: vcbus
98            - const: bt656
99            - const: dvin
100            - const: rdma
101            - const: venci
102            - const: vencp
103            - const: vdac
104            - const: vdi6
105            - const: vencl
106            - const: vid_lock
107      required:
108        - resets
109        - reset-names
110
111  - if:
112      properties:
113        compatible:
114          enum:
115            - amlogic,meson-axg-pwrc
116    then:
117      properties:
118        reset-names:
119          items:
120            - const: viu
121            - const: venc
122            - const: vcbus
123            - const: vencl
124            - const: vid_lock
125      required:
126        - resets
127        - reset-names
128
129  - if:
130      properties:
131        compatible:
132          enum:
133            - amlogic,meson-g12a-pwrc
134            - amlogic,meson-sm1-pwrc
135    then:
136      properties:
137        reset-names:
138          items:
139            - const: viu
140            - const: venc
141            - const: vcbus
142            - const: bt656
143            - const: rdma
144            - const: venci
145            - const: vencp
146            - const: vdac
147            - const: vdi6
148            - const: vencl
149            - const: vid_lock
150      required:
151        - resets
152        - reset-names
153
154required:
155  - compatible
156  - clocks
157  - clock-names
158  - "#power-domain-cells"
159  - amlogic,ao-sysctrl
160
161additionalProperties: false
162
163examples:
164  - |
165    pwrc: power-controller {
166          compatible = "amlogic,meson-sm1-pwrc";
167          #power-domain-cells = <1>;
168          amlogic,ao-sysctrl = <&rti>;
169          resets = <&reset_viu>,
170                   <&reset_venc>,
171                   <&reset_vcbus>,
172                   <&reset_bt656>,
173                   <&reset_rdma>,
174                   <&reset_venci>,
175                   <&reset_vencp>,
176                   <&reset_vdac>,
177                   <&reset_vdi6>,
178                   <&reset_vencl>,
179                   <&reset_vid_lock>;
180          reset-names = "viu", "venc", "vcbus", "bt656",
181                        "rdma", "venci", "vencp", "vdac",
182                        "vdi6", "vencl", "vid_lock";
183          clocks = <&clk_vpu>, <&clk_vapb>;
184          clock-names = "vpu", "vapb";
185    };
186