aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@st.com>2014-03-11 05:24:55 -0400
committerSrinivas Kandagatla <srinivas.kandagatla@st.com>2014-03-11 06:02:51 -0400
commit6b7f06cc805bb4755e69cd916b3f565947e0a77a (patch)
tree087a444745f1a096da308014bd2afc077a08f471
parent7ec5183a0ab1930b071c3c68a7d3b08e29b8bb78 (diff)
ARM: STi: STiH415: Add reset controller support.
This patch adds a reset controller node to the SOC device tree and also adds new header files with reset lines required for other device tree nodes. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
-rw-r--r--Documentation/devicetree/bindings/reset/st,sti-powerdown.txt47
-rw-r--r--arch/arm/boot/dts/stih415.dtsi6
-rw-r--r--include/dt-bindings/reset-controller/stih415-resets.h19
3 files changed, 72 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/reset/st,sti-powerdown.txt b/Documentation/devicetree/bindings/reset/st,sti-powerdown.txt
new file mode 100644
index 000000000000..5ab26b7e9d35
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/st,sti-powerdown.txt
@@ -0,0 +1,47 @@
1STMicroelectronics STi family Sysconfig Peripheral Powerdown Reset Controller
2=============================================================================
3
4This binding describes a reset controller device that is used to enable and
5disable on-chip peripheral controllers such as USB and SATA, using
6"powerdown" control bits found in the STi family SoC system configuration
7registers. These have been grouped together into a single reset controller
8device for convenience.
9
10The actual action taken when powerdown is asserted is hardware dependent.
11However, when asserted it may not be possible to access the hardware's
12registers and after an assert/deassert sequence the hardware's previous state
13may no longer be valid.
14
15Please refer to reset.txt in this directory for common reset
16controller binding usage.
17
18Required properties:
19- compatible: Should be "st,<chip>-powerdown"
20 ex: "st,stih415-powerdown", "st,stih416-powerdown"
21- #reset-cells: 1, see below
22
23example:
24
25 powerdown: powerdown-controller {
26 #reset-cells = <1>;
27 compatible = "st,stih415-powerdown";
28 };
29
30
31Specifying powerdown control of devices
32=======================================
33
34Device nodes should specify the reset channel required in their "resets"
35property, containing a phandle to the powerdown device node and an
36index specifying which channel to use, as described in reset.txt
37
38example:
39
40 usb1: usb@fe200000 {
41 resets = <&powerdown STIH41X_USB1_POWERDOWN>;
42 };
43
44Macro definitions for the supported reset channels can be found in:
45
46include/dt-bindings/reset-controller/stih415-resets.h
47include/dt-bindings/reset-controller/stih416-resets.h
diff --git a/arch/arm/boot/dts/stih415.dtsi b/arch/arm/boot/dts/stih415.dtsi
index d9c7dd1d95a4..19e29f4af9d6 100644
--- a/arch/arm/boot/dts/stih415.dtsi
+++ b/arch/arm/boot/dts/stih415.dtsi
@@ -10,6 +10,7 @@
10#include "stih415-clock.dtsi" 10#include "stih415-clock.dtsi"
11#include "stih415-pinctrl.dtsi" 11#include "stih415-pinctrl.dtsi"
12#include <dt-bindings/interrupt-controller/arm-gic.h> 12#include <dt-bindings/interrupt-controller/arm-gic.h>
13#include <dt-bindings/reset-controller/stih415-resets.h>
13/ { 14/ {
14 15
15 L2: cache-controller { 16 L2: cache-controller {
@@ -28,6 +29,11 @@
28 ranges; 29 ranges;
29 compatible = "simple-bus"; 30 compatible = "simple-bus";
30 31
32 powerdown: powerdown-controller {
33 #reset-cells = <1>;
34 compatible = "st,stih415-powerdown";
35 };
36
31 syscfg_sbc: sbc-syscfg@fe600000{ 37 syscfg_sbc: sbc-syscfg@fe600000{
32 compatible = "st,stih415-sbc-syscfg", "syscon"; 38 compatible = "st,stih415-sbc-syscfg", "syscon";
33 reg = <0xfe600000 0xb4>; 39 reg = <0xfe600000 0xb4>;
diff --git a/include/dt-bindings/reset-controller/stih415-resets.h b/include/dt-bindings/reset-controller/stih415-resets.h
new file mode 100644
index 000000000000..2d54e68c2d95
--- /dev/null
+++ b/include/dt-bindings/reset-controller/stih415-resets.h
@@ -0,0 +1,19 @@
1/*
2 * This header provides constants for the reset controller
3 * based peripheral powerdown requests on the STMicroelectronics
4 * STiH415 SoC.
5 */
6#ifndef _DT_BINDINGS_RESET_CONTROLLER_STIH415
7#define _DT_BINDINGS_RESET_CONTROLLER_STIH415
8
9#define STIH415_EMISS_POWERDOWN 0
10#define STIH415_NAND_POWERDOWN 1
11#define STIH415_KEYSCAN_POWERDOWN 2
12#define STIH415_USB0_POWERDOWN 3
13#define STIH415_USB1_POWERDOWN 4
14#define STIH415_USB2_POWERDOWN 5
15#define STIH415_SATA0_POWERDOWN 6
16#define STIH415_SATA1_POWERDOWN 7
17#define STIH415_PCIE_POWERDOWN 8
18
19#endif /* _DT_BINDINGS_RESET_CONTROLLER_STIH415 */