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

dt-bindings: rtc: pcf2123: convert to YAML

Convert the existing txt binding to the preferred YAML format.

The pcf2123 node may contain SPI settings such as spi-cs-high and
spi-max-frequency, which keeps it from being added to the trivial-rtc
binding with its current definition. Add a reference to
spi-peripheral-props.yaml to account for that.

The "interrupts" property was missing in the binding although it is
already supported. Add the missing property in the new binding.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230907-topic-pcf2123_yaml-v2-1-ea87a8e12190@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Javier Carrasco and committed by
Alexandre Belloni
fdaf4c5a f5f4c982

+47 -17
+47
Documentation/devicetree/bindings/rtc/nxp,pcf2123.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/nxp,pcf2123.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: NXP PCF2123 SPI Real Time Clock 8 + 9 + maintainers: 10 + - Javier Carrasco <javier.carrasco.cruz@gmail.com> 11 + 12 + allOf: 13 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 14 + - $ref: rtc.yaml# 15 + 16 + properties: 17 + compatible: 18 + enum: 19 + - nxp,pcf2123 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + interrupts: 25 + maxItems: 1 26 + 27 + required: 28 + - compatible 29 + - reg 30 + 31 + unevaluatedProperties: false 32 + 33 + examples: 34 + - | 35 + #include <dt-bindings/interrupt-controller/arm-gic.h> 36 + spi { 37 + #address-cells = <1>; 38 + #size-cells = <0>; 39 + 40 + rtc@3 { 41 + compatible = "nxp,pcf2123"; 42 + reg = <3>; 43 + interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_LOW>; 44 + spi-cs-high; 45 + }; 46 + }; 47 + ...
-17
Documentation/devicetree/bindings/rtc/nxp,rtc-2123.txt
··· 1 - NXP PCF2123 SPI Real Time Clock 2 - 3 - Required properties: 4 - - compatible: should be: "nxp,pcf2123" 5 - or "microcrystal,rv2123" 6 - - reg: should be the SPI slave chipselect address 7 - 8 - Optional properties: 9 - - spi-cs-high: PCF2123 needs chipselect high 10 - 11 - Example: 12 - 13 - pcf2123: rtc@3 { 14 - compatible = "nxp,pcf2123" 15 - reg = <3> 16 - spi-cs-high; 17 - };