Skip to content

Commit 1bb6e58

Browse files
EmilioCBenkartben
authored andcommitted
tests: drivers: Add MCXW72 Overlays
Add MCXW72 Overlay for PWM, ADC, SPI testing Signed-off-by: Emilio Benavente <[email protected]> enabled support
1 parent 9818939 commit 1bb6e58

File tree

7 files changed

+100
-0
lines changed

7 files changed

+100
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright 2024 NXP
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include <zephyr/dt-bindings/adc/adc.h>
7+
#include <zephyr/dt-bindings/adc/mcux-lpadc.h>
8+
9+
/ {
10+
zephyr,user {
11+
io-channels = <&adc0 0>;
12+
};
13+
};
14+
15+
&adc0 {
16+
#address-cells = <1>;
17+
#size-cells = <0>;
18+
19+
channel@0 {
20+
reg = <0>;
21+
zephyr,gain = "ADC_GAIN_1";
22+
zephyr,reference = "ADC_REF_EXTERNAL1";
23+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
24+
zephyr,resolution = <12>;
25+
zephyr,vref-mv = <1800>;
26+
/* channel 2 signal 6A */
27+
zephyr,input-positive = <MCUX_LPADC_CH2A>;
28+
};
29+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_I2C_VIRTUAL=n
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/*
8+
* This is a loopback setup for the mcxw72_evk
9+
* To test this sample, connect J1.5 <-> J2.1 and J1.7 <-> J2.3
10+
*/
11+
&lpi2c1 {
12+
status = "okay";
13+
eeprom0: eeprom@54 {
14+
compatible = "zephyr,i2c-target-eeprom";
15+
reg = <0x54>;
16+
size = <256>;
17+
};
18+
};
19+
20+
&lpi2c0 {
21+
status = "okay";
22+
pinctrl-0 = <&pinmux_lpi2c0>;
23+
pinctrl-names = "default";
24+
eeprom1: eeprom@56 {
25+
compatible = "zephyr,i2c-target-eeprom";
26+
reg = <0x56>;
27+
size = <256>;
28+
};
29+
};
30+
31+
&gpiob {
32+
status = "okay";
33+
};

tests/drivers/i2c/i2c_target_api/testcase.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ tests:
3737
drivers.i2c.target_api.single_role:
3838
platform_allow:
3939
- frdm_mcxn947/mcxn947/cpu0
40+
- mcxw72_evk/mcxw727c/cpu0
4041
- mimxrt1170_evk@B/mimxrt1176/cm7
4142
- mimxrt1170_evk/mimxrt1176/cm7
4243
- mimxrt1180_evk/mimxrt1189/cm33
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright 2024 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
aliases {
9+
pwm-0 = &tpm0;
10+
};
11+
};
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#
2+
# Copyright 2024 NXP
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
CONFIG_SPI_MCUX_LPSPI_DMA=y
7+
CONFIG_SPI_ASYNC=n
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright 2024 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&lpspi1 {
8+
slow@0 {
9+
compatible = "test-spi-loopback-slow";
10+
reg = <0>;
11+
spi-max-frequency = <500000>;
12+
};
13+
fast@0 {
14+
compatible = "test-spi-loopback-fast";
15+
reg = <0>;
16+
spi-max-frequency = <16000000>;
17+
};
18+
};

0 commit comments

Comments
 (0)