From 1903bb110a05754dca299611ebed98f9af6636e6 Mon Sep 17 00:00:00 2001 From: Lucien Zhao Date: Mon, 25 Nov 2024 17:18:59 +0800 Subject: [PATCH] samples: sensor: thermometer: add mimxrt1180_evk support add overlay to config p3t1755 parameter support thermometer both on cm33 and cm7 cores Signed-off-by: Lucien Zhao --- .../mimxrt1180_evk_mimxrt1189_cm33.overlay | 35 +++++++++++++++++++ .../mimxrt1180_evk_mimxrt1189_cm7.overlay | 35 +++++++++++++++++++ samples/sensor/thermometer/sample.yaml | 2 ++ 3 files changed, 72 insertions(+) create mode 100644 samples/sensor/thermometer/boards/mimxrt1180_evk_mimxrt1189_cm33.overlay create mode 100644 samples/sensor/thermometer/boards/mimxrt1180_evk_mimxrt1189_cm7.overlay diff --git a/samples/sensor/thermometer/boards/mimxrt1180_evk_mimxrt1189_cm33.overlay b/samples/sensor/thermometer/boards/mimxrt1180_evk_mimxrt1189_cm33.overlay new file mode 100644 index 000000000000000..f0a6d26f2e747e3 --- /dev/null +++ b/samples/sensor/thermometer/boards/mimxrt1180_evk_mimxrt1189_cm33.overlay @@ -0,0 +1,35 @@ +/* + * Copyright 2024 NXP + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/* + * The p3t1755 shield board is plugged into the arduino interface on + * the MIMXRT1180-EVK board, and the J13 on the shield board is connected + * to the J50 on the RT1180 referred below. + * J13-1 -> J50-1; J13-2 -> J50-2; + * J13-3 -> J50-3; J13-4 -> J50-4; + */ + +#include + +/ { + aliases { + ambient-temp0 = &p3t1755; + }; +}; + +&i3c2 { + status = "okay"; + + i2c-scl-hz = ; + i3c-scl-hz = ; + i3c-od-scl-hz = ; + + p3t1755: p3t1755@4800000236152a0090 { + compatible = "nxp,p3t1755"; + reg = <0x48 0x0236 0x152a0090>; + status = "okay"; + }; +}; diff --git a/samples/sensor/thermometer/boards/mimxrt1180_evk_mimxrt1189_cm7.overlay b/samples/sensor/thermometer/boards/mimxrt1180_evk_mimxrt1189_cm7.overlay new file mode 100644 index 000000000000000..f0a6d26f2e747e3 --- /dev/null +++ b/samples/sensor/thermometer/boards/mimxrt1180_evk_mimxrt1189_cm7.overlay @@ -0,0 +1,35 @@ +/* + * Copyright 2024 NXP + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/* + * The p3t1755 shield board is plugged into the arduino interface on + * the MIMXRT1180-EVK board, and the J13 on the shield board is connected + * to the J50 on the RT1180 referred below. + * J13-1 -> J50-1; J13-2 -> J50-2; + * J13-3 -> J50-3; J13-4 -> J50-4; + */ + +#include + +/ { + aliases { + ambient-temp0 = &p3t1755; + }; +}; + +&i3c2 { + status = "okay"; + + i2c-scl-hz = ; + i3c-scl-hz = ; + i3c-od-scl-hz = ; + + p3t1755: p3t1755@4800000236152a0090 { + compatible = "nxp,p3t1755"; + reg = <0x48 0x0236 0x152a0090>; + status = "okay"; + }; +}; diff --git a/samples/sensor/thermometer/sample.yaml b/samples/sensor/thermometer/sample.yaml index 7d6b3479eb63abf..b53edd199f3771a 100644 --- a/samples/sensor/thermometer/sample.yaml +++ b/samples/sensor/thermometer/sample.yaml @@ -10,6 +10,8 @@ tests: - robokit1 # ntc_thermistor - adi_eval_adin1110ebz # adt7420 - frdm_mcxn947/mcxn947/cpu0 # p3t1755 + - mimxrt1180_evk/mimxrt1189/cm33 # p3t1755 arduino shield + - mimxrt1180_evk/mimxrt1189/cm7 # p3t1755 arduino shield harness: console harness_config: fixture: sensor_ambient_temp