From cebf9279f6aac3f90fe3468211150a048cfcd1d1 Mon Sep 17 00:00:00 2001 From: Neil Chen Date: Thu, 26 Dec 2024 16:46:48 +0800 Subject: [PATCH] samples: sensor: Add support for temperature sensor on FRDM_MCXN236 Support the shield on FRDM_MCXN236 board by I2C and I3C way. Signed-off-by: Neil Chen --- .../boards/frdm_mcxn236.overlay | 14 ++++++++++ .../boards/frdm_mcxn236.overlay | 27 +++++++++++++++++++ samples/sensor/thermometer/sample.yaml | 2 ++ 3 files changed, 43 insertions(+) create mode 100644 boards/shields/p3t1755dp_ard_i2c/boards/frdm_mcxn236.overlay create mode 100644 boards/shields/p3t1755dp_ard_i3c/boards/frdm_mcxn236.overlay diff --git a/boards/shields/p3t1755dp_ard_i2c/boards/frdm_mcxn236.overlay b/boards/shields/p3t1755dp_ard_i2c/boards/frdm_mcxn236.overlay new file mode 100644 index 00000000000000..22ec2f7453cc02 --- /dev/null +++ b/boards/shields/p3t1755dp_ard_i2c/boards/frdm_mcxn236.overlay @@ -0,0 +1,14 @@ +/* + * Copyright 2024 NXP + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&i3c1 { + status = "disabled"; +}; + +&flexcomm5_lpi2c5 { + status = "okay"; + clock-frequency = ; +}; diff --git a/boards/shields/p3t1755dp_ard_i3c/boards/frdm_mcxn236.overlay b/boards/shields/p3t1755dp_ard_i3c/boards/frdm_mcxn236.overlay new file mode 100644 index 00000000000000..e3170cc30c5617 --- /dev/null +++ b/boards/shields/p3t1755dp_ard_i3c/boards/frdm_mcxn236.overlay @@ -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-11; J13-2 -> J9-12; + * J13-3 -> J9-13; J13-4 -> J9-22; + */ + +#include + +&flexcomm5_lpi2c5 { + status = "disabled"; +}; + +&i3c1 { + status = "okay"; + + i2c-scl-hz = ; + i3c-scl-hz = ; + i3c-od-scl-hz = ; +}; diff --git a/samples/sensor/thermometer/sample.yaml b/samples/sensor/thermometer/sample.yaml index 2d016a130b9208..db1be15fdff484 100644 --- a/samples/sensor/thermometer/sample.yaml +++ b/samples/sensor/thermometer/sample.yaml @@ -15,6 +15,8 @@ tests: - 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 + - platform:frdm_mcxn236:SHIELD=p3t1755dp_ard_i2c + - platform:frdm_mcxn236:SHIELD=p3t1755dp_ard_i3c harness: console harness_config: fixture: sensor_ambient_temp