Skip to content

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 5 times, most recently from 191d703 to c67eba5 Compare August 1, 2025 09:09
vbrzeski and others added 7 commits August 1, 2025 11:33
This commit resolves a bug where the USB Endpoint
provided by the HID driver was incorrect when in
High Speed mode.

Signed-off-by: Victor Brzeski <[email protected]>
(cherry picked from commit c0e1268)
Signed-off-by: Tomasz Moń <[email protected]>
Change the macros to have only one plus operator per term. This is
purely stylistic change, no functional changes.

Signed-off-by: Tomasz Moń <[email protected]>
(cherry picked from commit 673f324)
…ndpoints

Enable double buffering on data OUT endpoints to allow USB stack to
enqueue next transfer as soon as possible. This is especially useful
when operating at High-Speed where there is significantly less time
between subsequent SOF packets.

Signed-off-by: Tomasz Moń <[email protected]>
(cherry picked from commit 2f343bf)
…nqueue

Release receive buffer on failed endpoint enqueue.

Signed-off-by: Tomasz Moń <[email protected]>
(cherry picked from commit f9ac318)
…ndpoint

Enable double buffering on isochronous feedback endpoint to avoid
sending ZLP instead of feedback information.

Signed-off-by: Tomasz Moń <[email protected]>
(cherry picked from commit 223d23a)
…ing incompisoout

Rearm isochronous endpoints when handling incomplete iso out interrupt
to make it possible to rearm the endpoint in time (before SOF),
especially when operating at High-Speed.

Signed-off-by: Tomasz Moń <[email protected]>
(cherry picked from commit 6eb2fa8)
Incomplete iso IN/OUT is just informative and its occurrence does not
prevent the endpoint from actually transmitting/receiving data. Such
"late" isochronous transfers, which are perfectly fine according to USB
specification, were observed on Windows host with nRF54H20 running
explicit feedback sample operating at High-Speed.

The incorrect handling manifested itself with "ISO RX buffer too small"
error message. The faulty scenario was:
  * incompISOIN handler does not find any matching endpoint
  * incompISOOUT handler disables endpoint, discards buffer and sets
    rearm flag
  * next DWC2 interrupt handler iteration after reading GINTSTS
  * XferCompl interrupt on iso IN endpoint
  * XferCompl interrupt on iso OUT endpoint
      - transfer was actually happening to the buffer discarded in
	incompISOOUT handler
      - XferCompl handler modified the next buffer
  * GOUTNakEff interrupt, iso OUT endpoint EPDIS bit is set
  * EPDisbld interrupt, rearm flag set
      - the buffer modified by XferCompl is used and fails because it is
	not large enough

Modify the sequence so it accounts for host actions and the above faulty
scenario no longer causes any problems.

Signed-off-by: Tomasz Moń <[email protected]>
(cherry picked from commit 8d1f7b3)
bjarki-andreasen and others added 26 commits August 6, 2025 15:52
This reverts commit 17a975f.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
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 c67eba5 to 4d0b19d Compare August 6, 2025 13:52
The nrfs_gdpwr driver has a two stage init, which requires tracking
an "expected" state of the power domain, to be applied once the
ipc service needed to control the power domain is ready. This was
tracked with the "off" member of struct domain_data.

So, "off" was initialized to false, but, should actually be
initialized to true, since by default, if nothing needs the power
domain, it should be turned off when ipc service is ready.

To fix this, rename "off" member to "on" and adjust logic.

Additionally, define the correct struct domain_data in the
DOMAIN_DEFINE() macro. Can save 2 bytes. This did not cause any
issue since we typecast it anyway, and its size is large enough.

Upstream PR #: 94214

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

Update handling of fast instances to take into account whether
CONFIG_CLOCK_CONTROL is enabled or not.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit c326bf6)
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.