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

dt-bindings: rtc: ds1307: Convert to json-schema

Convert the DS1307 (and compatible) RTC bindings from the free-form text
format to json-schema.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220617114420.1398259-1-thierry.reding@gmail.com

authored by

Thierry Reding and committed by
Rob Herring
e3899832 4f46cc1b

+102 -52
-52
Documentation/devicetree/bindings/rtc/rtc-ds1307.txt
··· 1 - Dallas DS1307 and compatible RTC 2 - 3 - Required properties: 4 - - compatible: should be one of: 5 - "dallas,ds1307", 6 - "dallas,ds1308", 7 - "dallas,ds1337", 8 - "dallas,ds1338", 9 - "dallas,ds1339", 10 - "dallas,ds1388", 11 - "dallas,ds1340", 12 - "dallas,ds1341", 13 - "maxim,ds3231", 14 - "st,m41t0", 15 - "st,m41t00", 16 - "st,m41t11", 17 - "microchip,mcp7940x", 18 - "microchip,mcp7941x", 19 - "pericom,pt7c4338", 20 - "epson,rx8025", 21 - "isil,isl12057" 22 - "epson,rx8130" 23 - - reg: I2C bus address of the device 24 - 25 - Optional properties: 26 - - interrupts: rtc alarm interrupt. 27 - - clock-output-names: From common clock binding to override the default output 28 - clock name 29 - - wakeup-source: Enables wake up of host system on alarm 30 - - trickle-resistor-ohms : ds1339, ds1340 and ds 1388 only 31 - Selected resistor for trickle charger 32 - Possible values are 250, 2000, 4000 33 - Should be given if trickle charger should be enabled 34 - - aux-voltage-chargeable: ds1339, ds1340, ds1388 and rx8130 only 35 - Tells whether the battery/supercap of the RTC (if any) is 36 - chargeable or not. 37 - Possible values are 0 (not chargeable), 1 (chargeable) 38 - 39 - Deprecated properties: 40 - - trickle-diode-disable : ds1339, ds1340 and ds1388 only 41 - Do not use internal trickle charger diode 42 - Should be given if internal trickle charger diode should be disabled 43 - (superseded by aux-voltage-chargeable) 44 - 45 - Example: 46 - ds1339: rtc@68 { 47 - compatible = "dallas,ds1339"; 48 - reg = <0x68>; 49 - interrupt-parent = <&gpio4>; 50 - interrupts = <20 0>; 51 - trickle-resistor-ohms = <250>; 52 - };
+102
Documentation/devicetree/bindings/rtc/rtc-ds1307.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/rtc/rtc-ds1307.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Dallas DS1307 and compatible RTC 8 + 9 + maintainers: 10 + - Alexandre Belloni <alexandre.belloni@bootlin.com> 11 + 12 + properties: 13 + compatible: 14 + oneOf: 15 + - enum: 16 + - dallas,ds1307 17 + - dallas,ds1308 18 + - dallas,ds1337 19 + - dallas,ds1338 20 + - dallas,ds1339 21 + - dallas,ds1388 22 + - dallas,ds1340 23 + - dallas,ds1341 24 + - maxim,ds3231 25 + - st,m41t0 26 + - st,m41t00 27 + - st,m41t11 28 + - microchip,mcp7940x 29 + - microchip,mcp7941x 30 + - pericom,pt7c4338 31 + - epson,rx8025 32 + - isil,isl12057 33 + - epson,rx8130 34 + 35 + - items: 36 + - enum: 37 + - st,m41t00 38 + - const: dallas,ds1338 39 + 40 + reg: 41 + maxItems: 1 42 + 43 + interrupts: 44 + minItems: 1 45 + maxItems: 2 46 + 47 + interrupt-names: 48 + maxItems: 2 49 + 50 + "#clock-cells": 51 + const: 1 52 + 53 + clock-output-names: 54 + description: From common clock binding to override the default output clock name. 55 + 56 + wakeup-source: 57 + description: Enables wake up of host system on alarm. 58 + 59 + vcc-supply: true 60 + 61 + allOf: 62 + - $ref: rtc.yaml 63 + - if: 64 + properties: 65 + compatible: 66 + contains: 67 + enum: 68 + - dallas,ds1339 69 + - dallas,ds1340 70 + - dallas,ds1388 71 + then: 72 + properties: 73 + trickle-resistor-ohms: 74 + description: Selected resistor for trickle charger. Should be specified if trickle 75 + charger should be enabled. 76 + enum: [ 250, 2000, 4000 ] 77 + 78 + trickle-diode-disable: 79 + description: Do not use internal trickle charger diode. Should be given if internal 80 + trickle charger diode should be disabled (superseded by aux-voltage-chargeable) 81 + deprecated: true 82 + 83 + unevaluatedProperties: false 84 + 85 + required: 86 + - compatible 87 + - reg 88 + 89 + examples: 90 + - | 91 + i2c { 92 + #address-cells = <1>; 93 + #size-cells = <0>; 94 + 95 + rtc@68 { 96 + compatible = "dallas,ds1337"; 97 + reg = <0x68>; 98 + interrupt-parent = <&gpio4>; 99 + interrupts = <20 0>; 100 + trickle-resistor-ohms = <250>; 101 + }; 102 + };