summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorTomasz Figa <t.figa@samsung.com>2014-05-08 14:49:13 +0200
committerNitin Garg <nitin.garg@freescale.com>2015-01-15 21:16:28 -0600
commit4aa055cb0634bc8d0389070104fe6aa7cfa99b8c (patch)
tree684b4ea3ff80c72ad73be9ce4b9909122da9a70d /Documentation
parent61e1f068133fa5c5875cf0df46e6ee856a174535 (diff)
base: power: Add generic OF-based power domain look-up
This patch introduces generic code to perform power domain look-up using device tree and automatically bind devices to their power domains. Generic device tree binding is introduced to specify power domains of devices in their device tree nodes. Backwards compatibility with legacy Samsung-specific power domain bindings is provided, but for now the new code is not compiled when CONFIG_ARCH_EXYNOS is selected to avoid collision with legacy code. This will change as soon as Exynos power domain code gets converted to use the generic framework in further patch. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Reviewed-by: Mark Brown <broonie@linaro.org> Reviewed-by: Kevin Hilman <khilman@linaro.org> Reviewed-by: Philipp Zabel <philipp.zabel@gmail.com> [on i.MX6 GK802] Tested-by: Philipp Zabel <philipp.zabel@gmail.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> [shawn.guo: http://thread.gmane.org/gmane.linux.kernel.samsung-soc/31029] Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/power/power_domain.txt51
1 files changed, 51 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt
new file mode 100644
index 000000000000..303d0a968569
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/power_domain.txt
@@ -0,0 +1,51 @@
+* Generic power domains
+
+System on chip designs are often divided into multiple power domains that
+can be used for power gating of selected IP blocks for power saving by
+reduced leakage current.
+
+This device tree binding can be used to bind power domain consumer devices
+with their power domains provided by power domain providers. A power domain
+provider can be represented by any node in the device tree and can provide
+one or more power domains. A consumer node can refer to the provider by
+a phandle and a set of phandle arguments (so called power domain specifier)
+of length specified by #power-domain-cells property in the power domain
+provider node.
+
+==Power domain providers==
+
+Required properties:
+ - #power-domain-cells : Number of cells in a power domain specifier;
+ Typically 0 for nodes representing a single power domain and 1 for nodes
+ providing multiple power domains (e.g. power controllers), but can be
+ any value as specified by device tree binding documentation of particular
+ provider.
+
+Example:
+
+ power: power-controller@12340000 {
+ compatible = "foo,power-controller";
+ reg = <0x12340000 0x1000>;
+ #power-domain-cells = <1>;
+ };
+
+The node above defines a power controller that is a power domain provider
+and expects one cell as its phandle argument.
+
+==Power domain consumers==
+
+Required properties:
+ - power-domains : A phandle and power domain specifier as defined by bindings
+ of power controller specified by phandle.
+
+Example:
+
+ leaky-device@12350000 {
+ compatible = "foo,i-leak-current";
+ reg = <0x12350000 0x1000>;
+ power-domains = <&power 0>;
+ };
+
+The node above defines a typical power domain consumer device, which is located
+inside power domain with index 0 of power controller represented by node with
+label "power".