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

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

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

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240123125043.27192-1-zajec5@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Rafał Miłecki and committed by
Alexandre Belloni
aef3952e e8c04985

+52 -21
+52
Documentation/devicetree/bindings/rtc/mediatek,mt7622-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,mt7622-rtc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: MediaTek MT7622 on-SoC RTC 8 + 9 + allOf: 10 + - $ref: rtc.yaml# 11 + 12 + maintainers: 13 + - Sean Wang <sean.wang@mediatek.com> 14 + 15 + properties: 16 + compatible: 17 + items: 18 + - const: mediatek,mt7622-rtc 19 + - const: mediatek,soc-rtc 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + interrupts: 25 + maxItems: 1 26 + 27 + clocks: 28 + maxItems: 1 29 + 30 + clock-names: 31 + const: rtc 32 + 33 + required: 34 + - reg 35 + - interrupts 36 + - clocks 37 + - clock-names 38 + 39 + unevaluatedProperties: false 40 + 41 + examples: 42 + - | 43 + #include <dt-bindings/clock/mt7622-clk.h> 44 + #include <dt-bindings/interrupt-controller/arm-gic.h> 45 + 46 + rtc@10212800 { 47 + compatible = "mediatek,mt7622-rtc", "mediatek,soc-rtc"; 48 + reg = <0x10212800 0x200>; 49 + interrupts = <GIC_SPI 129 IRQ_TYPE_LEVEL_LOW>; 50 + clocks = <&topckgen CLK_TOP_RTC>; 51 + clock-names = "rtc"; 52 + };
-21
Documentation/devicetree/bindings/rtc/rtc-mt7622.txt
··· 1 - Device-Tree bindings for MediaTek SoC based RTC 2 - 3 - Required properties: 4 - - compatible : Should be 5 - "mediatek,mt7622-rtc", "mediatek,soc-rtc" : for MT7622 SoC 6 - - reg : Specifies base physical address and size of the registers; 7 - - interrupts : Should contain the interrupt for RTC alarm; 8 - - clocks : Specifies list of clock specifiers, corresponding to 9 - entries in clock-names property; 10 - - clock-names : Should contain "rtc" entries 11 - 12 - Example: 13 - 14 - rtc: rtc@10212800 { 15 - compatible = "mediatek,mt7622-rtc", 16 - "mediatek,soc-rtc"; 17 - reg = <0 0x10212800 0 0x200>; 18 - interrupts = <GIC_SPI 129 IRQ_TYPE_LEVEL_LOW>; 19 - clocks = <&topckgen CLK_TOP_RTC>; 20 - clock-names = "rtc"; 21 - };