Skip to content
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

drivers: serial: nrfx_uarte: Add requesting of HSFLL GD clock when fast UARTE (uart120) is used #82103

Merged
merged 4 commits into from
Jan 8, 2025

Conversation

nordic-krch
Copy link
Contributor

@nordic-krch nordic-krch commented Nov 27, 2024

Added clock request and release in resume and suspend actions. It is required for the fast UARTE peripheral (uart120 in nrf54h20). Since it would be tricky to handle that outside of PM actions added build time check which enforces use of device runtime PM when fast UARTE is used (device power PM is de facto a must in nrf54h20 so it is not a real limitation).

Due to device runtime PM requirement, uart_async_api test configuration for nrf54h20dk/nrf54h20/cpuapp has been extended to enable PM.
Work from PR #81527 had to be included.
DNM until #81735.

@nordic-krch nordic-krch added the DNM This PR should not be merged (Do Not Merge) label Nov 27, 2024
@bjarki-andreasen
Copy link
Collaborator

Looks correct :)

hubertmis
hubertmis previously approved these changes Nov 27, 2024
/* Macro must resolve to literal 0 or 1 */
#define INSTANCE_IS_FAST(unused, prefix, idx, _) \
COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(UARTE(idx)), \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should stay so that it does not take disabled instances into account

kl-cruz
kl-cruz previously approved these changes Dec 13, 2024
nika-nordic
nika-nordic previously approved these changes Dec 13, 2024
@nordic-krch nordic-krch dismissed stale reviews from nika-nordic and kl-cruz via e234a23 December 13, 2024 14:42
@nordic-krch nordic-krch force-pushed the uart_hsfll branch 2 times, most recently from e234a23 to 60277e0 Compare December 13, 2024 15:10
@bjarki-andreasen
Copy link
Collaborator

Merged as part of nrfconnect/sdk-zephyr#2385

@anangl
Copy link
Member

anangl commented Dec 30, 2024

Merged as part of nrfconnect/sdk-zephyr#2385

Reopening as the commits still need to be merged upstream. In the above PR, they were only cherry-picked into the downstream fork.

@anangl
Copy link
Member

anangl commented Dec 30, 2024

Rebased.

@bjarki-andreasen
Copy link
Collaborator

ah my bad :) I did not notice this one was upstream :)

@bjarki-andreasen
Copy link
Collaborator

is the DNM intentional?

@nordic-krch nordic-krch removed the DNM This PR should not be merged (Do Not Merge) label Jan 8, 2025
Add clock source for timer120 and timer121 nodes

Signed-off-by: Krzysztof Chruściński <[email protected]>
Add requesting for global HFSLL when fast instance TIMER (e.g.
TIMER120 in nrf54h20) is used.

Signed-off-by: Krzysztof Chruściński <[email protected]>
Request fast global domain to run at 320 MHz during fast UARTE
activity. As request is asynchronous it cannot be called from
an ISR. Due to complexity to handle that without device runtime
power management a requirement is added so that if fast UARTE
is used device runtime PM must be enabled. Clock is request
and released in PM resume and suspended actions which in case
of fast UARTE are only called from thread context.

Signed-off-by: Krzysztof Chruściński <[email protected]>
Enable device runtime PM for nrf54h20dk/nrf54h20/cpuapp where
fast UARTE (uart120) is tested.

Signed-off-by: Krzysztof Chruściński <[email protected]>
@kartben kartben merged commit 1115cd5 into zephyrproject-rtos:main Jan 8, 2025
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Base OS Base OS Library (lib/os) area: Clock Control area: Counter area: Devicetree area: UART Universal Asynchronous Receiver-Transmitter platform: nRF Nordic nRFx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants