|
| 1 | +description: | |
| 2 | + Silicon Labs SiWx91x General Purpose DMA (GPDMA) Controller |
| 3 | +
|
| 4 | + The SiWx91x GPDMA controller provides high-performance DMA transfers for |
| 5 | + memory-to-memory, memory-to-peripheral, and peripheral-to-memory operations. |
| 6 | + It supports up to 8 channels. |
| 7 | +
|
| 8 | + Usage in Device Tree Overlays: |
| 9 | +
|
| 10 | + To enable GPDMA for a peripheral (e.g., SPI), add the following to your overlay: |
| 11 | +
|
| 12 | + ```dts |
| 13 | + &spi0 { |
| 14 | + status = "okay"; |
| 15 | + cs-gpios = <&gpiob 12 GPIO_ACTIVE_LOW>; |
| 16 | + pinctrl-0 = <&spi0_default>; |
| 17 | + pinctrl-names = "default"; |
| 18 | +
|
| 19 | + dmas = <&gpdma0 0 11>, <&gpdma0 1 10>; |
| 20 | + dma-names = "tx", "rx"; |
| 21 | +
|
| 22 | + slow@0 { |
| 23 | + compatible = "test-spi-loopback-slow"; |
| 24 | + reg = <0>; |
| 25 | + spi-max-frequency = <500000>; |
| 26 | + }; |
| 27 | + fast@1 { |
| 28 | + compatible = "test-spi-loopback-fast"; |
| 29 | + reg = <1>; |
| 30 | + spi-max-frequency = <10000000>; |
| 31 | + }; |
| 32 | + }; |
| 33 | +
|
| 34 | + &gpdma0 { |
| 35 | + status = "okay"; |
| 36 | + }; |
| 37 | + ``` |
| 38 | +
|
| 39 | + DMA Configuration: |
| 40 | + - Channel 0: Used for TX (transmit) operations |
| 41 | + - Channel 1: Used for RX (receive) operations |
| 42 | + - Slot 11: Peripheral slot for SPI TX |
| 43 | + - Slot 10: Peripheral slot for SPI RX |
| 44 | +
|
| 45 | + The GPDMA controller automatically handles descriptor management and |
| 46 | + interrupt generation for transfer completion and error conditions. |
| 47 | +
|
| 48 | +compatible: "silabs,siwx91x-gpdma" |
| 49 | + |
| 50 | +include: dma-controller.yaml |
| 51 | + |
| 52 | +properties: |
| 53 | + reg: |
| 54 | + required: true |
| 55 | + |
| 56 | + silabs,channel-reg-base: |
| 57 | + type: int |
| 58 | + const: 0x21081004 |
| 59 | + description: | |
| 60 | + Base address for channel specific registers. |
| 61 | +
|
| 62 | + silabs,dma-channel-count: |
| 63 | + type: int |
| 64 | + const: 8 |
| 65 | + description: | |
| 66 | + Base address for channel specific registers. |
| 67 | +
|
| 68 | + "#dma-cells": |
| 69 | + const: 2 |
| 70 | + |
| 71 | +# Parameter syntax |
| 72 | +dma-cells: |
| 73 | + - channel |
| 74 | + - slot |
0 commit comments