eb248f24dce622af65812a246ce5a4abb0c31fcb
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / power / fsl,imx-gpcv2.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/power/fsl,imx-gpcv2.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Freescale i.MX General Power Controller v2
8
9 maintainers:
10   - Andrey Smirnov <andrew.smirnov@gmail.com>
11
12 description: |
13   The i.MX7S/D General Power Control (GPC) block contains Power Gating
14   Control (PGC) for various power domains.
15
16   Power domains contained within GPC node are generic power domain
17   providers, documented in
18   Documentation/devicetree/bindings/power/power-domain.yaml, which are
19   described as subnodes of the power gating controller 'pgc' node.
20
21   IP cores belonging to a power domain should contain a 'power-domains'
22   property that is a phandle for PGC node representing the domain.
23
24 properties:
25   compatible:
26     enum:
27       - fsl,imx7d-gpc
28       - fsl,imx8mq-gpc
29
30   reg:
31     maxItems: 1
32
33   interrupts:
34     maxItems: 1
35
36   interrupt-controller: true
37   '#interrupt-cells':
38     const: 3
39
40   pgc:
41     type: object
42     description: list of power domains provided by this controller.
43
44     patternProperties:
45       "power-domain@[0-9]$":
46         type: object
47         properties:
48
49           '#power-domain-cells':
50             const: 0
51
52           reg:
53             description: |
54               Power domain index. Valid values are defined in
55               include/dt-bindings/power/imx7-power.h for fsl,imx7d-gpc and
56               include/dt-bindings/power/imx8m-power.h for fsl,imx8mq-gpc
57             maxItems: 1
58
59           clocks:
60             description: |
61               A number of phandles to clocks that need to be enabled during domain
62               power-up sequencing to ensure reset propagation into devices located
63               inside this power domain.
64             minItems: 1
65             maxItems: 5
66
67           power-supply: true
68
69           resets:
70             description: |
71               A number of phandles to resets that need to be asserted during
72               power-up sequencing of the domain. The resets belong to devices
73               located inside the power domain, which need to be held in reset
74               across the power-up sequence. So no means to specify what each
75               reset is in a generic power-domain binding.
76             minItems: 1
77             maxItems: 4
78
79         required:
80           - '#power-domain-cells'
81           - reg
82
83 required:
84   - compatible
85   - reg
86   - interrupts
87   - pgc
88
89 additionalProperties: false
90
91 examples:
92   - |
93     #include <dt-bindings/interrupt-controller/arm-gic.h>
94
95     gpc@303a0000 {
96         compatible = "fsl,imx7d-gpc";
97         reg = <0x303a0000 0x1000>;
98         interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
99
100         pgc {
101             #address-cells = <1>;
102             #size-cells = <0>;
103
104             pgc_mipi_phy: power-domain@0 {
105                 #power-domain-cells = <0>;
106                 reg = <0>;
107                 power-supply = <&reg_1p0d>;
108             };
109
110             pgc_pcie_phy: power-domain@1 {
111                 #power-domain-cells = <0>;
112                 reg = <1>;
113                 power-supply = <&reg_1p0d>;
114             };
115
116             pgc_hsic_phy: power-domain@2 {
117                 #power-domain-cells = <0>;
118                 reg = <2>;
119                 power-supply = <&reg_1p2>;
120             };
121         };
122     };