Lines Matching +full:hal +full:- +full:based

4  * SPDX-License-Identifier: Apache-2.0
11 * This module provides routines to initialize and support board-level hardware
16 #include <zephyr/dt-bindings/regulator/nrf5x.h>
22 #include <zephyr/dt-bindings/regulator/nrf5x.h>
26 #include <hal/nrf_glitchdet.h>
27 #include <hal/nrf_oscillators.h>
28 #include <hal/nrf_power.h>
29 #include <hal/nrf_regulators.h>
55 uint32_t xosc32ktrim = NRF_FICR->XOSC32KTRIM; in nordicsemi_nrf54l_init()
63 uint32_t slope_sign_k = (slope_mask_k - (slope_mask_k >> 1)); in nordicsemi_nrf54l_init()
64 int32_t slope_k = (int32_t)(slope_field_k ^ slope_sign_k) - (int32_t)slope_sign_k; in nordicsemi_nrf54l_init()
67 * CAPVALUE = round( (CAPACITANCE - 4) * (FICR->XOSC32KTRIM.SLOPE + 0.765625 * 2^9)/(2^9) in nordicsemi_nrf54l_init()
68 * + FICR->XOSC32KTRIM.OFFSET/(2^6) ); in nordicsemi_nrf54l_init()
74 * calculation: (CAP_VAL - 4 pF)* 0.5 in nordicsemi_nrf54l_init()
75 * That translate to ((CAP_VAL_FEMTO_F - 4000fF) * 2UL) / 1000UL in nordicsemi_nrf54l_init()
80 uint32_t cap_val_encoded = (((DT_PROP(LFXO_NODE, load_capacitance_femtofarad) - 4000UL) in nordicsemi_nrf54l_init()
88 uint32_t mid_val = (cap_val_encoded - 4UL) * (uint32_t)(slope_k + 392UL) in nordicsemi_nrf54l_init()
94 /* Round based on fractional part */ in nordicsemi_nrf54l_init()
105 uint32_t xosc32mtrim = NRF_FICR->XOSC32MTRIM; in nordicsemi_nrf54l_init()
116 uint32_t slope_sign = (slope_mask - (slope_mask >> 1)); in nordicsemi_nrf54l_init()
117 int32_t slope_m = (int32_t)(slope_field ^ slope_sign) - (int32_t)slope_sign; in nordicsemi_nrf54l_init()
121 * CAPVALUE = (((CAPACITANCE-5.5)*(FICR->XOSC32MTRIM.SLOPE+791)) + in nordicsemi_nrf54l_init()
122 * FICR->XOSC32MTRIM.OFFSET<<2)>>8; in nordicsemi_nrf54l_init()
135 uint32_t mid_val_intcap = (((cap_val_femto_f - 5500UL) * (uint32_t)(slope_m + 791UL)) in nordicsemi_nrf54l_init()
141 /* Round based on fractional part */ in nordicsemi_nrf54l_init()