Skip to content

Commit de9f48e

Browse files
Yasin Ustunerkartben
authored andcommitted
soc: adi: Add MAX32660 SoC
This commit adds MAX32660 SoC and dts files. Signed-off-by: Yasin Ustuner <[email protected]>
1 parent ea59127 commit de9f48e

File tree

5 files changed

+259
-0
lines changed

5 files changed

+259
-0
lines changed
Lines changed: 149 additions & 0 deletions
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

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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+
&sram0 {
15+
reg = <0x20000000 DT_SIZE_K(16)>;
16+
};
17+
18+
/delete-node/ &clk_iso;
19+
/delete-node/ &clk_ibro;
20+
/delete-node/ &clk_erfo;
21+
/delete-node/ &adc;
22+
/delete-node/ &gpio1;
23+
/delete-node/ &i2c2;
24+
/delete-node/ &uart2;
25+
/delete-node/ &timer3;
26+
/delete-node/ &trng;
27+
/delete-node/ &flash0;
28+
29+
&flc0 {
30+
flash0: flash@0{
31+
compatible = "soc-nv-flash";
32+
reg = <0x00000000 DT_SIZE_K(256)>;
33+
write-block-size = <16>;
34+
erase-block-size = <8192>;
35+
};
36+
};
37+
38+
/* MAX32660 extra peripherals. */
39+
/ {
40+
chosen {
41+
/delete-property/ zephyr,entropy;
42+
};
43+
44+
soc {
45+
sram1: memory@20004000 {
46+
compatible = "mmio-sram";
47+
reg = <0x20004000 DT_SIZE_K(16)>;
48+
};
49+
50+
sram2: memory@20008000 {
51+
compatible = "mmio-sram";
52+
reg = <0x20008000 DT_SIZE_K(32)>;
53+
};
54+
55+
sram3: memory@20010000 {
56+
compatible = "mmio-sram";
57+
reg = <0x20010000 DT_SIZE_K(32)>;
58+
};
59+
60+
dma0: dma@40028000 {
61+
compatible = "adi,max32-dma";
62+
reg = <0x40028000 0x1000>;
63+
clocks = <&gcr ADI_MAX32_CLOCK_BUS0 5>;
64+
interrupts = <28 0>, <29 0>, <30 0>, <31 0>;
65+
dma-channels = <4>;
66+
status = "disabled";
67+
#dma-cells = <2>;
68+
};
69+
70+
spi0: spi@40046000 {
71+
compatible = "adi,max32-spi";
72+
reg = <0x40046000 0x1000>;
73+
#address-cells = <1>;
74+
#size-cells = <0>;
75+
clocks = <&gcr ADI_MAX32_CLOCK_BUS0 6>;
76+
interrupts = <16 0>;
77+
status = "disabled";
78+
};
79+
80+
spi1: spi@40019000 {
81+
compatible = "adi,max32-spi";
82+
reg = <0x40019000 0x1000>;
83+
#address-cells = <1>;
84+
#size-cells = <0>;
85+
clocks = <&gcr ADI_MAX32_CLOCK_BUS0 7>;
86+
interrupts = <17 0>;
87+
status = "disabled";
88+
};
89+
};
90+
};
Lines changed: 14 additions & 0 deletions
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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ config SOC_MAX32655_M4
2525
select SOC_MAX32655
2626
select SOC_FAMILY_MAX32_M4
2727

28+
config SOC_MAX32660
29+
bool
30+
select SOC_FAMILY_MAX32_M4
31+
2832
config SOC_MAX32662
2933
bool
3034
select SOC_FAMILY_MAX32_M4
@@ -84,6 +88,7 @@ config SOC_MAX78002_M4
8488
config SOC
8589
default "max32650" if SOC_MAX32650
8690
default "max32655" if SOC_MAX32655
91+
default "max32660" if SOC_MAX32660
8792
default "max32662" if SOC_MAX32662
8893
default "max32666" if SOC_MAX32666
8994
default "max32670" if SOC_MAX32670

soc/adi/max32/soc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ family:
88
- name: max32655
99
cpuclusters:
1010
- name: m4
11+
- name: max32660
1112
- name: max32662
1213
- name: max32666
1314
cpuclusters:

0 commit comments

Comments
 (0)