-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 (cherry picked from commit ee1d4da) Original-Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com> GitOrigin-RevId: ee1d4da Cr-Build-Id: 8730937883239782945 Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8730937883239782945 Copybot-Job-Name: zephyr-main-copybot-downstream Change-Id: Ie09531587af7e98dd3fa4a180636e58267569e53 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/6028795 Tested-by: Tristan Honscheid <honscheid@google.com> Commit-Queue: Tristan Honscheid <honscheid@google.com> Reviewed-by: Tristan Honscheid <honscheid@google.com> Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
- Loading branch information
Furkan Akkiz
authored and
Chromeos LUCI
committed
Nov 18, 2024
1 parent
3e876f0
commit c59cf8e
Showing
14 changed files
with
256 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
tests/drivers/adc/adc_api/boards/max78002evkit_max78002_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) 2024 Analog Devices, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/ { | ||
zephyr,user { | ||
/* adjust channel number according to pinmux in board.dts */ | ||
io-channels = <&adc 0>, <&adc 1>; | ||
}; | ||
}; | ||
|
||
&adc { | ||
status = "okay"; | ||
pinctrl-0 = <&ain0_p2_0 &ain1_p2_1>; | ||
pinctrl-names = "default"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
channel@0 { | ||
reg = <0>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; | ||
zephyr,resolution = <12>; | ||
}; | ||
|
||
channel@1 { | ||
reg = <1>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; | ||
zephyr,resolution = <12>; | ||
}; | ||
}; |
61 changes: 61 additions & 0 deletions
61
tests/drivers/counter/counter_basic_api/boards/max78002evkit_max78002_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) 2024 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/max78002evkit_max78002_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) 2024 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/max78002evkit_max78002_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) 2024 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/max78002evkit_max78002_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) 2024 Analog Devices, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
tst_dma0: &dma0 { }; |
23 changes: 23 additions & 0 deletions
23
tests/drivers/flash/common/boards/max78002evkit_max78002_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,23 @@ | ||
/* | ||
* Copyright (c) 2024 Analog Devices, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&flash0 { | ||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
code_partition: partition@0 { | ||
reg = <0x0 DT_SIZE_M(2)>; | ||
read-only; | ||
}; | ||
|
||
storage_partition: partition@200000 { | ||
label = "storage"; | ||
reg = <0x200000 DT_SIZE_K(512)>; | ||
}; | ||
}; | ||
}; |
13 changes: 13 additions & 0 deletions
13
tests/drivers/gpio/gpio_basic_api/boards/max78002evkit_max78002_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) 2024 Analog Devices, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/ { | ||
resources { | ||
compatible = "test-gpio-basic-api"; | ||
out-gpios = <&gpio0 8 0>; | ||
in-gpios = <&gpio0 9 0>; | ||
}; | ||
}; |
7 changes: 7 additions & 0 deletions
7
tests/drivers/i2c/i2c_target_api/boards/max78002evkit_max78002_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) 2024 Analog Devices, Inc. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
CONFIG_I2C_VIRTUAL=n | ||
CONFIG_I2C_MAX32_DMA=y |
33 changes: 33 additions & 0 deletions
33
tests/drivers/i2c/i2c_target_api/boards/max78002evkit_max78002_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,33 @@ | ||
/* | ||
* Copyright (c) 2024 Analog Devices, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&i2c0 { | ||
dmas = <&dma0 0 MAX78_DMA_SLOT_I2C0_TX>, <&dma0 1 MAX78_DMA_SLOT_I2C0_RX>; | ||
dma-names = "tx", "rx"; | ||
|
||
eeprom0: eeprom@54 { | ||
compatible = "zephyr,i2c-target-eeprom"; | ||
reg = <0x54>; | ||
address-width = <16>; | ||
size = <1024>; | ||
}; | ||
}; | ||
|
||
&i2c1 { | ||
status = "okay"; | ||
pinctrl-0 = <&i2c1_scl_p0_16 &i2c1_sda_p0_17>; | ||
pinctrl-names = "default"; | ||
|
||
dmas = <&dma0 2 MAX78_DMA_SLOT_I2C1_TX>, <&dma0 3 MAX78_DMA_SLOT_I2C1_RX>; | ||
dma-names = "tx", "rx"; | ||
|
||
eeprom1: eeprom@56 { | ||
compatible = "zephyr,i2c-target-eeprom"; | ||
reg = <0x56>; | ||
address-width = <16>; | ||
size = <1024>; | ||
}; | ||
}; |
24 changes: 24 additions & 0 deletions
24
tests/drivers/pwm/pwm_api/boards/max78002evkit_max78002_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) 2024 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"; | ||
pinctrl-0 = <&tmr0a_ioa_p0_2>; | ||
pinctrl-names = "default"; | ||
}; | ||
}; |
7 changes: 7 additions & 0 deletions
7
tests/drivers/spi/spi_loopback/boards/max78002evkit_max78002_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) 2024 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/max78002evkit_max78002_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) 2024 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 = <500000>; | ||
}; | ||
}; |
12 changes: 12 additions & 0 deletions
12
tests/drivers/w1/w1_api/boards/max78002evkit_max78002_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,12 @@ | ||
/* | ||
* Copyright (c) 2024 Analog Devices, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
w1_0: &w1 { | ||
status = "okay"; | ||
internal-pullup = <1>; | ||
}; | ||
|
||
#include "../w1_devices.dtsi" |
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