All of
 help / color / mirror / Atom feed
From: Sander Vanheule <>
Cc: Daniel Lezcano <>,
	Thomas Gleixner <>,
	Rob Herring <>,
	Sander Vanheule <>
Subject: [PATCH 0/2] Realtek Otto timer/counter support
Date: Sun, 16 Jan 2022 22:39:23 +0100	[thread overview]
Message-ID: <> (raw)

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?


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


             reply	other threads:[~2022-01-16 21:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-16 21:39 Sander Vanheule [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.