diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2017-03-28 11:19:44 -0400 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2017-04-07 07:36:37 -0400 |
commit | 2d9eb1dd58f26bbf782b043e8c29f9c3ca62a15c (patch) | |
tree | 5d3fb259a8005158ce800e7fea0a52019b8047ad | |
parent | bd01f064af2a5de4293c5401e01de5a6f951f4a5 (diff) |
dt-bindings: Add GPCv2 power gating driver
Add DT bindings for power domain driver for GPCv2 IP block found in
i.MX7 SoCs.
Cc: yurovsky@gmail.com
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Dong Aisheng <dongas86@gmail.com>
Cc: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
-rw-r--r-- | Documentation/devicetree/bindings/power/fsl,imx-gpcv2.txt | 71 | ||||
-rw-r--r-- | include/dt-bindings/power/imx7-power.h | 16 |
2 files changed, 87 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/power/fsl,imx-gpcv2.txt b/Documentation/devicetree/bindings/power/fsl,imx-gpcv2.txt new file mode 100644 index 000000000000..02f45c65fd87 --- /dev/null +++ b/Documentation/devicetree/bindings/power/fsl,imx-gpcv2.txt | |||
@@ -0,0 +1,71 @@ | |||
1 | Freescale i.MX General Power Controller v2 | ||
2 | ========================================== | ||
3 | |||
4 | The i.MX7S/D General Power Control (GPC) block contains Power Gating | ||
5 | Control (PGC) for various power domains. | ||
6 | |||
7 | Required properties: | ||
8 | |||
9 | - compatible: Should be "fsl,imx7d-gpc" | ||
10 | |||
11 | - reg: should be register base and length as documented in the | ||
12 | datasheet | ||
13 | |||
14 | - interrupts: Should contain GPC interrupt request 1 | ||
15 | |||
16 | Power domains contained within GPC node are generic power domain | ||
17 | providers, documented in | ||
18 | Documentation/devicetree/bindings/power/power_domain.txt, which are | ||
19 | described as subnodes of the power gating controller 'pgc' node, | ||
20 | which, in turn, is expected to contain the following: | ||
21 | |||
22 | Required properties: | ||
23 | |||
24 | - reg: Power domain index. Valid values are defined in | ||
25 | include/dt-bindings/power/imx7-power.h | ||
26 | |||
27 | - #power-domain-cells: Should be 0 | ||
28 | |||
29 | Optional properties: | ||
30 | |||
31 | - power-supply: Power supply used to power the domain | ||
32 | |||
33 | Example: | ||
34 | |||
35 | gpc: gpc@303a0000 { | ||
36 | compatible = "fsl,imx7d-gpc"; | ||
37 | reg = <0x303a0000 0x1000>; | ||
38 | interrupt-controller; | ||
39 | interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>; | ||
40 | #interrupt-cells = <3>; | ||
41 | interrupt-parent = <&intc>; | ||
42 | |||
43 | pgc { | ||
44 | #address-cells = <1>; | ||
45 | #size-cells = <0>; | ||
46 | |||
47 | pgc_pcie_phy: power-domain@3 { | ||
48 | #power-domain-cells = <0>; | ||
49 | |||
50 | reg = <IMX7_POWER_DOMAIN_PCIE_PHY>; | ||
51 | power-supply = <®_1p0d>; | ||
52 | }; | ||
53 | }; | ||
54 | }; | ||
55 | |||
56 | |||
57 | Specifying power domain for IP modules | ||
58 | ====================================== | ||
59 | |||
60 | IP cores belonging to a power domain should contain a 'power-domains' | ||
61 | property that is a phandle for PGC node representing the domain. | ||
62 | |||
63 | Example of a device that is part of the PCIE_PHY power domain: | ||
64 | |||
65 | pcie: pcie@33800000 { | ||
66 | reg = <0x33800000 0x4000>, | ||
67 | <0x4ff00000 0x80000>; | ||
68 | /* ... */ | ||
69 | power-domains = <&pgc_pcie_phy>; | ||
70 | /* ... */ | ||
71 | }; | ||
diff --git a/include/dt-bindings/power/imx7-power.h b/include/dt-bindings/power/imx7-power.h new file mode 100644 index 000000000000..3a181e410517 --- /dev/null +++ b/include/dt-bindings/power/imx7-power.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2017 Impinj | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __DT_BINDINGS_IMX7_POWER_H__ | ||
10 | #define __DT_BINDINGS_IMX7_POWER_H__ | ||
11 | |||
12 | #define IMX7_POWER_DOMAIN_MIPI_PHY 0 | ||
13 | #define IMX7_POWER_DOMAIN_PCIE_PHY 1 | ||
14 | #define IMX7_POWER_DOMAIN_USB_HSIC_PHY 2 | ||
15 | |||
16 | #endif | ||