xref: /freebsd/sys/contrib/device-tree/Bindings/power/fsl,imx-gpc.yaml (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/power/fsl,imx-gpc.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: Freescale i.MX General Power Controller
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Philipp Zabel <p.zabel@pengutronix.de>
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel Vadotdescription: |
13c66ec88fSEmmanuel Vadot  The i.MX6 General Power Control (GPC) block contains DVFS load tracking
14c66ec88fSEmmanuel Vadot  counters and Power Gating Control (PGC).
15c66ec88fSEmmanuel Vadot
16c66ec88fSEmmanuel Vadot  The power domains are generic power domain providers as documented in
17c66ec88fSEmmanuel Vadot  Documentation/devicetree/bindings/power/power-domain.yaml. They are
18c66ec88fSEmmanuel Vadot  described as subnodes of the power gating controller 'pgc' node of the GPC.
19c66ec88fSEmmanuel Vadot
20c66ec88fSEmmanuel Vadot  IP cores belonging to a power domain should contain a 'power-domains'
21c66ec88fSEmmanuel Vadot  property that is a phandle pointing to the power domain the device belongs
22c66ec88fSEmmanuel Vadot  to.
23c66ec88fSEmmanuel Vadot
24c66ec88fSEmmanuel Vadotproperties:
25c66ec88fSEmmanuel Vadot  compatible:
26*cb7aa33aSEmmanuel Vadot    oneOf:
27*cb7aa33aSEmmanuel Vadot      - enum:
28c66ec88fSEmmanuel Vadot          - fsl,imx6q-gpc
29*cb7aa33aSEmmanuel Vadot      - items:
30*cb7aa33aSEmmanuel Vadot          - enum:
31c66ec88fSEmmanuel Vadot              - fsl,imx6qp-gpc
32c66ec88fSEmmanuel Vadot              - fsl,imx6sl-gpc
33c66ec88fSEmmanuel Vadot              - fsl,imx6sx-gpc
34*cb7aa33aSEmmanuel Vadot              - fsl,imx6ul-gpc
35*cb7aa33aSEmmanuel Vadot          - const: fsl,imx6q-gpc
36c66ec88fSEmmanuel Vadot
37c66ec88fSEmmanuel Vadot  reg:
38c66ec88fSEmmanuel Vadot    maxItems: 1
39c66ec88fSEmmanuel Vadot
40c66ec88fSEmmanuel Vadot  interrupts:
41c66ec88fSEmmanuel Vadot    maxItems: 1
42c66ec88fSEmmanuel Vadot
43*cb7aa33aSEmmanuel Vadot  interrupt-controller: true
44*cb7aa33aSEmmanuel Vadot  '#interrupt-cells':
45*cb7aa33aSEmmanuel Vadot    const: 3
46*cb7aa33aSEmmanuel Vadot
47c66ec88fSEmmanuel Vadot  clocks:
48c66ec88fSEmmanuel Vadot    maxItems: 1
49c66ec88fSEmmanuel Vadot
50c66ec88fSEmmanuel Vadot  clock-names:
51c66ec88fSEmmanuel Vadot    const: ipg
52c66ec88fSEmmanuel Vadot
53c66ec88fSEmmanuel Vadot  pgc:
54c66ec88fSEmmanuel Vadot    type: object
557ef62cebSEmmanuel Vadot    additionalProperties: false
56c66ec88fSEmmanuel Vadot    description: list of power domains provided by this controller.
57c66ec88fSEmmanuel Vadot
587ef62cebSEmmanuel Vadot    properties:
597ef62cebSEmmanuel Vadot      '#address-cells':
607ef62cebSEmmanuel Vadot        const: 1
617ef62cebSEmmanuel Vadot
627ef62cebSEmmanuel Vadot      '#size-cells':
637ef62cebSEmmanuel Vadot        const: 0
647ef62cebSEmmanuel Vadot
65c66ec88fSEmmanuel Vadot    patternProperties:
66c66ec88fSEmmanuel Vadot      "power-domain@[0-9]$":
67c66ec88fSEmmanuel Vadot        type: object
687ef62cebSEmmanuel Vadot        additionalProperties: false
697ef62cebSEmmanuel Vadot
70c66ec88fSEmmanuel Vadot        properties:
71c66ec88fSEmmanuel Vadot
72c66ec88fSEmmanuel Vadot          '#power-domain-cells':
73c66ec88fSEmmanuel Vadot            const: 0
74c66ec88fSEmmanuel Vadot
75c66ec88fSEmmanuel Vadot          reg:
76c66ec88fSEmmanuel Vadot            description: |
77c66ec88fSEmmanuel Vadot              The following DOMAIN_INDEX values are valid for i.MX6Q:
78c66ec88fSEmmanuel Vadot                ARM_DOMAIN     0
79c66ec88fSEmmanuel Vadot                PU_DOMAIN      1
80c66ec88fSEmmanuel Vadot              The following additional DOMAIN_INDEX value is valid for i.MX6SL:
81c66ec88fSEmmanuel Vadot                DISPLAY_DOMAIN 2
82c66ec88fSEmmanuel Vadot              The following additional DOMAIN_INDEX value is valid for i.MX6SX:
83c66ec88fSEmmanuel Vadot                PCI_DOMAIN     3
84c66ec88fSEmmanuel Vadot            maxItems: 1
85c66ec88fSEmmanuel Vadot
86c66ec88fSEmmanuel Vadot          clocks:
87c66ec88fSEmmanuel Vadot            description: |
88c66ec88fSEmmanuel Vadot              A number of phandles to clocks that need to be enabled during domain
89c66ec88fSEmmanuel Vadot              power-up sequencing to ensure reset propagation into devices located
90c66ec88fSEmmanuel Vadot              inside this power domain.
91c66ec88fSEmmanuel Vadot            minItems: 1
92c66ec88fSEmmanuel Vadot            maxItems: 7
93c66ec88fSEmmanuel Vadot
94c66ec88fSEmmanuel Vadot          power-supply: true
95c66ec88fSEmmanuel Vadot
96c66ec88fSEmmanuel Vadot        required:
97c66ec88fSEmmanuel Vadot          - '#power-domain-cells'
98c66ec88fSEmmanuel Vadot          - reg
99c66ec88fSEmmanuel Vadot
100c66ec88fSEmmanuel Vadot    required:
1017ef62cebSEmmanuel Vadot      - '#address-cells'
1027ef62cebSEmmanuel Vadot      - '#size-cells'
1037ef62cebSEmmanuel Vadot
1047ef62cebSEmmanuel Vadotrequired:
105c66ec88fSEmmanuel Vadot  - compatible
106c66ec88fSEmmanuel Vadot  - reg
107c66ec88fSEmmanuel Vadot  - interrupts
108c66ec88fSEmmanuel Vadot  - clocks
109c66ec88fSEmmanuel Vadot  - clock-names
110c66ec88fSEmmanuel Vadot  - pgc
111c66ec88fSEmmanuel Vadot
112c66ec88fSEmmanuel VadotadditionalProperties: false
113c66ec88fSEmmanuel Vadot
114c66ec88fSEmmanuel Vadotexamples:
115c66ec88fSEmmanuel Vadot  - |
116c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/imx6qdl-clock.h>
117c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
118c66ec88fSEmmanuel Vadot
119c66ec88fSEmmanuel Vadot    gpc@20dc000 {
120c66ec88fSEmmanuel Vadot        compatible = "fsl,imx6q-gpc";
121c66ec88fSEmmanuel Vadot        reg = <0x020dc000 0x4000>;
122c66ec88fSEmmanuel Vadot        interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>;
123c66ec88fSEmmanuel Vadot        clocks = <&clks IMX6QDL_CLK_IPG>;
124c66ec88fSEmmanuel Vadot        clock-names = "ipg";
125c66ec88fSEmmanuel Vadot
126c66ec88fSEmmanuel Vadot        pgc {
127c66ec88fSEmmanuel Vadot            #address-cells = <1>;
128c66ec88fSEmmanuel Vadot            #size-cells = <0>;
129c66ec88fSEmmanuel Vadot
130c66ec88fSEmmanuel Vadot            power-domain@0 {
131c66ec88fSEmmanuel Vadot                reg = <0>;
132c66ec88fSEmmanuel Vadot                #power-domain-cells = <0>;
133c66ec88fSEmmanuel Vadot            };
134c66ec88fSEmmanuel Vadot
135c66ec88fSEmmanuel Vadot            pd_pu: power-domain@1 {
136c66ec88fSEmmanuel Vadot                reg = <1>;
137c66ec88fSEmmanuel Vadot                #power-domain-cells = <0>;
138c66ec88fSEmmanuel Vadot                power-supply = <&reg_pu>;
139c66ec88fSEmmanuel Vadot                clocks = <&clks IMX6QDL_CLK_GPU3D_CORE>,
140c66ec88fSEmmanuel Vadot                         <&clks IMX6QDL_CLK_GPU3D_SHADER>,
141c66ec88fSEmmanuel Vadot                         <&clks IMX6QDL_CLK_GPU2D_CORE>,
142c66ec88fSEmmanuel Vadot                         <&clks IMX6QDL_CLK_GPU2D_AXI>,
143c66ec88fSEmmanuel Vadot                         <&clks IMX6QDL_CLK_OPENVG_AXI>,
144c66ec88fSEmmanuel Vadot                         <&clks IMX6QDL_CLK_VPU_AXI>;
145c66ec88fSEmmanuel Vadot            };
146c66ec88fSEmmanuel Vadot        };
147c66ec88fSEmmanuel Vadot    };
148