Skip to content

Realtek Otto timer/counter support

Sander Vanheule linux-devicetree lkml oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2dt-bindings: timer: Add realtek,otto-tc bindingDocumentation/devicetree/bindings/timer/realtek,otto-tc.yaml+64 -02 replies
2/2clocksource/drivers: Add Realtek Otto timer driverMAINTAINERS drivers/clocksource/Kconfig drivers/clocksource/Makefile +1 more+231 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Realtek Otto timer/counter support

Realtek's family of networking SoCs (RTL838x, RTL839x, RTL930x, RTL931x) have a set of timers. These patches seek to provide a devicetree binding for them, and a first implementation of the driver.

Most of these SoCs can use the MIPS clocksource and clockevent timers, but the CEVT_R4K timer on the RTL930x series was left disconnected. This series therefore requires these timers to be able to function.

Except for the RTL838x series, these SoCs also support some form of SMP, but this is not yet implemented as the platform's IRQ driver does not support this yet. The driver also implements a fixed divider for the timer's internal clock, since this is good enough at this point.

I've tested this driver on RTL8380, RTL8393, and RTL9302 SoCs, running in single-CPU mode. When replacing the CEVT_R4K timer, these platforms then function as expected.

There's probably still other things that I missed, but I currently have the following questions:
- If the internal clock is added later, should this be added to the devicetree as a self-referenced clock? It's not possible to use this clock outside of the timer, so I guess it would mainly be to allow the DT code to build a complete overview of the clock hierarchy.
- When adding SMP support, what would be the best way to configure the CPU affinity? And what does FEAT_DYNIRQ imply exactly?

Best,
Sander

Sander Vanheule (2):
dt-bindings: timer: Add realtek,otto-tc binding clocksource/drivers: Add Realtek Otto timer driver

 .../bindings/timer/realtek,otto-tc.yaml       |  64 ++++++
 MAINTAINERS                                   |   6 +
 drivers/clocksource/Kconfig                   |   8 +
 drivers/clocksource/Makefile                  |   1 +
 drivers/clocksource/timer-realtek-otto.c      | 216 ++++++++++++++++++
 5 files changed, 295 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/timer/realtek,otto-tc.yaml
 create mode 100644 drivers/clocksource/timer-realtek-otto.c
Signature · 1 line
2.34.1