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

soc: nordic: nrf54l: soc: Rework to remove noup commits. #2510

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

nordic-krch
Copy link
Contributor

soc.c diverged with few noup commits. This is an attempt to make soc.c again purely upstream based.

This reverts commit 4052050.

Signed-off-by: Krzysztof Chruściński <[email protected]>
…cted time"

This reverts commit 482ff99.

Signed-off-by: Krzysztof Chruściński <[email protected]>
…ith TFM"

This reverts commit 840fc45.

Signed-off-by: Krzysztof Chruściński <[email protected]>
…ining

Test test_timer_remaining is comparing time captured by k_busy_wait and
k_timer_remaining_ticks. Test was accepting 1 tick difference between
those two. If system clock frequency is low (e.g. 100 Hz) 1 tick is a
long time but if system clock is high then 1 tick may not cover for
processing latency. Instead of using fixed 1 tick test is now converting
100 us to ticks (ceiling) to cover for cases where system clock is high.
100 us processing latency time is an arbitrary value.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit 04e8d08e04deecccbf20557c56eff68b5d225cbc)
…cy from DT

Use cpu clock source frequency as system core clock.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit df32919a526e20fc9928a8431dc03c9443c3230a)
Add clocks property to CPUs. nRF54Lx series is using hfpll as clock
source for CPU (and fast peripherals). CPU clock frequency can be
derived from frequency of the source clock so clock-frequency property
is removed from cpu as it is redundant.

nrfx/MDK expects that NRF_CONFIG_CPU_FREQ_MHZ define is set to correct
CPU frequency. Modified nrfx CMakeLists.txt to use clock frequency of
hfpll instead of CPU clock-frequency property.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit 43f442be462e95b68bebc7e56489200b01f97c81)
…and nrf54l09pdk

nrf54l20pdk and nrf54l09pdk must use 64 MHz for now. So far it was
done by using SOC_NRF54LX_SKIP_CLOCK_CONFIG Kconfig option which was
skipping oscillator configuration so that it was running the default
frequency (which is 64 MHz). This approach was a bit cryptic because
DT was indicating that CPU was running 128 MHz when actual frequency
was different (and it was relying on assumption that default frequency
is 64 MHz).

After adding hfpll as clock source for CPU Kconfig option can
be replaced with DT setting where actual frequency is correctly
indicated. Since hfpll is a clock source for fast peripherals (e.g.
TIMER00) it is possible to have single source of information
regarding frequency.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit d619fd6)
…ure build

Setup regulators and oscillators only on cpuapp secure target.

Upstream PR #: 85870

Signed-off-by: Krzysztof Chruściński <[email protected]>
Include configuration file for cases when this file is complied
in special builds (e.g. TFM).

Upstream PR #: 85870

Signed-off-by: Krzysztof Chruściński <[email protected]>
…ENCY

Move macro from nrf_clock_control.h to soc_nrf_common.h. Clock control
header fetches many dependencies (e.g. onoff.h) so move macro to more
low level header.

Upstream PR #: 85870

Signed-off-by: Krzysztof Chruściński <[email protected]>
@nordic-krch nordic-krch force-pushed the ncs/nrf54l_soc_rework branch from 3c03d20 to 80554ef Compare February 19, 2025 14:11
@Vge0rge Vge0rge self-requested a review February 20, 2025 12:19
@Vge0rge
Copy link
Contributor

Vge0rge commented Feb 20, 2025

Looks good and I tested it with TFM and seems to work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants