Re: [PATCH 0/4] Add hstimer support for H616 and T113-S3

From: Michal Piekos

Date: Mon Apr 20 2026 - 07:27:33 EST


On Sun, Apr 19, 2026 at 10:55:39PM +0200, Andre Przywara wrote:
> On Sun, 19 Apr 2026 14:46:06 +0200
> Michal Piekos <michal.piekos@xxxxxxxxxxxxx> wrote:
>
> Hi Michal,
>
> > Add support for Allwinner H616 high speed timer in sun5i hstimer driver
> > and describe corresponding nodes in dts for H616 and T113-S3.
> >
> > H616 uses same model as existing driver except register shift compared
> > to older variants.
> >
> > Added register layout abstraction in the driver, extended the binding
> > with new compatibles and wired up dts nodes for H616 and T113-S3 which
> > uses H616 as fallback compatible.
>
> Can you say *why* we need this? IIUC Linux only ever uses one clock
> source, and selects the (non-optional) Generic Timer (aka arch timer)
> for that? So can you say what this hstimer clock source adds? I guess
> higher resolution, but what is your use case, so why would you need the
> 200 MHz? And does this offset the higher access cost of an MMIO
> access, compared to the arch timer's sysreg based access? Also, IIUC,
> people would need to manually select this as the clocksource, why and
> when would they do so? (Given they even know about it in the first
> place).
> Also the hstimer hasn't been used since the A20, so nobody seemed to
> have missed it meanwhile?
>
> Cheers,
> Andre
>
I took the table from https://linux-sunxi.org/Linux_mainlining_effort as
a todo list and wanted to help with it. I do not have own use case for
this timer. If it is not needed then I will spin v2 to include your
comments and abandon it.

Michal

> >
> > Signed-off-by: Michal Piekos <michal.piekos@xxxxxxxxxxxxx>
> > ---
> > Michal Piekos (4):
> > dt-bindings: timer: allwinner,sun5i-a13-hstimer: add H616 and T113-S3
> > clocksource/drivers/sun5i: add H616 hstimer support
> > arm64: dts: allwinner: h616: add hstimer node
> > arm: dts: allwinner: t113s: add hstimer node
> >
> > .../timer/allwinner,sun5i-a13-hstimer.yaml | 8 +++-
> > arch/arm/boot/dts/allwinner/sun8i-t113s.dtsi | 12 +++++
> > arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 9 ++++
> > drivers/clocksource/timer-sun5i.c | 56 +++++++++++++++++++---
> > 4 files changed, 78 insertions(+), 7 deletions(-)
> > ---
> > base-commit: faeab166167f5787719eb8683661fd41a3bb1514
> > change-id: 20260413-h616-t113s-hstimer-62939948f91c
> >
> > Best regards,
>
>