Commit 04df6de4 authored by Michał Stasiak's avatar Michał Stasiak Committed by Benjamin Cabé
Browse files

tests: drivers: spi: Add support for nRF54L20 PDK



Added support for nRF54L20 PDK in SPIM twister tests.

Signed-off-by: default avatarMichał Stasiak <michal.stasiak@nordicsemi.no>
parent 47163722
Loading
Loading
Loading
Loading
+73 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2025 Nordic Semiconductor
 *
 * SPDX-License-Identifier: Apache-2.0
 */

&pinctrl {
	spi22_default_alt: spi22_default_alt {
		group1 {
			psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
				<NRF_PSEL(SPIM_MISO, 1, 11)>,
				<NRF_PSEL(SPIM_MOSI, 1, 9)>;
		};
	};

	spi22_sleep_alt: spi22_sleep_alt {
		group1 {
			psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
				<NRF_PSEL(SPIM_MISO, 1, 11)>,
				<NRF_PSEL(SPIM_MOSI, 1, 9)>;
			low-power-enable;
		};
	};

	spi21_default_alt: spi21_default_alt {
		group1 {
			psels = <NRF_PSEL(SPIS_SCK, 1, 12)>,
				<NRF_PSEL(SPIS_MISO, 1, 10)>,
				<NRF_PSEL(SPIS_MOSI, 1, 8)>,
				<NRF_PSEL(SPIS_CSN, 1, 14)>;
		};
	};

	spi21_sleep_alt: spi21_sleep_alt {
		group1 {
			psels = <NRF_PSEL(SPIS_SCK, 1, 12)>,
				<NRF_PSEL(SPIS_MISO, 1, 10)>,
				<NRF_PSEL(SPIS_MOSI, 1, 8)>,
				<NRF_PSEL(SPIS_CSN, 1, 14)>;
			low-power-enable;
		};
	};

};

&gpio2 {
	status = "okay";
};

&spi22 {
	status = "okay";
	pinctrl-0 = <&spi22_default_alt>;
	pinctrl-1 = <&spi22_sleep_alt>;
	pinctrl-names = "default", "sleep";
	overrun-character = <0x00>;
	cs-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
	dut_spi_dt: test-spi-dev@0 {
		compatible = "vnd,spi-device";
		reg = <0>;
		spi-max-frequency = <4000000>;
	};
};

dut_spis: &spi21 {
	compatible = "nordic,nrf-spis";
	status = "okay";
	def-char = <0x00>;
	pinctrl-0 = <&spi21_default_alt>;
	pinctrl-1 = <&spi21_sleep_alt>;
	pinctrl-names = "default", "sleep";
	/delete-property/rx-delay-supported;
	/delete-property/rx-delay;
};
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ tests:
      - nrf52840dk/nrf52840
      - nrf54l15dk/nrf54l15/cpuapp
      - nrf54h20dk/nrf54h20/cpuapp
      - nrf54l20pdk/nrf54l20/cpuapp
    integration_platforms:
      - nrf52840dk/nrf52840
  drivers.spi.spi_error_cases.fast:
+47 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2025 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: Apache-2.0
 */

&pinctrl {
	spi00_default: spi00_default {
		group1 {
			psels = <NRF_PSEL(SPIM_SCK, 2, 6)>,
				<NRF_PSEL(SPIM_MISO, 2, 9)>,
				<NRF_PSEL(SPIM_MOSI, 2, 8)>;
		};
	};

	spi00_sleep: spi00_sleep {
		group1 {
			psels = <NRF_PSEL(SPIM_SCK, 2, 6)>,
				<NRF_PSEL(SPIM_MISO, 2, 9)>,
				<NRF_PSEL(SPIM_MOSI, 2, 8)>;
			low-power-enable;
		};
	};
};

&spi00 {
	status = "okay";
	pinctrl-0 = <&spi00_default>;
	pinctrl-1 = <&spi00_sleep>;
	pinctrl-names = "default", "sleep";
	overrun-character = <0x00>;
	zephyr,pm-device-runtime-auto;
	slow@0 {
		compatible = "test-spi-loopback-slow";
		reg = <0>;
		spi-max-frequency = <DT_FREQ_M(2)>;
	};
	fast@0 {
		compatible = "test-spi-loopback-fast";
		reg = <0>;
		spi-max-frequency = <DT_FREQ_M(4)>;
	};
};

&gpio2 {
	status = "okay";
};