Skip to content

Commit e40a11e

Browse files
rcornall-adikartben
authored andcommitted
samples: drivers: spi_flash: Add MAX32655 support
Enable spi_flash sample for MAX32655FTHR and MAX32655EVKIT which have an external Winbond W25Q128jv external flash. Signed-off-by: Tahsin Mutlugun <[email protected]> Signed-off-by: Rob Cornall <[email protected]> Signed-off-by: Yasin Ustuner <[email protected]>
1 parent 90367c8 commit e40a11e

File tree

3 files changed

+72
-2
lines changed

3 files changed

+72
-2
lines changed

boards/adi/max32655evkit/max32655evkit_max32655_m4.dts

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023-2024 Analog Devices, Inc.
2+
* Copyright (c) 2023-2025 Analog Devices, Inc.
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -132,3 +132,34 @@
132132
&rtc_counter {
133133
status = "okay";
134134
};
135+
136+
&spi0_mosi_p0_5 {
137+
power-source = <MAX32_VSEL_VDDIOH>;
138+
};
139+
140+
&spi0_miso_p0_6 {
141+
power-source = <MAX32_VSEL_VDDIOH>;
142+
};
143+
144+
&spi0_sck_p0_7 {
145+
power-source = <MAX32_VSEL_VDDIOH>;
146+
};
147+
148+
&spi0 {
149+
status = "okay";
150+
pinctrl-0 = <&spi0_mosi_p0_5 &spi0_miso_p0_6 &spi0_sck_p0_7>;
151+
pinctrl-names = "default";
152+
cs-gpios = <&gpio0 4 (GPIO_ACTIVE_LOW | MAX32_GPIO_VSEL_VDDIOH)>;
153+
154+
spi0_cs0_flash: w25q128@0 {
155+
compatible = "jedec,spi-nor";
156+
/* 134217728 bits = 16 Mbytes */
157+
size = <0x8000000>;
158+
reg = <0>;
159+
spi-max-frequency = <10000000>;
160+
jedec-id = [ef 40 18];
161+
hold-gpios = <&gpio0 9 (GPIO_ACTIVE_LOW | MAX32_GPIO_VSEL_VDDIOH)>;
162+
wp-gpios = <&gpio0 8 (GPIO_ACTIVE_HIGH | MAX32_GPIO_VSEL_VDDIOH)>;
163+
status = "okay";
164+
};
165+
};

boards/adi/max32655fthr/max32655fthr_max32655_m4.dts

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023-2024 Analog Devices, Inc.
2+
* Copyright (c) 2023-2025 Analog Devices, Inc.
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -161,3 +161,35 @@
161161
&rtc_counter {
162162
status = "okay";
163163
};
164+
165+
&spi0_mosi_p0_5 {
166+
power-source = <MAX32_VSEL_VDDIOH>;
167+
};
168+
169+
&spi0_miso_p0_6 {
170+
power-source = <MAX32_VSEL_VDDIOH>;
171+
};
172+
173+
&spi0_sck_p0_7 {
174+
power-source = <MAX32_VSEL_VDDIOH>;
175+
};
176+
177+
&spi0 {
178+
status = "okay";
179+
pinctrl-0 = <&spi0_mosi_p0_5 &spi0_miso_p0_6 &spi0_sck_p0_7>;
180+
pinctrl-names = "default";
181+
cs-gpios = <&gpio0 4 (GPIO_ACTIVE_LOW | MAX32_GPIO_VSEL_VDDIOH)>,
182+
<&gpio0 11 (GPIO_ACTIVE_LOW | MAX32_GPIO_VSEL_VDDIOH)>;
183+
184+
spi0_cs1_flash: w25q128jv@1 {
185+
compatible = "jedec,spi-nor";
186+
/* 134217728 bits = 16 Mbytes */
187+
size = <0x8000000>;
188+
reg = <1>;
189+
spi-max-frequency = <10000000>;
190+
jedec-id = [ef 70 18];
191+
hold-gpios = <&gpio0 9 (GPIO_ACTIVE_LOW | MAX32_GPIO_VSEL_VDDIOH)>;
192+
wp-gpios = <&gpio0 8 (GPIO_ACTIVE_HIGH | MAX32_GPIO_VSEL_VDDIOH)>;
193+
status = "okay";
194+
};
195+
};
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#
2+
# Copyright (c) 2025 Analog Devices, Inc.
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
CONFIG_SPI_MAX32_INTERRUPT=y

0 commit comments

Comments
 (0)