From: Troy Mitchell <troy.mitchell@linux.spacemit.com>
To: Troy Mitchell <troy.mitchell@linux.spacemit.com>,
Daniel Lezcano <daniel.lezcano@kernel.org>,
Thomas Gleixner <tglx@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Yixun Lan <dlan@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-riscv@lists.infradead.org, spacemit@lists.linux.dev
Subject: [PATCH 1/5] dt-bindings: timer: Add SpacemiT K1 timer
Date: Tue, 03 Nov 2026 08:36:46 +0000 [thread overview]
Message-ID: <20261103-spacemit-soc-timer-v1-1-36722421db6e@linux.spacemit.com> (raw)
In-Reply-To: <20261103-spacemit-soc-timer-v1-0-36722421db6e@linux.spacemit.com>
The SpacemiT timer block provides three 32-bit counters, each with three
match comparators and an interrupt output. Describe its register range,
interrupts, functional and bus clocks, and reset.
K3 uses the same register interface, so describe its timer with a
SoC-specific compatible followed by the K1 fallback.
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
.../bindings/timer/spacemit,k1-timer.yaml | 71 ++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/Documentation/devicetree/bindings/timer/spacemit,k1-timer.yaml b/Documentation/devicetree/bindings/timer/spacemit,k1-timer.yaml
new file mode 100644
index 000000000000..b71785b8aa94
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/spacemit,k1-timer.yaml
@@ -0,0 +1,71 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/timer/spacemit,k1-timer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SpacemiT K1 timer
+
+maintainers:
+ - Troy Mitchell <troy.mitchell@linux.spacemit.com>
+
+description:
+ The timer block contains three 32-bit up counters, each with three match
+ comparators and an interrupt output. Each counter can use the functional
+ clock or the internal 32.768 kHz clock and supports free-running and
+ periodic operation.
+
+properties:
+ compatible:
+ oneOf:
+ - const: spacemit,k1-timer
+ - items:
+ - const: spacemit,k3-timer
+ - const: spacemit,k1-timer
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ minItems: 1
+ items:
+ - description: Counter 0 interrupt
+ - description: Counter 1 interrupt
+ - description: Counter 2 interrupt
+
+ clocks:
+ items:
+ - description: Functional clock
+ - description: APB bus clock
+
+ clock-names:
+ items:
+ - const: func
+ - const: bus
+
+ resets:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - resets
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/spacemit,k1-syscon.h>
+
+ timer@d4014000 {
+ compatible = "spacemit,k1-timer";
+ reg = <0xd4014000 0x100>;
+ interrupts = <23>;
+ clocks = <&syscon_apbc CLK_TIMERS1>,
+ <&syscon_apbc CLK_TIMERS1_BUS>;
+ clock-names = "func", "bus";
+ resets = <&syscon_apbc RESET_TIMERS1>;
+ };
--
2.56.0
next prev parent reply other threads:[~2026-11-03 8:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 8:36 [PATCH 0/5] Add SpacemiT K1/K3 SoC timer support Troy Mitchell
2026-11-03 8:36 ` Troy Mitchell [this message]
2026-11-03 8:36 ` [PATCH 2/5] clocksource/drivers/spacemit: Add K1 " Troy Mitchell
2026-11-03 8:36 ` [PATCH 3/5] riscv: dts: spacemit: Add the K1 APB timer Troy Mitchell
2026-11-03 8:36 ` [PATCH 4/5] riscv: dts: spacemit: Add the K3 " Troy Mitchell
2026-11-03 8:36 ` [PATCH 5/5] MAINTAINERS: Add entry for SpacemiT timer Troy Mitchell
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=20261103-spacemit-soc-timer-v1-1-36722421db6e@linux.spacemit.com \
--to=troy.mitchell@linux.spacemit.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=p.zabel@pengutronix.de \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=robh@kernel.org \
--cc=spacemit@lists.linux.dev \
--cc=tglx@kernel.org \
/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
all inboxes | Powered by JetHome®