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-g12a-pwrc
30      - amlogic,meson-sm1-pwrc
31
32  clocks:
33    minItems: 1
34    maxItems: 2
35
36  clock-names:
37    minItems: 1
38    maxItems: 2
39    items:
40      - const: vpu
41      - const: vapb
42
43  resets:
44    minItems: 11
45
46  reset-names:
47    minItems: 11
48
49  "#power-domain-cells":
50    const: 1
51
52  amlogic,ao-sysctrl:
53    description: phandle to the AO sysctrl node
54    allOf:
55      - $ref: /schemas/types.yaml#/definitions/phandle
56
57allOf:
58  - if:
59      properties:
60        compatible:
61          enum:
62            - amlogic,meson8b-pwrc
63            - amlogic,meson8m2-pwrc
64    then:
65      properties:
66        reset-names:
67          items:
68            - const: dblk
69            - const: pic_dc
70            - const: hdmi_apb
71            - const: hdmi_system
72            - const: venci
73            - const: vencp
74            - const: vdac
75            - const: vencl
76            - const: viu
77            - const: venc
78            - const: rdma
79      required:
80        - resets
81        - reset-names
82
83  - if:
84      properties:
85        compatible:
86          enum:
87            - amlogic,meson-g12a-pwrc
88            - amlogic,meson-sm1-pwrc
89    then:
90      properties:
91        reset-names:
92          items:
93            - const: viu
94            - const: venc
95            - const: vcbus
96            - const: bt656
97            - const: rdma
98            - const: venci
99            - const: vencp
100            - const: vdac
101            - const: vdi6
102            - const: vencl
103            - const: vid_lock
104      required:
105        - resets
106        - reset-names
107
108required:
109  - compatible
110  - clocks
111  - clock-names
112  - "#power-domain-cells"
113  - amlogic,ao-sysctrl
114
115additionalProperties: false
116
117examples:
118  - |
119    pwrc: power-controller {
120          compatible = "amlogic,meson-sm1-pwrc";
121          #power-domain-cells = <1>;
122          amlogic,ao-sysctrl = <&rti>;
123          resets = <&reset_viu>,
124                   <&reset_venc>,
125                   <&reset_vcbus>,
126                   <&reset_bt656>,
127                   <&reset_rdma>,
128                   <&reset_venci>,
129                   <&reset_vencp>,
130                   <&reset_vdac>,
131                   <&reset_vdi6>,
132                   <&reset_vencl>,
133                   <&reset_vid_lock>;
134          reset-names = "viu", "venc", "vcbus", "bt656",
135                        "rdma", "venci", "vencp", "vdac",
136                        "vdi6", "vencl", "vid_lock";
137          clocks = <&clk_vpu>, <&clk_vapb>;
138          clock-names = "vpu", "vapb";
139    };
140