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

dt-bindings: rtc: Convert snps,dw-apb-timer to DT schema

Modern device tree bindings are supposed to be created as YAML-files
in accordance with DT schema. This commit replaces Synopsys DW Timer
legacy bare text binding with YAML file. As before the binding file
states that the corresponding dts node is supposed to be compatible
with generic DW APB Timer indicated by the "snps,dw-apb-timer"
compatible string and to provide a mandatory registers memory range,
one timer interrupt, either reference clock source or a fixed clock
rate value. It may also have an optional APB bus reference clock
phandle specified.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-mips@vger.kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200521204818.25436-2-Sergey.Semin@baikalelectronics.ru

authored by

Serge Semin and committed by
Daniel Lezcano
b33aaf5c 264418e2

+88 -32
-32
Documentation/devicetree/bindings/rtc/dw-apb.txt
··· 1 - * Designware APB timer 2 - 3 - Required properties: 4 - - compatible: One of: 5 - "snps,dw-apb-timer" 6 - "snps,dw-apb-timer-sp" <DEPRECATED> 7 - "snps,dw-apb-timer-osc" <DEPRECATED> 8 - - reg: physical base address of the controller and length of memory mapped 9 - region. 10 - - interrupts: IRQ line for the timer. 11 - - either clocks+clock-names or clock-frequency properties 12 - 13 - Optional properties: 14 - - clocks : list of clock specifiers, corresponding to entries in 15 - the clock-names property; 16 - - clock-names : should contain "timer" and "pclk" entries, matching entries 17 - in the clocks property. 18 - - clock-frequency: The frequency in HZ of the timer. 19 - - clock-freq: For backwards compatibility with picoxcell 20 - 21 - If using the clock specifiers, the pclk clock is optional, as not all 22 - systems may use one. 23 - 24 - 25 - Example: 26 - timer@ffe00000 { 27 - compatible = "snps,dw-apb-timer"; 28 - interrupts = <0 170 4>; 29 - reg = <0xffe00000 0x1000>; 30 - clocks = <&timer_clk>, <&timer_pclk>; 31 - clock-names = "timer", "pclk"; 32 - };
+88
Documentation/devicetree/bindings/rtc/snps,dw-apb-timer.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/rtc/snps,dw-apb-timer.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Synopsys DesignWare APB Timer 8 + 9 + maintainers: 10 + - Daniel Lezcano <daniel.lezcano@linaro.org> 11 + 12 + properties: 13 + compatible: 14 + oneOf: 15 + - const: snps,dw-apb-timer 16 + - enum: 17 + - snps,dw-apb-timer-sp 18 + - snps,dw-apb-timer-osc 19 + deprecated: true 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + interrupts: 25 + maxItems: 1 26 + 27 + clocks: 28 + minItems: 1 29 + items: 30 + - description: Timer ticks reference clock source 31 + - description: APB interface clock source 32 + 33 + clock-names: 34 + minItems: 1 35 + items: 36 + - const: timer 37 + - const: pclk 38 + 39 + clock-frequency: true 40 + 41 + clock-freq: 42 + $ref: "/schemas/types.yaml#/definitions/uint32" 43 + description: | 44 + Has the same meaning as the 'clock-frequency' property - timer clock 45 + frequency in HZ, but is defined only for the backwards compatibility 46 + with the picoxcell platform. 47 + 48 + unevaluatedProperties: false 49 + 50 + required: 51 + - compatible 52 + - reg 53 + - interrupts 54 + 55 + oneOf: 56 + - required: 57 + - clocks 58 + - clock-names 59 + - required: 60 + - clock-frequency 61 + - required: 62 + - clock-freq 63 + 64 + examples: 65 + - | 66 + timer@ffe00000 { 67 + compatible = "snps,dw-apb-timer"; 68 + interrupts = <0 170 4>; 69 + reg = <0xffe00000 0x1000>; 70 + clocks = <&timer_clk>, <&timer_pclk>; 71 + clock-names = "timer", "pclk"; 72 + }; 73 + - | 74 + timer@ffe00000 { 75 + compatible = "snps,dw-apb-timer"; 76 + interrupts = <0 170 4>; 77 + reg = <0xffe00000 0x1000>; 78 + clocks = <&timer_clk>; 79 + clock-names = "timer"; 80 + }; 81 + - | 82 + timer@ffe00000 { 83 + compatible = "snps,dw-apb-timer"; 84 + interrupts = <0 170 4>; 85 + reg = <0xffe00000 0x1000>; 86 + clock-frequency = <25000000>; 87 + }; 88 + ...