File tree 2 files changed +59
-0
lines changed
tests/drivers/spi/spi_loopback
2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change
1
+ #include <zephyr/dt-bindings/dma/rpi-pico-dma-rp2040.h>
2
+
3
+ &dma {
4
+ status = "okay";
5
+ };
6
+
7
+ &pinctrl {
8
+ pio0_spi0_default: pio0_spi0_default {
9
+ /* gpio 17 is used for chip select, not assigned to the PIO */
10
+ group1 {
11
+ pinmux = <PIO0_P18>, <PIO0_P19>;
12
+ };
13
+ group2 {
14
+ pinmux = <PIO0_P16>;
15
+ input-enable;
16
+ };
17
+ };
18
+ };
19
+
20
+ &pio0 {
21
+ status = "okay";
22
+
23
+ pio0_spi0: pio0_spi0 {
24
+ pinctrl-0 = <&pio0_spi0_default>;
25
+ pinctrl-names = "default";
26
+
27
+ compatible = "raspberrypi,pico-spi-pio";
28
+ status = "okay";
29
+ dmas = <&dma 0 0 0>, <&dma 1 0 0>;
30
+ dma-names = "tx", "rx";
31
+ #address-cells = <1>;
32
+ #size-cells = <0>;
33
+ clocks = <&clocks RPI_PICO_CLKID_CLK_SYS>;
34
+ miso-gpios = <&gpio0 16 0>;
35
+ cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
36
+ clk-gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
37
+ mosi-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
38
+
39
+ slow@0 {
40
+ compatible = "test-spi-loopback-slow";
41
+ reg = <0>;
42
+ spi-max-frequency = <500000>;
43
+ };
44
+ fast@0 {
45
+ compatible = "test-spi-loopback-fast";
46
+ reg = <0>;
47
+ spi-max-frequency = <14000000>;
48
+ };
49
+ };
50
+ };
Original file line number Diff line number Diff line change @@ -217,6 +217,15 @@ tests:
217
217
- DTC_OVERLAY_FILE="boards/rpi_pico_pio.overlay"
218
218
- EXTRA_CONF_FILE="overlay-rpi-pico-pio.conf"
219
219
platform_allow : rpi_pico
220
+ drivers.spi.pio_spi_dma.loopback :
221
+ extra_args :
222
+ - DTC_OVERLAY_FILE="boards/rpi_pico_pio_dma.overlay"
223
+ - EXTRA_CONF_FILE="overlay-rpi-pico-pio.conf"
224
+ extra_configs :
225
+ - CONFIG_SPI_RPI_PICO_PIO_DMA=y
226
+ - CONFIG_DMA=y
227
+ - CONFIG_PRINTK=y
228
+ platform_allow : rpi_pico
220
229
drivers.spi.mcux_flexio_spi.loopback :
221
230
extra_args : DTC_OVERLAY_FILE="overlay-mcux-flexio-spi.overlay"
222
231
filter : CONFIG_DT_HAS_NXP_FLEXIO_ENABLED and
You can’t perform that action at this time.
0 commit comments