Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

watchdog: dt-bindings: atmel,at91sam9-wdt: convert to json-schema

Convert at91sam9 WDT binding for Atmel/Microchip SoCs to json-schema
format.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220714125122.144377-1-sergiu.moga@microchip.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Sergiu Moga and committed by
Wim Van Sebroeck
b2462060 80079353

+127 -51
+127
Documentation/devicetree/bindings/watchdog/atmel,at91sam9-wdt.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + # Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries 3 + %YAML 1.2 4 + --- 5 + $id: http://devicetree.org/schemas/watchdog/atmel,at91sam9-wdt.yaml# 6 + $schema: http://devicetree.org/meta-schemas/core.yaml# 7 + 8 + title: Atmel Watchdog Timers 9 + 10 + maintainers: 11 + - Eugen Hristev <eugen.hristev@microchip.com> 12 + 13 + properties: 14 + compatible: 15 + const: atmel,at91sam9260-wdt 16 + 17 + reg: 18 + maxItems: 1 19 + 20 + clocks: 21 + maxItems: 1 22 + 23 + interrupts: 24 + maxItems: 1 25 + 26 + atmel,max-heartbeat-sec: 27 + description: 28 + Should contain the maximum heartbeat value in seconds. This value 29 + should be less or equal to 16. It is used to compute the WDV field. 30 + maximum: 16 31 + 32 + atmel,min-heartbeat-sec: 33 + description: 34 + Should contain the minimum heartbeat value in seconds. This value 35 + must be smaller than the max-heartbeat-sec value. It is used to 36 + compute the WDD field. 37 + maximum: 16 38 + 39 + atmel,watchdog-type: 40 + $ref: /schemas/types.yaml#/definitions/string 41 + description: | 42 + Should be hardware or software. 43 + oneOf: 44 + - description: 45 + Hardware watchdog uses the at91 watchdog reset. 46 + const: hardware 47 + - description: | 48 + Software watchdog uses the watchdog interrupt 49 + to trigger a software reset. 50 + const: software 51 + default: hardware 52 + 53 + atmel,reset-type: 54 + $ref: /schemas/types.yaml#/definitions/string 55 + description: | 56 + Should be proc or all. This is valid only when using hardware watchdog. 57 + oneOf: 58 + - description: 59 + Assert peripherals and processor reset signals. 60 + const: all 61 + - description: 62 + Assert the processor reset signal. 63 + const: proc 64 + default: all 65 + 66 + atmel,disable: 67 + $ref: /schemas/types.yaml#/definitions/flag 68 + description: 69 + Should be present if you want to stop the watchdog. 70 + 71 + atmel,idle-halt: 72 + $ref: /schemas/types.yaml#/definitions/flag 73 + description: | 74 + Should be present if you want to stop the watchdog when 75 + entering idle state. 76 + CAUTION: This property should be used with care, it actually makes the 77 + watchdog not counting when the CPU is in idle state, therefore the 78 + watchdog reset time depends on mean CPU usage and will not reset at all 79 + if the CPU stops working while it is in idle state, which is probably 80 + not what you want. 81 + 82 + atmel,dbg-halt: 83 + $ref: /schemas/types.yaml#/definitions/flag 84 + description: | 85 + Should be present if you want to stop the watchdog when 86 + entering debug state. 87 + 88 + required: 89 + - compatible 90 + - reg 91 + - clocks 92 + 93 + allOf: 94 + - $ref: watchdog.yaml# 95 + - if: 96 + properties: 97 + atmel,reset-type: 98 + enum: 99 + - all 100 + - proc 101 + then: 102 + properties: 103 + atmel,watchdog-type: 104 + const: hardware 105 + 106 + dependencies: 107 + atmel,reset-type: ['atmel,watchdog-type'] 108 + 109 + unevaluatedProperties: false 110 + 111 + examples: 112 + - | 113 + #include <dt-bindings/interrupt-controller/irq.h> 114 + 115 + watchdog@fffffd40 { 116 + compatible = "atmel,at91sam9260-wdt"; 117 + reg = <0xfffffd40 0x10>; 118 + interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; 119 + clocks = <&clk32k>; 120 + timeout-sec = <15>; 121 + atmel,watchdog-type = "hardware"; 122 + atmel,reset-type = "all"; 123 + atmel,dbg-halt; 124 + atmel,idle-halt; 125 + atmel,max-heartbeat-sec = <16>; 126 + atmel,min-heartbeat-sec = <0>; 127 + };
-51
Documentation/devicetree/bindings/watchdog/atmel-wdt.txt
··· 1 - * Atmel Watchdog Timers 2 - 3 - ** at91sam9-wdt 4 - 5 - Required properties: 6 - - compatible: must be "atmel,at91sam9260-wdt". 7 - - reg: physical base address of the controller and length of memory mapped 8 - region. 9 - - clocks: phandle to input clock. 10 - 11 - Optional properties: 12 - - timeout-sec: contains the watchdog timeout in seconds. 13 - - interrupts : Should contain WDT interrupt. 14 - - atmel,max-heartbeat-sec : Should contain the maximum heartbeat value in 15 - seconds. This value should be less or equal to 16. It is used to 16 - compute the WDV field. 17 - - atmel,min-heartbeat-sec : Should contain the minimum heartbeat value in 18 - seconds. This value must be smaller than the max-heartbeat-sec value. 19 - It is used to compute the WDD field. 20 - - atmel,watchdog-type : Should be "hardware" or "software". Hardware watchdog 21 - use the at91 watchdog reset. Software watchdog use the watchdog 22 - interrupt to trigger a software reset. 23 - - atmel,reset-type : Should be "proc" or "all". 24 - "all" : assert peripherals and processor reset signals 25 - "proc" : assert the processor reset signal 26 - This is valid only when using "hardware" watchdog. 27 - - atmel,disable : Should be present if you want to disable the watchdog. 28 - - atmel,idle-halt : Should be present if you want to stop the watchdog when 29 - entering idle state. 30 - CAUTION: This property should be used with care, it actually makes the 31 - watchdog not counting when the CPU is in idle state, therefore the 32 - watchdog reset time depends on mean CPU usage and will not reset at all 33 - if the CPU stop working while it is in idle state, which is probably 34 - not what you want. 35 - - atmel,dbg-halt : Should be present if you want to stop the watchdog when 36 - entering debug state. 37 - 38 - Example: 39 - watchdog@fffffd40 { 40 - compatible = "atmel,at91sam9260-wdt"; 41 - reg = <0xfffffd40 0x10>; 42 - interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; 43 - clocks = <&clk32k>; 44 - timeout-sec = <15>; 45 - atmel,watchdog-type = "hardware"; 46 - atmel,reset-type = "all"; 47 - atmel,dbg-halt; 48 - atmel,idle-halt; 49 - atmel,max-heartbeat-sec = <16>; 50 - atmel,min-heartbeat-sec = <0>; 51 - };