devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: timer: add a binding for LiteX Timer
@ 2022-11-21  4:25 Icenowy Zheng
  2022-11-21  4:25 ` [PATCH 2/2] clocksource/drivers: add LiteX timer Icenowy Zheng
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Icenowy Zheng @ 2022-11-21  4:25 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Karol Gugala, Mateusz Holenko, Gabriel Somlo, Joel Stanley
  Cc: linux-kernel, devicetree, Icenowy Zheng

The LiteX SoC generator has a timer core, which by default only
generates a simple down counter.

Add a DT binding for it.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
---
 .../bindings/timer/litex,timer.yaml           | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/timer/litex,timer.yaml

diff --git a/Documentation/devicetree/bindings/timer/litex,timer.yaml b/Documentation/devicetree/bindings/timer/litex,timer.yaml
new file mode 100644
index 000000000000..bece07586c6b
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/litex,timer.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/timer/litex,timer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: LiteX Timer
+
+maintainers:
+  - Icenowy Zheng <uwu@icenowy.me>
+
+description: |
+  The LiteX Timer is a count-down timer that is defaultly embedded
+  into all LiteX SoCs, unless explicitly disabled. It's fed directly
+  by the system clock like other LiteX peripherals.
+
+properties:
+  compatible:
+    const: litex,timer
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  litex,width:
+    description:
+      The width of the timer's value, specified as the width argument
+      when creating an instance of litex.soc.cores.Timer.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - litex,width
+
+additionalProperties: false
+
+examples:
+  - |
+     timer@a0006000 {
+        compatible = "litex,timer";
+        reg = <0xa0006000 0x20>;
+        clocks = <&sys_clk>;
+        interrupts = <17>;
+        litex,width = <32>;
+     };
-- 
2.37.1


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

end of thread, other threads:[~2022-11-22 20:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-21  4:25 [PATCH 1/2] dt-bindings: timer: add a binding for LiteX Timer Icenowy Zheng
2022-11-21  4:25 ` [PATCH 2/2] clocksource/drivers: add LiteX timer Icenowy Zheng
2022-11-21 10:19 ` [PATCH 1/2] dt-bindings: timer: add a binding for LiteX Timer Krzysztof Kozlowski
2022-11-21 14:39   ` Icenowy Zheng
2022-11-22  7:53     ` Krzysztof Kozlowski
2022-11-22 20:28 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).