1/* 2 * Copyright (c) 2020 Stephanos Ioannidis <root@stephanos.io> 3 * Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com> 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8&dmac { 9 status = "okay"; 10}; 11 12&sercom4 { 13 /* Internally connect MOSI to MISO for loop-back operation */ 14 dipo = <3>; 15 dopo = <2>; 16 17 /* Assign a CS pin */ 18 cs-gpios = <&portb 28 GPIO_ACTIVE_LOW>; 19 20 /* Configure DMA */ 21 dmas = <&dmac 0 12>, <&dmac 1 13>; 22 dma-names = "rx", "tx"; 23 24 slow@0 { 25 compatible = "test-spi-loopback-slow"; 26 reg = <0>; 27 spi-max-frequency = <500000>; 28 }; 29 fast@0 { 30 compatible = "test-spi-loopback-fast"; 31 reg = <0>; 32 spi-max-frequency = <16000000>; 33 }; 34}; 35