Skip to content

Commit 08a4259

Browse files
haduongquangcarlescufi
authored andcommitted
boards/tests: dma: enable dma for S32Z270
Enable dma boards/test for S32Z270. The non-cacheable memory used for DMA tests (chan_blen_transfer and loop_transfer) is split from the system SRAM. Signed-off-by: Ha Duong Quang <[email protected]>
1 parent 12bb3fb commit 08a4259

19 files changed

+195
-0
lines changed

boards/nxp/s32z2xxdc2/doc/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ The boards support the following hardware features:
5959
+-----------+------------+-------------------------------------+
6060
| LPI2C | on-chip | i2c |
6161
+-----------+------------+-------------------------------------+
62+
| EDMA | on-chip | dma |
63+
+-----------+------------+-------------------------------------+
6264

6365
Other hardware features are not currently supported by the port.
6466

@@ -163,6 +165,12 @@ ADC is provided through ADC SAR controller with 2 instances. Each ADC SAR instan
163165
.. note::
164166
All channels of an instance only run on 1 group channel at the same time.
165167

168+
EDMA
169+
====
170+
171+
The EDMA modules feature four EDMA3 instances: Instance 0 with 32 channels,
172+
and instances 1, 4, and 5, each with 16 channels.
173+
166174
Programming and Debugging
167175
*************************
168176

boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ supported:
1818
- counter
1919
- adc
2020
- i2c
21+
- dma
2122
vendor: nxp

boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0_D.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ supported:
1818
- counter
1919
- adc
2020
- i2c
21+
- dma
2122
vendor: nxp

boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ supported:
1818
- counter
1919
- adc
2020
- i2c
21+
- dma
2122
vendor: nxp

boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1_D.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ supported:
1818
- counter
1919
- adc
2020
- i2c
21+
- dma
2122
vendor: nxp
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
CONFIG_DMA_TRANSFER_CHANNEL_NR_0=0
2+
CONFIG_DMA_TRANSFER_CHANNEL_NR_1=16
3+
CONFIG_CODE_DATA_RELOCATION=y
4+
CONFIG_DMA_LOOP_TRANSFER_RELOCATE_SECTION="SRAMNOCACHE"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright 2024 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>
8+
9+
/ {
10+
soc {
11+
sram_nocache: memory@31870000 {
12+
compatible = "zephyr,memory-region", "mmio-sram";
13+
reg = <0x31870000 DT_SIZE_K(64)>;
14+
zephyr,memory-region = "SRAMNOCACHE";
15+
zephyr,memory-attr = <(DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE))>;
16+
};
17+
};
18+
};
19+
20+
&sram0 {
21+
compatible = "mmio-sram";
22+
reg = <0x31780000 DT_SIZE_K(960)>;
23+
};
24+
25+
&edma0 {
26+
status = "okay";
27+
};
28+
29+
tst_dma0: &edma0 { };
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
CONFIG_DMA_TRANSFER_CHANNEL_NR_0=0
2+
CONFIG_DMA_TRANSFER_CHANNEL_NR_1=15
3+
CONFIG_CODE_DATA_RELOCATION=y
4+
CONFIG_DMA_LOOP_TRANSFER_RELOCATE_SECTION="SRAMNOCACHE"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright 2024 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>
8+
9+
/ {
10+
soc {
11+
sram_nocache: memory@35870000 {
12+
compatible = "zephyr,memory-region", "mmio-sram";
13+
reg = <0x35870000 DT_SIZE_K(64)>;
14+
zephyr,memory-region = "SRAMNOCACHE";
15+
zephyr,memory-attr = <(DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE))>;
16+
};
17+
};
18+
};
19+
20+
&sram1 {
21+
compatible = "mmio-sram";
22+
reg = <0x35780000 DT_SIZE_K(960)>;
23+
};
24+
25+
&edma5 {
26+
status = "okay";
27+
};
28+
29+
tst_dma0: &edma5 { };
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright 2024 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&edma0 {
8+
status = "okay";
9+
};
10+
11+
dma0: &edma0 { };

0 commit comments

Comments
 (0)