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
2 changed files with 8 additions and 0 deletions
|
@ -24,6 +24,11 @@ properties:
|
||||||
# Parameter syntax of stm32 follows the dma client dts syntax
|
# Parameter syntax of stm32 follows the dma client dts syntax
|
||||||
# in the Linux kernel declared in
|
# 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
|
# 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:
|
dma-cells:
|
||||||
- channel
|
- channel
|
||||||
|
|
|
@ -4,8 +4,11 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
/* macros for channel-config */
|
/* 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_PERIPH_ADDR_INC(config) (config & 0x1 << 9)
|
||||||
#define STM32_DMA_CONFIG_MEM_ADDR_INC(config) (config & 0x1 << 10)
|
#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_PERIPH_INC_FIXED(config) (config & 0x1 << 15)
|
||||||
#define STM32_DMA_CONFIG_PRIORITY(config) ((config >> 16) & 0x3)
|
#define STM32_DMA_CONFIG_PRIORITY(config) ((config >> 16) & 0x3)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue