drivers: timer: mec5: Driver using Microchip RTOS timer as kernel tick #79290
+453
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Timer driver using Microchip 32KHz based RTOS timer as the kernel timer tick. The driver uses one of the 32-bit basic timers to support the kernel's k_busy_wait API which is passed a wait count in 1 us units. The 32-bit basic timer is selected by using device tree chosen rtimer-busy-wait-timer set to the handle of the desired 32-bit basic timer. If this driver is disabled, the build system will select the ARM Cortex-M4 SysTick as the kernel timer tick driver. The user should specify RTOS timer as kernel tick by adding the compatible properity and setting the status property to "okay" at the board or application level device tree. The driver implements two internal API's for use by the SoC PM. These two API's allow the SoC PM layer to disable the timer used for k_busy_wait so the PLL can be disabled in deep sleep. We used a custom API so we can disable this timer in the deep sleep path when we know k_busy_wait will not be called by other drivers or applications.