Skip to content

Commit

Permalink
dt-bindings: rtc: pcf2123: convert to YAML
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Javier Carrasco authored and Alexandre Belloni committed Oct 15, 2023
1 parent f5f4c98 commit fdaf4c5
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 17 deletions.
47 changes: 47 additions & 0 deletions Documentation/devicetree/bindings/rtc/nxp,pcf2123.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/nxp,pcf2123.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: NXP PCF2123 SPI Real Time Clock

maintainers:
- Javier Carrasco <javier.carrasco.cruz@gmail.com>

allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
- $ref: rtc.yaml#

properties:
compatible:
enum:
- nxp,pcf2123

reg:
maxItems: 1

interrupts:
maxItems: 1

required:
- compatible
- reg

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
rtc@3 {
compatible = "nxp,pcf2123";
reg = <3>;
interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_LOW>;
spi-cs-high;
};
};
...
17 changes: 0 additions & 17 deletions Documentation/devicetree/bindings/rtc/nxp,rtc-2123.txt

This file was deleted.

0 comments on commit fdaf4c5

Please sign in to comment.