Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Zong-You Xie <ben717@andestech.com>
Cc: <paul.walmsley@sifive.com>, <palmer@dabbelt.com>,
	<aou@eecs.berkeley.edu>, <alex@ghiti.fr>, <robh@kernel.org>,
	<krzk+dt@kernel.org>, <conor+dt@kernel.org>, <tglx@linutronix.de>,
	<daniel.lezcano@linaro.org>,
	<prabhakar.mahadev-lad.rj@bp.renesas.com>,
	<devicetree@vger.kernel.org>, <linux-riscv@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <tim609@andestech.com>,
	Ben Zong-You Xie <ben717@andestech.com>,
	Conor Dooley <conor.dooley@microchip.com>
Subject: [PATCH v5 5/8] dt-bindings: timer: add Andes machine timer
Date: Mon, 2 Jun 2025 14:07:44 +0800	[thread overview]
Message-ID: <20250602060747.689824-6-ben717@andestech.com> (raw)
In-Reply-To: <20250602060747.689824-1-ben717@andestech.com>

Add the DT binding documentation for Andes machine timer.

The RISC-V architecture defines a machine timer that provides a real-time
counter and generates timer interrupts. Andes machiner timer (PLMT0) is
the implementation of the machine timer, and it contains memory-mapped
registers (mtime and mtimecmp). This device supports up to 32 cores.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
---
This patch depends on patch 2 and patch 4
---
 .../bindings/timer/andestech,plmt0.yaml       | 53 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 2 files changed, 54 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/timer/andestech,plmt0.yaml

diff --git a/Documentation/devicetree/bindings/timer/andestech,plmt0.yaml b/Documentation/devicetree/bindings/timer/andestech,plmt0.yaml
new file mode 100644
index 000000000000..90b612096004
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/andestech,plmt0.yaml
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/timer/andestech,plmt0.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Andes machine-level timer
+
+description:
+  The Andes machine-level timer device (PLMT0) provides machine-level timer
+  functionality for a set of HARTs on a RISC-V platform. It has a single
+  fixed-frequency monotonic time counter (MTIME) register and a time compare
+  register (MTIMECMP) for each HART connected to the PLMT0. A timer interrupt is
+  generated if MTIME >= MTIMECMP.
+
+maintainers:
+  - Ben Zong-You Xie <ben717@andestech.com>
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - andestech,qilai-plmt
+      - const: andestech,plmt0
+
+  reg:
+    maxItems: 1
+
+  interrupts-extended:
+    minItems: 1
+    maxItems: 32
+    description:
+      Specifies which harts are connected to the PLMT0. Each item must points
+      to a riscv,cpu-intc node, which has a riscv cpu node as parent. The
+      PLMT0 supports 1 hart up to 32 harts.
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - interrupts-extended
+
+examples:
+  - |
+    interrupt-controller@100000 {
+      compatible = "andestech,qilai-plmt", "andestech,plmt0";
+      reg = <0x100000 0x100000>;
+      interrupts-extended = <&cpu0intc 7>,
+                            <&cpu1intc 7>,
+                            <&cpu2intc 7>,
+                            <&cpu3intc 7>;
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index b79cdd43fe37..57a4b3789ef8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -20952,6 +20952,7 @@ M:	Ben Zong-You Xie <ben717@andestech.com>
 S:	Maintained
 F:	Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml
 F:	Documentation/devicetree/bindings/riscv/andes.yaml
+F:	Documentation/devicetree/bindings/timer/andestech,plmt0.yaml

 RISC-V ARCHITECTURE
 M:	Paul Walmsley <paul.walmsley@sifive.com>
--
2.34.1

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2025-06-02  6:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-02  6:07 [PATCH v5 0/8] add Voyager board support Ben Zong-You Xie
2025-06-02  6:07 ` [PATCH v5 1/8] riscv: add Andes SoC family Kconfig support Ben Zong-You Xie
2025-06-02  6:07 ` [PATCH v5 2/8] dt-bindings: riscv: add Andes QiLai SoC and the Voyager board bindings Ben Zong-You Xie
2025-06-02  6:07 ` [PATCH v5 3/8] dt-bindings: interrupt-controller: add Andes QiLai PLIC Ben Zong-You Xie
2025-06-02  6:07 ` [PATCH v5 4/8] dt-bindings: interrupt-controller: add Andes machine-level software interrupt controller Ben Zong-You Xie
2025-06-02  6:07 ` Ben Zong-You Xie [this message]
2025-06-02  6:07 ` [PATCH v5 6/8] riscv: dts: andes: add QiLai SoC device tree Ben Zong-You Xie
2025-06-02  6:07 ` [PATCH v5 7/8] riscv: dts: andes: add Voyager board " Ben Zong-You Xie
2025-06-02  6:07 ` [PATCH v5 8/8] riscv: defconfig: enable Andes SoC Ben Zong-You Xie
2025-06-06 16:00 ` [PATCH v5 0/8] add Voyager board support Conor Dooley
2025-06-09 12:06   ` Ben Zong-You Xie
2025-06-09 16:16     ` Conor Dooley
2025-06-09 16:17       ` Conor Dooley
2025-06-11 16:13         ` Ben Zong-You Xie
2025-06-11 16:21           ` Conor Dooley
2025-07-03 15:32             ` Arnd Bergmann
2025-07-03 15:53               ` Conor Dooley
2025-07-03 16:42                 ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250602060747.689824-6-ben717@andestech.com \
    --to=ben717@andestech.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tim609@andestech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox