diff options
author | Srinivas Kandagatla <srinivas.kandagatla@st.com> | 2014-03-11 05:24:55 -0400 |
---|---|---|
committer | Srinivas Kandagatla <srinivas.kandagatla@st.com> | 2014-03-11 06:02:51 -0400 |
commit | 6b7f06cc805bb4755e69cd916b3f565947e0a77a (patch) | |
tree | 087a444745f1a096da308014bd2afc077a08f471 | |
parent | 7ec5183a0ab1930b071c3c68a7d3b08e29b8bb78 (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.txt | 47 | ||||
-rw-r--r-- | arch/arm/boot/dts/stih415.dtsi | 6 | ||||
-rw-r--r-- | include/dt-bindings/reset-controller/stih415-resets.h | 19 |
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 @@ | |||
1 | STMicroelectronics STi family Sysconfig Peripheral Powerdown Reset Controller | ||
2 | ============================================================================= | ||
3 | |||
4 | This binding describes a reset controller device that is used to enable and | ||
5 | disable on-chip peripheral controllers such as USB and SATA, using | ||
6 | "powerdown" control bits found in the STi family SoC system configuration | ||
7 | registers. These have been grouped together into a single reset controller | ||
8 | device for convenience. | ||
9 | |||
10 | The actual action taken when powerdown is asserted is hardware dependent. | ||
11 | However, when asserted it may not be possible to access the hardware's | ||
12 | registers and after an assert/deassert sequence the hardware's previous state | ||
13 | may no longer be valid. | ||
14 | |||
15 | Please refer to reset.txt in this directory for common reset | ||
16 | controller binding usage. | ||
17 | |||
18 | Required properties: | ||
19 | - compatible: Should be "st,<chip>-powerdown" | ||
20 | ex: "st,stih415-powerdown", "st,stih416-powerdown" | ||
21 | - #reset-cells: 1, see below | ||
22 | |||
23 | example: | ||
24 | |||
25 | powerdown: powerdown-controller { | ||
26 | #reset-cells = <1>; | ||
27 | compatible = "st,stih415-powerdown"; | ||
28 | }; | ||
29 | |||
30 | |||
31 | Specifying powerdown control of devices | ||
32 | ======================================= | ||
33 | |||
34 | Device nodes should specify the reset channel required in their "resets" | ||
35 | property, containing a phandle to the powerdown device node and an | ||
36 | index specifying which channel to use, as described in reset.txt | ||
37 | |||
38 | example: | ||
39 | |||
40 | usb1: usb@fe200000 { | ||
41 | resets = <&powerdown STIH41X_USB1_POWERDOWN>; | ||
42 | }; | ||
43 | |||
44 | Macro definitions for the supported reset channels can be found in: | ||
45 | |||
46 | include/dt-bindings/reset-controller/stih415-resets.h | ||
47 | include/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 */ | ||