dt-bindings: watchdog: marvell GTI system watchdog driver
Subsystems (2)
PATCH v9 1/2 dt-bindings: watchdog: marvell GTI system watchdog driver
Add binding documentation for the Marvell GTI system watchdog driver.
---
v9:
- Rename binding file name from marvell,octeontx2-wdt.yaml to marvell,cn10624-wdt.yaml
- "allOf: - $ref: watchdog.yaml#" moved after maintainers
- clocks have maxItems rather than minItems
- Added "clock-names" name defination
- Added Fallback to compatible
v8:
- Compatible name as per soc name
.../watchdog/marvell,cn10624-wdt.yaml | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/marvell,cn10624-wdt.yaml
Documentation/devicetree/bindings/watchdog/marvell,cn10624-wdt.yaml new file +83 -0
@@ -0,0 +1,83 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/watchdog/marvell,cn10624-wdt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell Global Timer (GTI) system watchdog + +maintainers: + - Bharat Bhushan <[email protected]> + +allOf: + - $ref: watchdog.yaml# + +properties: + compatible: + oneOf: + - enum: + - marvell,cn9670-wdt + - marvell,cn10624-wdt + + - items: + - enum: + - marvell,cn9880-wdt + - marvell,cnf9535-wdt + - const: marvell,cn9670-wdt + + - items: + - enum: + - marvell,cn10308-wdt + - marvell,cnf10518-wdt + - const: marvell,cn10624-wdt + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: refclk + + marvell,wdt-timer-index: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 63 + description: + An SoC have many timers (up to 64), firmware can reserve one or more timer + for some other use case and configures one of the global timer as watchdog + timer. Firmware will update this field with the timer number configured + as watchdog timer. + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + soc { + #address-cells = <2>; + #size-cells = <2>; + + watchdog@802000040000 { + compatible = "marvell,cn9670-wdt"; + reg = <0x00008020 0x00040000 0x00000000 0x00020000>; + interrupts = <GIC_SPI 38 IRQ_TYPE_EDGE_RISING>; + clocks = <&sclk>; + clock-names = "refclk"; + marvell,wdt-timer-index = <63>; + }; + }; + +...
Signature · 1 line
2.17.1
PATCH v9 2/2 Watchdog: Add marvell GTI watchdog driver
This patch add support for Marvell GTI watchdog. Global timer unit (GTI) support hardware watchdog timer. Software programs watchdog timer to generate interrupt on first timeout, second timeout is configured to be ignored and system reboots on third timeout.
---
v9:
- include header files is alphabetic order
- using BIT_ULL for bit shifts in macros
- using devm_clk_get_enabled() rather than
devm_clk_get() and clk_prepare_enable()
- compatibles as per dt-binding changes
v8:
- Compatible names as per soc names
- This driver run on ARM64 based architecture, Added 64BIT config dependency to avoid compilation error related to readq/writeq on 32 as platform (Hexagon)
drivers/watchdog/Kconfig | 13 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/marvell_gti_wdt.c | 339 +++++++++++++++++++++++++++++ 3 files changed, 353 insertions(+) create mode 100644 drivers/watchdog/marvell_gti_wdt.c
drivers/watchdog/Kconfig +13 -0
@@ -1779,6 +1779,19 @@ config OCTEON_WDT from the first interrupt, it is then only poked when the device is written. +config MARVELL_GTI_WDT + tristate "Marvell GTI Watchdog driver" + depends on ARCH_THUNDER || (COMPILE_TEST && 64BIT) + default y + select WATCHDOG_CORE + help + Marvell GTI hardware supports watchdog timer. First timeout + works as watchdog pretimeout and installed interrupt handler + will be called on first timeout. Hardware can generate interrupt + to SCP on second timeout but it is not enabled, So second + timeout is ignored. If device poke does not happen then system + will reboot on third timeout. + config BCM2835_WDT tristate "Broadcom BCM2835 hardware watchdog" depends on ARCH_BCM2835 || (OF && COMPILE_TEST)
drivers/watchdog/Makefile +1 -0
@@ -98,6 +98,7 @@ obj-$(CONFIG_VISCONTI_WATCHDOG) += visconti_wdt.o obj-$(CONFIG_MSC313E_WATCHDOG) += msc313e_wdt.o obj-$(CONFIG_APPLE_WATCHDOG) += apple_wdt.o obj-$(CONFIG_SUNPLUS_WATCHDOG) += sunplus_wdt.o +obj-$(CONFIG_MARVELL_GTI_WDT) += marvell_gti_wdt.o # X86 (i386 + ia64 + x86_64) Architecture obj-$(CONFIG_ACQUIRE_WDT) += acquirewdt.o
drivers/watchdog/marvell_gti_wdt.c new file +339 -0
339 lines not on this page · raw message
Signature · 1 line
2.17.1
Quoted 6 lines · Bharat Bhushan
Add binding documentation for the Marvell GTI system watchdog driver.
Signed-off-by Bharat Bhushan <[email protected]>---
v9:
Best regards,
Krzysztof