drivers: pwm_mcux: Update MCUX pwm driver to use clock bindings

MCUX PWM driver used hardcoded clock source. update driver to use clock
bindings to determine PWM peripheral clock frequency.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2021-12-02 09:57:54 -06:00 committed by Maureen Helm
commit b0dfda1584
7 changed files with 70 additions and 7 deletions

View file

@ -22,5 +22,6 @@
#define IMX_CCM_SAI1_CLK 12
#define IMX_CCM_SAI2_CLK 13
#define IMX_CCM_SAI3_CLK 14
#define IMX_CCM_PWM_CLK 15
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_IMX_CCM_H_ */

View file

@ -60,6 +60,9 @@
#define IMX_CCM_EDMA_CLK 0x700UL
#define IMX_CCM_EDMA_LPSR_CLK 0x701UL
/* PWM */
#define IMX_CCM_PWM_CLK 0x800UL
/* CAN */
#define IMX_CCM_CAN_CLK 0x900UL
#define IMX_CCM_CAN1_CLK 0x900UL
@ -75,4 +78,5 @@
#define IMX_CCM_GPT5_CLK 0x1004UL
#define IMX_CCM_GPT6_CLK 0x1005UL
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_IMX_CCM_REV2_H_ */