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 @@ -205,6 +205,15 @@ tests:
205
205
- DTC_OVERLAY_FILE="boards/rpi_pico_pio.overlay"
206
206
- EXTRA_CONF_FILE="overlay-rpi-pico-pio.conf"
207
207
platform_allow : rpi_pico
208
+ drivers.spi.pio_spi_dma.loopback :
209
+ extra_args :
210
+ - DTC_OVERLAY_FILE="boards/rpi_pico_pio_dma.overlay"
211
+ - EXTRA_CONF_FILE="overlay-rpi-pico-pio.conf"
212
+ extra_configs :
213
+ - CONFIG_SPI_RPI_PICO_PIO_DMA=y
214
+ - CONFIG_DMA=y
215
+ - CONFIG_PRINTK=y
216
+ platform_allow : rpi_pico
208
217
drivers.spi.mcux_flexio_spi.loopback :
209
218
extra_args : DTC_OVERLAY_FILE="overlay-mcux-flexio-spi.overlay"
210
219
filter : CONFIG_DT_HAS_NXP_FLEXIO_ENABLED and
You can’t perform that action at this time.
0 commit comments