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

From: Iker Pedrosa

Date: Thu Nov 26 2026 - 15:52:14 EST


Series looks good. All previous concerns addressed.

Reviewed-by: Iker Pedrosa <ikerpedrosam@xxxxxxxxx>

El mié, 25 nov 2026 a las 2:39, Troy Mitchell
(<troy.mitchell@xxxxxxxxxxxxxxxxxx>) 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@xxxxxxxxxxxxxxxxxx
>
> 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@xxxxxxxxxxxxxxxxxx
>
> To: Troy Mitchell <troy.mitchell@xxxxxxxxxxxxxxxxxx>
> To: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
> To: Thomas Gleixner <tglx@xxxxxxxxxx>
> To: Rob Herring <robh@xxxxxxxxxx>
> To: Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>
> To: Conor Dooley <conor+dt@xxxxxxxxxx>
> To: Yixun Lan <dlan@xxxxxxxxxx>
> To: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
> To: Paul Walmsley <pjw@xxxxxxxxxx>
> To: Palmer Dabbelt <palmer@xxxxxxxxxxx>
> To: Albert Ou <aou@xxxxxxxxxxxxxxxxx>
> To: Alexandre Ghiti <alex@xxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> Cc: devicetree@xxxxxxxxxxxxxxx
> Cc: linux-riscv@xxxxxxxxxxxxxxxxxxx
> Cc: spacemit@xxxxxxxxxxxxxxx
>
> ---
> 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@xxxxxxxxxxxxxxxxxx>
>
>