samples: sensor: Add support for temperature sensor on FRDM_MCXN236
Add new test sample.sensor.thermometer_i3c, can't assign the same platform with i2c, and i3c at the same time. Support the shield on FRDM_MCXN236 board by I2C and I3C way. Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
This commit is contained in:
parent
f861b4fd94
commit
5b001d32af
14
boards/shields/p3t1755dp_ard_i2c/boards/frdm_mcxn236.overlay
Normal file
14
boards/shields/p3t1755dp_ard_i2c/boards/frdm_mcxn236.overlay
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright 2024 NXP
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
&i3c1 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&flexcomm5_lpi2c5 {
|
||||
status = "okay";
|
||||
clock-frequency = <I2C_BITRATE_STANDARD>;
|
||||
};
|
||||
27
boards/shields/p3t1755dp_ard_i3c/boards/frdm_mcxn236.overlay
Normal file
27
boards/shields/p3t1755dp_ard_i3c/boards/frdm_mcxn236.overlay
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2024 NXP
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
* The p3t1755 shield board is plugged into the arduino interface on
|
||||
* the FRDM-MCXN236 board, and the J13 on the shield board is connected
|
||||
* to the J9 on the MCXN236 referred below.
|
||||
* J13-1 -> J9-3; J13-2 -> J9-4;
|
||||
* J13-3 -> J9-1; J13-4 -> J9-22;
|
||||
*/
|
||||
|
||||
#include <freq.h>
|
||||
|
||||
&flexcomm5_lpi2c5 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&i3c1 {
|
||||
status = "okay";
|
||||
|
||||
i2c-scl-hz = <DT_FREQ_K(400)>;
|
||||
i3c-scl-hz = <DT_FREQ_K(400)>;
|
||||
i3c-od-scl-hz = <DT_FREQ_K(100)>;
|
||||
};
|
||||
@ -1,21 +1,11 @@
|
||||
sample:
|
||||
name: Temperature Sensor
|
||||
common:
|
||||
filter: dt_alias_exists("ambient-temp0")
|
||||
harness: console
|
||||
tests:
|
||||
sample.sensor.thermometer:
|
||||
tags: sensors
|
||||
filter: dt_alias_exists("ambient-temp0")
|
||||
integration_platforms:
|
||||
- nrf52840dk/nrf52840 # mcp9700a
|
||||
- frdm_k22f # tcn75a
|
||||
- robokit1 # ntc_thermistor
|
||||
- adi_eval_adin1110ebz # adt7420
|
||||
- frdm_mcxn947/mcxn947/cpu0 # p3t1755
|
||||
extra_args:
|
||||
- platform:mimxrt1180_evk/mimxrt1189/cm33:SHIELD=p3t1755dp_ard_i2c
|
||||
- platform:mimxrt1180_evk/mimxrt1189/cm7:SHIELD=p3t1755dp_ard_i2c
|
||||
- platform:mimxrt1180_evk/mimxrt1189/cm33:SHIELD=p3t1755dp_ard_i3c
|
||||
- platform:mimxrt1180_evk/mimxrt1189/cm7:SHIELD=p3t1755dp_ard_i3c
|
||||
harness: console
|
||||
harness_config:
|
||||
fixture: sensor_ambient_temp
|
||||
type: multi_line
|
||||
@ -23,3 +13,30 @@ tests:
|
||||
- "Thermometer Example (.*)"
|
||||
- "Temperature device is 0x[0-9|a-z]+, name is [a-z|0-9]+@[a-z|0-9]+"
|
||||
- "Temperature is [0-9|.]+°C"
|
||||
integration_platforms:
|
||||
- nrf52840dk/nrf52840 # mcp9700a
|
||||
- frdm_k22f # tcn75a
|
||||
- robokit1 # ntc_thermistor
|
||||
- adi_eval_adin1110ebz # adt7420
|
||||
extra_args:
|
||||
- platform:mimxrt1180_evk/mimxrt1189/cm33:SHIELD=p3t1755dp_ard_i2c
|
||||
- platform:mimxrt1180_evk/mimxrt1189/cm7:SHIELD=p3t1755dp_ard_i2c
|
||||
- platform:frdm_mcxn236/mcxn236:SHIELD=p3t1755dp_ard_i2c
|
||||
sample.sensor.thermometer_i3c:
|
||||
tags: sensors
|
||||
harness_config:
|
||||
fixture: sensor_ambient_temp_i3c
|
||||
type: multi_line
|
||||
regex:
|
||||
- "Thermometer Example (.*)"
|
||||
- "Temperature device is 0x[0-9|a-z]+, name is [a-z|0-9]+@[a-z|0-9]+"
|
||||
- "Temperature is [0-9|.]+°C"
|
||||
integration_platforms:
|
||||
- frdm_mcxn947/mcxn947/cpu0 # p3t1755
|
||||
depends_on:
|
||||
- i3c
|
||||
filter: dt_alias_exists("ambient-temp0")
|
||||
extra_args:
|
||||
- platform:mimxrt1180_evk/mimxrt1189/cm33:SHIELD=p3t1755dp_ard_i3c
|
||||
- platform:mimxrt1180_evk/mimxrt1189/cm7:SHIELD=p3t1755dp_ard_i3c
|
||||
- platform:frdm_mcxn236/mcxn236:SHIELD=p3t1755dp_ard_i3c
|
||||
|
||||
Loading…
Reference in New Issue
Block a user