Add watchdog driver for Sunplus SP7021 SoC
Xiantao Hu
maintainerv5 cover Add watchdog driver for Sunplus SP7021 SoC
This is a patch series for watchdog driver for Sunplus SP7021 SoC.
Sunplus SP7021 is an ARM Cortex A7 (4 cores) based SoC. It integrates many peripherals (ex: UART, I2C, SPI, SDIO, eMMC, USB, SD card and etc.) into a single chip. It is designed for industrial control.
Refer to:
https://sunplus-tibbo.atlassian.net/wiki/spaces/doc/overview
https://tibbo.com/store/plus1.html
Xiantao Hu (2):
watchdog: Add Sunplus SP7021 WDT devicetree bindings documentation
watchdog: Add watchdog driver for Sunplus SP7021
.../bindings/watchdog/sunplus,sp7021-wdt.yaml | 47 +++ MAINTAINERS | 7 + drivers/watchdog/Kconfig | 11 + drivers/watchdog/Makefile | 1 + drivers/watchdog/sunplus_wdt.c | 268 ++++++++++++++++++ 5 files changed, 334 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/sunplus,sp7021-wdt.yaml create mode 100644 drivers/watchdog/sunplus_wdt.c
Signature · 1 line
2.33.1
Xiantao Hu
maintainerPATCH v5 2/2 watchdog: Add watchdog driver for Sunplus SP7021
Sunplus SP7021 requires watchdog timer support.
Add watchdog driver to enable this.
---
Changes in v5:
- Addressed all comments from Mr. Guenter Roeck.
Drop the sp_wdt_set_timeout().
Fix devm_add_action_or_reset() called.
- Use dev_err_probe() making code cleaner.
- Change GPL version.
MAINTAINERS | 1 + drivers/watchdog/Kconfig | 11 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/sunplus_wdt.c | 268 +++++++++++++++++++++++++++++++++ 4 files changed, 281 insertions(+) create mode 100644 drivers/watchdog/sunplus_wdt.c
MAINTAINERS +1 -0
@@ -18247,6 +18247,7 @@ M: Xiantao Hu <[email protected]> L: [email protected] S: Maintained F: Documentation/devicetree/bindings/watchdog/sunplus,sp7021-wdt.yaml +F: drivers/watchdog/sunplus_wdt.c SUPERH M: Yoshinori Sato <[email protected]>
drivers/watchdog/Kconfig +11 -0
@@ -976,6 +976,17 @@ config MSC313E_WATCHDOG To compile this driver as a module, choose M here: the module will be called msc313e_wdt. +config SUNPLUS_WATCHDOG + tristate "Sunplus watchdog support" + depends on ARCH_SUNPLUS || COMPILE_TEST + select WATCHDOG_CORE + help + Say Y here to include support for the watchdog timer + in Sunplus SoCs. + + To compile this driver as a module, choose M here: the + module will be called sunplus_wdt. + # X86 (i386 + ia64 + x86_64) Architecture config ACQUIRE_WDT
drivers/watchdog/Makefile +1 -0
@@ -93,6 +93,7 @@ obj-$(CONFIG_PM8916_WATCHDOG) += pm8916_wdt.o obj-$(CONFIG_ARM_SMC_WATCHDOG) += arm_smc_wdt.o obj-$(CONFIG_VISCONTI_WATCHDOG) += visconti_wdt.o obj-$(CONFIG_MSC313E_WATCHDOG) += msc313e_wdt.o +obj-$(CONFIG_SUNPLUS_WATCHDOG) += sunplus_wdt.o # X86 (i386 + ia64 + x86_64) Architecture obj-$(CONFIG_ACQUIRE_WDT) += acquirewdt.o
drivers/watchdog/sunplus_wdt.c new file +268 -0
268 lines not on this page · raw message
Signature · 1 line
2.33.1
Xiantao Hu
maintainerPATCH v5 1/2 watchdog: Add Sunplus SP7021 WDT devicetree bindings documentation
In reply to Xiantao HuThis adds the documentation for the devicetree bindings of the Sunplus SP7021 watchdog driver, found from SP7021 SoCs and newer.
--- .../bindings/watchdog/sunplus,sp7021-wdt.yaml | 47 +++++++++++++++++++ MAINTAINERS | 6 +++ 2 files changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/sunplus,sp7021-wdt.yaml
Documentation/devicetree/bindings/watchdog/sunplus,sp7021-wdt.yaml new file +47 -0
@@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) Sunplus Co., Ltd. 2021 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/watchdog/sunplus,sp7021-wdt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sunplus SoCs Watchdog Device Tree Bindings + +maintainers: + - XianTao Hu <[email protected]> + +allOf: + - $ref: watchdog.yaml# + +properties: + compatible: + const: sunplus,sp7021-wdt + + reg: + items: + - description: watchdog registers regions + - description: miscellaneous control registers regions + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - resets + +additionalProperties: false + +examples: + - | + watchdog: watchdog@9c000630 { + compatible = "sunplus,sp7021-wdt"; + reg = <0x9c000630 0x08>, <0x9C000274 0x04>; + clocks = <&clkc 0x24>; + resets = <&rstc 0x14>; + }; +...
MAINTAINERS +6 -0
@@ -18242,6 +18242,12 @@ L: [email protected] S: Maintained F: drivers/net/ethernet/dlink/sundance.c +SUNPLUS WATCHDOG DRIVER +M: Xiantao Hu <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/devicetree/bindings/watchdog/sunplus,sp7021-wdt.yaml + SUPERH M: Yoshinori Sato <[email protected]> M: Rich Felker <[email protected]>
Signature · 1 line
2.33.1