watchdog: digicolor: document device tree binding
Baruch Siach
maintainerPATCH v3 1/2 watchdog: digicolor: document device tree binding
Add a device tree binding documentation to the watchdog hardware block on the Conexant CX92755 SoC. The CX92755 is from the Digicolor SoCs series. Other SoCs in that series may share the same hardware block.
---
v3:
No change
v2:
No change
--- .../devicetree/bindings/watchdog/digicolor-wdt.txt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt
Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt new file +25 -0
@@ -0,0 +1,25 @@ +Conexant Digicolor SoCs Watchdog timer + +The watchdog functionality in Conexant Digicolor SoCs relies on the so called +"Agent Communication" block. This block includes the eight programmable system +timer counters. The first timer (called "Timer A") is the only one that can be +used as watchdog. + +Required properties: + +- compatible : Should be "cnxt,cx92755-wdt" +- reg : Specifies base physical address and size of the registers +- clocks : phandle; specifies the clock that drives the timer + +Optional properties: + +- timeout-sec : Contains the watchdog timeout in seconds + +Example: + + watchdog at f0000fc0 { + compatible = "cnxt,cx92755-wdt"; + reg = <0xf0000fc0 0x8>; + clocks = <&main_clk>; + timeout-sec = <15>; + };
Signature · 1 line
2.1.4
Baruch Siach
maintainerPATCH v3 2/2 watchdog: digicolor: driver for Conexant Digicolor CX92755 SoC
This commit add a driver for the watchdog functionality of the Conexant CX92755 SoC, from the Digicolor series of SoCs. Of 8 system timers provided by the CX92755, the first one, timer A, can reset the chip when its counter reaches zero. This driver uses this capability to provide userspace with a standard watchdog, using the watchdog timer driver core framework. This driver also implements a reboot handler for the reboot(2) system call.
The watchdog driver shares the timer registers with the CX92755 timer driver (drivers/clocksource/timer-digicolor.c). The timer driver, however, uses only timers other than A, so both drivers should coexist.
---
v3:
Address further comments of Guenter Roeck:
* Remove redundant parentheses
* Use a single label in probe error path
v2:
Address the comments of Guenter Roeck:
* Set default timeout to max_timeout
* Move watchdog timer set code to a helper routine to avoid code duplication
* Update watchdog timer on .set_timeout callback
* Fix iomap leak on error path
* Change restart registration error message to a warning
* Use devm_clk_get() to acquire the clock
--- drivers/watchdog/Kconfig | 10 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/digicolor_wdt.c | 205 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 216 insertions(+) create mode 100644 drivers/watchdog/digicolor_wdt.c
drivers/watchdog/Kconfig +10 -0
@@ -515,6 +515,16 @@ config MEDIATEK_WATCHDOG To compile this driver as a module, choose M here: the module will be called mtk_wdt. +config DIGICOLOR_WATCHDOG + tristate "Conexant Digicolor SoCs watchdog support" + depends on ARCH_DIGICOLOR + select WATCHDOG_CORE + help + Say Y here to include support for the watchdog timer + in Conexant Digicolor SoCs. + To compile this driver as a module, choose M here: the + module will be called digicolor_wdt. + # AVR32 Architecture config AT32AP700X_WDT
drivers/watchdog/Makefile +1 -0
@@ -64,6 +64,7 @@ obj-$(CONFIG_BCM_KONA_WDT) += bcm_kona_wdt.o obj-$(CONFIG_TEGRA_WATCHDOG) += tegra_wdt.o obj-$(CONFIG_MESON_WATCHDOG) += meson_wdt.o obj-$(CONFIG_MEDIATEK_WATCHDOG) += mtk_wdt.o +obj-$(CONFIG_DIGICOLOR_WATCHDOG) += digicolor_wdt.o # AVR32 Architecture obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o
drivers/watchdog/digicolor_wdt.c new file +205 -0
205 lines not on this page · raw message
Signature · 1 line
2.1.4
Guenter Roeck
maintainerPATCH v3 2/2 watchdog: digicolor: driver for Conexant Digicolor CX92755 SoC
Quoted 7 lines · Baruch Siach
This commit add a driver for the watchdog functionality of the Conexant CX92755 SoC, from the Digicolor series of SoCs. Of 8 system timers provided by the CX92755, the first one, timer A, can reset the chip when its counter reaches zero. This driver uses this capability to provide userspace with a standard watchdog, using the watchdog timer driver core framework. This driver also implements a reboot handler for the reboot(2) system call.
Quoted 5 lines
The watchdog driver shares the timer registers with the CX92755 timer driver (
drivers/clocksource/timer-digicolor.c). The timer driver, however, uses only timers other than A, so both drivers should coexist.Signed-off-by Baruch Siach <[email protected]>
Guenter Roeck
maintainerPATCH v3 1/2 watchdog: digicolor: document device tree binding
In reply to Baruch SiachQuoted 5 lines · Baruch Siach
Add a device tree binding documentation to the watchdog hardware block on the Conexant CX92755 SoC. The CX92755 is from the Digicolor SoCs series. Other SoCs in that series may share the same hardware block.
Signed-off-by Baruch Siach <[email protected]>