Add watchdog driver for Sunplus SP7021 SoC
Xiantao Hu
maintainerv3 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.
Xiantao Hu (2):
dt-bindings: watchdog: Add bindings doc for Sunplus SP7021
watchdog: Add driver for Sunplus SP7021
.../bindings/watchdog/sunplus,sp7021-wdt.yaml | 45 +++ MAINTAINERS | 7 + drivers/watchdog/Kconfig | 11 + drivers/watchdog/Makefile | 1 + drivers/watchdog/sunplus_wdt.c | 279 ++++++++++++++++++ 5 files changed, 343 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 v3 1/2 dt-bindings: watchdog: Add bindings doc for Sunplus SP7021
Add bindings documentation for Sunplus SP7021 SoC.
---
Changes in v3:
- removed second reg source. The registers are not used in the driver.
.../bindings/watchdog/sunplus,sp7021-wdt.yaml | 45 +++++++++++++++++++ MAINTAINERS | 6 +++ 2 files changed, 51 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/sunplus,sp7021-wdt.yaml
Documentation/devicetree/bindings/watchdog/sunplus,sp7021-wdt.yaml new file +45 -0
@@ -0,0 +1,45 @@ +# 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: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - resets + +additionalProperties: false + +examples: + - | + watchdog: watchdog@9c000630 { + compatible = "sunplus,sp7021-wdt"; + reg = <0x9c000630 0x08>; + clocks = <&clkc 0x24>; + resets = <&rstc 0x14>; + }; +...
MAINTAINERS +6 -0
@@ -17933,6 +17933,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
Rob Herring
maintainerRe: [PATCH v3 1/2] dt-bindings: watchdog: Add bindings doc for Sunplus SP7021
Quoted 6 lines · Xiantao Hu
Add bindings documentation for Sunplus SP7021 SoC.
Signed-off-by Xiantao Hu <[email protected]>---
Changes in v3:
- removed second reg source. The registers are not used in the driver.
Use by a driver doesn't matter. If they are part of the h/w, put them in the binding.
Quoted 78 lines
.../bindings/watchdog/sunplus,sp7021-wdt.yaml | 45 +++++++++++++++++++ MAINTAINERS | 6 +++ 2 files changed, 51 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/sunplus,sp7021-wdt.yamlDocumentation/devicetree/bindings/watchdog/sunplus,sp7021-wdt.yaml new file +45
-0@@ -0,0 +1,45 @@ +# 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: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - resets + +additionalProperties: false + +examples: + - | + watchdog: watchdog@9c000630 { + compatible = "sunplus,sp7021-wdt"; + reg = <0x9c000630 0x08>; + clocks = <&clkc 0x24>; + resets = <&rstc 0x14>; + }; +...MAINTAINERS +6
-0@@ -17933,6 +17933,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
Xiantao Hu
maintainerPATCH v3 2/2 watchdog: Add driver for Sunplus SP7021
In reply to Xiantao HuAdd driver for Sunplus SP7021 SoC.
---
Changes in v3:
- Addressed all comments from Guenter Roeck.
- Drop the operations related to address 0x9c000274. Put it in bootloader before entry kernel boot.
MAINTAINERS | 1 + drivers/watchdog/Kconfig | 11 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/sunplus_wdt.c | 279 +++++++++++++++++++++++++++++++++ 4 files changed, 292 insertions(+) create mode 100644 drivers/watchdog/sunplus_wdt.c
MAINTAINERS +1 -0
@@ -17938,6 +17938,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
@@ -990,6 +990,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
@@ -94,6 +94,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 +279 -0
279 lines not on this page · raw message
Signature · 1 line
2.33.1