[PATCH v3 0/5] Add SpacemiT K1/K3 SoC timer support

Iker Pedrosa ikerpedrosam at gmail.com
Thu Nov 26 12:50:00 PST 2026


Series looks good. All previous concerns addressed.

Reviewed-by: Iker Pedrosa <ikerpedrosam at gmail.com>

El mié, 25 nov 2026 a las 2:39, Troy Mitchell
(<troy.mitchell at linux.spacemit.com>) escribió:
>
> The SpacemiT K1 and K3 SoCs have APB timers that run independently of
> the CPU cores. Each timer block has three 32-bit up counters, and each
> counter has three match comparators and its own interrupt. A counter
> can be clocked from the functional clock or from the 32.768 kHz clock,
> and can run in free-running or periodic mode.
>
> This series uses counter 0 as a oneshot clockevent. It is registered
> for tick broadcast, so it can wake up CPUs whose local RISC-V timer
> stops in idle.
>
> K3 uses the same register interface as K1 and falls back to the K1
> compatible. Both SoCs run the timer from a 1 MHz functional clock.
>
> ---
> Changes in v3:
> - Drop the unnecessary RESET_CONTROLLER dependency (Philipp)
> - Link to v2: https://patch.msgid.link/20261117-spacemit-soc-timer-v2-0-9264d0ea7755@linux.spacemit.com
>
> Changes in v2:
> - Use named constants with comments for the counter sync latency and
>   the minimum clock rate (Iker)
> - Link to v1: https://patch.msgid.link/20261103-spacemit-soc-timer-v1-0-36722421db6e@linux.spacemit.com
>
> To: Troy Mitchell <troy.mitchell at linux.spacemit.com>
> To: Daniel Lezcano <daniel.lezcano at kernel.org>
> To: Thomas Gleixner <tglx at kernel.org>
> To: Rob Herring <robh at kernel.org>
> To: Krzysztof Kozlowski <krzk+dt at kernel.org>
> To: Conor Dooley <conor+dt at kernel.org>
> To: Yixun Lan <dlan at kernel.org>
> To: Philipp Zabel <p.zabel at pengutronix.de>
> To: Paul Walmsley <pjw at kernel.org>
> To: Palmer Dabbelt <palmer at dabbelt.com>
> To: Albert Ou <aou at eecs.berkeley.edu>
> To: Alexandre Ghiti <alex at ghiti.fr>
> Cc: linux-kernel at vger.kernel.org
> Cc: devicetree at vger.kernel.org
> Cc: linux-riscv at lists.infradead.org
> Cc: spacemit at lists.linux.dev
>
> ---
> Troy Mitchell (5):
>       dt-bindings: timer: Add SpacemiT K1 timer
>       clocksource/drivers/spacemit: Add K1 timer support
>       riscv: dts: spacemit: Add the K1 APB timer
>       riscv: dts: spacemit: Add the K3 APB timer
>       MAINTAINERS: Add entry for SpacemiT timer
>
>  .../bindings/timer/spacemit,k1-timer.yaml          |  71 +++++
>  MAINTAINERS                                        |   6 +
>  arch/riscv/boot/dts/spacemit/k1.dtsi               |  12 +
>  arch/riscv/boot/dts/spacemit/k3.dtsi               |  12 +
>  drivers/clocksource/Kconfig                        |  11 +
>  drivers/clocksource/Makefile                       |   1 +
>  drivers/clocksource/timer-spacemit.c               | 317 +++++++++++++++++++++
>  7 files changed, 430 insertions(+)
> ---
> base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
> change-id: 20261019-spacemit-soc-timer-cadf3088d286
>
> Best regards,
> --
> Troy Mitchell <troy.mitchell at linux.spacemit.com>
>
>



More information about the linux-riscv mailing list