-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drivers: sensor: temperature: Add i.MX RT die temperature sensor #83880
base: main
Are you sure you want to change the base?
drivers: sensor: temperature: Add i.MX RT die temperature sensor #83880
Conversation
anedergaard
commented
Jan 13, 2025
- Added dts binding for die temperature sensor for i.MX RT117X and i.MX RT118X
- Added driver for die temperature readings on i.MX RT117X and i.MX RT118X
- Added overlay file for RT1170-EVK in temp_sensor test for validation
The following west manifest projects have changed revision in this Pull Request:
⛔ DNM label due to: 1 project with PR revision Note: This message is automatically posted and updated by the Manifest GitHub Action. |
353c9e1
to
ab9fb98
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionality LGTM.
I think some naming alignment is needed. There's tmpsns, temp, temperature.
Yes, you are right, I'll align the naming once @DerekSnell has suggested a compatible string. |
Hi @anedergaard , The IP name for this HW peripheral is TMPSNS, which is also the name used in the SOC reference manual, and in the HAL driver fsl_tempsensor.c. So I think the best name for this binding is Thank you |
ab9fb98
to
42f9cdc
Compare
This commit points nxp_hal to the PR which enables mcux driver for die temperature for i.MX RT117X and i.MX RT118X devices. Signed-off-by: Anders Bjørn Nedergaard <[email protected]>
Added die temperature binding for i.MX RT 117X and i.MX RT 118X Signed-off-by: Anders Bjørn Nedergaard <[email protected]>
42f9cdc
to
9b87ba0
Compare
Hi @DerekSnell, Updated 1
|
Added driver for i.MX RT117X and i.MX RT118X die temperature sensor Signed-off-by: Anders Bjørn Nedergaard <[email protected]>
Added temp_sensor overlay for i.MX RT1170-EVK Signed-off-by: Anders Bjørn Nedergaard <[email protected]>
9b87ba0
to
b891f14
Compare
Update 2:
|
depends on SOC_SERIES_IMXRT11XX || SOC_SERIES_IMXRT118X | ||
default y | ||
help | ||
Enable temperature measurement for NXP TMPSNS sensor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enable temperature measurement for NXP TMPSNS sensor | |
Enable temperature measurement for NXP TMPSNS sensor |
} | ||
} | ||
|
||
static const struct sensor_driver_api tmpsns_driver_api = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static const struct sensor_driver_api tmpsns_driver_api = { | |
static DEVICE_API(sensor, tmpsns_driver_api) = { |
@@ -0,0 +1,3 @@ | |||
temp_sensor: &temp { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File needs a license/copyright header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming looks good :)
const struct nxp_tmpsns_data *data = dev->data; | ||
|
||
switch (chan) { | ||
case SENSOR_CHAN_ALL: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this line.
get
cannot support SENSOR_CHAN_ALL
since there is only one val
reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @anedergaard ,
Thank you for contributing this. I am blocking to address this build warning when I build the test for the MIMXRT1170-EVK. The test does build and runs well on my board. But can you improve the DTS to avoid this warning?
CMake Warning at
/zephyrproject/zephyr/cmake/modules/dts.cmake:425 (message):
dtc raised one or more warnings:
/build/zephyr/zephyr.dts:4051.27-4054.5:
Warning (simple_bus_reg): /soc/temp: missing or empty reg/ranges property
Otherwise, the naming changes you made look good to me.
I see your PR got caught in a known CI issue with the RT1180, which should be resolved when #83827 merges.
A very minor nit, but since you will be updating - there is a typo in commit message "termerature"
Thank you