Skip to content

Commit 40a7dd8

Browse files
dts: i2s: add i2s node for max32655fthr
- add basic dma only i2s dts binding for max32-i2s - add i2s node with default config to max32655.dtsi - add i2s pin definition for max32655fthr board as per spec Signed-off-by: Anuj Pathak <[email protected]>
1 parent 4b3cb73 commit 40a7dd8

File tree

4 files changed

+60
-1
lines changed

4 files changed

+60
-1
lines changed

boards/adi/max32655fthr/max32655fthr_max32655_m4.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@
154154
status = "okay";
155155
};
156156

157+
&i2s0 {
158+
status = "okay";
159+
pinctrl-0 = <&i2s_sck_p1_2 &i2s_ws_p1_3 &i2s_sdi_p1_4 &i2s_sdo_p1_5>;
160+
pinctrl-names = "default";
161+
};
162+
157163
&wdt0 {
158164
status = "okay";
159165
};

dts/arm/adi/max32/max32655.dtsi

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,5 +164,23 @@
164164
status = "disabled";
165165
};
166166
};
167+
168+
i2s0: i2s0@40060000 {
169+
compatible = "adi,max32-i2s";
170+
reg = <0x40060000 0x1000>;
171+
#address-cells = <1>;
172+
#size-cells = <0>;
173+
/*
174+
* DMA Configuration is provided as an example.
175+
* user is free to change dma channel index,
176+
* but tx and rx slot should be kept same as below
177+
*
178+
* ref to MAX32655 User Guide
179+
* Table 9-2: DMA Source and Destination by Peripheral
180+
*/
181+
dmas = <&dma0 0 MAX32_DMA_SLOT_I2S_TX>, <&dma0 1 MAX32_DMA_SLOT_I2S_RX>;
182+
dma-names = "tx", "rx";
183+
status = "disabled";
184+
};
167185
};
168186
};
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright (c) 2025 Croxel Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: Analog Devices MAX32 series I2S controller
5+
6+
compatible: "adi,max32-i2s"
7+
8+
include: [i2s-controller.yaml, pinctrl-device.yaml]
9+
10+
properties:
11+
reg:
12+
required: true
13+
14+
dmas:
15+
required: true
16+
description: |
17+
DMA channels for RX and TX. Two channels must be provided in the following order:
18+
- RX DMA channel
19+
- TX DMA channel
20+
21+
dma-names:
22+
required: true
23+
description: |
24+
Names of DMA channels for RX and TX. Must be provided in the following order:
25+
- rx
26+
- tx
27+
28+
i2s-clk-frequency:
29+
type: int
30+
default: 12288000
31+
description: |
32+
Frequency of the I2S clock in Hz.
33+
This clock is used to derive the bit clock and frame clock.
34+
Default to 12.288 MHz, which is suitable for common audio sample rates.

include/zephyr/dt-bindings/dma/max32655_dma.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#define MAX32_DMA_SLOT_UART2_RX 0x0EU
1919
#define MAX32_DMA_SLOT_SPI0_RX 0x0FU
2020
#define MAX32_DMA_SLOT_UART3_RX 0x1CU
21+
#define MAX32_DMA_SLOT_I2S_RX 0x1EU
2122
#define MAX32_DMA_SLOT_SPI1_TX 0x21U
2223
#define MAX32_DMA_SLOT_UART0_TX 0x24U
2324
#define MAX32_DMA_SLOT_UART1_TX 0x25U
@@ -28,6 +29,6 @@
2829
#define MAX32_DMA_SLOT_UART2_TX 0x2EU
2930
#define MAX32_DMA_SLOT_SPI0_TX 0x2FU
3031
#define MAX32_DMA_SLOT_UART3_TX 0x3CU
31-
#define MAX32_DMA_SLOT_I2S 0x3EU
32+
#define MAX32_DMA_SLOT_I2S_TX 0x3EU
3233

3334
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_DMA_MAX32655_DMA_H_ */

0 commit comments

Comments
 (0)