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

dt-bindings: timer: Convert Allwinner A10 Timer to a schema

The older Allwinner SoCs have a Timer supported in Linux, with a matching
Device Tree binding.

While the original binding only mentions one interrupt, the timer actually
has 6 of them.

Now that we have the DT validation in place, let's convert the device tree
bindings for that controller over to a YAML schemas.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

authored by

Maxime Ripard and committed by
Daniel Lezcano
a08bda2d 9f475d08

+76 -19
+76
Documentation/devicetree/bindings/timer/allwinner,sun4i-a10-timer.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/timer/allwinner,sun4i-a10-timer.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Allwinner A10 Timer Device Tree Bindings 8 + 9 + maintainers: 10 + - Chen-Yu Tsai <wens@csie.org> 11 + - Maxime Ripard <maxime.ripard@bootlin.com> 12 + 13 + properties: 14 + compatible: 15 + enum: 16 + - allwinner,sun4i-a10-timer 17 + - allwinner,suniv-f1c100s-timer 18 + 19 + reg: 20 + maxItems: 1 21 + 22 + interrupts: 23 + description: 24 + List of timers interrupts 25 + 26 + clocks: 27 + maxItems: 1 28 + 29 + allOf: 30 + - if: 31 + properties: 32 + compatible: 33 + items: 34 + const: allwinner,sun4i-a10-timer 35 + 36 + then: 37 + properties: 38 + interrupts: 39 + minItems: 6 40 + maxItems: 6 41 + 42 + - if: 43 + properties: 44 + compatible: 45 + items: 46 + const: allwinner,suniv-f1c100s-timer 47 + 48 + then: 49 + properties: 50 + interrupts: 51 + minItems: 3 52 + maxItems: 3 53 + 54 + required: 55 + - compatible 56 + - reg 57 + - interrupts 58 + - clocks 59 + 60 + additionalProperties: false 61 + 62 + examples: 63 + - | 64 + timer { 65 + compatible = "allwinner,sun4i-a10-timer"; 66 + reg = <0x01c20c00 0x400>; 67 + interrupts = <22>, 68 + <23>, 69 + <24>, 70 + <25>, 71 + <67>, 72 + <68>; 73 + clocks = <&osc>; 74 + }; 75 + 76 + ...
-19
Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt
··· 1 - Allwinner A1X SoCs Timer Controller 2 - 3 - Required properties: 4 - 5 - - compatible : should be one of the following: 6 - "allwinner,sun4i-a10-timer" 7 - "allwinner,suniv-f1c100s-timer" 8 - - reg : Specifies base physical address and size of the registers. 9 - - interrupts : The interrupt of the first timer 10 - - clocks: phandle to the source clock (usually a 24 MHz fixed clock) 11 - 12 - Example: 13 - 14 - timer { 15 - compatible = "allwinner,sun4i-a10-timer"; 16 - reg = <0x01c20c00 0x400>; 17 - interrupts = <22>; 18 - clocks = <&osc>; 19 - };