Skip to content

Commit 9e6ca51

Browse files
ozersakartben
authored andcommitted
boards: Add MAX32657EVKit board
This commit add secure board of MAX32657. Only GPIO and UART drivers have been enabled. To build: - west build -b max32657evkit/max32657 -p Co-authored-by:: Furkan Akkiz <[email protected]> Signed-off-by: Sadik Ozer <[email protected]>
1 parent f9ce25f commit 9e6ca51

File tree

10 files changed

+553
-0
lines changed

10 files changed

+553
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright (c) 2024-2025 Analog Devices, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if BOARD_MAX32657EVKIT
5+
6+
# Code Partition:
7+
#
8+
# For the secure version of the board the firmware is linked at the beginning
9+
# of the flash, or into the code-partition defined in DT if it is intended to
10+
# be loaded by MCUboot. If the secure firmware is to be combined with a non-
11+
# secure image (TRUSTED_EXECUTION_SECURE=y), the secure FW image shall always
12+
# be restricted to the size of its code partition.
13+
#
14+
# For the non-secure version of the board, the firmware
15+
# must be linked into the code-partition (non-secure) defined in DT, regardless.
16+
# Apply this configuration below by setting the Kconfig symbols used by
17+
# the linker according to the information extracted from DT partitions.
18+
19+
# Workaround for not being able to have commas in macro arguments
20+
DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition
21+
22+
config FLASH_LOAD_SIZE
23+
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
24+
25+
endif # BOARD_MAX32657EVKIT
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2024-2025 Analog Devices, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_MAX32657EVKIT
5+
select SOC_MAX32657 if BOARD_MAX32657EVKIT_MAX32657
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (c) 2024-2025 Analog Devices, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
board_runner_args(openocd --cmd-pre-init "source [find interface/jlink.cfg]")
5+
board_runner_args(openocd --cmd-pre-init "source [find target/max32657.cfg]")
6+
7+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)

boards/adi/max32657evkit/board.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2024-2025 Analog Devices, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
board:
5+
name: max32657evkit
6+
vendor: adi
7+
socs:
8+
- name: max32657
45.9 KB
Loading

boards/adi/max32657evkit/doc/index.rst

Lines changed: 369 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Copyright (c) 2024-2025 Analog Devices, Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include <adi/max32/max32657.dtsi>
10+
#include "max32657evkit_max32657_common.dtsi"
11+
12+
/ {
13+
chosen {
14+
zephyr,sram = &secure_ram;
15+
zephyr,flash = &flash0;
16+
zephyr,code-partition = &slot0_partition;
17+
};
18+
19+
reserved-memory {
20+
#address-cells = <1>;
21+
#size-cells = <1>;
22+
ranges;
23+
24+
secure_ram: partition@30000000 {
25+
label = "secure-memory";
26+
reg = <0x30000000 DT_SIZE_K(256)>;
27+
};
28+
};
29+
};
30+
31+
&flash0 {
32+
partitions {
33+
compatible = "fixed-partitions";
34+
#address-cells = <1>;
35+
#size-cells = <1>;
36+
37+
slot0_partition: partition@0 {
38+
label = "image-0";
39+
reg = <0x0 DT_SIZE_K(960)>;
40+
read-only;
41+
};
42+
43+
storage_partition: partition@f0000 {
44+
label = "storage";
45+
reg = <0xf0000 DT_SIZE_K(64)>;
46+
};
47+
};
48+
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
identifier: max32657evkit/max32657
2+
name: max32657evkit-max32657
3+
vendor: adi
4+
type: mcu
5+
arch: arm
6+
toolchain:
7+
- zephyr
8+
- gnuarmemb
9+
supported:
10+
- serial
11+
- gpio
12+
ram: 256
13+
flash: 960
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
* Copyright (c) 2024-2025 Analog Devices, Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <adi/max32/max32657-pinctrl.dtsi>
8+
#include <zephyr/dt-bindings/gpio/gpio.h>
9+
#include <zephyr/dt-bindings/gpio/adi-max32-gpio.h>
10+
#include <zephyr/dt-bindings/input/input-event-codes.h>
11+
12+
/ {
13+
model = "Analog Devices MAX32657EVKIT";
14+
compatible = "adi,max32657evkit";
15+
16+
chosen {
17+
zephyr,console = &uart0;
18+
zephyr,shell-uart = &uart0;
19+
};
20+
21+
leds {
22+
compatible = "gpio-leds";
23+
24+
led1: led_1 {
25+
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
26+
label = "Green LED";
27+
};
28+
};
29+
30+
buttons {
31+
compatible = "gpio-keys";
32+
33+
pb1: pb1 {
34+
gpios = <&gpio0 12 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
35+
label = "SW2";
36+
zephyr,code = <INPUT_KEY_0>;
37+
};
38+
};
39+
40+
/* These aliases are provided for compatibility with samples */
41+
aliases {
42+
led0 = &led1;
43+
sw0 = &pb1;
44+
};
45+
};
46+
47+
&uart0 {
48+
pinctrl-0 = <&uart0_tx_p0_9 &uart0_rx_p0_5>;
49+
pinctrl-names = "default";
50+
current-speed = <115200>;
51+
data-bits = <8>;
52+
parity = "none";
53+
status = "okay";
54+
};
55+
56+
&clk_ipo {
57+
status = "okay";
58+
};
59+
60+
&gpio0 {
61+
status = "okay";
62+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (c) 2024-2025 Analog Devices, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Enable GPIO
5+
CONFIG_GPIO=y
6+
7+
# Console
8+
CONFIG_CONSOLE=y
9+
CONFIG_UART_CONSOLE=y
10+
11+
# Enable UART
12+
CONFIG_SERIAL=y
13+
CONFIG_UART_INTERRUPT_DRIVEN=y
14+
15+
# It is secure fw, enable flags
16+
CONFIG_TRUSTED_EXECUTION_SECURE=y

0 commit comments

Comments
 (0)