Doc: bindings: Add binding doc for nxp system counter timer
PATCH 1/2 Doc: bindings: Add binding doc for nxp system counter timer
Add the binding doc for nxp system counter timer module.
Signed-off-by Bai Ping <[email protected]>
--- .../devicetree/bindings/timer/nxp,sysctr_timer.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/nxp,sysctr_timer.txt
Documentation/devicetree/bindings/timer/nxp,sysctr_timer.txt new file +28 -0
@@ -0,0 +1,28 @@ +NXP System Counter Module(sys_ctr) + +The system counter(sys_ctr) is a programmable system counter which provides +a shared time base to Cortex A15, A7, A53, A73, etc. it is intended for use in +applications where the counter is always powered and support multiple, +unrelated clocks. + +Required properties: + +- compatible : should be "nxp,sysctr-timer" +- reg : Specifies the base physical address and size of the comapre + frame and the counter control, read & compare. +- interrupts : should be the compare frames' interrupt +- clock-frequency : Specifies the counter clock frequency. + +Example: + + system_counter: timer@306a0000 { + compatible = "nxp,sysctr-timer"; + reg = <0x0 0x306a0000 0x0 0x10000>, /* system-counter-rd base */ + <0x0 0x306b0000 0x0 0x10000>, /* system-counter-cmp base */ + <0x0 0x306c0000 0x0 0x10000>; /* system-counter-ctrl base */ + clock-frequency = <8000000>; + interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>; + }; + +
Signature · 1 line
1.9.1
PATCH 2/2 driver: clocksource: Add nxp system counter timer driver support
The system counter (sys_ctr) is a programmable system counter which provides a shared time base to the Cortex A15, A7, A53 etc cores. It is intended for use in applications where the counter is always powered on and supports multiple, unrelated clocks. The sys_ctr hardware supports:
- 56-bit counter width (roll-over time greater than 40 years)
- compare frame(64-bit compare value) contains programmable interrupt generation
Signed-off-by Bai Ping <[email protected]>
--- drivers/clocksource/Kconfig | 8 ++ drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-imx-sysctr.c | 204 +++++++++++++++++++++++++++++++++ 3 files changed, 213 insertions(+) create mode 100644 drivers/clocksource/timer-imx-sysctr.c
drivers/clocksource/Kconfig +8 -0
@@ -591,6 +591,14 @@ config CLKSRC_IMX_TPM Enable this option to use IMX Timer/PWM Module (TPM) timer as clocksource. +config CLKSRC_IMX_SYS_CTR + bool "Clocksource using i.MX system counter" if COMPILE_TEST + depends on (ARM || ARM64) && CLKDEV_LOOKUP + select CLKSRC_MMIO + help + Enable this option to use IMX system counter timer as + clocksource. + config CLKSRC_ST_LPC bool "Low power clocksource found in the LPC" if COMPILE_TEST select TIMER_OF if OF
drivers/clocksource/Makefile +1 -0
@@ -71,6 +71,7 @@ obj-$(CONFIG_CLKSRC_MIPS_GIC) += mips-gic-timer.o obj-$(CONFIG_CLKSRC_TANGO_XTAL) += tango_xtal.o obj-$(CONFIG_CLKSRC_IMX_GPT) += timer-imx-gpt.o obj-$(CONFIG_CLKSRC_IMX_TPM) += timer-imx-tpm.o +obj-$(CONFIG_CLKSRC_IMX_SYS_CTR) += timer-imx-sysctr.o obj-$(CONFIG_ASM9260_TIMER) += asm9260_timer.o obj-$(CONFIG_H8300_TMR8) += h8300_timer8.o obj-$(CONFIG_H8300_TMR16) += h8300_timer16.o
drivers/clocksource/timer-imx-sysctr.c new file +204 -0
204 lines not on this page · raw message
Signature · 1 line
1.9.1