Skip to content

Commit 3002840

Browse files
mertekrennashif
authored andcommitted
dts: arm: adi: Add MAX32675 DMA instance and binding file
Add DMA0 node to MAX32675 dtsi file and add binding file for DMA slots. Signed-off-by: Mert Ekren <[email protected]>
1 parent bd20604 commit 3002840

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

dts/arm/adi/max32/max32675.dtsi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <arm/armv7-m.dtsi>
88
#include <adi/max32/max32xxx.dtsi>
9+
#include <zephyr/dt-bindings/dma/max32675_dma.h>
910

1011
&flash0 {
1112
reg = <0x10000000 DT_SIZE_K(384)>;
@@ -60,6 +61,16 @@
6061
reg = <0x20024000 DT_SIZE_K(16)>;
6162
};
6263

64+
dma0: dma@40028000 {
65+
compatible = "adi,max32-dma";
66+
reg = <0x40028000 0x1000>;
67+
clocks = <&gcr ADI_MAX32_CLOCK_BUS0 5>;
68+
interrupts = <28 0>, <29 0>, <30 0>, <31 0>, <68 0>, <69 0>, <70 0>, <71 0>;
69+
dma-channels = <8>;
70+
status = "disabled";
71+
#dma-cells = <2>;
72+
};
73+
6374
spi1: spi@40047000 {
6475
compatible = "adi,max32-spi";
6576
reg = <0x40047000 0x1000>;
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2024 Analog Devices, Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_DMA_MAX32675_DMA_H_
8+
#define ZEPHYR_INCLUDE_DT_BINDINGS_DMA_MAX32675_DMA_H_
9+
10+
#define MAX32_DMA_SLOT_MEMTOMEM 0x00U
11+
#define MAX32_DMA_SLOT_SPI0_RX 0x01U
12+
#define MAX32_DMA_SLOT_SPI1_RX 0x02U
13+
#define MAX32_DMA_SLOT_UART0_RX 0x04U
14+
#define MAX32_DMA_SLOT_I2C0_RX 0x07U
15+
#define MAX32_DMA_SLOT_I2C2_RX 0x0AU
16+
#define MAX32_DMA_SLOT_UART2_RX 0x0EU
17+
#define MAX32_DMA_SLOT_AES_RX 0x10U
18+
#define MAX32_DMA_SLOT_I2S_RX 0x1EU
19+
#define MAX32_DMA_SLOT_SPI0_TX 0x21U
20+
#define MAX32_DMA_SLOT_SPI1_TX 0x22U
21+
#define MAX32_DMA_SLOT_UART0_TX 0x24U
22+
#define MAX32_DMA_SLOT_I2C0_TX 0x27U
23+
#define MAX32_DMA_SLOT_I2C2_TX 0x2AU
24+
#define MAX32_DMA_SLOT_CRC 0x2CU
25+
#define MAX32_DMA_SLOT_UART2_TX 0x2EU
26+
#define MAX32_DMA_SLOT_AES_TX 0x30U
27+
#define MAX32_DMA_SLOT_I2S_TX 0x3EU
28+
29+
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_DMA_MAX32675_DMA_H_ */

0 commit comments

Comments
 (0)