-
Notifications
You must be signed in to change notification settings - Fork 7.4k
clock_control: add vendor specific API to get HF clock startup time #90615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clock_control: add vendor specific API to get HF clock startup time #90615
Conversation
fc78d01
to
4662a26
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cvinayak , after this change EVENT_OVERHEAD_XTAL_US could start using the device-tree defined startup latency
4662a26
to
f37b306
Compare
@rugeGerritsen PR to cover the use of devicetree in bsim CI(not testing on target today, will test in the future at the next opportunity). |
@aescolar do we need any DTS updates for bsim boards to pick the node value? |
Looks like bsim CI already picks it up :-) .. there is mesh test failing. |
09ce64a
to
327cbc7
Compare
This default matches the default before it got changed in nrfconnect/sdk-nrf#22369. This ensures that the current consumption when using Bluetooth remains unchanged. The default of 854 is likely good enough for this board. This noup commit can be replaced once: * HFXO startup latency is defined in device tree zephyrproject-rtos/zephyr#90615 * The startup latency is configured per board and not per SoC. The startup latency is board specific as the HFXO is an SOC-external component. Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This default matches the default before it got changed in nrfconnect/sdk-nrf#22369. This ensures that the current consumption when using Bluetooth remains unchanged. The default of 854 is likely good enough for this board. This noup commit can be replaced once: * HFXO startup latency is defined in device tree: zephyrproject-rtos/zephyr#90615 * The startup latency is configured per board and not per SoC. The startup latency is board specific as the HFXO is an SOC-external component. Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This default matches the default before it got changed in nrfconnect/sdk-nrf#22369. This ensures that the current consumption when using Bluetooth remains unchanged. The default of 854 is slightly smaller than what is recommended by the documentation provided for MPSL_HFCLK_LATENCY. It is still likely good enough for this board and its use cases. This noup commit can be replaced once: * HFXO startup latency is defined in device tree: zephyrproject-rtos/zephyr#90615 * The startup latency is configured per board and not per SoC. The startup latency is board specific as the HFXO is an SOC-external component. Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Add nrf51 series hfxo binding and nodes to socs. Note that the values added to the soc .dtsi files are worst case defaults, which will be replaced with optimal values at board level in the future, as they depend on the specific crystal in use. Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add nrf52 series hfxo binding and nodes to socs. Note that the values added to the soc .dtsi files are worst case defaults, which will be replaced with optimal values at board level in the future, as they depend on the specific crystal in use. Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add the clock startup time property to the nrf53 series HFXO binding. Note that the values added to the soc .dtsi files are worst case defaults, which will be replaced with optimal values at board level in the future, as they depend on the specific crystal in use. Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Each nrf series has its own variant of the hfxo clock, specified by the binding which includes the series in the name. The nrf54L series is no different, hence the binding should be clearly specified by having the series name within it. Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Each nrf series has its own variant of the lfxo clock, specified by the binding which includes the series in the name. The nrf54L series is no different, hence the binding should be clearly specified by having the series name within it. Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add the clock startup time property to the nrf54l series HFXO binding. Note that the values added to the soc .dtsi files are worst case defaults, which will be replaced with optimal values at board level in the future, as they depend on the specific crystal in use. Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Implement vendor specific z_nrf_clock_bt_ctlr_hf_get_startup_time_us() which gets the startup time of the high frequency clock used for Bluetooth. Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
CLOCK_CONTROL_NRF_HFINT_CALIBRATION depended on the renamed nordic,nrf-hfxo -> nordic,nrf54l-hfxo. Update config to depend on DT_HAS_NORDIC_NRF54L_HFXO_ENABLED to match new compat name. Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
327cbc7
to
ee4c537
Compare
|
* | ||
* @retval HFCLK startup time in microseconds | ||
*/ | ||
uint32_t z_nrf_clock_bt_ctlr_hf_get_startup_time_us(void); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the bt_ctrl
part be removed? The use-cases go beyond just Bluetooth controller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The naming is intended to match z_nrf_clock_bt_ctlr_hf_request()
and _release()
to make it recognizable and clearly differentiate it from nrf_clock_control_hfxo_request()
and newer APIs. It is planned to be replaced by the newer APIs in the future by #90399 in any case :)
This default matches the default before it got changed in nrfconnect/sdk-nrf#22369. This ensures that the current consumption when using Bluetooth remains unchanged. The default of 854 is slightly smaller than what is recommended by the documentation provided for MPSL_HFCLK_LATENCY. It is still likely good enough for this board and its use cases. This noup commit can be replaced once: * HFXO startup latency is defined in device tree: zephyrproject-rtos/zephyr#90615 * The startup latency is configured per board and not per SoC. The startup latency is board specific as the HFXO is an SOC-external component. Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Note that for the nRF51, the clock was not called HFXO, but for simplicity its called HFXO in the devicetree