tests: drivers: spi: spi_slave: Add nrf54h20dk
Add configuration for nrf54h20dk to the test. Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
47896e4584
commit
435f32d191
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Nordic Semiconductor
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
&pinctrl {
|
||||
spi130_default_alt: spi130_default_alt {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 0)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 6)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 8)>;
|
||||
};
|
||||
};
|
||||
|
||||
spi130_sleep_alt: spi130_sleep_alt {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 0)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 6)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 8)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
spis131_default_alt: spis131_default_alt {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIS_SCK, 0, 1)>,
|
||||
<NRF_PSEL(SPIS_MISO, 0, 7)>,
|
||||
<NRF_PSEL(SPIS_MOSI, 0, 9)>,
|
||||
<NRF_PSEL(SPIS_CSN, 0, 11)>;
|
||||
};
|
||||
};
|
||||
|
||||
spis131_sleep_alt: spis131_sleep_alt {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIS_SCK, 0, 1)>,
|
||||
<NRF_PSEL(SPIS_MISO, 0, 7)>,
|
||||
<NRF_PSEL(SPIS_MOSI, 0, 9)>,
|
||||
<NRF_PSEL(SPIS_CSN, 0, 11)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpiote130 {
|
||||
status = "okay";
|
||||
owned-channels = <7>;
|
||||
};
|
||||
|
||||
dut_spi: &spi130 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
status = "okay";
|
||||
pinctrl-0 = <&spi130_default_alt>;
|
||||
pinctrl-1 = <&spi130_sleep_alt>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
overrun-character = <0x00>;
|
||||
cs-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
|
||||
dut_spi_dt: test-spi-dev@0 {
|
||||
compatible = "vnd,spi-device";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <500000>;
|
||||
};
|
||||
};
|
||||
|
||||
dut_spis: &spi131 {
|
||||
compatible = "nordic,nrf-spis";
|
||||
status = "okay";
|
||||
def-char = <0x00>;
|
||||
pinctrl-0 = <&spis131_default_alt>;
|
||||
pinctrl-1 = <&spis131_sleep_alt>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
/delete-property/rx-delay-supported;
|
||||
/delete-property/rx-delay;
|
||||
};
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Nordic Semiconductor
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include "nrf54h20dk_nrf54h20_common.dtsi"
|
||||
|
||||
&dut_spi {
|
||||
memory-regions = <&cpuapp_dma_region>;
|
||||
};
|
||||
|
||||
&dut_spis {
|
||||
memory-regions = <&cpuapp_dma_region>;
|
||||
};
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Nordic Semiconductor
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include "nrf54h20dk_nrf54h20_common.dtsi"
|
||||
|
||||
&dut_spi {
|
||||
memory-regions = <&cpurad_dma_region>;
|
||||
};
|
||||
|
||||
&dut_spis {
|
||||
memory-regions = <&cpurad_dma_region>;
|
||||
};
|
|
@ -8,6 +8,7 @@
|
|||
#include <string.h>
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/drivers/spi.h>
|
||||
#include <zephyr/linker/devicetree_regions.h>
|
||||
#include <zephyr/ztest.h>
|
||||
|
||||
#define SPI_MODE (SPI_MODE_CPOL | SPI_MODE_CPHA | SPI_WORD_SET(8) | SPI_LINES_SINGLE)
|
||||
|
|
|
@ -5,6 +5,8 @@ tests:
|
|||
harness: ztest
|
||||
harness_config:
|
||||
fixture: gpio_spi_loopback
|
||||
platform_allow: nrf52840dk/nrf52840 nrf54l15pdk/nrf54l15/cpuapp
|
||||
platform_allow: |
|
||||
nrf52840dk/nrf52840 nrf54l15pdk/nrf54l15/cpuapp nrf54h20dk/nrf54h20/cpuapp
|
||||
nrf54h20dk/nrf54h20/cpurad
|
||||
integration_platforms:
|
||||
- nrf52840dk/nrf52840
|
||||
|
|
Loading…
Reference in a new issue