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

dt-bindings: watchdog: sp-805: Convert to Json-schema

Convert the ARM SP-805 watchdog IP DT binding over to Json-schema.

A straight-forward conversion, but the requirement for providing two
clocks got strengthened from "should" to "must".

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Link: https://lore.kernel.org/r/20200909105046.160991-1-andre.przywara@arm.com
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Andre Przywara and committed by
Rob Herring
73d3e43f 488e5947

+71 -32
-32
Documentation/devicetree/bindings/watchdog/arm,sp805.txt
··· 1 - ARM AMBA Primecell SP805 Watchdog 2 - 3 - SP805 WDT is a ARM Primecell Peripheral and has a standard-id register that 4 - can be used to identify the peripheral type, vendor, and revision. 5 - This value can be used for driver matching. 6 - 7 - As SP805 WDT is a primecell IP, it follows the base bindings specified in 8 - 'arm/primecell.txt' 9 - 10 - Required properties: 11 - - compatible: Should be "arm,sp805" & "arm,primecell" 12 - - reg: Should contain location and length for watchdog timer register 13 - - clocks: Clocks driving the watchdog timer hardware. This list should be 14 - 2 clocks. With 2 clocks, the order is wdog_clk, apb_pclk 15 - wdog_clk can be equal to or be a sub-multiple of the apb_pclk 16 - frequency 17 - - clock-names: Shall be "wdog_clk" for first clock and "apb_pclk" for the 18 - second one 19 - 20 - Optional properties: 21 - - interrupts: Should specify WDT interrupt number 22 - - timeout-sec: Should specify default WDT timeout in seconds. If unset, the 23 - default timeout is determined by the driver 24 - 25 - Example: 26 - watchdog@66090000 { 27 - compatible = "arm,sp805", "arm,primecell"; 28 - reg = <0x66090000 0x1000>; 29 - interrupts = <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>; 30 - clocks = <&wdt_clk>, <&apb_pclk>; 31 - clock-names = "wdog_clk", "apb_pclk"; 32 - };
+71
Documentation/devicetree/bindings/watchdog/arm,sp805.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/watchdog/arm,sp805.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: ARM AMBA Primecell SP805 Watchdog 8 + 9 + maintainers: 10 + - Viresh Kumar <vireshk@kernel.org> 11 + 12 + description: |+ 13 + The Arm SP805 IP implements a watchdog device, which triggers an interrupt 14 + after a configurable time period. If that interrupt has not been serviced 15 + when the next interrupt would be triggered, the reset signal is asserted. 16 + 17 + allOf: 18 + - $ref: /schemas/watchdog/watchdog.yaml# 19 + 20 + # Need a custom select here or 'arm,primecell' will match on lots of nodes 21 + select: 22 + properties: 23 + compatible: 24 + contains: 25 + const: arm,sp805 26 + required: 27 + - compatible 28 + 29 + properties: 30 + compatible: 31 + items: 32 + - const: arm,sp805 33 + - const: arm,primecell 34 + 35 + interrupts: 36 + maxItems: 1 37 + 38 + reg: 39 + maxItems: 1 40 + 41 + clocks: 42 + description: | 43 + Clocks driving the watchdog timer hardware. The first clock is used 44 + for the actual watchdog counter. The second clock drives the register 45 + interface. 46 + minItems: 2 47 + maxItems: 2 48 + 49 + clock-names: 50 + items: 51 + - const: wdog_clk 52 + - const: apb_pclk 53 + 54 + required: 55 + - compatible 56 + - reg 57 + - clocks 58 + - clock-names 59 + 60 + unevaluatedProperties: false 61 + 62 + examples: 63 + - | 64 + #include <dt-bindings/interrupt-controller/arm-gic.h> 65 + watchdog@66090000 { 66 + compatible = "arm,sp805", "arm,primecell"; 67 + reg = <0x66090000 0x1000>; 68 + interrupts = <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>; 69 + clocks = <&wdt_clk>, <&apb_pclk>; 70 + clock-names = "wdog_clk", "apb_pclk"; 71 + };