Skip to content

Commit ee1d4da

Browse files
hfakkiznashif
authored andcommitted
tests: Add MAX78002EVKIT test overlay files
Enable following tests for MAX78002EVKIT: - tests/drivers/adc/adc_api - tests/drivers/counter/counter_basic_api - tests/drivers/dma/chan_blen_transfer - tests/drivers/dma/loop_transfer - tests/drivers/flash/common - tests/drivers/gpio/gpio_basic_api - tests/drivers/i2c/i2c_target_api - tests/drivers/pwm/pwm_api - tests/drivers/spi/spi_loopback - tests/drivers/w1/w1_api Signed-off-by: Furkan Akkiz <[email protected]>
1 parent 4488728 commit ee1d4da

File tree

14 files changed

+256
-0
lines changed

14 files changed

+256
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright (c) 2024 Analog Devices, Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
zephyr,user {
9+
/* adjust channel number according to pinmux in board.dts */
10+
io-channels = <&adc 0>, <&adc 1>;
11+
};
12+
};
13+
14+
&adc {
15+
status = "okay";
16+
pinctrl-0 = <&ain0_p2_0 &ain1_p2_1>;
17+
pinctrl-names = "default";
18+
#address-cells = <1>;
19+
#size-cells = <0>;
20+
21+
channel@0 {
22+
reg = <0>;
23+
zephyr,gain = "ADC_GAIN_1";
24+
zephyr,reference = "ADC_REF_INTERNAL";
25+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
26+
zephyr,resolution = <12>;
27+
};
28+
29+
channel@1 {
30+
reg = <1>;
31+
zephyr,gain = "ADC_GAIN_1";
32+
zephyr,reference = "ADC_REF_INTERNAL";
33+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
34+
zephyr,resolution = <12>;
35+
};
36+
};
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
* Copyright (c) 2024 Analog Devices, Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&timer0 {
8+
status = "okay";
9+
prescaler = <2>;
10+
counter {
11+
status = "okay";
12+
};
13+
};
14+
15+
&timer1 {
16+
status = "okay";
17+
prescaler = <2>;
18+
counter {
19+
status = "okay";
20+
};
21+
};
22+
23+
&timer2 {
24+
status = "okay";
25+
prescaler = <2>;
26+
counter {
27+
status = "okay";
28+
};
29+
};
30+
31+
&timer3 {
32+
status = "okay";
33+
prescaler = <2>;
34+
counter {
35+
status = "okay";
36+
};
37+
};
38+
39+
&lptimer0 {
40+
status = "okay";
41+
clock-source = <ADI_MAX32_PRPH_CLK_SRC_ERTCO>;
42+
counter {
43+
status = "okay";
44+
};
45+
};
46+
47+
&lptimer1 {
48+
status = "okay";
49+
clock-source = <ADI_MAX32_PRPH_CLK_SRC_INRO>;
50+
counter {
51+
status = "okay";
52+
};
53+
};
54+
55+
&clk_ertco {
56+
status = "okay";
57+
};
58+
59+
&clk_inro {
60+
status = "okay";
61+
};
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2024 Analog Devices, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_CODE_DATA_RELOCATION=y
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
* Copyright (c) 2024 Analog Devices, Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
tst_dma0: &dma0 { };
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
* Copyright (c) 2024 Analog Devices, Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
tst_dma0: &dma0 { };
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright (c) 2024 Analog Devices, Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&flash0 {
8+
partitions {
9+
compatible = "fixed-partitions";
10+
#address-cells = <1>;
11+
#size-cells = <1>;
12+
13+
code_partition: partition@0 {
14+
reg = <0x0 DT_SIZE_M(2)>;
15+
read-only;
16+
};
17+
18+
storage_partition: partition@200000 {
19+
label = "storage";
20+
reg = <0x200000 DT_SIZE_K(512)>;
21+
};
22+
};
23+
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Copyright (c) 2024 Analog Devices, Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
resources {
9+
compatible = "test-gpio-basic-api";
10+
out-gpios = <&gpio0 8 0>;
11+
in-gpios = <&gpio0 9 0>;
12+
};
13+
};
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#
2+
# Copyright (c) 2024 Analog Devices, Inc.
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
CONFIG_I2C_VIRTUAL=n
7+
CONFIG_I2C_MAX32_DMA=y
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright (c) 2024 Analog Devices, Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&i2c0 {
8+
dmas = <&dma0 0 MAX78_DMA_SLOT_I2C0_TX>, <&dma0 1 MAX78_DMA_SLOT_I2C0_RX>;
9+
dma-names = "tx", "rx";
10+
11+
eeprom0: eeprom@54 {
12+
compatible = "zephyr,i2c-target-eeprom";
13+
reg = <0x54>;
14+
address-width = <16>;
15+
size = <1024>;
16+
};
17+
};
18+
19+
&i2c1 {
20+
status = "okay";
21+
pinctrl-0 = <&i2c1_scl_p0_16 &i2c1_sda_p0_17>;
22+
pinctrl-names = "default";
23+
24+
dmas = <&dma0 2 MAX78_DMA_SLOT_I2C1_TX>, <&dma0 3 MAX78_DMA_SLOT_I2C1_RX>;
25+
dma-names = "tx", "rx";
26+
27+
eeprom1: eeprom@56 {
28+
compatible = "zephyr,i2c-target-eeprom";
29+
reg = <0x56>;
30+
address-width = <16>;
31+
size = <1024>;
32+
};
33+
};
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright (c) 2024 Analog Devices, Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
aliases {
9+
pwm-0 = &pwm0;
10+
};
11+
};
12+
13+
&tmr0a_ioa_p0_2 {
14+
power-source=<MAX32_VSEL_VDDIOH>;
15+
};
16+
17+
&timer0 {
18+
status = "okay";
19+
pwm0: pwm {
20+
status = "okay";
21+
pinctrl-0 = <&tmr0a_ioa_p0_2>;
22+
pinctrl-names = "default";
23+
};
24+
};

0 commit comments

Comments
 (0)