diff --git a/boards/shields/nrf700x_nrf54h20dk/Kconfig.shield b/boards/shields/nrf700x_nrf54h20dk/Kconfig.shield new file mode 100644 index 000000000000..ade9bd94584c --- /dev/null +++ b/boards/shields/nrf700x_nrf54h20dk/Kconfig.shield @@ -0,0 +1,14 @@ +# +# Copyright (c) 2023 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +DT_COMPAT_NORDIC_NRF700X_SPI := nordic,nrf700x-spi + +config SHIELD_NRF700X_NRF54H20DK + def_bool $(shields_list_contains,nrf700x_nrf54h20dk) + +config NRF7002_ON_SPI + def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF700X_SPI)) + depends on SHIELD_NRF700X_NRF54H20DK diff --git a/boards/shields/nrf700x_nrf54h20dk/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/boards/shields/nrf700x_nrf54h20dk/boards/nrf54h20dk_nrf54h20_cpuapp.conf new file mode 100644 index 000000000000..6883a62376f0 --- /dev/null +++ b/boards/shields/nrf700x_nrf54h20dk/boards/nrf54h20dk_nrf54h20_cpuapp.conf @@ -0,0 +1,16 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +CONFIG_SHELL_BACKEND_SERIAL=y +# nrf_security is WIP +CONFIG_WPA_SUPP_CRYPTO_NONE=y +CONFIG_TEST_RANDOM_GENERATOR=y + +# External flash access is WIP +CONFIG_WIFI_CREDENTIALS=n +CONFIG_FLASH=n +CONFIG_NVS=n +CONFIG_SETTINGS=n diff --git a/boards/shields/nrf700x_nrf54h20dk/nrf700x_nrf54h20dk.overlay b/boards/shields/nrf700x_nrf54h20dk/nrf700x_nrf54h20dk.overlay new file mode 100644 index 000000000000..b9ff2a5ae9db --- /dev/null +++ b/boards/shields/nrf700x_nrf54h20dk/nrf700x_nrf54h20dk.overlay @@ -0,0 +1,173 @@ +/* Copyright (c) 2023 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ +#include + +/* Wi-Fi needs more flash (1M) and RAM (512K): + * + * To minimize the changes, only necessary nodes are added, so, delete + * any linked nodes. This was done here as it's applicable to most samples, + * if a sample needs anything extra, it can override this with a sample specific + * overlay. + */ + /delete-node/ &ipc0; + /delete-node/ &cpuppr_vpr; + /delete-node/ &mram1x; + /delete-node/ &cpurad_uicr; + +/ { + /delete-node/ ipc; + /delete-node/ reserved-memory; + + /* Shift offsets by 512K */ + soc { + mram1x: mram@e000000 { + compatible = "nordic,mram"; + erase-block-size = <4096>; + write-block-size = <16>; + reg = <0xe000000 DT_SIZE_K(2048)>; + cpuapp_rx_partitions: cpuapp-rx-partitions { + compatible = "nordic,owned-partitions", "fixed-partitions"; + status = "okay"; + perm-read; + perm-execute; + perm-secure; + #address-cells = <1>; + #size-cells = <1>; + + cpuapp_slot0_partition: partition@66000 { + reg = <0x66000 DT_SIZE_K(1024)>; + }; + }; + + cpuapp_rw_partitions: cpuapp-rw-partitions { + compatible = "nordic,owned-partitions", "fixed-partitions"; + status = "okay"; + perm-read; + perm-write; + perm-secure; + #address-cells = <1>; + #size-cells = <1>; + + storage_partition: partition@166000 { + reg = <0x166000 DT_SIZE_K(24)>; + }; + }; + }; + }; + + reserved-memory { + compatible = "reserved-memory"; + #address-cells = < 0x1 >; + #size-cells = < 0x1 >; + /* Shift offsets by 256K and remove IPC regions */ + cpuapp_ram0x_region: memory@2f000000 { + compatible = "nordic,owned-memory"; + reg = <0x2f000000 DT_SIZE_K(512)>; + status = "okay"; + perm-read; + perm-write; + perm-secure; + perm-execute; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x2f000000 DT_SIZE_K(512)>; + + cpuapp_data: memory@0 { + reg = <0x0 DT_SIZE_K(512)>; + }; + }; + + /* Below sections are unchanged, duplicated as delete the entire node */ + shared_ram3x_region: memory@2fc12000{ + compatible = "nordic,owned-memory"; + reg = <0x2fc12000 DT_SIZE_K(4)>; + status = "okay"; + perm-read; + perm-write; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x2fc12000 0x2000>; + + cpuapp_dma_region: memory@e80 { + compatible = "zephyr,memory-region"; + reg = <0xe80 DT_SIZE_K(4)>; + status = "okay"; + #memory-region-cells = <0>; + zephyr,memory-region = "DMA_RAM3x_APP"; + }; + }; + + cpuapp_uicr_ext: memory@e1ff800 { + reg = <0xe1ff800 DT_SIZE_K(2)>; + }; + }; + + nordic_wlan0: nordic_wlan0 { + compatible = "nordic,wlan0"; + status = "okay"; + }; + + nrf70_tx_power_ceiling: nrf70_tx_power_ceiling_node { + status = "okay"; + compatible = "nordic,nrf700x-tx-power-ceiling"; + max-pwr-2g-dsss = <0x54>; + max-pwr-2g-mcs0 = <0x40>; + max-pwr-2g-mcs7 = <0x40>; + max-pwr-5g-low-mcs0 = <0x34>; + max-pwr-5g-low-mcs7 = <0x34>; + max-pwr-5g-mid-mcs0 = <0x34>; + max-pwr-5g-mid-mcs7 = <0x34>; + max-pwr-5g-high-mcs0 = <0x30>; + max-pwr-5g-high-mcs7 = <0x30>; + }; + + chosen { + zephyr,wifi = &nordic_wlan0; + zephyr,bt-hci-ipc = ""; + }; +}; + +&pinctrl { + spi130_default: spi130_default { + group1 { + /* SCK has to be 0..3 and other signals can't use these pins */ + psels = , + , + ; + }; + }; + + spi130_sleep: spi130_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; +}; + +&spi130 { + status = "okay"; + cs-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; + + pinctrl-0 = <&spi130_default>; + pinctrl-1 = <&spi130_sleep>; + pinctrl-names = "default", "sleep"; + memory-regions = <&cpuapp_dma_region>; + nrf700x: nrf7002@0 { + compatible = "nordic,nrf700x-spi"; + status = "okay"; + reg = <0>; + spi-max-frequency = ; + bucken-gpios = <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; + iovdd-ctrl-gpios = <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; + host-irq-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; + }; +}; + +&gpio1 { + status = "okay"; +}; diff --git a/samples/wifi/shell/sample.yaml b/samples/wifi/shell/sample.yaml index 37ca160a140f..2ce3a61cc5ef 100644 --- a/samples/wifi/shell/sample.yaml +++ b/samples/wifi/shell/sample.yaml @@ -158,6 +158,12 @@ tests: - nrf52840dk/nrf52840 platform_allow: nrf5340dk/nrf5340/cpuapp nrf52840dk/nrf52840 tags: ci_build + sample.nrf54h20dk_nrf7002ek.shell: + build_only: true + extra_args: SHIELD=nrf700x_nrf54h20dk + integration_platforms: + - nrf54h20dk/nrf54h20/cpuapp + platform_allow: nrf54h20dk/nrf54h20/cpuapp # Used by QA and also acts as a memory stress test sample.nrf7001.superset: build_only: true diff --git a/samples/wifi/shell/src/main.c b/samples/wifi/shell/src/main.c index d0e842170f9e..23f1edba92be 100644 --- a/samples/wifi/shell/src/main.c +++ b/samples/wifi/shell/src/main.c @@ -10,7 +10,7 @@ #include #include -#if defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M +#if NRFX_CLOCK_ENABLED && defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) && NRF_CLOCK_HAS_HFCLK192M #include #endif #include @@ -42,7 +42,7 @@ int init_usb(void) int main(void) { -#if defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M +#if NRFX_CLOCK_ENABLED && defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) && NRF_CLOCK_HAS_HFCLK192M /* For now hardcode to 128MHz */ nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1);