All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Realtek Otto timer/counter support
@ 2022-01-16 21:39 Sander Vanheule
  2022-01-16 21:39 ` [PATCH 1/2] dt-bindings: timer: Add realtek,otto-tc binding Sander Vanheule
  2022-01-16 21:39 ` [PATCH 2/2] clocksource/drivers: Add Realtek Otto timer driver Sander Vanheule
  0 siblings, 2 replies; 11+ messages in thread
From: Sander Vanheule @ 2022-01-16 21:39 UTC (permalink / raw)
  To: linux-kernel, devicetree
  Cc: Daniel Lezcano, Thomas Gleixner, Rob Herring, Sander Vanheule

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

-- 
2.34.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-02-09 12:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-16 21:39 [PATCH 0/2] Realtek Otto timer/counter support Sander Vanheule
2022-01-16 21:39 ` [PATCH 1/2] dt-bindings: timer: Add realtek,otto-tc binding Sander Vanheule
2022-02-09  2:49   ` Rob Herring
2022-02-09 10:58     ` Sander Vanheule
2022-01-16 21:39 ` [PATCH 2/2] clocksource/drivers: Add Realtek Otto timer driver Sander Vanheule
2022-01-17  1:28   ` kernel test robot
2022-01-17  1:28     ` kernel test robot
2022-01-17  8:03     ` Sander Vanheule
2022-01-17  8:03       ` Sander Vanheule
2022-01-17  7:38   ` kernel test robot
2022-01-17  7:38     ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.