Commit 8df65d4a authored by Corentin Labbe's avatar Corentin Labbe Committed by Alexandre Belloni
Browse files

dt-bindings: convert rtc/faraday,ftrtc01 to yaml



Converts rtc/faraday,ftrtc01.txt to yaml.
This permits to detect some missing properties: reg, resets, interrupts

Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarCorentin Labbe <clabbe@baylibre.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210510182505.3968936-1-clabbe@baylibre.com
parent 206e04ec
Loading
Loading
Loading
Loading
+0 −28
Original line number Diff line number Diff line
* Faraday Technology FTRTC010 Real Time Clock

This RTC appears in for example the Storlink Gemini family of
SoCs.

Required properties:
- compatible : Should be one of:
  "faraday,ftrtc010"
  "cortina,gemini-rtc", "faraday,ftrtc010"

Optional properties:
- clocks: when present should contain clock references to the
  PCLK and EXTCLK clocks. Faraday calls the later CLK1HZ and
  says the clock should be 1 Hz, but implementers actually seem
  to choose different clocks here, like Cortina who chose
  32768 Hz (a typical low-power clock).
- clock-names: should name the clocks "PCLK" and "EXTCLK"
  respectively.

Examples:

rtc@45000000 {
	compatible = "cortina,gemini-rtc";
	reg = <0x45000000 0x100>;
	interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
	clocks = <&foo 0>, <&foo 1>;
	clock-names = "PCLK", "EXTCLK";
};
+59 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/faraday,ftrtc010.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Faraday Technology FTRTC010 Real Time Clock

maintainers:
  - Linus Walleij <linus.walleij@linaro.org>

description: |
  This RTC appears in for example the Storlink Gemini family of SoCs.

properties:
  compatible:
    oneOf:
      - const: faraday,ftrtc010
      - items:
          - const: cortina,gemini-rtc
          - const: faraday,ftrtc010

  resets:
    maxItems: 1

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    minItems: 2
    items:
      - description: PCLK clocks
      - description: EXTCLK clocks. Faraday calls it CLK1HZ and says the clock
          should be 1 Hz, but implementers actually seem to choose different
          clocks here, like Cortina who chose 32768 Hz (a typical low-power clock).

  clock-names:
    items:
      - const: "PCLK"
      - const: "EXTCLK"

required:
  - compatible

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    rtc@45000000 {
      compatible = "cortina,gemini-rtc", "faraday,ftrtc010";
      reg = <0x45000000 0x100>;
      interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
      clocks = <&foo 0>, <&foo 1>;
      clock-names = "PCLK", "EXTCLK";
    };