-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Add MAX78000FTHR test overlay files
Enable the following tests for MAX78000FTHR: - tests/drivers/adc/adc_api - tests/drivers/counter/counter_basic_api - tests/drivers/dma/chan_blen_transfer - tests/drivers/dma/loop_transfer - tests/drivers/gpio/gpio_basic_api - tests/drivers/pwm/pwm_api - tests/drivers/spi/spi_loopback - tests/drivers/w1/w1_api Signed-off-by: Yasin Ustuner <[email protected]>
- Loading branch information
Showing
10 changed files
with
202 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
tests/drivers/adc/adc_api/boards/max78000fthr_max78000_m4.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (c) 2025 Analog Devices, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/ { | ||
zephyr,user { | ||
/* adjust channel number according to pinmux in board.dts */ | ||
io-channels = <&adc 3>, <&adc 4>; | ||
}; | ||
}; | ||
|
||
&adc { | ||
status = "okay"; | ||
pinctrl-0 = <&ain3_p2_3 &ain4_p2_4>; | ||
pinctrl-names = "default"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
channel@3 { | ||
reg = <3>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; | ||
zephyr,resolution = <10>; | ||
}; | ||
|
||
channel@4 { | ||
reg = <4>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; | ||
zephyr,resolution = <10>; | ||
}; | ||
}; |
61 changes: 61 additions & 0 deletions
61
tests/drivers/counter/counter_basic_api/boards/max78000fthr_max78000_m4.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* Copyright (c) 2025 Analog Devices, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&timer0 { | ||
status = "okay"; | ||
prescaler = <2>; | ||
counter { | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
&timer1 { | ||
status = "okay"; | ||
prescaler = <2>; | ||
counter { | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
&timer2 { | ||
status = "okay"; | ||
prescaler = <2>; | ||
counter { | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
&timer3 { | ||
status = "okay"; | ||
prescaler = <2>; | ||
counter { | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
&lptimer0 { | ||
status = "okay"; | ||
clock-source = <ADI_MAX32_PRPH_CLK_SRC_ERTCO>; | ||
counter { | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
&lptimer1 { | ||
status = "okay"; | ||
clock-source = <ADI_MAX32_PRPH_CLK_SRC_INRO>; | ||
counter { | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
&clk_ertco { | ||
status = "okay"; | ||
}; | ||
|
||
&clk_inro { | ||
status = "okay"; | ||
}; |
4 changes: 4 additions & 0 deletions
4
tests/drivers/dma/chan_blen_transfer/boards/max78000fthr_max78000_m4.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright (c) 2025 Analog Devices, Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
CONFIG_CODE_DATA_RELOCATION=y |
7 changes: 7 additions & 0 deletions
7
tests/drivers/dma/chan_blen_transfer/boards/max78000fthr_max78000_m4.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
* Copyright (c) 2025 Analog Devices, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
tst_dma0: &dma0 { }; |
7 changes: 7 additions & 0 deletions
7
tests/drivers/dma/loop_transfer/boards/max78000fthr_max78000_m4.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
* Copyright (c) 2025 Analog Devices, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
tst_dma0: &dma0 { }; |
13 changes: 13 additions & 0 deletions
13
tests/drivers/gpio/gpio_basic_api/boards/max78000fthr_max78000_m4.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* Copyright (c) 2025 Analog Devices, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/ { | ||
resources { | ||
compatible = "test-gpio-basic-api"; | ||
out-gpios = <&gpio1 0 0>; | ||
in-gpios = <&gpio1 1 0>; | ||
}; | ||
}; |
22 changes: 22 additions & 0 deletions
22
tests/drivers/pwm/pwm_api/boards/max78000fthr_max78000_m4.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright (c) 2025 Analog Devices, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/ { | ||
aliases { | ||
pwm-0 = &pwm0; | ||
}; | ||
}; | ||
|
||
&tmr0a_ioa_p0_2 { | ||
power-source=<MAX32_VSEL_VDDIOH>; | ||
}; | ||
|
||
&timer0 { | ||
status = "okay"; | ||
pwm0: pwm { | ||
status = "okay"; | ||
}; | ||
}; |
7 changes: 7 additions & 0 deletions
7
tests/drivers/spi/spi_loopback/boards/max78000fthr_max78000_m4.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# | ||
# Copyright (c) 2025 Analog Devices, Inc. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
CONFIG_SPI_ASYNC=y | ||
CONFIG_SPI_MAX32_INTERRUPT=y |
21 changes: 21 additions & 0 deletions
21
tests/drivers/spi/spi_loopback/boards/max78000fthr_max78000_m4.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright (c) 2025 Analog Devices, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&spi0 { | ||
dmas = <&dma0 1 MAX78_DMA_SLOT_SPI0_TX>, <&dma0 2 MAX78_DMA_SLOT_SPI0_RX>; | ||
dma-names = "tx", "rx"; | ||
|
||
slow@0 { | ||
compatible = "test-spi-loopback-slow"; | ||
reg = <0>; | ||
spi-max-frequency = <128000>; | ||
}; | ||
fast@0 { | ||
compatible = "test-spi-loopback-fast"; | ||
reg = <0>; | ||
spi-max-frequency = <400000>; | ||
}; | ||
}; |
24 changes: 24 additions & 0 deletions
24
tests/drivers/w1/w1_api/boards/max78000fthr_max78000_m4.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (c) 2025 Analog Devices, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&owm_io_p0_6 { | ||
power-source=<MAX32_VSEL_VDDIOH>; | ||
}; | ||
|
||
&owm_pe_p0_7 { | ||
power-source=<MAX32_VSEL_VDDIOH>; | ||
}; | ||
|
||
w1_0: &w1 { | ||
status = "okay"; | ||
pinctrl-0 = <&owm_io_p0_6 &owm_pe_p0_7>; | ||
pinctrl-names = "default"; | ||
internal-pullup = <1>; | ||
external-pullup = <0>; | ||
long-line-mode; | ||
}; | ||
|
||
#include "../w1_devices.dtsi" |