Lines Matching +full:osc +full:- +full:freq

4  * SPDX-License-Identifier: Apache-2.0
66 LOG_DBG("RCX calibration done, RCX freq: %d", in calibration_work_cb()
71 if ((CRG_TOP->CLK_CTRL_REG & CRG_TOP_CLK_CTRL_REG_LP_CLK_SEL_Msk) == in calibration_work_cb()
81 LOG_DBG("RC32K calibration done, RC32K freq: %d", in calibration_work_cb()
108 if ((CRG_TOP->CLK_CTRL_REG & CRG_TOP_CLK_CTRL_REG_LP_CLK_SEL_Msk) == in xtal32k_settle_work_cb()
118 if ((CRG_TOP->CLK_RC32K_REG & CRG_TOP_CLK_RC32K_REG_RC32K_ENABLE_Msk) == 0) { in smartbond_start_rc32k()
119 CRG_TOP->CLK_RC32K_REG |= CRG_TOP_CLK_RC32K_REG_RC32K_ENABLE_Msk; in smartbond_start_rc32k()
171 return -ENODEV; in smartbond_clock_set_pll_status()
182 return -EIO; in smartbond_clock_set_pll_status()
224 CRG_TOP->CLK_RC32M_REG |= CRG_TOP_CLK_RC32M_REG_RC32M_ENABLE_Msk; in smartbond_clock_control_on()
232 pll_requests = 1 << (clk - SMARTBOND_CLK_PLL96M); in smartbond_clock_control_on()
233 if ((CRG_TOP->CLK_CTRL_REG & CRG_TOP_CLK_CTRL_REG_RUNNING_AT_PLL96M_Msk) == 0) { in smartbond_clock_control_on()
234 if ((CRG_TOP->CLK_CTRL_REG & in smartbond_clock_control_on()
246 CRG_TOP->CLK_CTRL_REG &= ~CRG_TOP_CLK_CTRL_REG_USB_CLK_SRC_Msk; in smartbond_clock_control_on()
251 return -ENOTSUP; in smartbond_clock_control_on()
270 ret = -EPERM; in smartbond_clock_control_off()
273 if (((CRG_TOP->CLK_CTRL_REG & CRG_TOP_CLK_CTRL_REG_LP_CLK_SEL_Msk) >> in smartbond_clock_control_off()
275 CRG_TOP->CLK_RCX_REG &= ~CRG_TOP_CLK_RCX_REG_RCX_ENABLE_Msk; in smartbond_clock_control_off()
281 if (((CRG_TOP->CLK_CTRL_REG & CRG_TOP_CLK_CTRL_REG_LP_CLK_SEL_Msk) >> in smartbond_clock_control_off()
283 CRG_TOP->CLK_XTAL32K_REG &= ~CRG_TOP_CLK_XTAL32K_REG_XTAL32K_ENABLE_Msk; in smartbond_clock_control_off()
290 if ((CRG_TOP->CLK_CTRL_REG & CRG_TOP_CLK_CTRL_REG_RUNNING_AT_RC32M_Msk) == 0) { in smartbond_clock_control_off()
300 CRG_TOP->CLK_CTRL_REG |= CRG_TOP_CLK_CTRL_REG_USB_CLK_SRC_Msk; in smartbond_clock_control_off()
303 pll_requests &= ~(1 << (clk - SMARTBOND_CLK_PLL96M)); in smartbond_clock_control_off()
316 ret = -EPERM; in smartbond_clock_control_off()
321 return -ENOTSUP; in smartbond_clock_control_off()
343 clk = sys_clk_src[CRG_TOP->CLK_CTRL_REG & in smartbond_source_clock()
348 clk = lp_clk_src[(CRG_TOP->CLK_CTRL_REG & in smartbond_source_clock()
381 return -ENOTSUP; in smartbond_clock_get_rate()
448 rc = -EINVAL; in z_smartbond_select_lp_clk()
465 CRG_TOP->CLK_CTRL_REG = (CRG_TOP->CLK_CTRL_REG & ~clk_sel_msk) | clk_sel; in z_smartbond_select_lp_clk()
507 return -EINVAL; in z_smartbond_select_sys_clk()
517 CRG_TOP->CLK_CTRL_REG = (CRG_TOP->CLK_CTRL_REG & ~clk_sel_msk) | clk_sel; in z_smartbond_select_sys_clk()
525 return -EIO; in z_smartbond_select_sys_clk()
539 return -EINVAL; in z_smartbond_select_sys_clk()
579 DT_FOREACH_CHILD_STATUS_OKAY_SEP(DT_PATH(crg, osc), ENABLE_OSC, (;)); in smartbond_clocks_init()
601 DT_FOREACH_CHILD_SEP(DT_PATH(crg, osc), DISABLE_OSC, (;)); in smartbond_clocks_init()
630 return -ENOTSUP; in smartbond_clocks_pm_action()
637 PM_DEVICE_DT_DEFINE(DT_NODELABEL(osc), smartbond_clocks_pm_action);
639 DEVICE_DT_DEFINE(DT_NODELABEL(osc),
641 PM_DEVICE_DT_GET(DT_NODELABEL(osc)),