diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 16f906632..becbc5069 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -161,8 +161,8 @@ jobs:
- name: Build
run: |
- west build -b pca10056 -d examples/device/cdc_msc/build examples/device/cdc_msc -- -DRTOS=zephyr
- west build -b pca10056 -d examples/device/msc_dual_lun/build examples/device/msc_dual_lun -- -DRTOS=zephyr
+ west build -b nrf52840dk -d examples/device/cdc_msc/build examples/device/cdc_msc -- -DRTOS=zephyr
+ west build -b nrf52840dk -d examples/device/msc_dual_lun/build examples/device/msc_dual_lun -- -DRTOS=zephyr
# ---------------------------------------
# Hardware in the loop (HIL)
diff --git a/.idea/debugServers/lpc1769.xml b/.idea/debugServers/lpc1769.xml
new file mode 100644
index 000000000..4acfe6afe
--- /dev/null
+++ b/.idea/debugServers/lpc1769.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/debugServers/lpc55s69.xml b/.idea/debugServers/lpc55s69.xml
new file mode 100644
index 000000000..ceedab0af
--- /dev/null
+++ b/.idea/debugServers/lpc55s69.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/debugServers/nrf52833.xml b/.idea/debugServers/nrf52833.xml
new file mode 100644
index 000000000..09d2ae3d3
--- /dev/null
+++ b/.idea/debugServers/nrf52833.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/debugServers/nrf5340.xml b/.idea/debugServers/nrf5340.xml
new file mode 100644
index 000000000..ac3bd59fa
--- /dev/null
+++ b/.idea/debugServers/nrf5340.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/debugServers/stm32f411.xml b/.idea/debugServers/stm32f411.xml
new file mode 100644
index 000000000..2bcdf3829
--- /dev/null
+++ b/.idea/debugServers/stm32f411.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/reference/boards.rst b/docs/reference/boards.rst
index 3f8277247..e668e2693 100644
--- a/docs/reference/boards.rst
+++ b/docs/reference/boards.rst
@@ -202,10 +202,11 @@ circuitplayground_bluefruit Adafruit Circuit Playground Bluefruit nrf ht
feather_nrf52840_express Adafruit Feather nRF52840 Express nrf https://www.adafruit.com/product/4062
feather_nrf52840_sense Adafruit Feather nRF52840 Sense nrf https://www.adafruit.com/product/4516
itsybitsy_nrf52840 Adafruit ItsyBitsy nRF52840 Express nrf https://www.adafruit.com/product/4481
-pca10056 Nordic nRF52840DK nrf https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK
-pca10059 Nordic nRF52840 Dongle nrf https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-Dongle
-pca10095 Nordic nRF5340 DK nrf https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF5340-DK
-pca10100 Nordic nRF52833 DK nrf https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52833-DK
+nrf52833dk Nordic nRF52833 DK nrf https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52833-DK
+nrf52840dk Nordic nRF52840DK nrf https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK
+nrf52840dongle Nordic nRF52840 Dongle nrf https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-Dongle
+nrf5340dk Nordic nRF5340 DK nrf https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF5340-DK
+nrf54h20dk Nordic nRF54H20 DK nrf https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF5340-DK
=========================== ===================================== ======== ============================================================================== ======
Raspberry Pi
@@ -298,8 +299,8 @@ stm32l4p5nucleo STM32 L4P5 Nucleo stm32l4 https://www.s
stm32l4r5nucleo STM32 L4R5 Nucleo stm32l4 https://www.st.com/en/evaluation-tools/nucleo-l4r5zi.html
stm32n6570dk STM32 N6570-DK stm32n6 https://www.st.com/en/evaluation-tools/stm32n6570-dk.html
stm32n657nucleo STM32 N657X0-Q Nucleo stm32n6 https://www.st.com/en/evaluation-tools/nucleo-n657x0-q.html
+stm32u083cdk STM32U083C-DK Discovery Kit stm32u0 https://www.st.com/en/evaluation-tools/stm32u083c-dk.html
b_u585i_iot2a STM32 B-U585i IOT2A Discovery kit stm32u5 https://www.st.com/en/evaluation-tools/b-u585i-iot02a.html
-stm32u083cdk STM32 U083C Discovery Kit stm32u0 https://www.st.com/en/evaluation-tools/stm32u083c-dk.html
stm32u545nucleo STM32 U545 Nucleo stm32u5 https://www.st.com/en/evaluation-tools/nucleo-u545re-q.html
stm32u575eval STM32 U575 Eval stm32u5 https://www.st.com/en/evaluation-tools/stm32u575i-ev.html
stm32u575nucleo STM32 U575 Nucleo stm32u5 https://www.st.com/en/evaluation-tools/nucleo-u575zi-q.html
diff --git a/docs/reference/dependencies.rst b/docs/reference/dependencies.rst
index 1a088c989..9ca9b0b54 100644
--- a/docs/reference/dependencies.rst
+++ b/docs/reference/dependencies.rst
@@ -22,7 +22,7 @@ hw/mcu/gd/nuclei-sdk https://github.com/Nuclei-Software/nuc
hw/mcu/infineon/mtb-xmclib-cat3 https://github.com/Infineon/mtb-xmclib-cat3.git daf5500d03cba23e68c2f241c30af79cd9d63880 xmc4000
hw/mcu/microchip https://github.com/hathach/microchip_driver.git 9e8b37e307d8404033bb881623a113931e1edf27 sam3x samd11 samd21 samd51 samd5x_e5x same5x same7x saml2x samg
hw/mcu/mindmotion/mm32sdk https://github.com/hathach/mm32sdk.git b93e856211060ae825216c6a1d6aa347ec758843 mm32
-hw/mcu/nordic/nrfx https://github.com/NordicSemiconductor/nrfx.git 7c47cc0a56ce44658e6da2458e86cd8783ccc4a2 nrf
+hw/mcu/nordic/nrfx https://github.com/NordicSemiconductor/nrfx.git 11f57e578c7feea13f21c79ea0efab2630ac68c7 nrf
hw/mcu/nuvoton https://github.com/majbthrd/nuc_driver.git 2204191ec76283371419fbcec207da02e1bc22fa nuc
hw/mcu/nxp/lpcopen https://github.com/hathach/nxp_lpcopen.git b41cf930e65c734d8ec6de04f1d57d46787c76ae lpc11 lpc13 lpc15 lpc17 lpc18 lpc40 lpc43
hw/mcu/nxp/mcux-sdk https://github.com/nxp-mcuxpresso/mcux-sdk a1bdae309a14ec95a4f64a96d3315a4f89c397c6 kinetis_k kinetis_k32l2 kinetis_kl lpc51 lpc54 lpc55 mcx imxrt
diff --git a/hw/bsp/nrf/boards/adafruit_clue/board.mk b/hw/bsp/nrf/boards/adafruit_clue/board.mk
index b80807963..e6fcdd9b0 100644
--- a/hw/bsp/nrf/boards/adafruit_clue/board.mk
+++ b/hw/bsp/nrf/boards/adafruit_clue/board.mk
@@ -2,7 +2,7 @@ MCU_VARIANT = nrf52840
CFLAGS += -DNRF52840_XXAA
# All source paths should be relative to the top level.
-LD_FILE = hw/bsp/nrf/linker/nrf52840_s140_v6.ld
+LD_FILE = ${FAMILY_PATH}/linker/nrf52840_s140_v6.ld
$(BUILD)/$(PROJECT).zip: $(BUILD)/$(PROJECT).hex
adafruit-nrfutil dfu genpkg --dev-type 0x0052 --sd-req 0xFFFE --application $^ $@
diff --git a/hw/bsp/nrf/boards/circuitplayground_bluefruit/board.mk b/hw/bsp/nrf/boards/circuitplayground_bluefruit/board.mk
index b80807963..e6fcdd9b0 100644
--- a/hw/bsp/nrf/boards/circuitplayground_bluefruit/board.mk
+++ b/hw/bsp/nrf/boards/circuitplayground_bluefruit/board.mk
@@ -2,7 +2,7 @@ MCU_VARIANT = nrf52840
CFLAGS += -DNRF52840_XXAA
# All source paths should be relative to the top level.
-LD_FILE = hw/bsp/nrf/linker/nrf52840_s140_v6.ld
+LD_FILE = ${FAMILY_PATH}/linker/nrf52840_s140_v6.ld
$(BUILD)/$(PROJECT).zip: $(BUILD)/$(PROJECT).hex
adafruit-nrfutil dfu genpkg --dev-type 0x0052 --sd-req 0xFFFE --application $^ $@
diff --git a/hw/bsp/nrf/boards/feather_nrf52840_express/board.mk b/hw/bsp/nrf/boards/feather_nrf52840_express/board.mk
index 488f07b82..d33b3558a 100644
--- a/hw/bsp/nrf/boards/feather_nrf52840_express/board.mk
+++ b/hw/bsp/nrf/boards/feather_nrf52840_express/board.mk
@@ -5,7 +5,7 @@ CFLAGS += -DNRF52840_XXAA
MAX3421_HOST = 1
# All source paths should be relative to the top level.
-LD_FILE = hw/bsp/nrf/linker/nrf52840_s140_v6.ld
+LD_FILE = ${FAMILY_PATH}/linker/nrf52840_s140_v6.ld
$(BUILD)/$(PROJECT).zip: $(BUILD)/$(PROJECT).hex
adafruit-nrfutil dfu genpkg --dev-type 0x0052 --sd-req 0xFFFE --application $^ $@
diff --git a/hw/bsp/nrf/boards/feather_nrf52840_sense/board.mk b/hw/bsp/nrf/boards/feather_nrf52840_sense/board.mk
index b80807963..e6fcdd9b0 100644
--- a/hw/bsp/nrf/boards/feather_nrf52840_sense/board.mk
+++ b/hw/bsp/nrf/boards/feather_nrf52840_sense/board.mk
@@ -2,7 +2,7 @@ MCU_VARIANT = nrf52840
CFLAGS += -DNRF52840_XXAA
# All source paths should be relative to the top level.
-LD_FILE = hw/bsp/nrf/linker/nrf52840_s140_v6.ld
+LD_FILE = ${FAMILY_PATH}/linker/nrf52840_s140_v6.ld
$(BUILD)/$(PROJECT).zip: $(BUILD)/$(PROJECT).hex
adafruit-nrfutil dfu genpkg --dev-type 0x0052 --sd-req 0xFFFE --application $^ $@
diff --git a/hw/bsp/nrf/boards/itsybitsy_nrf52840/board.mk b/hw/bsp/nrf/boards/itsybitsy_nrf52840/board.mk
index b80807963..e6fcdd9b0 100644
--- a/hw/bsp/nrf/boards/itsybitsy_nrf52840/board.mk
+++ b/hw/bsp/nrf/boards/itsybitsy_nrf52840/board.mk
@@ -2,7 +2,7 @@ MCU_VARIANT = nrf52840
CFLAGS += -DNRF52840_XXAA
# All source paths should be relative to the top level.
-LD_FILE = hw/bsp/nrf/linker/nrf52840_s140_v6.ld
+LD_FILE = ${FAMILY_PATH}/linker/nrf52840_s140_v6.ld
$(BUILD)/$(PROJECT).zip: $(BUILD)/$(PROJECT).hex
adafruit-nrfutil dfu genpkg --dev-type 0x0052 --sd-req 0xFFFE --application $^ $@
diff --git a/hw/bsp/nrf/boards/pca10100/board.cmake b/hw/bsp/nrf/boards/nrf52833dk/board.cmake
similarity index 100%
rename from hw/bsp/nrf/boards/pca10100/board.cmake
rename to hw/bsp/nrf/boards/nrf52833dk/board.cmake
diff --git a/hw/bsp/nrf/boards/pca10100/board.h b/hw/bsp/nrf/boards/nrf52833dk/board.h
similarity index 100%
rename from hw/bsp/nrf/boards/pca10100/board.h
rename to hw/bsp/nrf/boards/nrf52833dk/board.h
diff --git a/hw/bsp/nrf/boards/pca10100/board.mk b/hw/bsp/nrf/boards/nrf52833dk/board.mk
similarity index 64%
rename from hw/bsp/nrf/boards/pca10100/board.mk
rename to hw/bsp/nrf/boards/nrf52833dk/board.mk
index 5fba269b7..7cf00cbc1 100644
--- a/hw/bsp/nrf/boards/pca10100/board.mk
+++ b/hw/bsp/nrf/boards/nrf52833dk/board.mk
@@ -1,7 +1,7 @@
MCU_VARIANT = nrf52833
CFLAGS += -DNRF52833_XXAA
-LD_FILE = hw/mcu/nordic/nrfx/mdk/nrf52833_xxaa.ld
+LD_FILE = ${FAMILY_PATH}/linker/nrf52833_xxaa.ld
# flash using jlink
flash: flash-jlink
diff --git a/hw/bsp/nrf/boards/pca10056/board.cmake b/hw/bsp/nrf/boards/nrf52840dk/board.cmake
similarity index 100%
rename from hw/bsp/nrf/boards/pca10056/board.cmake
rename to hw/bsp/nrf/boards/nrf52840dk/board.cmake
diff --git a/hw/bsp/nrf/boards/pca10056/board.h b/hw/bsp/nrf/boards/nrf52840dk/board.h
similarity index 100%
rename from hw/bsp/nrf/boards/pca10056/board.h
rename to hw/bsp/nrf/boards/nrf52840dk/board.h
diff --git a/hw/bsp/nrf/boards/pca10056/board.mk b/hw/bsp/nrf/boards/nrf52840dk/board.mk
similarity index 63%
rename from hw/bsp/nrf/boards/pca10056/board.mk
rename to hw/bsp/nrf/boards/nrf52840dk/board.mk
index be2ed3314..d8bbd41f8 100644
--- a/hw/bsp/nrf/boards/pca10056/board.mk
+++ b/hw/bsp/nrf/boards/nrf52840dk/board.mk
@@ -1,7 +1,5 @@
MCU_VARIANT = nrf52840
CFLAGS += -DNRF52840_XXAA
-LD_FILE = hw/mcu/nordic/nrfx/mdk/nrf52840_xxaa.ld
-
# flash using jlink
flash: flash-jlink
diff --git a/hw/bsp/nrf/boards/pca10056/ozone/nrf52840.jdebug b/hw/bsp/nrf/boards/nrf52840dk/ozone/nrf52840.jdebug
similarity index 100%
rename from hw/bsp/nrf/boards/pca10056/ozone/nrf52840.jdebug
rename to hw/bsp/nrf/boards/nrf52840dk/ozone/nrf52840.jdebug
diff --git a/hw/bsp/nrf/boards/pca10059/board.cmake b/hw/bsp/nrf/boards/nrf52840dongle/board.cmake
similarity index 56%
rename from hw/bsp/nrf/boards/pca10059/board.cmake
rename to hw/bsp/nrf/boards/nrf52840dongle/board.cmake
index c79eb5964..5ec769192 100644
--- a/hw/bsp/nrf/boards/pca10059/board.cmake
+++ b/hw/bsp/nrf/boards/nrf52840dongle/board.cmake
@@ -1,5 +1,5 @@
set(MCU_VARIANT nrf52840)
-set(LD_FILE_GNU ${CMAKE_CURRENT_LIST_DIR}/pca10059.ld)
+set(LD_FILE_GNU ${CMAKE_CURRENT_LIST_DIR}/${BOARD}.ld)
function(update_board TARGET)
endfunction()
diff --git a/hw/bsp/nrf/boards/pca10059/board.h b/hw/bsp/nrf/boards/nrf52840dongle/board.h
similarity index 100%
rename from hw/bsp/nrf/boards/pca10059/board.h
rename to hw/bsp/nrf/boards/nrf52840dongle/board.h
diff --git a/hw/bsp/nrf/boards/pca10059/board.mk b/hw/bsp/nrf/boards/nrf52840dongle/board.mk
similarity index 100%
rename from hw/bsp/nrf/boards/pca10059/board.mk
rename to hw/bsp/nrf/boards/nrf52840dongle/board.mk
diff --git a/hw/bsp/nrf/boards/pca10059/pca10059.ld b/hw/bsp/nrf/boards/nrf52840dongle/nrf52840dongle.ld
similarity index 57%
rename from hw/bsp/nrf/boards/pca10059/pca10059.ld
rename to hw/bsp/nrf/boards/nrf52840dongle/nrf52840dongle.ld
index adc80f3c4..32cc6eada 100644
--- a/hw/bsp/nrf/boards/pca10059/pca10059.ld
+++ b/hw/bsp/nrf/boards/nrf52840dongle/nrf52840dongle.ld
@@ -11,9 +11,3 @@ MEMORY
INCLUDE "nrf_common.ld"
-
-/* nrfx v2 linker does not define __tbss_start/end__ __sbss_start/end__*/
-__tbss_start__ = __tbss_start;
-__tbss_end__ = __tbss_end;
-__sbss_start__ = __sbss_start;
-__sbss_end__ = __sbss_end;
diff --git a/hw/bsp/nrf/boards/nrf5340dk/board.cmake b/hw/bsp/nrf/boards/nrf5340dk/board.cmake
new file mode 100644
index 000000000..fe766dd78
--- /dev/null
+++ b/hw/bsp/nrf/boards/nrf5340dk/board.cmake
@@ -0,0 +1,4 @@
+set(MCU_VARIANT nrf5340)
+
+function(update_board TARGET)
+endfunction()
diff --git a/hw/bsp/nrf/boards/pca10095/board.h b/hw/bsp/nrf/boards/nrf5340dk/board.h
similarity index 100%
rename from hw/bsp/nrf/boards/pca10095/board.h
rename to hw/bsp/nrf/boards/nrf5340dk/board.h
diff --git a/hw/bsp/nrf/boards/pca10095/board.mk b/hw/bsp/nrf/boards/nrf5340dk/board.mk
similarity index 64%
rename from hw/bsp/nrf/boards/pca10095/board.mk
rename to hw/bsp/nrf/boards/nrf5340dk/board.mk
index 20580d619..972168fcd 100644
--- a/hw/bsp/nrf/boards/pca10095/board.mk
+++ b/hw/bsp/nrf/boards/nrf5340dk/board.mk
@@ -1,14 +1,9 @@
-CPU_CORE = cortex-m33
-MCU_VARIANT = nrf5340_application
+MCU_VARIANT = nrf5340
CFLAGS += -DNRF5340_XXAA -DNRF5340_XXAA_APPLICATION
# enable max3421 host driver for this board
MAX3421_HOST = 1
-LD_FILE = hw/mcu/nordic/nrfx/mdk/nrf5340_xxaa_application.ld
-
-SRC_C += hw/mcu/nordic/nrfx/drivers/src/nrfx_usbreg.c
-
# caused by void SystemStoreFICRNS() (without void) in system_nrf5340_application.c
CFLAGS += -Wno-error=strict-prototypes
diff --git a/hw/bsp/nrf/boards/pca10095/ozone/nrf5340.jdebug b/hw/bsp/nrf/boards/nrf5340dk/ozone/nrf5340.jdebug
similarity index 100%
rename from hw/bsp/nrf/boards/pca10095/ozone/nrf5340.jdebug
rename to hw/bsp/nrf/boards/nrf5340dk/ozone/nrf5340.jdebug
diff --git a/hw/bsp/nrf/boards/nrf54h20dk/board.cmake b/hw/bsp/nrf/boards/nrf54h20dk/board.cmake
new file mode 100644
index 000000000..fca7a56d2
--- /dev/null
+++ b/hw/bsp/nrf/boards/nrf54h20dk/board.cmake
@@ -0,0 +1,11 @@
+set(MCU_VARIANT nrf54h20)
+
+function(update_board TARGET)
+ # temporarily, 54h20 has multiple sram sections
+ target_compile_definitions(${TARGET} PUBLIC
+ CFG_EXAMPLE_VIDEO_READONLY
+ )
+ target_sources(${TARGET} PRIVATE
+# ${NRFX_PATH}/drivers/src/nrfx_usbreg.c
+ )
+endfunction()
diff --git a/hw/bsp/nrf/boards/nrf54h20dk/board.h b/hw/bsp/nrf/boards/nrf54h20dk/board.h
new file mode 100644
index 000000000..c8ed5779f
--- /dev/null
+++ b/hw/bsp/nrf/boards/nrf54h20dk/board.h
@@ -0,0 +1,65 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020, Ha Thach (tinyusb.org)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * This file is part of the TinyUSB stack.
+ */
+
+/* metadata:
+ name: Nordic nRF54H20 DK
+ url: https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF5340-DK
+*/
+
+#ifndef BOARD_H_
+#define BOARD_H_
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+#define _PINNUM(port, pin) ((port)*32 + (pin))
+
+// LED
+#define LED_PIN 28
+#define LED_STATE_ON 0
+
+// Button
+#define BUTTON_PIN 23
+#define BUTTON_STATE_ACTIVE 0
+
+// UART
+#define UART_RX_PIN 22
+#define UART_TX_PIN 20
+
+// SPI for USB host shield
+// Pin is correct but not working probably due to signal incompatible (1.8V 3v3) with MAC3421E !?
+//#define MAX3421_SCK_PIN _PINNUM(1, 15)
+//#define MAX3421_MOSI_PIN _PINNUM(1, 13)
+//#define MAX3421_MISO_PIN _PINNUM(1, 14)
+//#define MAX3421_CS_PIN _PINNUM(1, 12)
+//#define MAX3421_INTR_PIN _PINNUM(1, 11)
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif /* BOARD_H_ */
diff --git a/hw/bsp/nrf/boards/nrf54h20dk/board.mk b/hw/bsp/nrf/boards/nrf54h20dk/board.mk
new file mode 100644
index 000000000..c49b605e8
--- /dev/null
+++ b/hw/bsp/nrf/boards/nrf54h20dk/board.mk
@@ -0,0 +1,12 @@
+MCU_VARIANT = nrf54h20
+CFLAGS += -DNRF54H20_XXAA
+
+# enable max3421 host driver for this board
+MAX3421_HOST = 1
+
+# caused by void SystemStoreFICRNS() (without void) in system_nrf5340_application.c
+CFLAGS += -Wno-error=strict-prototypes
+
+# flash using jlink
+JLINK_DEVICE = nrf5340_xxaa_app
+flash: flash-jlink
diff --git a/hw/bsp/nrf/boards/pca10095/board.cmake b/hw/bsp/nrf/boards/pca10095/board.cmake
deleted file mode 100644
index 6d183dde6..000000000
--- a/hw/bsp/nrf/boards/pca10095/board.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-set(MCU_VARIANT nrf5340_application)
-
-function(update_board TARGET)
- target_sources(${TARGET} PRIVATE
- ${NRFX_PATH}/drivers/src/nrfx_usbreg.c
- )
-endfunction()
diff --git a/hw/bsp/nrf/family.c b/hw/bsp/nrf/family.c
index 298ca2302..0221da083 100644
--- a/hw/bsp/nrf/family.c
+++ b/hw/bsp/nrf/family.c
@@ -45,7 +45,9 @@
#include "nrfx.h"
#include "hal/nrf_gpio.h"
#include "nrfx_gpiote.h"
+#if !defined(NRF54H20_XXAA)
#include "nrfx_power.h"
+#endif
#include "nrfx_uarte.h"
#include "nrfx_spim.h"
@@ -58,21 +60,12 @@
#pragma GCC diagnostic pop
#endif
-
-// There is API changes between nrfx v2 and v3
-#if 85301 >= (10000*MDK_MAJOR_VERSION + 100*MDK_MINOR_VERSION + MDK_MICRO_VERSION)
- // note MDK 8.53.1 is also used by nrfx v3.0.0, just skip this version and use later 3.x
- #define NRFX_VER 2
-#else
- #define NRFX_VER 3
+// example only supports nrfx v3 for code simplicity
+#if !(defined(NRFX_CONFIG_API_VER_MAJOR) && NRFX_CONFIG_API_VER_MAJOR >= 3) && \
+ !(85301 >= (10000*MDK_MAJOR_VERSION + 100*MDK_MINOR_VERSION + MDK_MICRO_VERSION))
+ #error "Example requires nrfx v3.0.0 or later"
#endif
-//--------------------------------------------------------------------+
-// Forward USB interrupt events to TinyUSB IRQ Handler
-//--------------------------------------------------------------------+
-void USBD_IRQHandler(void) {
- tud_int_handler(0);
-}
/*------------------------------------------------------------------*/
/* MACRO TYPEDEF CONSTANT ENUM
@@ -85,50 +78,69 @@ enum {
USB_EVT_READY = 2
};
-#ifdef NRF5340_XXAA
- #define LFCLK_SRC_RC CLOCK_LFCLKSRC_SRC_LFRC
- #define VBUSDETECT_Msk USBREG_USBREGSTATUS_VBUSDETECT_Msk
- #define OUTPUTRDY_Msk USBREG_USBREGSTATUS_OUTPUTRDY_Msk
- #define GPIOTE_IRQn GPIOTE1_IRQn
+// Forward USB interrupt events to TinyUSB IRQ Handler
+#if defined(NRF54H20_XXAA)
+#define USBD_IRQn USBHS_IRQn
+void USBHS_IRQHandler(void) {
+ tusb_int_handler(0, true);
+}
+
+static nrfx_uarte_t _uart_id = NRFX_UARTE_INSTANCE(120);
+
#else
- #define LFCLK_SRC_RC CLOCK_LFCLKSRC_SRC_RC
- #define VBUSDETECT_Msk POWER_USBREGSTATUS_VBUSDETECT_Msk
- #define OUTPUTRDY_Msk POWER_USBREGSTATUS_OUTPUTRDY_Msk
+
+#ifdef NRF5340_XXAA
+#define LFCLK_SRC_RC CLOCK_LFCLKSRC_SRC_LFRC
+#define VBUSDETECT_Msk USBREG_USBREGSTATUS_VBUSDETECT_Msk
+#define OUTPUTRDY_Msk USBREG_USBREGSTATUS_OUTPUTRDY_Msk
+#define GPIOTE_IRQn GPIOTE1_IRQn
+#else
+#define LFCLK_SRC_RC CLOCK_LFCLKSRC_SRC_RC
+#define VBUSDETECT_Msk POWER_USBREGSTATUS_VBUSDETECT_Msk
+#define OUTPUTRDY_Msk POWER_USBREGSTATUS_OUTPUTRDY_Msk
#endif
static nrfx_uarte_t _uart_id = NRFX_UARTE_INSTANCE(0);
+void USBD_IRQHandler(void) {
+ tud_int_handler(0);
+}
+#endif
+
+
+
+
// tinyusb function that handles power event (detected, ready, removed)
// We must call it within SD's SOC event handler, or set it as power event handler if SD is not enabled.
extern void tusb_hal_nrf_power_event(uint32_t event);
+#if !defined(NRF54H20_XXAA)
// nrf power callback, could be unused if SD is enabled or usb is disabled (board_test example)
TU_ATTR_UNUSED static void power_event_handler(nrfx_power_usb_evt_t event) {
tusb_hal_nrf_power_event((uint32_t) event);
}
+#endif
//------------- Host using MAX2341E -------------//
#if CFG_TUH_ENABLED && defined(CFG_TUH_MAX3421) && CFG_TUH_MAX3421
static void max3421_init(void);
static nrfx_spim_t _spi = NRFX_SPIM_INSTANCE(1);
-
-#if NRFX_VER > 2
static nrfx_gpiote_t _gpiote = NRFX_GPIOTE_INSTANCE(0);
#endif
-#endif
-
//--------------------------------------------------------------------+
//
//--------------------------------------------------------------------+
void board_init(void) {
+#if !defined(NRF54H20_XXAA)
// stop LF clock just in case we jump from application without reset
NRF_CLOCK->TASKS_LFCLKSTOP = 1UL;
// Use Internal OSC to compatible with all boards
NRF_CLOCK->LFCLKSRC = LFCLK_SRC_RC;
NRF_CLOCK->TASKS_LFCLKSTART = 1UL;
+#endif
// LED
nrf_gpio_cfg_output(LED_PIN);
@@ -140,6 +152,7 @@ void board_init(void) {
#if CFG_TUSB_OS == OPT_OS_NONE
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
+
#elif CFG_TUSB_OS == OPT_OS_ZEPHYR
#ifdef CONFIG_HAS_HW_NRF_USBREG
// IRQ_CONNECT(USBREGULATOR_IRQn, DT_IRQ(DT_INST(0, nordic_nrf_clock), priority), nrfx_isr, nrfx_usbreg_irq_handler, 0);
@@ -153,21 +166,6 @@ void board_init(void) {
#endif
// UART
- #if NRFX_VER <= 2
- nrfx_uarte_config_t uart_cfg = {
- .pseltxd = UART_TX_PIN,
- .pselrxd = UART_RX_PIN,
- .pselcts = NRF_UARTE_PSEL_DISCONNECTED,
- .pselrts = NRF_UARTE_PSEL_DISCONNECTED,
- .p_context = NULL,
- .baudrate = NRF_UARTE_BAUDRATE_115200, // CFG_BOARD_UART_BAUDRATE
- .interrupt_priority = 7,
- .hal_cfg = {
- .hwfc = NRF_UARTE_HWFC_DISABLED,
- .parity = NRF_UARTE_PARITY_EXCLUDED,
- }
- };
- #else
nrfx_uarte_config_t uart_cfg = {
.txd_pin = UART_TX_PIN,
.rxd_pin = UART_RX_PIN,
@@ -181,7 +179,6 @@ void board_init(void) {
.parity = NRF_UARTE_PARITY_EXCLUDED,
}
};
- #endif
nrfx_uarte_init(&_uart_id, &uart_cfg, NULL);
@@ -191,6 +188,7 @@ void board_init(void) {
// 2 is highest for application
NVIC_SetPriority(USBD_IRQn, 2);
+#if !defined(NRF54H20_XXAA)
// USB power may already be ready at this time -> no event generated
// We need to invoke the handler based on the status initially
uint32_t usb_reg;
@@ -234,6 +232,7 @@ void board_init(void) {
tusb_hal_nrf_power_event(USB_EVT_READY);
}
#endif
+#endif
#if CFG_TUH_ENABLED && defined(CFG_TUH_MAX3421) && CFG_TUH_MAX3421
max3421_init();
@@ -255,7 +254,9 @@ uint32_t board_button_read(void) {
size_t board_get_unique_id(uint8_t id[], size_t max_len) {
(void) max_len;
-#ifdef NRF5340_XXAA
+#if defined(NRF54H20_XXAA)
+ uintptr_t did_addr = (uintptr_t) NRF_FICR->BLE.ADDR;
+#elif defined(NRF5340_XXAA)
uintptr_t did_addr = (uintptr_t) NRF_FICR->INFO.DEVICEID;
#else
uintptr_t did_addr = (uintptr_t) NRF_FICR->DEVICEID;
@@ -277,11 +278,7 @@ int board_uart_read(uint8_t* buf, int len) {
}
int board_uart_write(void const* buf, int len) {
- nrfx_err_t err = nrfx_uarte_tx(&_uart_id, (uint8_t const*) buf, (size_t) len
- #if NRFX_VER > 2
- ,0
- #endif
- );
+ nrfx_err_t err = nrfx_uarte_tx(&_uart_id, (uint8_t const*) buf, (size_t) len ,0);
return (NRFX_SUCCESS == err) ? len : 0;
}
@@ -352,18 +349,16 @@ void nrf_error_cb(uint32_t id, uint32_t pc, uint32_t info) {
// API: SPI transfer with MAX3421E, must be implemented by application
//--------------------------------------------------------------------+
#if CFG_TUH_ENABLED && defined(CFG_TUH_MAX3421) && CFG_TUH_MAX3421
-
-#if NRFX_VER <= 2
-void max3421_int_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action ) {
- if (action != NRF_GPIOTE_POLARITY_HITOLO) return;
-#else
void max3421_int_handler(nrfx_gpiote_pin_t pin, nrfx_gpiote_trigger_t action, void* p_context) {
(void) p_context;
- if (action != NRFX_GPIOTE_TRIGGER_HITOLO) return;
-#endif
+ if (action != NRFX_GPIOTE_TRIGGER_HITOLO) {
+ return;
+ }
+ if (pin != MAX3421_INTR_PIN) {
+ return;
+ }
- if (pin != MAX3421_INTR_PIN) return;
- tuh_int_handler(1, true);
+ tusb_int_handler(1, true);
}
static void max3421_init(void) {
@@ -378,13 +373,8 @@ static void max3421_init(void) {
.sck_pin = MAX3421_SCK_PIN,
.mosi_pin = MAX3421_MOSI_PIN,
.miso_pin = MAX3421_MISO_PIN,
- #if NRFX_VER <= 2
- .ss_pin = NRFX_SPIM_PIN_NOT_USED,
- .frequency = NRF_SPIM_FREQ_4M,
- #else
.ss_pin = NRF_SPIM_PIN_NOT_CONNECTED,
.frequency = 4000000u,
- #endif
.ss_active_high = false,
.irq_priority = 3,
.orc = 0xFF,
@@ -398,14 +388,6 @@ static void max3421_init(void) {
TU_ASSERT(NRFX_SUCCESS == nrfx_spim_init(&_spi, &cfg, NULL, NULL), );
// max3421e interrupt pin
- #if NRFX_VER <= 2
- nrfx_gpiote_init(1);
- nrfx_gpiote_in_config_t in_config = NRFX_GPIOTE_CONFIG_IN_SENSE_HITOLO(true);
- in_config.pull = NRF_GPIO_PIN_PULLUP;
- NVIC_SetPriority(GPIOTE_IRQn, 2);
- nrfx_gpiote_in_init(MAX3421_INTR_PIN, &in_config, max3421_int_handler);
- nrfx_gpiote_trigger_enable(MAX3421_INTR_PIN, true);
- #else
nrf_gpio_pin_pull_t intr_pull = NRF_GPIO_PIN_PULLUP;
nrfx_gpiote_trigger_config_t intr_trigger = {
.trigger = NRFX_GPIOTE_TRIGGER_HITOLO,
@@ -426,7 +408,6 @@ static void max3421_init(void) {
nrfx_gpiote_input_configure(&_gpiote, MAX3421_INTR_PIN, &intr_config);
nrfx_gpiote_trigger_enable(&_gpiote, MAX3421_INTR_PIN, true);
- #endif
}
// API to enable/disable MAX3421 INTR pin interrupt
diff --git a/hw/bsp/nrf/family.cmake b/hw/bsp/nrf/family.cmake
index 7d0a9f6de..8cebcbedd 100644
--- a/hw/bsp/nrf/family.cmake
+++ b/hw/bsp/nrf/family.cmake
@@ -10,17 +10,21 @@ if (NOT board_cmake_included)
endif ()
# toolchain set up
-if (MCU_VARIANT STREQUAL "nrf5340_application")
+if (MCU_VARIANT STREQUAL nrf5340 OR MCU_VARIANT STREQUAL nrf54h20)
set(CMAKE_SYSTEM_CPU cortex-m33 CACHE INTERNAL "System Processor")
- set(JLINK_DEVICE nrf5340_xxaa_app)
+ set(JLINK_DEVICE ${MCU_VARIANT}_xxaa_app)
else ()
set(CMAKE_SYSTEM_CPU cortex-m4 CACHE INTERNAL "System Processor")
set(JLINK_DEVICE ${MCU_VARIANT}_xxaa)
endif ()
-set(CMAKE_TOOLCHAIN_FILE ${TOP}/examples/build_system/cmake/toolchain/arm_${TOOLCHAIN}.cmake)
+if (MCU_VARIANT STREQUAL "nrf54h20")
+ set(FAMILY_MCUS NRF54 CACHE INTERNAL "")
+else ()
+ set(FAMILY_MCUS NRF5X CACHE INTERNAL "")
+endif ()
-set(FAMILY_MCUS NRF5X CACHE INTERNAL "")
+set(CMAKE_TOOLCHAIN_FILE ${TOP}/examples/build_system/cmake/toolchain/arm_${TOOLCHAIN}.cmake)
#------------------------------------
# BOARD_TARGET
@@ -31,36 +35,47 @@ function(add_board_target BOARD_TARGET)
return()
endif ()
- if (MCU_VARIANT STREQUAL "nrf5340_application")
- set(MCU_VARIANT_XXAA "nrf5340_xxaa_application")
- else ()
- set(MCU_VARIANT_XXAA "${MCU_VARIANT}_xxaa")
- endif ()
-
- if (NOT DEFINED LD_FILE_GNU)
- set(LD_FILE_GNU ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/linker/${MCU_VARIANT_XXAA}.ld)
- endif ()
-
- if (NOT DEFINED STARTUP_FILE_${CMAKE_C_COMPILER_ID})
- set(STARTUP_FILE_GNU ${NRFX_PATH}/mdk/gcc_startup_${MCU_VARIANT}.S)
- set(STARTUP_FILE_Clang ${STARTUP_FILE_GNU})
- endif ()
-
add_library(${BOARD_TARGET} STATIC
${NRFX_PATH}/helpers/nrfx_flag32_allocator.c
${NRFX_PATH}/drivers/src/nrfx_gpiote.c
${NRFX_PATH}/drivers/src/nrfx_power.c
${NRFX_PATH}/drivers/src/nrfx_spim.c
${NRFX_PATH}/drivers/src/nrfx_uarte.c
- ${NRFX_PATH}/mdk/system_${MCU_VARIANT}.c
${NRFX_PATH}/soc/nrfx_atomic.c
- ${STARTUP_FILE_${CMAKE_C_COMPILER_ID}}
)
- string(TOUPPER "${MCU_VARIANT_XXAA}" MCU_VARIANT_XXAA_UPPER)
+
+ if (MCU_VARIANT STREQUAL nrf54h20)
+ set(LD_FILE_GNU_DEFAULT ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/linker/${MCU_VARIANT}_xxaa_application.ld)
+ target_sources(${BOARD_TARGET} PUBLIC
+ ${NRFX_PATH}/mdk/system_nrf54h.c
+ ${NRFX_PATH}/mdk/gcc_startup_${MCU_VARIANT}_application.S
+ )
+ elseif (MCU_VARIANT STREQUAL nrf5340)
+ set(LD_FILE_GNU_DEFAULT ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/linker/${MCU_VARIANT}_xxaa_application.ld)
+ target_sources(${BOARD_TARGET} PUBLIC
+ ${NRFX_PATH}/mdk/system_${MCU_VARIANT}_application.c
+ ${NRFX_PATH}/mdk/gcc_startup_${MCU_VARIANT}_application.S
+ ${NRFX_PATH}/drivers/src/nrfx_usbreg.c
+ )
+ target_compile_definitions(${BOARD_TARGET} PUBLIC NRF5340_XXAA_APPLICATION)
+ else()
+ set(LD_FILE_GNU_DEFAULT ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/linker/${MCU_VARIANT}_xxaa.ld)
+ target_sources(${BOARD_TARGET} PUBLIC
+ ${NRFX_PATH}/mdk/system_${MCU_VARIANT}.c
+ ${NRFX_PATH}/mdk/gcc_startup_${MCU_VARIANT}.S
+ )
+ endif ()
+
+ if (NOT DEFINED LD_FILE_GNU)
+ set(LD_FILE_GNU ${LD_FILE_GNU_DEFAULT})
+ endif ()
+
+ string(TOUPPER ${MCU_VARIANT} MCU_VARIANT_UPPER)
target_compile_definitions(${BOARD_TARGET} PUBLIC
__STARTUP_CLEAR_BSS
CONFIG_GPIO_AS_PINRESET
- ${MCU_VARIANT_XXAA_UPPER}
+ ${MCU_VARIANT_UPPER}_XXAA
+ NRF_APPLICATION
)
if (TRACE_ETM STREQUAL "1")
@@ -137,13 +152,16 @@ function(family_configure_example TARGET RTOS)
endif ()
# Add TinyUSB target and port source
- family_add_tinyusb(${TARGET} OPT_MCU_NRF5X)
+ family_add_tinyusb(${TARGET} OPT_MCU_${FAMILY_MCUS})
target_sources(${TARGET} PRIVATE
${TOP}/src/portable/nordic/nrf5x/dcd_nrf5x.c
+ ${TOP}/src/portable/synopsys/dwc2/dcd_dwc2.c
+ ${TOP}/src/portable/synopsys/dwc2/hcd_dwc2.c
+ ${TOP}/src/portable/synopsys/dwc2/dwc2_common.c
)
# Flashing
-# family_add_bin_hex(${TARGET})
+ # family_add_bin_hex(${TARGET})
family_flash_jlink(${TARGET})
-# family_flash_adafruit_nrfutil(${TARGET})
+ # family_flash_adafruit_nrfutil(${TARGET})
endfunction()
diff --git a/hw/bsp/nrf/family.mk b/hw/bsp/nrf/family.mk
index a8acb1624..2cead99db 100644
--- a/hw/bsp/nrf/family.mk
+++ b/hw/bsp/nrf/family.mk
@@ -4,11 +4,37 @@ NRFX_PATH = hw/mcu/nordic/nrfx
include $(TOP)/$(BOARD_PATH)/board.mk
-# nRF52 is cortex-m4, nRF53 is cortex-m33
-CPU_CORE ?= cortex-m4
+ifeq (${MCU_VARIANT},nrf54h20)
+ CPU_CORE = cortex-m33
+ CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_NRF54
+ LD_FILE_DEFAULT = ${FAMILY_PATH}/linker/${MCU_VARIANT}_xxaa_application.ld
+ SRC_C += ${NRFX_PATH}/mdk/system_nrf54h.c
+ SRC_S += ${NRFX_PATH}/mdk/gcc_startup_$(MCU_VARIANT)_application.S
+ JLINK_DEVICE ?= $(MCU_VARIANT)_xxaa_app
+
+else
+ifeq (${MCU_VARIANT},nrf5340)
+ CPU_CORE = cortex-m33
+ CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_NRF5X
+ LD_FILE_DEFAULT = ${FAMILY_PATH}/linker/${MCU_VARIANT}_xxaa_application.ld
+ SRC_C += ${NRFX_PATH}/mdk/system_$(MCU_VARIANT)_application.c \
+ ${NRFX_PATH}/drivers/src/nrfx_usbreg.c
+ SRC_S += ${NRFX_PATH}/mdk/gcc_startup_$(MCU_VARIANT)_application.S
+ JLINK_DEVICE ?= $(MCU_VARIANT)_xxaa_app
+
+else
+
+ CPU_CORE = cortex-m4
+ CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_NRF5X
+ LD_FILE_DEFAULT = ${FAMILY_PATH}/linker/${MCU_VARIANT}_xxaa.ld
+ SRC_C += ${NRFX_PATH}/mdk/system_$(MCU_VARIANT).c
+ SRC_S += ${NRFX_PATH}/mdk/gcc_startup_$(MCU_VARIANT).S
+ JLINK_DEVICE ?= $(MCU_VARIANT)_xxaa
+endif
+endif
CFLAGS += \
- -DCFG_TUSB_MCU=OPT_MCU_NRF5X \
+ -DNRF_APPLICATION \
-DCONFIG_GPIO_AS_PINRESET \
-D__STARTUP_CLEAR_BSS
@@ -33,14 +59,20 @@ LDFLAGS_GCC += \
LDFLAGS_CLANG += \
-L$(TOP)/${NRFX_PATH}/mdk \
+ifndef LD_FILE
+LD_FILE = ${LD_FILE_DEFAULT}
+endif
+
SRC_C += \
src/portable/nordic/nrf5x/dcd_nrf5x.c \
+ src/portable/synopsys/dwc2/dwc2_common.c \
+ src/portable/synopsys/dwc2/dcd_dwc2.c \
+ src/portable/synopsys/dwc2/hcd_dwc2.c \
${NRFX_PATH}/helpers/nrfx_flag32_allocator.c \
${NRFX_PATH}/drivers/src/nrfx_gpiote.c \
${NRFX_PATH}/drivers/src/nrfx_power.c \
${NRFX_PATH}/drivers/src/nrfx_spim.c \
${NRFX_PATH}/drivers/src/nrfx_uarte.c \
- ${NRFX_PATH}/mdk/system_$(MCU_VARIANT).c \
${NRFX_PATH}/soc/nrfx_atomic.c
INC += \
@@ -53,9 +85,4 @@ INC += \
$(TOP)/${NRFX_PATH}/drivers/include \
$(TOP)/${NRFX_PATH}/drivers/src \
-SRC_S += ${NRFX_PATH}/mdk/gcc_startup_$(MCU_VARIANT).S
-
ASFLAGS += -D__HEAP_SIZE=0
-
-# For flash-jlink target
-JLINK_DEVICE ?= $(MCU_VARIANT)_xxaa
diff --git a/hw/bsp/nrf/linker/nrf52833_xxaa.ld b/hw/bsp/nrf/linker/nrf52833_xxaa.ld
index ae4d0e5b3..f4c46a3f1 100644
--- a/hw/bsp/nrf/linker/nrf52833_xxaa.ld
+++ b/hw/bsp/nrf/linker/nrf52833_xxaa.ld
@@ -12,9 +12,3 @@ MEMORY
INCLUDE "nrf_common.ld"
-
-/* nrfx v2 linker does not define __tbss_start/end__ __sbss_start/end__*/
-__tbss_start__ = __tbss_start;
-__tbss_end__ = __tbss_end;
-__sbss_start__ = __sbss_start;
-__sbss_end__ = __sbss_end;
diff --git a/hw/bsp/nrf/linker/nrf52840_s140_v6.ld b/hw/bsp/nrf/linker/nrf52840_s140_v6.ld
index 037a14196..1a2292269 100644
--- a/hw/bsp/nrf/linker/nrf52840_s140_v6.ld
+++ b/hw/bsp/nrf/linker/nrf52840_s140_v6.ld
@@ -36,9 +36,3 @@ SECTIONS
} INSERT AFTER .data;
INCLUDE "nrf_common.ld"
-
-/* nrfx v2 linker does not define __tbss_start/end__ __sbss_start/end__*/
-__tbss_start__ = __tbss_start;
-__tbss_end__ = __tbss_end;
-__sbss_start__ = __sbss_start;
-__sbss_end__ = __sbss_end;
diff --git a/hw/bsp/nrf/linker/nrf52840_xxaa.ld b/hw/bsp/nrf/linker/nrf52840_xxaa.ld
index 2d20ba7ac..fcfe08a60 100644
--- a/hw/bsp/nrf/linker/nrf52840_xxaa.ld
+++ b/hw/bsp/nrf/linker/nrf52840_xxaa.ld
@@ -12,9 +12,3 @@ MEMORY
}
INCLUDE "nrf_common.ld"
-
-/* nrfx v2 linker does not define __tbss_start/end__ __sbss_start/end__*/
-__tbss_start__ = __tbss_start;
-__tbss_end__ = __tbss_end;
-__sbss_start__ = __sbss_start;
-__sbss_end__ = __sbss_end;
diff --git a/hw/bsp/nrf/linker/nrf5340_xxaa_application.ld b/hw/bsp/nrf/linker/nrf5340_xxaa_application.ld
index 31762d0b2..7fd682a40 100644
--- a/hw/bsp/nrf/linker/nrf5340_xxaa_application.ld
+++ b/hw/bsp/nrf/linker/nrf5340_xxaa_application.ld
@@ -13,9 +13,3 @@ MEMORY
INCLUDE "nrf_common.ld"
-
-/* nrfx v2 linker does not define __tbss_start/end__ __sbss_start/end__*/
-__tbss_start__ = __tbss_start;
-__tbss_end__ = __tbss_end;
-__sbss_start__ = __sbss_start;
-__sbss_end__ = __sbss_end;
diff --git a/hw/bsp/nrf/linker/nrf54h20_xxaa_application.ld b/hw/bsp/nrf/linker/nrf54h20_xxaa_application.ld
new file mode 100644
index 000000000..0c8d7127a
--- /dev/null
+++ b/hw/bsp/nrf/linker/nrf54h20_xxaa_application.ld
@@ -0,0 +1,21 @@
+/* Linker script to configure memory regions. */
+
+SEARCH_DIR(.)
+/*GROUP(-lgcc -lc) not compatible with clang*/
+
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0xE0A0000, LENGTH = 0x40000 /* Inside global MRAM0 */
+ FLASH1 (rx) : ORIGIN = 0x2F840000, LENGTH = 0x4000 /* OTP0 */
+ EXTFLASH (rx) : ORIGIN = 0x70000000, LENGTH = 0x20000000
+ RAM (rwx) : ORIGIN = 0x22000000, LENGTH = 0x8000
+ RAM1 (rwx) : ORIGIN = 0x2F000000, LENGTH = 0x80000 /* RAM00 */
+ RAM2 (rwx) : ORIGIN = 0x2F080000, LENGTH = 0x60000 /* RAM01 */
+ RAM3 (rwx) : ORIGIN = 0x2F880000, LENGTH = 0x10000 /* RAM20 */
+ RAM4 (rwx) : ORIGIN = 0x2F890000, LENGTH = 0x8000 /* RAM21 */
+ RAM5 (rwx) : ORIGIN = 0x2FC00000, LENGTH = 0x4000 /* RAM30 (low-speed) */
+ RAM6 (rwx) : ORIGIN = 0x2FC04000, LENGTH = 0x4000 /* RAM31 (low-speed) */
+}
+
+
+INCLUDE "nrf_common.ld"
diff --git a/hw/bsp/nrf/nrfx_config/nrfx_config.h b/hw/bsp/nrf/nrfx_config/nrfx_config.h
index fbec4192b..88431e42c 100644
--- a/hw/bsp/nrf/nrfx_config/nrfx_config.h
+++ b/hw/bsp/nrf/nrfx_config/nrfx_config.h
@@ -1,46 +1,111 @@
+/*
+ * Copyright (c) 2019 - 2025, Nordic Semiconductor ASA
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holder nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
#ifndef NRFX_CONFIG_H__
#define NRFX_CONFIG_H__
-#define NRFX_POWER_ENABLED 1
-#define NRFX_POWER_DEFAULT_CONFIG_IRQ_PRIORITY 7
-
-#define NRFX_CLOCK_ENABLED 0
-#define NRFX_GPIOTE_ENABLED 1
-#define NRFX_GPIOTE0_ENABLED 1
-
-#define NRFX_UARTE_ENABLED 1
-#define NRFX_UARTE0_ENABLED 1
-
-#define NRFX_SPIM_ENABLED 1
-#define NRFX_SPIM1_ENABLED 1 // use SPI1 since nrf5340 share uart with spi
-
-#define NRFX_PRS_ENABLED 0
-#define NRFX_USBREG_ENABLED 1
+#include "nrfx_config_common.h"
#if defined(NRF51)
-#include
+ #include
#elif defined(NRF52805_XXAA)
-#include
+ #include
#elif defined(NRF52810_XXAA)
-#include
+ #include
#elif defined(NRF52811_XXAA)
-#include
+ #include
#elif defined(NRF52820_XXAA)
-#include
+ #include
#elif defined(NRF52832_XXAA) || defined (NRF52832_XXAB)
-#include
+ #include
#elif defined(NRF52833_XXAA)
-#include
+ #include
#elif defined(NRF52840_XXAA)
-#include
+ #include
#elif defined(NRF5340_XXAA_APPLICATION)
-#include
+ #include
#elif defined(NRF5340_XXAA_NETWORK)
#include
+#elif defined(NRF54H20_XXAA) && defined(NRF_APPLICATION)
+ #include
+#elif defined(NRF54H20_XXAA) && defined(NRF_RADIOCORE)
+ #include
+#elif defined(NRF54H20_XXAA) && defined(NRF_PPR)
+ #include
+#elif defined(NRF54H20_XXAA) && defined(NRF_FLPR)
+ #include
+#elif defined(NRF54L05_XXAA) && defined(NRF_APPLICATION)
+ #include
+#elif defined(NRF54L05_XXAA) && defined(NRF_FLPR)
+ #include
+#elif defined(NRF54L10_XXAA) && defined(NRF_APPLICATION)
+ #include
+#elif defined(NRF54L10_XXAA) && defined(NRF_FLPR)
+ #include
+#elif defined(NRF54L15_XXAA) && defined(NRF_APPLICATION)
+ #include
+#elif defined(NRF54L15_XXAA) && defined(NRF_FLPR)
+ #include
+#elif defined(NRF54LM20A_ENGA_XXAA) && defined(NRF_APPLICATION)
+ #include
+#elif defined(NRF54LM20A_ENGA_XXAA) && defined(NRF_FLPR)
+ #include
+#elif defined(NRF54LS05B_ENGA_XXAA) && defined(NRF_APPLICATION)
+ #include
+#elif defined(NRF54LV10A_ENGA_XXAA) && defined(NRF_APPLICATION)
+ #include
+#elif defined(NRF54LV10A_ENGA_XXAA) && defined(NRF_FLPR)
+ #include
+#elif defined(NRF7120_ENGA_XXAA) && defined(NRF_APPLICATION)
+ #include
+#elif defined(NRF7120_ENGA_XXAA) && defined(NRF_FLPR)
+ #include
+#elif defined(NRF7120_ENGA_XXAA) && defined(NRF_LMAC)
+ #include
+#elif defined(NRF7120_ENGA_XXAA) && defined(NRF_UMAC)
+ #include
#elif defined(NRF9120_XXAA) || defined(NRF9160_XXAA)
#include
+#elif defined(NRF9230_ENGB_XXAA) && defined(NRF_APPLICATION)
+ #include
+#elif defined(NRF9230_ENGB_XXAA) && defined(NRF_RADIOCORE)
+ #include
+#elif defined(NRF9230_ENGB_XXAA) && defined(NRF_PPR)
+ #include
+#elif defined(NRF9230_ENGB_XXAA) && defined(NRF_FLPR)
+ #include
#else
- #error "Unknown device."
+ #include "nrfx_config_ext.h"
#endif
#endif // NRFX_CONFIG_H__
diff --git a/hw/bsp/nrf/nrfx_config/nrfx_config_common.h b/hw/bsp/nrf/nrfx_config/nrfx_config_common.h
new file mode 100644
index 000000000..a5a29bb8e
--- /dev/null
+++ b/hw/bsp/nrf/nrfx_config/nrfx_config_common.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2022 - 2025, Nordic Semiconductor ASA
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holder nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef NRFX_CONFIG_COMMON_H__
+#define NRFX_CONFIG_COMMON_H__
+
+#ifndef NRFX_CONFIG_H__
+#error "This file should not be included directly. Include nrfx_config.h instead."
+#endif
+
+/** @brief Symbol specifying major version of the nrfx API to be used. */
+#ifndef NRFX_CONFIG_API_VER_MAJOR
+#define NRFX_CONFIG_API_VER_MAJOR 3
+#endif
+
+/** @brief Symbol specifying minor version of the nrfx API to be used. */
+#ifndef NRFX_CONFIG_API_VER_MINOR
+#define NRFX_CONFIG_API_VER_MINOR 12
+#endif
+
+/** @brief Symbol specifying micro version of the nrfx API to be used. */
+#ifndef NRFX_CONFIG_API_VER_MICRO
+#define NRFX_CONFIG_API_VER_MICRO 0
+#endif
+
+//--------------------------------------------------------------------+
+//
+//--------------------------------------------------------------------+
+#define NRFX_CLOCK_ENABLED 0
+#define NRFX_UARTE_ENABLED 1
+
+#if defined(NRF54H20_XXAA)
+#define NRFX_UARTE120_ENABLED 1
+
+#else
+
+#define NRFX_POWER_ENABLED 1
+#define NRFX_POWER_DEFAULT_CONFIG_IRQ_PRIORITY 7
+
+#define NRFX_UARTE0_ENABLED 1
+
+#define NRFX_GPIOTE_ENABLED 1
+#define NRFX_GPIOTE0_ENABLED 1
+
+#define NRFX_SPIM_ENABLED 1
+#define NRFX_SPIM1_ENABLED 1 // use SPI1 since nrf5340 share uart with spi
+#endif
+
+#define NRFX_PRS_ENABLED 0
+#define NRFX_USBREG_ENABLED 1
+
+#define NRF_STATIC_INLINE static inline
+
+#endif /* NRFX_CONFIG_COMMON_H__ */
diff --git a/hw/bsp/nrf/nrfx_config/nrfx_config_ext.h b/hw/bsp/nrf/nrfx_config/nrfx_config_ext.h
new file mode 100644
index 000000000..e503e1399
--- /dev/null
+++ b/hw/bsp/nrf/nrfx_config/nrfx_config_ext.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2023 - 2025, Nordic Semiconductor ASA
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holder nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef NRFX_CONFIG_EXT_H__
+#define NRFX_CONFIG_EXT_H__
+
+#error "Unknown device."
+
+#endif // NRFX_CONFIG_EXT_H__
diff --git a/hw/bsp/zephyr_board_aliases.cmake b/hw/bsp/zephyr_board_aliases.cmake
index b60e97ef4..a60068208 100644
--- a/hw/bsp/zephyr_board_aliases.cmake
+++ b/hw/bsp/zephyr_board_aliases.cmake
@@ -1,2 +1,2 @@
-set(pca10056_BOARD_ALIAS nrf52840dk/nrf52840)
+set(nrf52840dk_BOARD_ALIAS nrf52840dk/nrf52840)
set(stm32n657nucleo_BOARD_ALIAS nucleo_n657x0_q)
diff --git a/src/common/tusb_mcu.h b/src/common/tusb_mcu.h
index 1c11df114..1f8975e55 100644
--- a/src/common/tusb_mcu.h
+++ b/src/common/tusb_mcu.h
@@ -137,6 +137,12 @@
// 8 CBI + 1 ISO
#define TUP_DCD_ENDPOINT_MAX 9
+#elif TU_CHECK_MCU(OPT_MCU_NRF54)
+ #define TUP_USBIP_DWC2
+ #define TUP_USBIP_DWC2_NRF
+ #define TUP_DCD_ENDPOINT_MAX 16
+ #define CFG_TUH_DWC2_DMA_ENABLE_DEFAULT 0
+
//--------------------------------------------------------------------+
// Microchip
//--------------------------------------------------------------------+
diff --git a/src/portable/synopsys/dwc2/dwc2_common.h b/src/portable/synopsys/dwc2/dwc2_common.h
index 33219f786..0166b0261 100644
--- a/src/portable/synopsys/dwc2/dwc2_common.h
+++ b/src/portable/synopsys/dwc2/dwc2_common.h
@@ -51,6 +51,8 @@
#include "dwc2_xmc.h"
#elif defined(TUP_USBIP_DWC2_AT32)
#include "dwc2_at32.h"
+#elif defined(TUP_USBIP_DWC2_NRF)
+ #include "dwc2_nrf.h"
#else
#error "Unsupported MCUs"
#endif
diff --git a/src/portable/synopsys/dwc2/dwc2_nrf.h b/src/portable/synopsys/dwc2/dwc2_nrf.h
new file mode 100644
index 000000000..b93571f16
--- /dev/null
+++ b/src/portable/synopsys/dwc2/dwc2_nrf.h
@@ -0,0 +1,61 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2025 Ha Thach (tinyusb.org)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * This file is part of the TinyUSB stack.
+ */
+#ifndef TUSB_DWC2_NRF_H
+#define TUSB_DWC2_NRF_H
+
+#include "nrf.h"
+
+#define DWC2_EP_MAX 16
+
+static const dwc2_controller_t _dwc2_controller[] = {
+ { .reg_base = NRF_USBHSCORE0_NS_BASE, .irqnum = USBHS_IRQn, .ep_count = 16, .ep_fifo_size = 12288 },
+};
+
+TU_ATTR_ALWAYS_INLINE static inline void dwc2_int_set(uint8_t rhport, tusb_role_t role, bool enabled) {
+ (void) rhport;
+ (void) role;
+ (void) enabled;
+}
+
+#define dwc2_dcd_int_enable(_rhport) dwc2_int_set(_rhport, TUSB_ROLE_DEVICE, true)
+#define dwc2_dcd_int_disable(_rhport) dwc2_int_set(_rhport, TUSB_ROLE_DEVICE, false)
+
+TU_ATTR_ALWAYS_INLINE static inline void dwc2_remote_wakeup_delay(void) {
+}
+
+// MCU specific PHY init, called BEFORE core reset
+TU_ATTR_ALWAYS_INLINE static inline void dwc2_phy_init(dwc2_regs_t* dwc2, uint8_t hs_phy_type) {
+ (void)dwc2;
+ (void)hs_phy_type;
+}
+
+// MCU specific PHY update, it is called AFTER init() and core reset
+TU_ATTR_ALWAYS_INLINE static inline void dwc2_phy_update(dwc2_regs_t* dwc2, uint8_t hs_phy_type) {
+ (void)dwc2;
+ (void)hs_phy_type;
+}
+
+#endif
diff --git a/src/tusb_option.h b/src/tusb_option.h
index 378b5607e..dd57f6296 100644
--- a/src/tusb_option.h
+++ b/src/tusb_option.h
@@ -62,7 +62,8 @@
#define OPT_MCU_LPC55XX OPT_MCU_LPC55
// NRF
-#define OPT_MCU_NRF5X 100 ///< Nordic nRF5x series
+#define OPT_MCU_NRF5X 100 ///< Nordic nRF 52,53 series
+#define OPT_MCU_NRF54 101 ///< Nordic nRF54 series
// SAM
#define OPT_MCU_SAMD21 200 ///< MicroChip SAMD21
diff --git a/tools/get_deps.py b/tools/get_deps.py
index 36ed98a62..c243137fa 100755
--- a/tools/get_deps.py
+++ b/tools/get_deps.py
@@ -47,7 +47,7 @@ deps_optional = {
'b93e856211060ae825216c6a1d6aa347ec758843',
'mm32'],
'hw/mcu/nordic/nrfx': ['https://github.com/NordicSemiconductor/nrfx.git',
- '7c47cc0a56ce44658e6da2458e86cd8783ccc4a2',
+ '11f57e578c7feea13f21c79ea0efab2630ac68c7',
'nrf'],
'hw/mcu/nuvoton': ['https://github.com/majbthrd/nuc_driver.git',
'2204191ec76283371419fbcec207da02e1bc22fa',