Skip to content

Commit e1c6838

Browse files
yasin-ADIMaureenHelm
authored andcommitted
soc: adi: Add MAX32660 SoC
This commit adds MAX32660 SoC and dts files. Signed-off-by: Yasin Ustuner <[email protected]>
1 parent 9349aab commit e1c6838

File tree

5 files changed

+253
-0
lines changed

5 files changed

+253
-0
lines changed
+149
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
/*
2+
* Copyright (c) 2025 Analog Devices, Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/pinctrl/max32-pinctrl.h>
8+
9+
/ {
10+
soc {
11+
pinctrl: pin-controller@40008000 {
12+
/omit-if-no-ref/ swdio_p0_0: swdio_p0_0 {
13+
pinmux = <MAX32_PINMUX(0, 0, AF1)>;
14+
};
15+
16+
/omit-if-no-ref/ spi1_miso_p0_0: spi1_miso_p0_0 {
17+
pinmux = <MAX32_PINMUX(0, 0, AF2)>;
18+
};
19+
20+
/omit-if-no-ref/ uart1_tx_p0_0: uart1_tx_p0_0 {
21+
pinmux = <MAX32_PINMUX(0, 0, AF3)>;
22+
};
23+
24+
/omit-if-no-ref/ swdclk_p0_1: swdclk_p0_1 {
25+
pinmux = <MAX32_PINMUX(0, 1, AF1)>;
26+
};
27+
28+
/omit-if-no-ref/ spi1_mosi_p0_1: spi1_mosi_p0_1 {
29+
pinmux = <MAX32_PINMUX(0, 1, AF2)>;
30+
};
31+
32+
/omit-if-no-ref/ uart1_rx_p0_1: uart1_rx_p0_1 {
33+
pinmux = <MAX32_PINMUX(0, 1, AF3)>;
34+
};
35+
36+
/omit-if-no-ref/ i2c1_scl_p0_2: i2c1_scl_p0_2 {
37+
pinmux = <MAX32_PINMUX(0, 2, AF1)>;
38+
};
39+
40+
/omit-if-no-ref/ spi1_sck_p0_2: spi1_sck_p0_2 {
41+
pinmux = <MAX32_PINMUX(0, 2, AF2)>;
42+
};
43+
44+
/omit-if-no-ref/ cal32k_p0_2: cal32k_p0_2 {
45+
pinmux = <MAX32_PINMUX(0, 2, AF3)>;
46+
};
47+
48+
/omit-if-no-ref/ i2c1_sda_p0_3: i2c1_sda_p0_3 {
49+
pinmux = <MAX32_PINMUX(0, 3, AF1)>;
50+
};
51+
52+
/omit-if-no-ref/ spi1_ss0_p0_3: spi1_ss0_p0_3 {
53+
pinmux = <MAX32_PINMUX(0, 3, AF2)>;
54+
};
55+
56+
/omit-if-no-ref/ tmr0_p0_3: tmr0_p0_3 {
57+
pinmux = <MAX32_PINMUX(0, 3, AF3)>;
58+
};
59+
60+
/omit-if-no-ref/ spi0_miso_p0_4: spi0_miso_p0_4 {
61+
pinmux = <MAX32_PINMUX(0, 4, AF1)>;
62+
};
63+
64+
/omit-if-no-ref/ uart0_tx_p0_4: uart0_tx_p0_4 {
65+
pinmux = <MAX32_PINMUX(0, 4, AF2)>;
66+
};
67+
68+
/omit-if-no-ref/ spi0_mosi_p0_5: spi0_mosi_p0_5 {
69+
pinmux = <MAX32_PINMUX(0, 5, AF1)>;
70+
};
71+
72+
/omit-if-no-ref/ uart0_rx_p0_5: uart0_rx_p0_5 {
73+
pinmux = <MAX32_PINMUX(0, 5, AF2)>;
74+
};
75+
76+
/omit-if-no-ref/ spi0_sck_p0_6: spi0_sck_p0_6 {
77+
pinmux = <MAX32_PINMUX(0, 6, AF1)>;
78+
};
79+
80+
/omit-if-no-ref/ uart0_cts_p0_6: uart0_cts_p0_6 {
81+
pinmux = <MAX32_PINMUX(0, 6, AF2)>;
82+
};
83+
84+
/omit-if-no-ref/ uart1_tx_p0_6: uart1_tx_p0_6 {
85+
pinmux = <MAX32_PINMUX(0, 6, AF3)>;
86+
};
87+
88+
/omit-if-no-ref/ spi0_ss0_p0_7: spi0_ss0_p0_7 {
89+
pinmux = <MAX32_PINMUX(0, 7, AF1)>;
90+
};
91+
92+
/omit-if-no-ref/ uart0_rts_p0_7: uart0_rts_p0_7 {
93+
pinmux = <MAX32_PINMUX(0, 7, AF2)>;
94+
};
95+
96+
/omit-if-no-ref/ uart1_rx_p0_7: uart1_rx_p0_7 {
97+
pinmux = <MAX32_PINMUX(0, 7, AF3)>;
98+
};
99+
100+
/omit-if-no-ref/ i2c0_scl_p0_8: i2c0_scl_p0_8 {
101+
pinmux = <MAX32_PINMUX(0, 8, AF1)>;
102+
};
103+
104+
/omit-if-no-ref/ swdio_p0_8: swdio_p0_8 {
105+
pinmux = <MAX32_PINMUX(0, 8, AF2)>;
106+
};
107+
108+
/omit-if-no-ref/ i2c0_sda_p0_9: i2c0_sda_p0_9 {
109+
pinmux = <MAX32_PINMUX(0, 9, AF1)>;
110+
};
111+
112+
/omit-if-no-ref/ swdclk_p0_9: swdclk_p0_9 {
113+
pinmux = <MAX32_PINMUX(0, 9, AF2)>;
114+
};
115+
116+
/omit-if-no-ref/ spi1_miso_p0_10: spi1_miso_p0_10 {
117+
pinmux = <MAX32_PINMUX(0, 10, AF1)>;
118+
};
119+
120+
/omit-if-no-ref/ uart1_tx_p0_10: uart1_tx_p0_10 {
121+
pinmux = <MAX32_PINMUX(0, 10, AF2)>;
122+
};
123+
124+
/omit-if-no-ref/ spi1_mosi_p0_11: spi1_mosi_p0_11 {
125+
pinmux = <MAX32_PINMUX(0, 11, AF1)>;
126+
};
127+
128+
/omit-if-no-ref/ uart1_rx_p0_11: uart1_rx_p0_11 {
129+
pinmux = <MAX32_PINMUX(0, 11, AF2)>;
130+
};
131+
132+
/omit-if-no-ref/ spi1_sck_p0_12: spi1_sck_p0_12 {
133+
pinmux = <MAX32_PINMUX(0, 12, AF1)>;
134+
};
135+
136+
/omit-if-no-ref/ uart1_cts_p0_12: uart1_cts_p0_12 {
137+
pinmux = <MAX32_PINMUX(0, 12, AF2)>;
138+
};
139+
140+
/omit-if-no-ref/ spi1_ss0_p0_13: spi1_ss0_p0_13 {
141+
pinmux = <MAX32_PINMUX(0, 13, AF1)>;
142+
};
143+
144+
/omit-if-no-ref/ uart1_rts_p0_13: uart1_rts_p0_13 {
145+
pinmux = <MAX32_PINMUX(0, 13, AF2)>;
146+
};
147+
};
148+
};
149+
};

dts/arm/adi/max32/max32660.dtsi

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
/*
2+
* Copyright (c) 2025 Analog Devices, Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <arm/armv7-m.dtsi>
8+
#include <adi/max32/max32xxx.dtsi>
9+
10+
&clk_ipo {
11+
clock-frequency = <DT_FREQ_M(96)>;
12+
};
13+
14+
&flash0 {
15+
reg = <0x00000000 DT_SIZE_K(256)>;
16+
};
17+
18+
&sram0 {
19+
reg = <0x20000000 DT_SIZE_K(16)>;
20+
};
21+
22+
/delete-node/ &clk_iso;
23+
/delete-node/ &clk_ibro;
24+
/delete-node/ &clk_erfo;
25+
/delete-node/ &adc;
26+
/delete-node/ &gpio1;
27+
/delete-node/ &i2c2;
28+
/delete-node/ &uart2;
29+
/delete-node/ &timer3;
30+
/delete-node/ &trng;
31+
32+
/* MAX32660 extra peripherals. */
33+
/ {
34+
chosen {
35+
zephyr,entropy = &{/}; /* Assigns an invalid node */
36+
};
37+
38+
soc {
39+
sram1: memory@20004000 {
40+
compatible = "mmio-sram";
41+
reg = <0x20004000 DT_SIZE_K(16)>;
42+
};
43+
44+
sram2: memory@20008000 {
45+
compatible = "mmio-sram";
46+
reg = <0x20008000 DT_SIZE_K(32)>;
47+
};
48+
49+
sram3: memory@20010000 {
50+
compatible = "mmio-sram";
51+
reg = <0x20010000 DT_SIZE_K(32)>;
52+
};
53+
54+
dma0: dma@40028000 {
55+
compatible = "adi,max32-dma";
56+
reg = <0x40028000 0x1000>;
57+
clocks = <&gcr ADI_MAX32_CLOCK_BUS0 5>;
58+
interrupts = <28 0>, <29 0>, <30 0>, <31 0>;
59+
dma-channels = <4>;
60+
status = "disabled";
61+
#dma-cells = <2>;
62+
};
63+
64+
spi0: spi@40046000 {
65+
compatible = "adi,max32-spi";
66+
reg = <0x40046000 0x1000>;
67+
#address-cells = <1>;
68+
#size-cells = <0>;
69+
clocks = <&gcr ADI_MAX32_CLOCK_BUS0 6>;
70+
interrupts = <16 0>;
71+
status = "disabled";
72+
};
73+
74+
spi1: spi@40019000 {
75+
compatible = "adi,max32-spi";
76+
reg = <0x40019000 0x1000>;
77+
#address-cells = <1>;
78+
#size-cells = <0>;
79+
clocks = <&gcr ADI_MAX32_CLOCK_BUS0 7>;
80+
interrupts = <17 0>;
81+
status = "disabled";
82+
};
83+
};
84+
};
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Analog Devices MAX32660 MCU
2+
3+
# Copyright (c) 2025 Analog Devices, Inc.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if SOC_MAX32660
7+
8+
config SYS_CLOCK_HW_CYCLES_PER_SEC
9+
default $(dt_node_int_prop_int,/clocks/clk_ipo,clock-frequency)
10+
11+
config NUM_IRQS
12+
default 55
13+
14+
endif # SOC_MAX32660

soc/adi/max32/Kconfig.soc

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ config SOC_MAX32655_M4
2121
select SOC_MAX32655
2222
select SOC_FAMILY_MAX32_M4
2323

24+
config SOC_MAX32660
25+
bool
26+
select SOC_FAMILY_MAX32_M4
27+
2428
config SOC_MAX32662
2529
bool
2630
select SOC_FAMILY_MAX32_M4
@@ -79,6 +83,7 @@ config SOC_MAX78002_M4
7983

8084
config SOC
8185
default "max32655" if SOC_MAX32655
86+
default "max32660" if SOC_MAX32660
8287
default "max32662" if SOC_MAX32662
8388
default "max32666" if SOC_MAX32666
8489
default "max32670" if SOC_MAX32670

soc/adi/max32/soc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ family:
77
- name: max32655
88
cpuclusters:
99
- name: m4
10+
- name: max32660
1011
- name: max32662
1112
- name: max32666
1213
cpuclusters:

0 commit comments

Comments
 (0)