Skip to content

Conversation

nordic-krch
Copy link
Contributor

@nordic-krch nordic-krch commented Jun 4, 2025

Add support for special GPIOTE0 instance on nrf54h20/cpurad.

This instance requires special handling because:

  • there is no support for PORT event (level interrupts)
  • TE channels are fixed to the pin
  • pins are configured through CTRLSEL (new nrf-regtool version needed)
  • new nrfx_gpiote driver needed

DNM until nrf-regtool v9.2.0 is available.

@nordic-krch nordic-krch added the DNM This PR should not be merged (Do Not Merge) label Jun 4, 2025
Copy link

github-actions bot commented Jun 4, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff

All manifest checks OK

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

@github-actions github-actions bot added manifest manifest-hal_nordic DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Jun 4, 2025
@fabiobaltieri
Copy link
Member

fabiobaltieri commented Jun 4, 2025

Hey, this needs a rebase and force push to pick up the CI error workaround. (the twister one anyway)

@nordic-krch nordic-krch force-pushed the nrf54h20_rad_gpiote branch from 7dfc940 to 7484e74 Compare June 5, 2025 06:43
kl-cruz
kl-cruz previously approved these changes Jun 12, 2025
@nordic-krch nordic-krch force-pushed the nrf54h20_rad_gpiote branch from 7484e74 to 5b050f2 Compare June 26, 2025 08:28
@nordic-krch nordic-krch force-pushed the nrf54h20_rad_gpiote branch 2 times, most recently from d979dc4 to fd196ed Compare July 10, 2025 11:40
@nordic-krch nordic-krch force-pushed the nrf54h20_rad_gpiote branch from fd196ed to 7fb0fee Compare July 16, 2025 05:51
kl-cruz
kl-cruz previously approved these changes Jul 18, 2025
Copy link
Contributor

@kl-cruz kl-cruz left a comment

Choose a reason for hiding this comment

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

Please set hal_nordic hash reference if possible

@github-actions github-actions bot removed manifest-hal_nordic DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Jul 28, 2025
@kl-cruz kl-cruz removed the DNM This PR should not be merged (Do Not Merge) label Jul 28, 2025
Bump required version of nrf-regtool to 9.2.0.

Signed-off-by: Krzysztof Chruściński <[email protected]>
Add GPIOTE0 instance in radio peripherals.

Signed-off-by: Krzysztof Chruściński <[email protected]>
Add new feature flags to gpiote node.
Include pinctrl. Pins used by GPIOTE0 on nrf54h20/cpurad require CTRLSEL
configuration. Pins are listed using pinctrl and parsed by nrf-regtool
to prepare UICR configuration.

Signed-off-by: Krzysztof Chruściński <[email protected]>
Add NRFX_GPIOTE_VAR_FEATURE_SUPPORT feature flag to nrfx configuration.
It enables support for special GPIOTE0 instance in nrfx_gpiote driver.

Signed-off-by: Krzysztof Chruściński <[email protected]>
Add support for special GPIOTE0 instance on nrf54h20/cpurad.
This instance requires special handling because:
- there is no support for PORT event (level interrupts)
- TE channels are fixed to the pin

Signed-off-by: Krzysztof Chruściński <[email protected]>
Add return code checking for gpio_pin_interrupt_configure functions.
Add disabling pin interrupt at the end of the test to restore pin
state.

Signed-off-by: Krzysztof Chruściński <[email protected]>
Add configuration for testing GPIOTE0 instance on nrf54h20/cpurad.

Signed-off-by: Krzysztof Chruściński <[email protected]>
@bjarki-andreasen
Copy link
Contributor

Rebased

Comment on lines +415 to +423
gpiote0: gpiote@27000 {
compatible = "nordic,nrf-gpiote";
reg = <0x27000 0x1000>;
status = "disabled";
interrupts = <39 NRF_DEFAULT_IRQ_PRIORITY>;
instance = <0>;
no-port-event;
fixed-channels-supported;
};
Copy link
Contributor

@jonathannilsen jonathannilsen Jul 30, 2025

Choose a reason for hiding this comment

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

Adding this node causes this check in validate_base_addresses.c to fail for us, since in our case the MDK only defines NRF_RADIOCORE_GPIOTE and not NRF_GPIOTE or NRF_GPIOTE0:

CHECK_DT_REG(gpiote0, NRF_GPIOTE0);

Would it be possible to add something like

#if !defined(NRF_GPIOTE0) && defined(NRF_RADIOCORE_GPIOTE)
#define NRF_GPIOTE0 NRF_RADIOCORE_GPIOTE
#endif

to validate_base_addresses.c?

Copy link
Member

Choose a reason for hiding this comment

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

@nordic-krch - will you be able to address this comment?

Copy link
Contributor

Choose a reason for hiding this comment

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

@nordic-krch is on vacation, I have pushed the suggestion

nika-nordic
nika-nordic previously approved these changes Jul 31, 2025
Map definition of NRF_GPIOTE0 to NRF_RADIOCORE_GPIOTE when MDK
defines NRF_RADIOCORE_GPIOTE instead of NRF_GPIOTE0

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
@bjarki-andreasen bjarki-andreasen dismissed stale reviews from nika-nordic and themself via d1de673 July 31, 2025 13:53
Copy link

@nordic-krch
Copy link
Contributor Author

@anangl can you take a look?

@henrikbrixandersen henrikbrixandersen merged commit 015643d into zephyrproject-rtos:main Aug 7, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants