Skip to content

Nrf pinctrl power domain refactor #3042

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

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

Conversation

bjarki-andreasen
Copy link
Contributor

@bjarki-andreasen bjarki-andreasen commented Jul 10, 2025

The power domain and pinctrl refactor touches quite a few files, and was merged upstream before some already fromlisted commits, so there are a bit of reverts and reapplies with no actual code changes to apply the fromtree/fromlist commits cleanly.

@bjarki-andreasen bjarki-andreasen force-pushed the nrf-pinctrl-power-domain-refactor branch 2 times, most recently from 348fce9 to 2f7a41b Compare July 11, 2025 14:48
@bjarki-andreasen bjarki-andreasen force-pushed the nrf-pinctrl-power-domain-refactor branch 4 times, most recently from 53cdfeb to 2b52ec2 Compare July 15, 2025 08:11
@bjarki-andreasen bjarki-andreasen force-pushed the nrf-pinctrl-power-domain-refactor branch 3 times, most recently from 9302056 to 255b120 Compare July 28, 2025 13:45
@bjarki-andreasen bjarki-andreasen force-pushed the nrf-pinctrl-power-domain-refactor branch from 255b120 to 3d7b824 Compare July 30, 2025 09:36
@bjarki-andreasen bjarki-andreasen marked this pull request as ready for review July 30, 2025 09:42
@anangl
Copy link
Contributor

anangl commented Jul 30, 2025

I think that f5228b9 can be dropped permanently. "nordic,nrf-exmif-spi" is no longer used in NCS (since nrfconnect/sdk-nrf#21704 was merged).

@bjarki-andreasen bjarki-andreasen force-pushed the nrf-pinctrl-power-domain-refactor branch 3 times, most recently from ac37f52 to 13f7f6a Compare July 30, 2025 12:00
Kronosblaster and others added 9 commits July 31, 2025 14:35
Support added for power domain regulation using TISCI added for
devices using the binding ti,sci-pm-domain.
This driver relies on the TISCI layer to make calls to the
device manager core to perform power management.

Signed-off-by: Dave Joseph <[email protected]>
(cherry picked from commit 76905a8)
`DT_SAME_NODE()` is judged by `==` and cannot be used as
a condition for `COND_CODE_1()`.
Using `IS_EQ()` to make it possible for compile-time
calculation.

Signed-off-by: TOKITA Hiroshi <[email protected]>
(cherry picked from commit ba48d83)
…cpurad GPIOTE0 config"

This reverts commit 68375c0.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
…n cpurad"

This reverts commit 2892fc1.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
…lag"

This reverts commit eb6005c.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
…ption"

This reverts commit 36cd63b.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
This reverts commit 17a975f.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
bjarki-andreasen and others added 24 commits July 31, 2025 14:36
This reverts commit 88454f2.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
Introduce the NRFS GDPWR (Global Domain Power Request) device
driver and devicetree binding.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 0ec81c5)
Introduce the NRF GPIO Pad Group device driver and binding. The
pad group device represents the GPIO pads (pins), contrary to a
GPIO controller, which is one of the many devices which can be
muxed to pads in the pad group.

The pad group belong to a power domain, which is not neccesarily the
same power domain as devices being muxed to the pads, like GPIO or
UART. If no ACTIVE device is using any of the pads in the pad
group, the pad groups power domain may be SUSPENDED. Before the pad
groups power domain is SUSPENDED, pad config retention must be
enabled to prevent the pads from loosing their state. That's what
this device driver manages. Once retained, the pad configs and
outputs are locked, even when their power domain is SUSPENDED.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 3a8651a)
This reverts commit a9bcc44.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
…l handling"

This reverts commit f5228b9.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
To determine whether device runtime PM is enabled on a device, use
`pm_device_runtime_is_enabled`. This results in the same behaviour when
`CONFIG_PM_DEVICE_RUNTIME=n`, but properly controls the clocks on a
per-instance basis when `CONFIG_PM_DEVICE_RUNTIME=y`.

Signed-off-by: Jordan Yates <[email protected]>
(cherry picked from commit 6e0d0f5)
…SF client"

This reverts commit dbd3936.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
…efault"

This reverts commit 946fcec.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
This reverts commit e9a13c3.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
…ctrl and pds

Transition nrf54h away from the soc specific gpd
(global power domain) driver which mixed power domains, pinctrl
and gpio pin retention into a non scalable solution, forcing soc
specific logic to bleed into nrf drivers.

The new solution uses zephyrs PM_DEVICE based power domains to
properly model the hardware layout of device and pin power domains,
and moves pin retention logic out of drivers into pinctrl and
gpio, which are the components which manage pins (pads).

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 2b0d1ae)
…n) driver

Remove the deprecated GPD (Global Power Domain) driver.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 2854115)
The nRF54H20 supports a Bluetooth controller.
The HCI driver interface has changed upstream in
zephyrproject-rtos/zephyr#72323
so now we need to add it to device tree.

Signed-off-by: Rubin Gerritsen <[email protected]>
(cherry picked from commit 960a734)
The SoftDevice Controller is a different controller than
the open source link layer with a different set of quirks.
It should therefore have its own device tree binding.

This commit converts the SoftDevice Controller driver
to use this new DTS binding instead of reusing the existing one.

This commit updates or adds additional overlays for
existing samples, applications and tests that were using the
open source link layer.

Signed-off-by: Rubin Gerritsen <[email protected]>
Signed-off-by: Kristoffer Rist Skøien <[email protected]>
Signed-off-by: Rafał Kuźnia <[email protected]>
(cherry picked from commit a55b00a)
This test cannot be executed with the SDFW Service Framework client
started, so disable its initialization.

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit 4b18963)
Configure SDP MSPI pins to switch their control to VPR core

Signed-off-by: Jakub Zymelka <[email protected]>
Signed-off-by: Andrzej Głąbek <[email protected]>
Signed-off-by: Magdalena Pastula <[email protected]>
(cherry picked from commit c55bfc3)
This commit brings back modifications from these reverted commits:
- f68b2ed
- e606246
slightly adjusted so that the EXMIF peripheral is still by default
handled by the mspi_dw driver, and in cases where this driver cannot
be used because something still does not work correctly, one can
switch to the old solution based on the tweaked spi_dw driver.

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit c3c1692)
Signed-off-by: Bjarki Arge Andreasen <[email protected]>
Bump required version of nrf-regtool to 9.2.0.

Upstream PR #: 91041

Signed-off-by: Krzysztof Chruściński <[email protected]>
Same as commit 6ec9d10 but with the REQUIRED keyword on its own
line to attempt to avoid a merge conflict when reverting/reapplying
this patch.

Signed-off-by: Jonathan Nilsen <[email protected]>
(cherry picked from commit 8c2d815)
Add GPIOTE0 instance in radio peripherals.

Upstream PR #: 91041

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.

Upstream PR #: 91041

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.

Upstream PR #: 91041

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

Upstream PR #: 91041

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

Add configuration for testing GPIOTE0 instance on nrf54h20/cpurad.

Upstream PR #: 91041

Signed-off-by: Krzysztof Chruściński <[email protected]>
Some nRF SoCs (i.e. nRF54H20) can peform DMA transfers
only from specific memory regions - `dmm` facilitates that.

Upstream PR #: 93487

Signed-off-by: Nikodem Kastelik <[email protected]>
@bjarki-andreasen bjarki-andreasen force-pushed the nrf-pinctrl-power-domain-refactor branch from 13f7f6a to 191d703 Compare July 31, 2025 12:37
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.

10 participants