Skip to contentSkip to conversation

add new wdt driver for sp805

PATCH New Qiang Zhao 1 participant 4 messages May 7, 2019

Subsystems (2)
lore
Share & tools
lore

Qiang Zhao

author
#0 lore raw

cover add new wdt driver for sp805

changes for v2:
- modify the driver to DM
changes for v3:
- drop member "timeout" of struct "sp805_wat_priv", it is not needed

Zhao Qiang (3):
watchdog: add sp805 watchdog support
dts: fsl-ls1028a: add sp805 node which is a watchdog
defconfig: ls1028ardb: enable wdt

 MAINTAINERS                   |   1 +
 arch/arm/dts/fsl-ls1028a.dtsi |   4 ++
 configs/ls1028ardb_defconfig  |   3 +
 drivers/watchdog/Kconfig      |   7 ++
 drivers/watchdog/Makefile     |   1 +
 drivers/watchdog/sp805_wdt.c  | 126 ++++++++++++++++++++++++++++++++++
 6 files changed, 142 insertions(+)
 create mode 100644 drivers/watchdog/sp805_wdt.c
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH v3 1/3 watchdog: add sp805 watchdog support

sp805 is watchdog on some NXP layerscape SoCs, Now add its driver in uboot. To add

	CONFIG_WDT_SP805=y
	CONFIG_WDT=y
	CONFIG_CMD_WDT=y

in defconfig to use it.

---
 MAINTAINERS                  |   1 +
 drivers/watchdog/Kconfig     |   7 ++
 drivers/watchdog/Makefile    |   1 +
 drivers/watchdog/sp805_wdt.c | 127 +++++++++++++++++++++++++++++++++++
 4 files changed, 136 insertions(+)
 create mode 100644 drivers/watchdog/sp805_wdt.c
MAINTAINERS +1 -0
index 8f237128b2..e8e7a92802 100644
@@ -410,6 +410,7 @@ FREESCALE QORIQ
 M:	York Sun <[email protected]>
 S:	Maintained
 T:	git git://git.denx.de/u-boot-fsl-qoriq.git
+F:	drivers/watchdog/sp805_wdt.c
 
 I2C
 M:	Heiko Schocher <[email protected]>
drivers/watchdog/Kconfig +7 -0
index b06c5447f6..29e04630d2 100644
@@ -95,6 +95,13 @@ config WDT_ORION
 	   Select this to enable Orion watchdog timer, which can be found on some
 	   Marvell Armada chips.
 
+config WDT_SP805
+	bool "SP805 watchdog timer support"
+	depends on WDT
+	help
+	   Select this to enable SP805 watchdog timer, which can be found on some
+	   nxp layerscape chips.
+
 config WDT_CDNS
 	bool "Cadence watchdog timer support"
 	depends on WDT
drivers/watchdog/Makefile +1 -0
index 19c631bb58..eb285bde24 100644
@@ -25,3 +25,4 @@ obj-$(CONFIG_BCM2835_WDT)       += bcm2835_wdt.o
 obj-$(CONFIG_WDT_ORION) += orion_wdt.o
 obj-$(CONFIG_WDT_CDNS) += cdns_wdt.o
 obj-$(CONFIG_MPC8xx_WATCHDOG) += mpc8xx_wdt.o
+obj-$(CONFIG_WDT_SP805) += sp805_wdt.o
drivers/watchdog/sp805_wdt.c new file +127 -0

127 lines not on this page · raw message

Signature · 1 line
2.17.1
author
#2 lore raw

PATCH v3 2/3 dts: fsl-ls1028a: add sp805 node which is a watchdog

In reply to Qiang Zhao

add sp805 nodes in fsl-ls1028a.dtsi

---
 arch/arm/dts/fsl-ls1028a.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/dts/fsl-ls1028a.dtsi +4 -0
index 35382eb3b4..30fb20cd3e 100644
@@ -338,4 +338,8 @@
 		status = "disabled";
 	      };
 
+	cluster1_core0_watchdog: wdt at c000000 {
+		compatible = "arm,sp805-wdt";
+		reg = <0x0 0xc000000 0x0 0x1000>;
+	};
 };
Signature · 1 line
2.17.1
author
#3 lore raw

PATCH v3 3/3 defconfig: ls1028ardb: enable wdt

In reply to Qiang Zhao

Enable watchdog which is sp805, can be found on some NXP Layerscape SoC.

---
 configs/ls1028ardb_defconfig | 3 +++
 1 file changed, 3 insertions(+)
configs/ls1028ardb_defconfig +3 -0
index e3ff21f10c..5edcaae24b 100644
@@ -70,3 +70,6 @@ CONFIG_NR_DRAM_BANKS=2
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCI_PNP=y
 CONFIG_DM_MMC=y
+CONFIG_WDT_SP805=y
+CONFIG_WDT=y
+CONFIG_CMD_WDT=y
Signature · 1 line
2.17.1