1/* 2 * SPDX-License-Identifier: Apache-2.0 3 * 4 * Copyright (c) 2022 TOKITA Hiroshi <tokita.hiroshi@gmail.com> 5 */ 6 7#include <dt-bindings/dma/gd32_dma.h> 8 9&dma1 { 10 status = "okay"; 11}; 12 13&pinctrl { 14 spi0_default: spi0_default { 15 group1 { 16 pinmux = <SPI0_MISO_PA6>, <SPI0_SCK_PA5>, 17 <SPI0_MOSI_PA7>, <SPI0_NSS_PA4>; 18 }; 19 }; 20}; 21 22&spi0 { 23 status = "okay"; 24 pinctrl-0 = <&spi0_default>; 25 pinctrl-names = "default"; 26 27 cs-gpios = <&gpioa 4 GPIO_ACTIVE_LOW>; 28 29 dmas = <&dma1 0 3 0 0>, <&dma1 5 3 0 0>; 30 dma-names = "rx", "tx"; 31 32 slow@0 { 33 compatible = "test-spi-loopback-slow"; 34 reg = <0>; 35 spi-max-frequency = <500000>; 36 }; 37 fast@0 { 38 compatible = "test-spi-loopback-fast"; 39 reg = <0>; 40 spi-max-frequency = <16000000>; 41 }; 42}; 43