Skip to content

Commit fdaf4c5

Browse files
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>
1 parent f5f4c98 commit fdaf4c5

File tree

2 files changed

+47
-17
lines changed

2 files changed

+47
-17
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
...

Documentation/devicetree/bindings/rtc/nxp,rtc-2123.txt

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)