drivers: clock_control_mcux_sim: add support for clkout
Add support for CLKOUT source selection and divider as found on the NXP Kinetis KE1xF SoC series. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
56dfb62e40
commit
d4b9c0d600
|
@ -45,6 +45,15 @@ static int mcux_sim_get_subsys_rate(struct device *dev,
|
|||
|
||||
static int mcux_sim_init(struct device *dev)
|
||||
{
|
||||
#ifdef DT_SIM_CLKOUT_DIVIDER
|
||||
SIM->CHIPCTL = (SIM->CHIPCTL & ~SIM_CHIPCTL_CLKOUTDIV_MASK)
|
||||
| SIM_CHIPCTL_CLKOUTDIV(DT_SIM_CLKOUT_DIVIDER);
|
||||
#endif
|
||||
#ifdef DT_SIM_CLKOUT_SOURCE
|
||||
SIM->CHIPCTL = (SIM->CHIPCTL & ~SIM_CHIPCTL_CLKOUTSEL_MASK)
|
||||
| SIM_CHIPCTL_CLKOUTSEL(DT_SIM_CLKOUT_SOURCE);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,18 @@ properties:
|
|||
description: Human readable string describing the device (used by Zephyr for API name)
|
||||
generation: define
|
||||
|
||||
clkout-source:
|
||||
type: int
|
||||
category: optional
|
||||
description: clkout clock source
|
||||
generation: define
|
||||
|
||||
clkout-divider:
|
||||
type: int
|
||||
category: optional
|
||||
description: clkout divider
|
||||
generation: define
|
||||
|
||||
"#cells":
|
||||
- name
|
||||
- offset
|
||||
|
|
Loading…
Reference in a new issue