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

dt-bindings: rtc: convert MT2717 RTC to the json-schema

This helps validating DTS files. Introduced changes:
1. Reworded title
2. Dropper redundant properties descriptions
3. Added required #include and adjusted "reg" in example

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20240122124949.29577-1-zajec5@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Rafał Miłecki and committed by
Alexandre Belloni
e8c04985 787bcc98

+39 -14
+39
Documentation/devicetree/bindings/rtc/mediatek,mt2712-rtc.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/rtc/mediatek,mt2712-rtc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: MediaTek MT2712 on-SoC RTC 8 + 9 + allOf: 10 + - $ref: rtc.yaml# 11 + 12 + maintainers: 13 + - Ran Bi <ran.bi@mediatek.com> 14 + 15 + properties: 16 + compatible: 17 + const: mediatek,mt2712-rtc 18 + 19 + reg: 20 + maxItems: 1 21 + 22 + interrupts: 23 + maxItems: 1 24 + 25 + required: 26 + - reg 27 + - interrupts 28 + 29 + unevaluatedProperties: false 30 + 31 + examples: 32 + - | 33 + #include <dt-bindings/interrupt-controller/arm-gic.h> 34 + 35 + rtc@10011000 { 36 + compatible = "mediatek,mt2712-rtc"; 37 + reg = <0x10011000 0x1000>; 38 + interrupts = <GIC_SPI 239 IRQ_TYPE_LEVEL_LOW>; 39 + };
-14
Documentation/devicetree/bindings/rtc/rtc-mt2712.txt
··· 1 - Device-Tree bindings for MediaTek SoC based RTC 2 - 3 - Required properties: 4 - - compatible : Should be "mediatek,mt2712-rtc" : for MT2712 SoC 5 - - reg : Specifies base physical address and size of the registers; 6 - - interrupts : Should contain the interrupt for RTC alarm; 7 - 8 - Example: 9 - 10 - rtc: rtc@10011000 { 11 - compatible = "mediatek,mt2712-rtc"; 12 - reg = <0 0x10011000 0 0x1000>; 13 - interrupts = <GIC_SPI 239 IRQ_TYPE_LEVEL_LOW>; 14 - };