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

Misc nRF54h20 updates #1642

Closed
wants to merge 24 commits into from

Conversation

57300
Copy link
Contributor

@57300 57300 commented Apr 16, 2024

DNM: Contains commits backported from HWMv2

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Apr 18, 2024

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
hal_nordic zephyrproject-rtos/hal_nordic@f8e4d73 zephyrproject-rtos/hal_nordic#167 zephyrproject-rtos/hal_nordic#167/files

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@Rafal-Nordic
Copy link
Contributor

please update the commit fe8139e

This reverts commit 8a5c578.

Signed-off-by: Grzegorz Swiderski <[email protected]>
@shanthanordic
Copy link

To be merged after the current upmerge

57300 and others added 23 commits April 30, 2024 15:07
…um version"

This reverts commit 22df05a.

Signed-off-by: Grzegorz Swiderski <[email protected]>
Use `DT_REG_HAS_IDX()` instead of `DT_NODE_EXISTS()` when checking
if for a given nodelabel the base address of the associated node
should be validated, so that the validation is performed only if
the base address is available. This prevents build failures in cases
like the os_mgmt_datetime test where the `rtc` nodelabel is used for
an emulated RTC.

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit dde7c47)
According to RISC-V Instruction Set Manual Chapter 3.3.2:
"The operation of WFI must be unaffected by the global interrupt
bits in mstatus
[...]
WFI is also required to resume execution for locally enabled
interrupts pending at any privilege level,
regardless of the global interrupt enable at each privilege level."

Disabling interrupts before executing `wfi` prevents a corner case
where an IRQ is presented just before executing `wfi`,
which would cause it to return directly into `wfi` and potentially
get stuck in sleep, instead of continuing to background processing.

When execution is resumed, interrupts are reenabled
and appropriate IRQ Handlers should be executed.

Signed-off-by: Marcin Szymczyk <[email protected]>
(cherry picked from commit 292aafe)
…aking VPR up

WARNING: backported from HWMv2

Due to HW issue, VPR needs to keep MSTATUS.MIE enabled during sleep.
Otherwise, interrupts will not wake it up.

Signed-off-by: Marcin Szymczyk <[email protected]>
(cherry picked from commit d248b7b)
…t time

Interrupts should not be enabled this early in boot time.
Driver initializations expect IRQs not to arrive when
setting up HW.
Remove enabling `MSTATUS.MIE` in `__start`.
It will be enabled when main thread is switched to,
as threads by default start with enabled `MSTATUS.MIE`.

Signed-off-by: Marcin Szymczyk <[email protected]>
(cherry picked from commit a994dc5)
…alling `wfi`

To minimize time the CPU spends when preparing for sleep, make sure
the pending transactions are finished before calling `wfi`.

Signed-off-by: Marcin Szymczyk <[email protected]>
(cherry picked from commit 1de13cc)
WARNING: backported from HWMv2

Nordic SoCs use this hook to execute `SystemInit` as early as possible
after ARM core reset. Previously, `z_arm_platform_init` was defined as
assembly code, which would simply jump to the other function.

However, this extra code can be avoided by using `SystemInit` directly
in place of the `z_arm_platform_init` symbol (whenever it's undefined).
This is now done with a linker script containing a `PROVIDE` directive.

This saves 4 bytes of ROM (0-16 depending on alignment) and also makes
it possible to override `z_arm_platform_init` out of tree, if needed.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 7d45f3c)
This definition is used in nrfx header files, so it shouldn't be added
using `zephyr_library_compile_definitions()`. This would cause the GRTC
driver to fail the build when CONFIG_NRF_GRTC_START_SYSCOUNTER=y.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 35e418f)
Add a VEVIF node to be used for communicating with SysCtrl (cpusys).
This is the only part of the SysCtrl VPR exposed to local domains.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 163cacb)
…SysCtrl

Add the default `zephyr,ipc-icmsg` nodes for communication with
Application and Radiocore.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 711abcd)
WARNING: backported from HWMv2

Upstream PR: zephyrproject-rtos/zephyr#71590

Fixes #71511
Follow-up to #70977

Update the approach by moving the `PROVIDE` directive to a separate
linker script added using `zephyr_linker_sources()`. This makes the
change more likely to propagate to existing samples which are using
CONFIG_CUSTOM_LINKER_SCRIPT.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit f16b33e)
Interrupt handlers are expected to have a pototype
void (const void*)
but nrfx_grtc_irq_handler has just a void(void)
(with no input parameter).
Fix it by using a trampoline.

Signed-off-by: Alberto Escolar Piedras <[email protected]>
(cherry picked from commit 8e20b80)
Fixed order of mepc and _mcause in esf for 32bit stacking.
Added missing stack pointer alignement bit support.'

Signed-off-by: Lukasz Stepnicki <[email protected]>
(cherry picked from commit 37e3449)
Add missing USBHS node to list of global peripherals.

Signed-off-by: Håkon Amundsen <[email protected]>
(cherry picked from commit 5895be5)
Upstream PR: zephyrproject-rtos/zephyr#71536

If no HSFLL needs trimming, then `trim_hsfll()` should be compiled out.
This makes it easier to reuse the rest of `soc.c` out of tree.

Furthermore, some HSFLL instances can be trimmed before booting Zephyr,
so the FICR client properties in the DT binding should not be required.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 0803dc254b193dd10d94a99ca1289318d483087f)
Upstream PR: zephyrproject-rtos/zephyr#71536

Make the SoC initialization priority configurable.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit d5442da200a4b1e9ac3a11b4ea16c6a69666729c)
Upstream PR: zephyrproject-rtos/zephyr#71536

Add `CHECK_DT_REG()` entries for a few additional peripheral types:
BELLBOARD, CCM, GRTC, HSFLL, UICR, and VPR.

For peripheral instances outside of the Global Domain, such as DPPIC020,
use domain-specific defines like NRF_RADIOCORE_DPPIC020 when validating.
These are always defined by the MDK, while NRF_DPPIC020 isn't guaranteed
to exist in those cases. Revise existing macro checks accordingly.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 1750413c7f22a76d504c35a890d31eab469c9850)
Upstream PR: zephyrproject-rtos/zephyr#71609

Add devicetree nodes for the Reset Information registers on nRF54H20,
along with a new binding.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 8fe636b4d583b7f3d119d7e80094e3b5bfa52099)
Upstream PR: zephyrproject-rtos/zephyr#71609

Each local RESETINFO instance can be used in samples.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 74627effecb5a9dcb570fd683f1795d310ac372f)
Upstream PR: zephyrproject-rtos/zephyr#71610

Move global RAM0x regions to align with the documentation.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 523c872fbf10638cff9e11984eacc8f66c099c96)
WARNING: backported from HWMv2

Upstream PR: zephyrproject-rtos/zephyr#70245

Adding nRF Services library to the hal-nordic repo

Signed-off-by: Rafal Dyla <[email protected]>
(cherry picked from commit dd46b6976708e3632230280ce973b94a86b40251)
Upstream PR: zephyrproject-rtos/zephyr#71688

This commit aligns the GRTC driver to changes introduced in
hal_nordic. Some of the features regarding GRTC sleep/wakeup
functionality has been modified and moved out to the nrfx
driver's code.

Signed-off-by: Adam Kondraciuk <[email protected]>
(cherry picked from commit 65614cfa63cd8569c89acce0a3b1f720a4eeae10)
DNM: HWMv2 will obsolete this

Signed-off-by: Grzegorz Swiderski <[email protected]>
@57300 57300 force-pushed the misc-nrf54h20-ncs branch from e7390f6 to 2073080 Compare April 30, 2024 13:07
@57300 57300 marked this pull request as draft May 6, 2024 11:03
@57300 57300 mentioned this pull request May 6, 2024
@57300 57300 changed the base branch from main to v3.6.99-ncs1-branch May 8, 2024 12:47
@57300 57300 closed this May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants