Skip to contentSkip to conversation

Reset Controller Nodes for TI Keystone platforms

PATCH Superseded Suman Anna 2 participants 7 messages Jan 9, 2017

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Suman Anna

author
#0 lore raw

cover Reset Controller Nodes for TI Keystone platforms

Hi Santosh,

This patch adds the reset controller nodes and the corresponding reset data for TI Keystone 66AK2H, 66AK2L and 66AK2E SoCs. These resets are for the DSPs on these SoCs, and are the last dependencies before the keystone remoteproc driver can be added.

All these SoCs will use the ti-syscon-reset driver which is already part of mainline kernel. The bindings for the same can be found in Documentation/devicetree/bindings/reset/ti-syscon-reset.txt file. Note that the other Keystone 66AK2G SoC will use a different TI-SCI based reset driver, so will be submitted separately once the TI-SCI dependencies make it into mainline.

Patches are based on top of 4.10-rc1 plus the MSM-RAM DT node series that you have already picked up. Patch 1 enable the Reset Framework for Keystone platforms, and remaining patches add the required DT nodes.

regards
Suman

Suman Anna (5):
ARM: Keystone: Enable ARCH_HAS_RESET_CONTROLLER
ARM: dts: keystone: Add PSC node
ARM: dts: keystone-k2hk: Add PSC reset controller node
ARM: dts: keystone-k2l: Add PSC reset controller node
ARM: dts: keystone-k2e: Add PSC reset controller node

 arch/arm/boot/dts/keystone-k2e.dtsi  | 13 +++++++++++++
 arch/arm/boot/dts/keystone-k2hk.dtsi | 20 ++++++++++++++++++++
 arch/arm/boot/dts/keystone-k2l.dtsi  | 16 ++++++++++++++++
 arch/arm/boot/dts/keystone.dtsi      |  5 +++++
 arch/arm/mach-keystone/Kconfig       |  1 +
 5 files changed, 55 insertions(+)
Signature · 1 line
2.10.2
author
#1 lore raw

PATCH 1/5 ARM: Keystone: Enable ARCH_HAS_RESET_CONTROLLER

The Keystone 2 family of SoCs will use various Reset Controller drivers for managing the resets of remote processor devices like DSPs on the SoC, so select the ARCH_HAS_RESET_CONTROLLER option by default to enable the Reset framework.

---
 arch/arm/mach-keystone/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-keystone/Kconfig +1 -0
index 24bd64dabdfc..554357035f30 100644
@@ -4,6 +4,7 @@ config ARCH_KEYSTONE
 	select ARM_GIC
 	select HAVE_ARM_ARCH_TIMER
 	select KEYSTONE_TIMER
+	select ARCH_HAS_RESET_CONTROLLER
 	select ARM_ERRATA_798181 if SMP
 	select COMMON_CLK_KEYSTONE
 	select ARCH_SUPPORTS_BIG_ENDIAN
Signature · 1 line
2.10.2
author
#2 lore raw

PATCH 2/5 ARM: dts: keystone: Add PSC node

In reply to Suman Anna

The Power Sleep Controller (PSC) module is responsible for the power and clock management for each of the peripherals present on the SoC. Represent this as a syscon node so that multiple users can leverage it for various functionalities.

[afd at ti.com: add simple-mfd compatible]
---
 arch/arm/boot/dts/keystone.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/keystone.dtsi +5 -0
index 02708ba2d4f4..ec203d0a673d 100644
@@ -83,6 +83,11 @@
 			reg = <0x02310000 0x200>;
 		};
 
+		psc: power-sleep-controller at 02350000 {
+			compatible = "syscon", "simple-mfd";
+			reg = <0x02350000 0x1000>;
+		};
+
 		devctrl: device-state-control at 02620000 {
 			compatible = "ti,keystone-devctrl", "syscon";
 			reg = <0x02620000 0x1000>;
Signature · 1 line
2.10.2
author
#3 lore raw

PATCH 3/5 ARM: dts: keystone-k2hk: Add PSC reset controller node

In reply to Suman Anna

The Power Sleep Controller (PSC) module contains specific memory-mapped registers that can be used to perform reset management using specific bits for the DSPs available on the SoC. The PSC is defined using a syscon node, and the reset functionality is defined using a child syscon reset controller node.

Add this syscon reset controller node as well as the reset control data for the resets it supports for the 66AK2H SoCs.

---
 arch/arm/boot/dts/keystone-k2hk.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
arch/arm/boot/dts/keystone-k2hk.dtsi +20 -0
index e0780f111537..a833db72fc61 100644
@@ -8,6 +8,8 @@
  * published by the Free Software Foundation.
  */
 
+#include <dt-bindings/reset/ti-syscon.h>
+
 / {
 	compatible = "ti,k2hk", "ti,keystone";
 	model = "Texas Instruments Keystone 2 Kepler/Hawking SoC";
@@ -58,6 +60,24 @@
 			};
 		};
 
+		psc: power-sleep-controller at 02350000 {
+			pscrst: psc-reset-controller {
+				compatible = "ti,k2hk-pscrst", "ti,syscon-reset";
+				#reset-cells = <1>;
+
+				ti,reset-bits = <
+					0xa3c 8 0xa3c 8 0x83c 8 (ASSERT_CLEAR | DEASSERT_SET | STATUS_CLEAR) /* 0: dsp0 */
+					0xa40 8 0xa40 8 0x840 8 (ASSERT_CLEAR | DEASSERT_SET | STATUS_CLEAR) /* 1: dsp1 */
+					0xa44 8 0xa44 8 0x844 8 (ASSERT_CLEAR | DEASSERT_SET | STATUS_CLEAR) /* 2: dsp2 */
+					0xa48 8 0xa48 8 0x848 8 (ASSERT_CLEAR | DEASSERT_SET | STATUS_CLEAR) /* 3: dsp3 */
+					0xa4c 8 0xa4c 8 0x84c 8 (ASSERT_CLEAR | DEASSERT_SET | STATUS_CLEAR) /* 4: dsp4 */
+					0xa50 8 0xa50 8 0x850 8 (ASSERT_CLEAR | DEASSERT_SET | STATUS_CLEAR) /* 5: dsp5 */
+					0xa54 8 0xa54 8 0x854 8 (ASSERT_CLEAR | DEASSERT_SET | STATUS_CLEAR) /* 6: dsp6 */
+					0xa58 8 0xa58 8 0x858 8 (ASSERT_CLEAR | DEASSERT_SET | STATUS_CLEAR) /* 7: dsp7 */
+				>;
+			};
+		};
+
 		dspgpio0: keystone_dsp_gpio at 02620240 {
 			compatible = "ti,keystone-dsp-gpio";
 			gpio-controller;
Signature · 1 line
2.10.2
author
#4 lore raw

PATCH 4/5 ARM: dts: keystone-k2l: Add PSC reset controller node

In reply to Suman Anna

The Power Sleep Controller (PSC) module contains specific memory-mapped registers that can be used to perform reset management using specific bits for the DSPs available on the SoC. The PSC is defined using a syscon node, and the reset functionality is defined using a child syscon reset controller node.

Add this syscon reset controller node as well as the reset control data for the resets it supports for the 66AK2L SoCs.

---
 arch/arm/boot/dts/keystone-k2l.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm/boot/dts/keystone-k2l.dtsi +16 -0
index b58015737a35..4fa368f9ba52 100644
@@ -8,6 +8,8 @@
  * published by the Free Software Foundation.
  */
 
+#include <dt-bindings/reset/ti-syscon.h>
+
 / {
 	compatible = "ti,k2l", "ti,keystone";
 	model = "Texas Instruments Keystone 2 Lamarr SoC";
@@ -216,6 +218,20 @@
 			};
 		};
 
+		psc: power-sleep-controller at 02350000 {
+			pscrst: psc-reset-controller {
+				compatible = "ti,k2l-pscrst", "ti,syscon-reset";
+				#reset-cells = <1>;
+
+				ti,reset-bits = <
+					0xa3c 8 0xa3c 8 0x83c 8 (ASSERT_CLEAR | DEASSERT_SET | STATUS_CLEAR) /* 0: dsp0 */
+					0xa40 8 0xa40 8 0x840 8 (ASSERT_CLEAR | DEASSERT_SET | STATUS_CLEAR) /* 1: dsp1 */
+					0xa44 8 0xa44 8 0x844 8 (ASSERT_CLEAR | DEASSERT_SET | STATUS_CLEAR) /* 2: dsp2 */
+					0xa48 8 0xa48 8 0x848 8 (ASSERT_CLEAR | DEASSERT_SET | STATUS_CLEAR) /* 3: dsp3 */
+				>;
+			};
+		};
+
 		dspgpio0: keystone_dsp_gpio at 02620240 {
 			compatible = "ti,keystone-dsp-gpio";
 			gpio-controller;
Signature · 1 line
2.10.2
author
#5 lore raw

PATCH 5/5 ARM: dts: keystone-k2e: Add PSC reset controller node

In reply to Suman Anna

The Power Sleep Controller (PSC) module contains specific memory-mapped registers that can be used to perform reset management using specific bits for the DSPs available on the SoC. The PSC is defined using a syscon node, and the reset functionality is defined using a child syscon reset controller node.

Add this syscon reset controller node as well as the reset control data for the resets it supports for the 66AK2E SoCs.

---
 arch/arm/boot/dts/keystone-k2e.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm/boot/dts/keystone-k2e.dtsi +13 -0
index 9d1d8a64d10e..c5983418c42c 100644
@@ -8,6 +8,8 @@
  * published by the Free Software Foundation.
  */
 
+#include <dt-bindings/reset/ti-syscon.h>
+
 / {
 	compatible = "ti,k2e", "ti,keystone";
 	model = "Texas Instruments Keystone 2 Edison SoC";
@@ -94,6 +96,17 @@
 			};
 		};
 
+		psc: power-sleep-controller at 02350000 {
+			pscrst: psc-reset-controller {
+				compatible = "ti,k2e-pscrst", "ti,syscon-reset";
+				#reset-cells = <1>;
+
+				ti,reset-bits = <
+					0xa3c 8 0xa3c 8 0x83c 8 (ASSERT_CLEAR | DEASSERT_SET | STATUS_CLEAR) /* 0: dsp0 */
+				>;
+			};
+		};
+
 		dspgpio0: keystone_dsp_gpio at 02620240 {
 			compatible = "ti,keystone-dsp-gpio";
 			gpio-controller;
Signature · 1 line
2.10.2
#6 lore raw
In reply to Suman Anna
Quoted 14 lines · Suman Anna

Hi Santosh,

This patch adds the reset controller nodes and the corresponding reset data for TI Keystone 66AK2H, 66AK2L and 66AK2E SoCs. These resets are for the DSPs on these SoCs, and are the last dependencies before the keystone remoteproc driver can be added.

All these SoCs will use the ti-syscon-reset driver which is already part of mainline kernel. The bindings for the same can be found in Documentation/devicetree/bindings/reset/ti-syscon-reset.txt file. Note that the other Keystone 66AK2G SoC will use a different TI-SCI based reset driver, so will be submitted separately once the TI-SCI dependencies make it into mainline.

Quoted 5 lines

Patches are based on top of 4.10-rc1 plus the MSM-RAM DT node series that you have already picked up. Patch 1 enable the Reset Framework for Keystone platforms, and remaining patches add the required DT nodes.

Ok. I will let this series be on list for a week or so for any comments. After that will pick this up and push it out to next.

Regards,
Santosh