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 <hasanfurkan.akkiz@analog.com>
This commit is contained in:
parent
4488728822
commit
ee1d4da864
14 changed files with 256 additions and 0 deletions
|
@ -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>;
|
||||
};
|
||||
};
|
|
@ -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";
|
||||
};
|
|
@ -0,0 +1,4 @@
|
|||
# Copyright (c) 2024 Analog Devices, Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_CODE_DATA_RELOCATION=y
|
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Analog Devices, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
tst_dma0: &dma0 { };
|
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Analog Devices, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
tst_dma0: &dma0 { };
|
|
@ -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)>;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -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>;
|
||||
};
|
||||
};
|
|
@ -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
|
|
@ -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>;
|
||||
};
|
||||
};
|
|
@ -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";
|
||||
};
|
||||
};
|
|
@ -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
|
|
@ -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>;
|
||||
};
|
||||
};
|
|
@ -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"
|
|
@ -46,3 +46,4 @@ tests:
|
|||
- max32666evkit/max32666/cpu0
|
||||
- max32680evkit/max32680/m4
|
||||
- max32690evkit/max32690/m4
|
||||
- max78002evkit/max78002/m4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue