dts: bindings: dma add support for controller
This patch introduces the periph to/from memory dma transfer define new values for dma cells on client side Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
parent
25700ace0a
commit
b7a3e7dc31
|
@ -24,6 +24,11 @@ properties:
|
|||
# Parameter syntax of stm32 follows the dma client dts syntax
|
||||
# in the Linux kernel declared in
|
||||
# https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git/plain/Bindings/dma/stm32-dma.txt
|
||||
#
|
||||
# channel: DMA channel
|
||||
# slot: DMA stream of the DMA channel for DMA V1 or for DMA V2 with MUX peripheral request else NA
|
||||
# channel-config: configuration of the selected DMA channel
|
||||
# features: fifo threshold if relevant for DMA V1 or TBD for DMA V2
|
||||
|
||||
dma-cells:
|
||||
- channel
|
||||
|
|
|
@ -4,8 +4,11 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
/* macros for channel-config */
|
||||
#define STM32_DMA_CONFIG_DIRECTION(config) (config & 0x3 << 6)
|
||||
#define STM32_DMA_CONFIG_PERIPH_ADDR_INC(config) (config & 0x1 << 9)
|
||||
#define STM32_DMA_CONFIG_MEM_ADDR_INC(config) (config & 0x1 << 10)
|
||||
#define STM32_DMA_CONFIG_PERIPH_DATA_SIZE(config) (config & (0x3 << 11))
|
||||
#define STM32_DMA_CONFIG_MEM_DATA_SIZE(config) (config & (0x3 << 13))
|
||||
#define STM32_DMA_CONFIG_PERIPH_INC_FIXED(config) (config & 0x1 << 15)
|
||||
#define STM32_DMA_CONFIG_PRIORITY(config) ((config >> 16) & 0x3)
|
||||
|
||||
|
|
Loading…
Reference in a new issue