Commit 5b05198b authored by Sergiu Moga's avatar Sergiu Moga Committed by Alexandre Belloni
Browse files

dt-bindings: rtc: convert at91sam9 bindings to json-schema

parent 73ce0530
Loading
Loading
Loading
Loading
+0 −25
Original line number Diff line number Diff line
Atmel AT91SAM9260 Real Time Timer

Required properties:
- compatible: should be one of the following:
	- "atmel,at91sam9260-rtt"
	- "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt"
- reg: should encode the memory region of the RTT controller
- interrupts: rtt alarm/event interrupt
- clocks: should contain the 32 KHz slow clk that will drive the RTT block.
- atmel,rtt-rtc-time-reg: should encode the GPBR register used to store
	the time base when the RTT is used as an RTC.
	The first cell should point to the GPBR node and the second one
	encode the offset within the GPBR block (or in other words, the
	GPBR register used to store the time base).


Example:

rtt@fffffd20 {
	compatible = "atmel,at91sam9260-rtt";
	reg = <0xfffffd20 0x10>;
	interrupts = <1 4 7>;
	clocks = <&clk32k>;
	atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
};
+65 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/atmel,at91sam9-rtc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Atmel AT91 RTT Device Tree Bindings

allOf:
  - $ref: "rtc.yaml#"

maintainers:
  - Alexandre Belloni <alexandre.belloni@bootlin.com>

properties:
  compatible:
    oneOf:
      - items:
          - const: atmel,at91sam9260-rtt
      - items:
          - const: microchip,sam9x60-rtt
          - const: atmel,at91sam9260-rtt

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    maxItems: 1

  atmel,rtt-rtc-time-reg:
    $ref: /schemas/types.yaml#/definitions/phandle-array
    items:
      - items:
          - description: Phandle to the GPBR node.
          - description: Offset within the GPBR block.
    description:
      Should encode the GPBR register used to store the time base when the
      RTT is used as an RTC. The first cell should point to the GPBR node
      and the second one encodes the offset within the GPBR block (or in
      other words, the GPBR register used to store the time base).

required:
  - compatible
  - reg
  - interrupts
  - clocks
  - atmel,rtt-rtc-time-reg

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>

    rtc@fffffd20 {
        compatible = "atmel,at91sam9260-rtt";
        reg = <0xfffffd20 0x10>;
        interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
        clocks = <&clk32k>;
        atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
    };