timer: add SP804 UCLASS timer driver
authorAndre Przywara <andre.przywara@arm.com>
Thu, 20 Oct 2022 22:10:23 +0000 (23:10 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 2 Nov 2022 17:58:17 +0000 (13:58 -0400)
commit731d108dd0706e76addc6945e8c8709a05cb4728
tree43d4ca21a2bb7a5bebe85ea6a1d3138623717fb0
parent1c1036499f737eeaa2dab4e56d7ff2c3447fce64
timer: add SP804 UCLASS timer driver

The "Arm Ltd. Dual-Timer Module (SP804)" is a simple 32-bit count-down
timer IP with interrupt functionality, and is used in some SoCs from
various vendors.

Add a simple DM compliant timer driver, to allow users of the SP804 to
switch to DM_TIMER.

This relies on the input clock to be accessible via the DM clock
framework, which should be fine as we probably look at fixed-clock's
here anyway.
We re-program the control register in the probe() function, but keep
the divider in place, in case this has been set to something on purpose
before.

The TRM for the timer IP can be found here:
https://developer.arm.com/documentation/ddi0271/latest

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
drivers/timer/Kconfig
drivers/timer/Makefile
drivers/timer/sp804_timer.c [new file with mode: 0644]