aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Gerlach <d-gerlach@ti.com>2017-04-04 11:59:27 -0400
committerSantosh Shilimkar <ssantosh@kernel.org>2017-04-04 11:59:27 -0400
commit7cc119f29b197f967161ca94c9d5cb5073b4b52b (patch)
tree6339e7f1d8d648c51c8792598a1b8de1fae96875
parent213ec7fed30277ac04bcd401efe827603ce9ac2e (diff)
dt-bindings: Add TI SCI PM Domains
Add a generic power domain implementation, TI SCI PM Domains, that will hook into the genpd framework and allow the TI SCI protocol to control device power states. Also, provide macros representing each device index as understood by TI SCI to be used in the device node power-domain references. These are identifiers for the K2G devices managed by the PMMC. Acked-by: Santosh Shilimkar <ssantosh@kernel.org> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
-rw-r--r--Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt57
-rw-r--r--MAINTAINERS2
-rw-r--r--include/dt-bindings/genpd/k2g.h90
3 files changed, 149 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
new file mode 100644
index 000000000000..c705db07d820
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
@@ -0,0 +1,57 @@
1Texas Instruments TI-SCI Generic Power Domain
2---------------------------------------------
3
4Some TI SoCs contain a system controller (like the PMMC, etc...) that is
5responsible for controlling the state of the IPs that are present.
6Communication between the host processor running an OS and the system
7controller happens through a protocol known as TI-SCI [1].
8
9[1] Documentation/devicetree/bindings/arm/keystone/ti,sci.txt
10
11PM Domain Node
12==============
13The PM domain node represents the global PM domain managed by the PMMC, which
14in this case is the implementation as documented by the generic PM domain
15bindings in Documentation/devicetree/bindings/power/power_domain.txt. Because
16this relies on the TI SCI protocol to communicate with the PMMC it must be a
17child of the pmmc node.
18
19Required Properties:
20--------------------
21- compatible: should be "ti,sci-pm-domain"
22- #power-domain-cells: Must be 1 so that an id can be provided in each
23 device node.
24
25Example (K2G):
26-------------
27 pmmc: pmmc {
28 compatible = "ti,k2g-sci";
29 ...
30
31 k2g_pds: power-controller {
32 compatible = "ti,sci-pm-domain";
33 #power-domain-cells = <1>;
34 };
35 };
36
37PM Domain Consumers
38===================
39Hardware blocks belonging to a PM domain should contain a "power-domains"
40property that is a phandle pointing to the corresponding PM domain node
41along with an index representing the device id to be passed to the PMMC
42for device control.
43
44Required Properties:
45--------------------
46- power-domains: phandle pointing to the corresponding PM domain node
47 and an ID representing the device.
48
49See dt-bindings/genpd/k2g.h for the list of valid identifiers for k2g.
50
51Example (K2G):
52--------------------
53 uart0: serial@02530c00 {
54 compatible = "ns16550a";
55 ...
56 power-domains = <&k2g_pds K2G_DEV_UART0>;
57 };
diff --git a/MAINTAINERS b/MAINTAINERS
index c776906f67a9..9057479ee607 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12382,6 +12382,8 @@ S: Maintained
12382F: Documentation/devicetree/bindings/arm/keystone/ti,sci.txt 12382F: Documentation/devicetree/bindings/arm/keystone/ti,sci.txt
12383F: drivers/firmware/ti_sci* 12383F: drivers/firmware/ti_sci*
12384F: include/linux/soc/ti/ti_sci_protocol.h 12384F: include/linux/soc/ti/ti_sci_protocol.h
12385F: Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
12386F: include/dt-bindings/genpd/k2g.h
12385 12387
12386THANKO'S RAREMONO AM/FM/SW RADIO RECEIVER USB DRIVER 12388THANKO'S RAREMONO AM/FM/SW RADIO RECEIVER USB DRIVER
12387M: Hans Verkuil <hverkuil@xs4all.nl> 12389M: Hans Verkuil <hverkuil@xs4all.nl>
diff --git a/include/dt-bindings/genpd/k2g.h b/include/dt-bindings/genpd/k2g.h
new file mode 100644
index 000000000000..fffdb604fc7d
--- /dev/null
+++ b/include/dt-bindings/genpd/k2g.h
@@ -0,0 +1,90 @@
1/*
2 * TI K2G SoC Device definitions
3 *
4 * Copyright (C) 2015-2017 Texas Instruments Incorporated - https://urldefense.proofpoint.com/v2/url?u=http-3A__www.ti.com_&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=XBn1JQGPwR8CsE7xpP3wPlG6DQU7qw8ym65xieNZ4hY&m=K-anSnBVCpVU_mSaI7FWz6dwIAPBePhk6w9rCref6SI&s=UvxGRJAJRKjDVjwUuXloC2gH4uWNkMelLuW2oG01DPM&e=
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17#ifndef _DT_BINDINGS_GENPD_K2G_H
18#define _DT_BINDINGS_GENPD_K2G_H
19
20/* Documented in https://urldefense.proofpoint.com/v2/url?u=http-3A__processors.wiki.ti.com_index.php_TISCI&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=XBn1JQGPwR8CsE7xpP3wPlG6DQU7qw8ym65xieNZ4hY&m=K-anSnBVCpVU_mSaI7FWz6dwIAPBePhk6w9rCref6SI&s=OUR-PBKiUWN0Bhs-J9hzlER8kpqh_V70s09xc8Zo1iA&e= */
21
22#define K2G_DEV_PMMC0 0x0000
23#define K2G_DEV_MLB0 0x0001
24#define K2G_DEV_DSS0 0x0002
25#define K2G_DEV_MCBSP0 0x0003
26#define K2G_DEV_MCASP0 0x0004
27#define K2G_DEV_MCASP1 0x0005
28#define K2G_DEV_MCASP2 0x0006
29#define K2G_DEV_DCAN0 0x0008
30#define K2G_DEV_DCAN1 0x0009
31#define K2G_DEV_EMIF0 0x000a
32#define K2G_DEV_MMCHS0 0x000b
33#define K2G_DEV_MMCHS1 0x000c
34#define K2G_DEV_GPMC0 0x000d
35#define K2G_DEV_ELM0 0x000e
36#define K2G_DEV_SPI0 0x0010
37#define K2G_DEV_SPI1 0x0011
38#define K2G_DEV_SPI2 0x0012
39#define K2G_DEV_SPI3 0x0013
40#define K2G_DEV_ICSS0 0x0014
41#define K2G_DEV_ICSS1 0x0015
42#define K2G_DEV_USB0 0x0016
43#define K2G_DEV_USB1 0x0017
44#define K2G_DEV_NSS0 0x0018
45#define K2G_DEV_PCIE0 0x0019
46#define K2G_DEV_GPIO0 0x001b
47#define K2G_DEV_GPIO1 0x001c
48#define K2G_DEV_TIMER64_0 0x001d
49#define K2G_DEV_TIMER64_1 0x001e
50#define K2G_DEV_TIMER64_2 0x001f
51#define K2G_DEV_TIMER64_3 0x0020
52#define K2G_DEV_TIMER64_4 0x0021
53#define K2G_DEV_TIMER64_5 0x0022
54#define K2G_DEV_TIMER64_6 0x0023
55#define K2G_DEV_MSGMGR0 0x0025
56#define K2G_DEV_BOOTCFG0 0x0026
57#define K2G_DEV_ARM_BOOTROM0 0x0027
58#define K2G_DEV_DSP_BOOTROM0 0x0029
59#define K2G_DEV_DEBUGSS0 0x002b
60#define K2G_DEV_UART0 0x002c
61#define K2G_DEV_UART1 0x002d
62#define K2G_DEV_UART2 0x002e
63#define K2G_DEV_EHRPWM0 0x002f
64#define K2G_DEV_EHRPWM1 0x0030
65#define K2G_DEV_EHRPWM2 0x0031
66#define K2G_DEV_EHRPWM3 0x0032
67#define K2G_DEV_EHRPWM4 0x0033
68#define K2G_DEV_EHRPWM5 0x0034
69#define K2G_DEV_EQEP0 0x0035
70#define K2G_DEV_EQEP1 0x0036
71#define K2G_DEV_EQEP2 0x0037
72#define K2G_DEV_ECAP0 0x0038
73#define K2G_DEV_ECAP1 0x0039
74#define K2G_DEV_I2C0 0x003a
75#define K2G_DEV_I2C1 0x003b
76#define K2G_DEV_I2C2 0x003c
77#define K2G_DEV_EDMA0 0x003f
78#define K2G_DEV_SEMAPHORE0 0x0040
79#define K2G_DEV_INTC0 0x0041
80#define K2G_DEV_GIC0 0x0042
81#define K2G_DEV_QSPI0 0x0043
82#define K2G_DEV_ARM_64B_COUNTER0 0x0044
83#define K2G_DEV_TETRIS0 0x0045
84#define K2G_DEV_CGEM0 0x0046
85#define K2G_DEV_MSMC0 0x0047
86#define K2G_DEV_CBASS0 0x0049
87#define K2G_DEV_BOARD0 0x004c
88#define K2G_DEV_EDMA1 0x004f
89
90#endif