Skip to content

Commit 57b3dd1

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 d445586 commit 57b3dd1

File tree

6 files changed

+45
-1
lines changed

6 files changed

+45
-1
lines changed

boards/nxp/mimxrt700_evk/board.c

+6
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,12 @@ void board_early_init_hook(void)
428428
CLOCK_EnableUsbhs0PhyPllClock(kCLOCK_Usbphy480M, usbClockFreq);
429429
CLOCK_EnableUsbhs0Clock(kCLOCK_Usb480M, usbClockFreq);
430430
#endif
431+
432+
#if (DT_NODE_HAS_STATUS(DT_NODELABEL(i3c2), okay) || \
433+
DT_NODE_HAS_STATUS(DT_NODELABEL(i3c3), okay))
434+
CLOCK_AttachClk(kSENSE_BASE_to_I3C23);
435+
CLOCK_SetClkDiv(kCLOCK_DivI3c23Clk, 4U);
436+
#endif
431437
}
432438

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

boards/nxp/mimxrt700_evk/doc/index.rst

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ the hardware features below.
7575
+-----------+------------+-------------------------------------+
7676
| I2C | on-chip | i2c |
7777
+-----------+------------+-------------------------------------+
78+
| I3C | on-chip | i3c |
79+
+-----------+------------+-------------------------------------+
7880
| GPIO | on-chip | gpio |
7981
+-----------+------------+-------------------------------------+
8082
| UART | on-chip | serial port-polling; |

boards/nxp/mimxrt700_evk/mimxrt700_evk-pinctrl.dtsi

+17
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,21 @@
7575
nxp,analog-mode;
7676
};
7777
};
78+
79+
pinmux_i3c3: pinmux_i3c3 {
80+
group0 {
81+
pinmux = <I3C3_SDA_PIO8_21>,
82+
<I3C3_SCL_PIO8_22>;
83+
slew-rate = "normal";
84+
drive-strength = "normal";
85+
input-enable;
86+
bias-pull-up;
87+
};
88+
group1 {
89+
pinmux = <I3C3_PUR_PIO8_20>;
90+
slew-rate = "normal";
91+
drive-strength = "normal";
92+
input-enable;
93+
};
94+
};
7895
};

boards/nxp/mimxrt700_evk/mimxrt700_evk_mimxrt798s_cm33_cpu1.dts

+17
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";
@@ -17,6 +18,7 @@
1718
aliases {
1819
led0 = &red_led;
1920
sw0 = &user_button_1;
21+
ambient-temp0 = &p3t1755;
2022
};
2123

2224
chosen {
@@ -80,3 +82,18 @@
8082
&gpio8 {
8183
status = "okay";
8284
};
85+
86+
&i3c3 {
87+
status = "okay";
88+
pinctrl-0 = <&pinmux_i3c3>;
89+
pinctrl-names = "default";
90+
i2c-scl-hz = <DT_FREQ_K(400)>;
91+
i3c-scl-hz = <DT_FREQ_M(4)>;
92+
i3c-od-scl-hz = <DT_FREQ_K(1500)>;
93+
94+
p3t1755: p3t1755@4800000236152a0090 {
95+
compatible = "nxp,p3t1755";
96+
reg = <0x48 0x0236 0x152a0090>;
97+
status = "okay";
98+
};
99+
};

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

samples/sensor/thermometer/sample.yaml

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

0 commit comments

Comments
 (0)