Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions drivers/pwm/Kconfig.nrf_sw
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ config PWM_NRF_SW
default y
depends on DT_HAS_NORDIC_NRF_SW_PWM_ENABLED
select NRFX_GPIOTE
select NRFX_PPI if HAS_HW_NRF_PPI
select NRFX_DPPI if HAS_HW_NRF_DPPIC
select NRFX_GPPI
help
Enable driver to utilize PWM on the Nordic Semiconductor nRF SoCs.

Expand Down
6 changes: 2 additions & 4 deletions drivers/serial/Kconfig.nrfx_uart_instance
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ config UART_$(nrfx_uart_num)_ENHANCED_POLL_OUT
default y
depends on HAS_HW_NRF_UARTE$(nrfx_uart_num)
depends on HAS_HW_NRF_PPI || HAS_HW_NRF_DPPIC
select NRFX_PPI if HAS_HW_NRF_PPI
select NRFX_DPPI if HAS_HW_NRF_DPPIC
select NRFX_GPPI
help
When enabled, polling out does not trigger interrupt which stops TX.
Feature uses a PPI channel.
Expand Down Expand Up @@ -55,8 +54,7 @@ config UART_$(nrfx_uart_num)_NRF_HW_ASYNC
depends on UART_ASYNC_API
depends on UART_NRFX_UARTE_LEGACY_SHIM
depends on HAS_HW_NRF_PPI || HAS_HW_NRF_DPPIC
select NRFX_PPI if HAS_HW_NRF_PPI
select NRFX_DPPI if HAS_HW_NRF_DPPIC
select NRFX_GPPI
help
If default driver uses interrupts to count incoming bytes, it is possible
that with higher speeds and/or high cpu load some data can be lost.
Expand Down
4 changes: 2 additions & 2 deletions modules/hal_nordic/nrfx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_NRF92X ${MDK_DIR}/system_nrf92.c
zephyr_library_sources(nrfx_glue.c)
zephyr_library_sources(${HELPERS_DIR}/nrfx_flag32_allocator.c)
zephyr_library_sources_ifdef(CONFIG_RETAINED_MEM_NRF_RAM_CTRL ${HELPERS_DIR}/nrfx_ram_ctrl.c)
zephyr_library_sources_ifdef(CONFIG_NRFX_DPPI ${HELPERS_DIR}/nrfx_gppi_dppi.c)
zephyr_library_sources_ifdef(CONFIG_NRFX_GPPI ${HELPERS_DIR}/nrfx_gppi_dppi.c)
Copy link
Member

Choose a reason for hiding this comment

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

This does not seem to be necessary/beneficial.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you elaborate? Do you mean that CONFIG_NRFX_GPPI kconfig is not beneficial or something else?

Copy link
Member

Choose a reason for hiding this comment

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

NRFX_GPPI enables NRFX_DPPI, so the change is not really needed. But it causes that nrfx_gppi_dppi.c will be compiled also for NRFX_PPI, unnecessarily.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is possible to enable NRFX_DPPI without enabling any GPPI functionality now. Also NRFX_GPPI does more, as it is unified across the SoC families. Regardless of whether working with nRF52 or nRF54L or anything else, NRFX_GPPI will enable everything that's needed.

I just noticed that that NRFX_PPI in the next line should be replaced with NRFX_GPPI as well. I'll add this subsequent commit as well, if you don't mind.

zephyr_library_sources_ifdef(CONFIG_NRFX_PPI ${HELPERS_DIR}/nrfx_gppi_ppi.c)

zephyr_library_sources_ifdef(CONFIG_NRFX_PRS ${SRC_DIR}/prs/nrfx_prs.c)
Expand Down Expand Up @@ -185,7 +185,7 @@ if(CONFIG_SOC_NRF54L20_ENGA_CPUAPP)
zephyr_compile_definitions(NRF_SKIP_TAMPC_SETUP)
endif()

if(CONFIG_SOC_SERIES_NRF54LX AND CONFIG_NRFX_DPPI)
if(CONFIG_SOC_SERIES_NRF54LX AND CONFIG_NRFX_GPPI)
zephyr_library_sources(${HELPERS_DIR}/nrfx_gppi_dppi_ppib_lumos.c)
zephyr_library_sources(${NRFX_DIR}/soc/interconnect/dppic_ppib/nrfx_interconnect_dppic_ppib.c)
endif()
Expand Down
29 changes: 29 additions & 0 deletions modules/hal_nordic/nrfx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,71 +30,85 @@ config NRFX_DPPI

config NRFX_DPPI0
bool "DPPI0 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,dppic,$(DT_COMPAT_NORDIC_NRF_DPPIC))
Copy link
Member

Choose a reason for hiding this comment

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

I think that for consistency it would be good to use ddpic0 here and add such node label to nodes labeled as dppic, like it is done for wdt0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm reluctant to changing labels of nodes that existed for years, as it might break compatibility somewhere for no good reason really.

Copy link
Contributor

Choose a reason for hiding this comment

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

You can extend the existing nodelabel like this:

dppic0: dppic: dppic {
        ...
};

in devicetree and update NRFX_DPPI0
to

depends on ($(dt_nodelabel_has_compat,dppic,$(DT_COMPAT_NORDIC_NRF_DPPIC)) || \
            $(dt_nodelabel_has_compat,dppic0,$(DT_COMPAT_NORDIC_NRF_DPPIC)))

to keep backward compatibility

Copy link
Member

Choose a reason for hiding this comment

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

I haven't suggested changing a label but adding another one: dppic: dppic0: dppic@....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll address this in a follow up commit then. I want to avoid adding more changes here, as it will block further activities related to nrfx v3.9.

select NRFX_DPPI

config NRFX_DPPI00
bool "DPPI00 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,dppic00,$(DT_COMPAT_NORDIC_NRF_DPPIC))
select NRFX_DPPI

config NRFX_DPPI10
bool "DPPI10 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,dppic10,$(DT_COMPAT_NORDIC_NRF_DPPIC))
select NRFX_DPPI

config NRFX_DPPI20
bool "DPPI20 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,dppic20,$(DT_COMPAT_NORDIC_NRF_DPPIC))
select NRFX_DPPI

config NRFX_DPPI30
bool "DPPI30 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,dppic30,$(DT_COMPAT_NORDIC_NRF_DPPIC))
select NRFX_DPPI

config NRFX_DPPI020
bool "DPPI020 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,dppic020,$(DT_COMPAT_NORDIC_NRF_DPPIC_LOCAL))
select NRFX_DPPI

config NRFX_DPPI120
bool "DPPI120 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,dppic120,$(DT_COMPAT_NORDIC_NRF_DPPIC_GLOBAL))
select NRFX_DPPI

config NRFX_DPPI130
bool "DPPI130 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,dppic130,$(DT_COMPAT_NORDIC_NRF_DPPIC_GLOBAL))
select NRFX_DPPI

config NRFX_DPPI131
bool "DPPI131 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,dppic131,$(DT_COMPAT_NORDIC_NRF_DPPIC_GLOBAL))
select NRFX_DPPI

config NRFX_DPPI132
bool "DPPI132 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,dppic132,$(DT_COMPAT_NORDIC_NRF_DPPIC_GLOBAL))
select NRFX_DPPI

config NRFX_DPPI133
bool "DPPI133 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,dppic133,$(DT_COMPAT_NORDIC_NRF_DPPIC_GLOBAL))
select NRFX_DPPI

config NRFX_DPPI134
bool "DPPI134 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,dppic134,$(DT_COMPAT_NORDIC_NRF_DPPIC_GLOBAL))
select NRFX_DPPI

config NRFX_DPPI135
bool "DPPI135 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,dppic135,$(DT_COMPAT_NORDIC_NRF_DPPIC_GLOBAL))
select NRFX_DPPI

config NRFX_DPPI136
bool "DPPI136 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,dppic136,$(DT_COMPAT_NORDIC_NRF_DPPIC_GLOBAL))
select NRFX_DPPI

Expand Down Expand Up @@ -192,6 +206,12 @@ config NRFX_GPIOTE_NUM_OF_EVT_HANDLERS
Specifies number of handlers that can be registered to nrfx_gpiote driver
by the user.

config NRFX_GPPI
bool "Generic PPI layer"
help
Enable the nrfx_gppi utilities providing unified API for creating PPI
connections across SoC families.

config NRFX_GRTC
bool "GRTC driver"
depends on $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF_GRTC))
Expand Down Expand Up @@ -257,48 +277,57 @@ config NRFX_POWER

config NRFX_PPI
bool "PPI allocator"
default y if NRFX_GPPI
depends on $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF_PPI))

config NRFX_PPIB
bool

config NRFX_PPIB00
bool "PPIB00 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,ppib00,$(DT_COMPAT_NORDIC_NRF_PPIB))
select NRFX_PPIB

config NRFX_PPIB01
bool "PPIB01 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,ppib01,$(DT_COMPAT_NORDIC_NRF_PPIB))
select NRFX_PPIB

config NRFX_PPIB10
bool "PPIB10 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,ppib10,$(DT_COMPAT_NORDIC_NRF_PPIB))
select NRFX_PPIB

config NRFX_PPIB11
bool "PPIB11 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,ppib11,$(DT_COMPAT_NORDIC_NRF_PPIB))
select NRFX_PPIB

config NRFX_PPIB20
bool "PPIB20 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,ppib20,$(DT_COMPAT_NORDIC_NRF_PPIB))
select NRFX_PPIB

config NRFX_PPIB21
bool "PPIB21 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,ppib21,$(DT_COMPAT_NORDIC_NRF_PPIB))
select NRFX_PPIB

config NRFX_PPIB22
bool "PPIB22 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,ppib22,$(DT_COMPAT_NORDIC_NRF_PPIB))
select NRFX_PPIB

config NRFX_PPIB30
bool "PPIB30 driver instance"
default y if NRFX_GPPI
depends on $(dt_nodelabel_has_compat,ppib30,$(DT_COMPAT_NORDIC_NRF_PPIB))
select NRFX_PPIB

Expand Down
6 changes: 0 additions & 6 deletions samples/boards/nordic/nrfx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@

source "Kconfig.zephyr"

config NRFX_DPPI
default $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF_DPPIC))

config NRFX_PPI
default $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF_PPI))

config NRFX_GPIOTE0
default y if SOC_SERIES_NRF51X || \
SOC_SERIES_NRF52X || \
Expand Down
1 change: 1 addition & 0 deletions samples/boards/nordic/nrfx/prj.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG_GPIO=n
CONFIG_LOG=y
CONFIG_LOG_PROCESS_THREAD_SLEEP_MS=100
CONFIG_NRFX_GPPI=y
2 changes: 1 addition & 1 deletion soc/nordic/nrf53/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ config SOC_NRF53_ANOMALY_168_WORKAROUND_FOR_EXECUTION_FROM_RAM
config SOC_NRF53_RTC_PRETICK
bool "Pre-tick workaround for nRF5340 anomaly 165"
depends on (SYS_CLOCK_EXISTS && SOC_NRF5340_CPUNET) || SOC_NRF5340_CPUAPP
select NRFX_DPPI
select NRFX_GPPI
select ARM_ON_ENTER_CPU_IDLE_HOOK if SOC_NRF5340_CPUNET
select ARM_ON_ENTER_CPU_IDLE_PREPARE_HOOK if SOC_NRF5340_CPUNET
help
Expand Down
2 changes: 1 addition & 1 deletion soc/nordic/nrf53/Kconfig.sync_rtc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ config NRF53_SYNC_RTC
bool "RTC clock synchronization"
default y if LOG && !LOG_MODE_MINIMAL
depends on NRF_RTC_TIMER
select NRFX_DPPI
select NRFX_GPPI
select MBOX if !IPM

if NRF53_SYNC_RTC
Expand Down
Loading