diff mbox series

[U-Boot] arm64: zynqmp: Enable cadence WDT for zcu100

Message ID f953777ca1c69800caf43f707c5c5720675096a9.1524218140.git.michal.simek@xilinx.com
State Accepted
Commit 767afebbcda59f3ccb04f6c94de8cab2fb7905b6
Delegated to: Michal Simek
Headers show
Series [U-Boot] arm64: zynqmp: Enable cadence WDT for zcu100 | expand

Commit Message

Michal Simek April 20, 2018, 9:55 a.m. UTC
Enable watchdog on zcu100 to make sure if there is a bug in the u-boot
there is proper reset.
Watchdog expires and PMU fw is informed and based on setting proper
action is taken.

The patch is enabling reset-on-timeout feature and also fixing fixed
clock rate for watchdog where 100MHz is max (and also default) clock value.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 arch/arm/dts/zynqmp-clk.dtsi                | 2 +-
 arch/arm/dts/zynqmp-zcu100-revC.dts         | 1 +
 configs/xilinx_zynqmp_zcu100_revC_defconfig | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/arm/dts/zynqmp-clk.dtsi b/arch/arm/dts/zynqmp-clk.dtsi
index a8664e81870e..a795efdc15c8 100644
--- a/arch/arm/dts/zynqmp-clk.dtsi
+++ b/arch/arm/dts/zynqmp-clk.dtsi
@@ -219,7 +219,7 @@ 
 };
 
 &watchdog0 {
-	clocks = <&clk250>;
+	clocks = <&clk100>;
 };
 
 &xilinx_drm {
diff --git a/arch/arm/dts/zynqmp-zcu100-revC.dts b/arch/arm/dts/zynqmp-zcu100-revC.dts
index 38b8753da114..da5af96051d1 100644
--- a/arch/arm/dts/zynqmp-zcu100-revC.dts
+++ b/arch/arm/dts/zynqmp-zcu100-revC.dts
@@ -332,6 +332,7 @@ 
 
 &watchdog0 {
 	status = "okay";
+	reset-on-timeout;
 };
 
 &xilinx_ams {
diff --git a/configs/xilinx_zynqmp_zcu100_revC_defconfig b/configs/xilinx_zynqmp_zcu100_revC_defconfig
index 348c8c77cd41..db6ed1aa86eb 100644
--- a/configs/xilinx_zynqmp_zcu100_revC_defconfig
+++ b/configs/xilinx_zynqmp_zcu100_revC_defconfig
@@ -80,5 +80,7 @@  CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_WDT=y
+CONFIG_WDT_CDNS=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y