Skip to contentSkip to conversation

ARM: OMAP3+: Add device-tree support for dmtimers

RFC New Jon Hunter 1 participant 2 messages Jul 13, 2012 Device tree bindings

lore
Share & tools
lore

Jon Hunter

author
#0 lore raw

cover ARM: OMAP3+: Add device-tree support for dmtimers

This series adds device-tree support for the dmtimers on OMAP3/4 devices. Once everyone is happy with the implementation I can add support for OMAP2/5 devices too.

Testing:
- I have tested the all the dmtimers (not used by the kernel as sys-timers) on both OMAP3430 Beagle and OMAP4460 Panda with/without device-tree with this series.
- The testing includes
- Configuring, starting a timer and checking the counter value is incrementing.
- Testing timer overflow interrupt when timer expires.
- Using different clock sources to operate the timer with.
- Using DT to provide resource information for IRQ and memory by removing Benoit's intention "HACK" in commit a4f6cdb0 (ARM: OMAP:
omap_device: Add omap_device_[alloc|delete] for DT integration)

Jon Hunter (4):
arm/dts: OMAP: Add genernal purpose timer nodes
ARM: OMAP3: Dynamically disable secure timer nodes for secure devices
ARM: OMAP4: Add timer clock aliases for device-tree
ARM: OMAP: Add DT support for dmtimer driver

 .../devicetree/bindings/arm/omap/timer.txt         |   34 +++++++
 arch/arm/boot/dts/omap3.dtsi                       |  104 ++++++++++++++++++++
 arch/arm/boot/dts/omap4.dtsi                       |   93 +++++++++++++++++
 arch/arm/mach-omap2/board-generic.c                |    1 +
 arch/arm/mach-omap2/clock44xx_data.c               |   12 +++
 arch/arm/mach-omap2/common.h                       |    1 +
 arch/arm/mach-omap2/timer.c                        |   40 ++++++++
 arch/arm/plat-omap/dmtimer.c                       |   32 ++++--
 8 files changed, 311 insertions(+), 6 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/omap/timer.txt
Signature · 1 line
1.7.9.5
author
#1 lore raw

RFC 1/4 arm/dts: OMAP: Add genernal purpose timer nodes

Add the 12 GP timers nodes present in OMAP3.
Add the 11 GP timers nodes present in OMAP4.

Add documentation for timer properties specific to OMAP.

For each timer an alias is being added. The purpose for doing this is because the OMAP dmtimer driver uses an ID to distinguish between the different timer instances. For example, a timer can be requested by its ID. By adding an alias for each timer we can then use the function of_alias_get_id() to extract the ID for each timer from the alias name. The same method is used for the TTY serial devices. If it is preferred that such an alias is not added and there is a better way to pass an ID from device-tree let me know.

Cc Benoit Cousson <[email protected]>
---
 .../devicetree/bindings/arm/omap/timer.txt         |   34 +++++++
 arch/arm/boot/dts/omap3.dtsi                       |  104 ++++++++++++++++++++
 arch/arm/boot/dts/omap4.dtsi                       |   93 +++++++++++++++++
 3 files changed, 231 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/omap/timer.txt
Documentation/devicetree/bindings/arm/omap/timer.txt new file +34 -0
new file mode 100644
index 0000000..dcbb451
@@ -0,0 +1,34 @@
+OMAP Timer controller bindings
+
+Required properties:
+- compatible:
+  - "ti,omap3-timer" for OMAP3+ controllers
+- reg: Contains timer register address range (base address and length)
+- interrupts: Contains the interrupt information for the timer. The format is
+  being dependent on which interrupt controller the OMAP device uses.
+
+OMAP specific properties:
+- ti,hwmods: Name of the hwmod associated to the timer:
+  "timer<X>", <X> being the 1-based instance number from the HW spec
+- ti,timer-alwon: Indicates the timer is in an alway-on power domain.
+- ti,timer-pwm: Indicates the timer supports can generate PWM output.
+- ti,timer-secure: Indicates the timer is reserved on a secure OMAP device and
+  therefore cannot be used by the kernel.
+
+Note: Each timer should have an alias correctly numbered in "aliases" node. The
+      alias is used to identify the timer instance in the driver.
+
+Example:
+
+aliases {
+	timer12 = &timer12;
+};
+
+timer12: timer at 48304000 {
+	compatible = "ti,omap3-timer";
+	reg = <0x48304000 0xfff>;
+	interrupts = <95>;
+	ti,hwmods = "timer12"
+	ti,timer-alwon;
+	ti,timer-secure;
+};
arch/arm/boot/dts/omap3.dtsi +104 -0

121 lines not on this page · raw message

arch/arm/boot/dts/omap4.dtsi +93 -0

104 lines not on this page · raw message

Signature · 1 line
1.7.9.5