Commit f4e82f19 authored by Jonathan Neuschäfer's avatar Jonathan Neuschäfer Committed by Rob Herring
Browse files

dt-bindings: timer: nuvoton,npcm7xx-timer: Convert to YAML



Let's convert this devicetree binding to YAML, to make it easier to
extend later.

Signed-off-by: default avatarJonathan Neuschäfer <j.neuschaefer@gmx.net>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220130102704.2892072-1-j.neuschaefer@gmx.net
parent d71ea591
Loading
Loading
Loading
Loading
+0 −21
Original line number Diff line number Diff line
Nuvoton NPCM7xx timer

Nuvoton NPCM7xx have three timer modules, each timer module provides five 24-bit
timer counters.

Required properties:
- compatible      : "nuvoton,npcm750-timer" for Poleg NPCM750, or
                    "nuvoton,wpcm450-timer" for Hermon WPCM450.
- reg             : Offset and length of the register set for the device.
- interrupts      : Contain the timer interrupt of timer 0.
- clocks          : phandle of timer reference clock (usually a 25 MHz clock).

Example:

timer@f0008000 {
    compatible = "nuvoton,npcm750-timer";
    interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
    reg = <0xf0008000 0x50>;
    clocks = <&clk NPCM7XX_CLK_TIMER>;
};
+46 −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/timer/nuvoton,npcm7xx-timer.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Nuvoton NPCM7xx timer

maintainers:
  - Jonathan Neuschäfer <j.neuschaefer@gmx.net>

properties:
  compatible:
    enum:
      - nuvoton,wpcm450-timer  # for Hermon WPCM450
      - nuvoton,npcm750-timer  # for Poleg NPCM750

  reg:
    maxItems: 1

  interrupts:
    items:
      - description: The timer interrupt of timer 0

  clocks:
    maxItems: 1

required:
  - compatible
  - reg
  - interrupts
  - clocks

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/clock/nuvoton,npcm7xx-clock.h>
    timer@f0008000 {
        compatible = "nuvoton,npcm750-timer";
        interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
        reg = <0xf0008000 0x50>;
        clocks = <&clk NPCM7XX_CLK_TIMER>;
    };