Skip to contentSkip to conversation

stm32mp: handle SYSRESET

PATCH In review Patrick Delaunay 2 participants 2 messages Mar 20, 2018 – Apr 7, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 stm32mp: handle SYSRESET

Add support of sysreset with generic driver "syscon-reboot" provided by RCC, for U-boot and for SPL.

---

 arch/arm/Kconfig                    | 1 +
 arch/arm/dts/stm32mp157-u-boot.dtsi | 4 ++++
 arch/arm/dts/stm32mp157.dtsi        | 7 +++++++
 arch/arm/mach-stm32mp/Kconfig       | 2 ++
 arch/arm/mach-stm32mp/cpu.c         | 4 ----
 5 files changed, 14 insertions(+), 4 deletions(-)
arch/arm/Kconfig +1 -0
index 425f533..b59da78 100644
@@ -1163,6 +1163,7 @@ config ARCH_STM32MP
 	select REGMAP
 	select SUPPORT_SPL
 	select SYSCON
+	select SYSRESET
 	select SYS_THUMB_BUILD
 	help
 	  Support for STM32MP SoC family developed by STMicroelectronics,
arch/arm/dts/stm32mp157-u-boot.dtsi +4 -0
index 7a9a4ce..1eca802 100644
@@ -72,6 +72,10 @@
 	u-boot,dm-pre-reloc;
 };
 
+&rcc_reboot {
+	u-boot,dm-pre-reloc;
+};
+
 &pinctrl {
 	u-boot,dm-pre-reloc;
 };
arch/arm/dts/stm32mp157.dtsi +7 -0
index 77953c8..b84899a 100644
@@ -114,6 +114,13 @@
 				#reset-cells = <1>;
 				compatible = "st,stm32mp1-rcc-rst";
 			};
+
+			rcc_reboot: rcc-reboot at 50000000 {
+				compatible = "syscon-reboot";
+				regmap = <&rcc>;
+				offset = <0x404>;
+				mask = <0x1>;
+			};
 		};
 
 		pinctrl: pin-controller {
arch/arm/mach-stm32mp/Kconfig +2 -0
index c1ad939..22e1d11 100644
@@ -16,6 +16,7 @@ config SPL
 	select SPL_RESET_SUPPORT
 	select SPL_SERIAL_SUPPORT
 	select SPL_SYSCON
+	select SPL_DRIVERS_MISC_SUPPORT
 	imply SPL_LIBDISK_SUPPORT
 
 config SYS_SOC
@@ -29,6 +30,7 @@ config TARGET_STM32MP1
 	select CPU_V7_HAS_VIRT
 	select PINCTRL_STM32
 	select STM32_RESET
+	select SYSRESET_SYSCON
 	help
 		target STMicroelectronics SOC STM32MP1 family
 		STMicroelectronics MPU with core ARMv7
arch/arm/mach-stm32mp/cpu.c +0 -4
index 4ba2aec..f9f3bf9 100644
@@ -269,7 +269,3 @@ int arch_misc_init(void)
 
 	return 0;
 }
-
-void reset_cpu(ulong addr)
-{
-}
Signature · 1 line
2.7.4
#1 lore raw
Quoted 4 lines · Patrick Delaunay

Add support of sysreset with generic driver "syscon-reboot" provided by RCC, for U-boot and for SPL.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180407/e8aee48c/attachment.sig>