Skip to content

Commit 8c3e937

Browse files
mikolaj-klikowiczkartben
authored andcommitted
drivers: clock_control: clock_control_max32: Enable IPLL
Make enabling MAX78002 IPLL clock from dts possible Signed-off-by: Mikolaj Klikowicz <mklikowicz@antmicro.com>
1 parent fd2a80e commit 8c3e937

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/clock_control/clock_control_max32.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ static int api_get_rate(const struct device *dev, clock_control_subsys_t clkcfg,
8585
case ADI_MAX32_PRPH_CLK_SRC_IBRO_DIV8:
8686
*rate = ADI_MAX32_CLK_IBRO_FREQ / 8;
8787
break;
88+
case ADI_MAX32_PRPH_CLK_SRC_IPLL:
89+
*rate = ADI_MAX32_CLK_IPLL_FREQ;
90+
break;
8891
default:
8992
*rate = 0U;
9093
/* Invalid parameters */
@@ -130,6 +133,10 @@ static void setup_fixed_clocks(void)
130133
MXC_SYS_ClockSourceEnable(ADI_MAX32_CLK_ERTCO);
131134
#endif
132135

136+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_ipll))
137+
MXC_SYS_ClockSourceEnable(ADI_MAX32_CLK_IPLL);
138+
#endif
139+
133140
/* Some device does not support external clock */
134141
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(clk_extclk), fixed_clock, okay)
135142
MXC_SYS_ClockSourceEnable(ADI_MAX32_CLK_EXTCLK);

0 commit comments

Comments
 (0)