Skip to content

Commit dd30fc4

Browse files
committed
sample: sensor: Add support for temperature sensor on RT700 cm33_cpu1
Add support for p3t1755 temperature sensor on RT700 cm33_cpu1 core Signed-off-by: Lucien Zhao <[email protected]>
1 parent d28b6ae commit dd30fc4

File tree

6 files changed

+53
-1
lines changed

6 files changed

+53
-1
lines changed

boards/nxp/mimxrt700_evk/board.c

+6
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,12 @@ void board_early_init_hook(void)
441441
#if DT_NODE_HAS_STATUS(DT_NODELABEL(sc_timer), okay)
442442
CLOCK_AttachClk(kFRO0_DIV6_to_SCT);
443443
#endif
444+
445+
#if (DT_NODE_HAS_STATUS(DT_NODELABEL(i3c2), okay) || \
446+
DT_NODE_HAS_STATUS(DT_NODELABEL(i3c3), okay))
447+
CLOCK_AttachClk(kSENSE_BASE_to_I3C23);
448+
CLOCK_SetClkDiv(kCLOCK_DivI3c23Clk, 4U);
449+
#endif
444450
}
445451

446452
static void GlikeyWriteEnable(GLIKEY_Type *base, uint8_t idx)

boards/nxp/mimxrt700_evk/mimxrt700_evk-pinctrl.dtsi

+17
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,21 @@
8484
input-enable;
8585
};
8686
};
87+
88+
pinmux_i3c3: pinmux_i3c3 {
89+
group0 {
90+
pinmux = <I3C3_SDA_PIO8_21>,
91+
<I3C3_SCL_PIO8_22>;
92+
slew-rate = "normal";
93+
drive-strength = "normal";
94+
input-enable;
95+
bias-pull-up;
96+
};
97+
group1 {
98+
pinmux = <I3C3_PUR_PIO8_20>;
99+
slew-rate = "normal";
100+
drive-strength = "normal";
101+
input-enable;
102+
};
103+
};
87104
};

boards/nxp/mimxrt700_evk/mimxrt700_evk_mimxrt798s_cm33_cpu1.dts

+16
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <nxp/nxp_rt7xx_cm33_cpu1.dtsi>
1010
#include <zephyr/dt-bindings/input/input-event-codes.h>
1111
#include "mimxrt700_evk-pinctrl.dtsi"
12+
#include <freq.h>
1213

1314
/ {
1415
model = "NXP MIMXRT700-EVK board";
@@ -80,3 +81,18 @@
8081
&gpio8 {
8182
status = "okay";
8283
};
84+
85+
&i3c3 {
86+
status = "okay";
87+
pinctrl-0 = <&pinmux_i3c3>;
88+
pinctrl-names = "default";
89+
i2c-scl-hz = <DT_FREQ_K(400)>;
90+
i3c-scl-hz = <DT_FREQ_M(4)>;
91+
i3c-od-scl-hz = <DT_FREQ_K(1500)>;
92+
93+
p3t1755: p3t1755@4800000236152a0090 {
94+
compatible = "nxp,p3t1755";
95+
reg = <0x48 0x0236 0x152a0090>;
96+
status = "okay";
97+
};
98+
};

boards/nxp/mimxrt700_evk/mimxrt700_evk_mimxrt798s_cm33_cpu1.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2024 NXP
2+
# Copyright 2024-2025 NXP
33
#
44
# SPDX-License-Identifier: Apache-2.0
55
#
@@ -18,4 +18,5 @@ supported:
1818
- gpio
1919
- uart
2020
- adc
21+
- i3c
2122
vendor: nxp
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
aliases {
9+
ambient-temp0 = &p3t1755;
10+
};
11+
};

samples/sensor/thermometer/sample.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ tests:
3535
- "Temperature is [0-9|.]+°C"
3636
integration_platforms:
3737
- frdm_mcxn947/mcxn947/cpu0 # p3t1755
38+
- mimxrt700_evk/mimxrt798s/cm33_cpu1 # p3t1755
3839
depends_on:
3940
- i3c
4041
filter: dt_alias_exists("ambient-temp0")

0 commit comments

Comments
 (0)