Skip to content

Commit 7e0a334

Browse files
jjdalynhnashif
authored andcommitted
drivers: sensor: ntc_thermistor: Add Murata NCP15XH103
Murata NCP15XH103 compensation table added. Signed-off-by: Jeff Daly <[email protected]>
1 parent 5dbfbbc commit 7e0a334

File tree

4 files changed

+45
-1
lines changed

4 files changed

+45
-1
lines changed

drivers/sensor/ntc_thermistor/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ config NTC_THERMISTOR
88
depends on DT_HAS_NTC_THERMISTOR_GENERIC_ENABLED || \
99
DT_HAS_EPCOS_B57861S0103A039_ENABLED || \
1010
DT_HAS_MURATA_NCP15WB473_ENABLED || \
11-
DT_HAS_TDK_NTCG163JF103FT1_ENABLED
11+
DT_HAS_TDK_NTCG163JF103FT1_ENABLED || \
12+
DT_HAS_MURATA_NCP15XH103_ENABLED
1213
select ADC
1314
help
1415
Enable driver for Zephyr NTC Thermistor.

drivers/sensor/ntc_thermistor/ntc_thermistor.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,3 +243,29 @@ static __unused const struct ntc_compensation comp_tdk_ntcg163jf103ft1[] = {
243243

244244
DT_INST_FOREACH_STATUS_OKAY_VARGS(NTC_THERMISTOR_DEFINE, DT_DRV_COMPAT,
245245
comp_tdk_ntcg163jf103ft1)
246+
247+
/* murata,ncp15xh103 */
248+
#undef DT_DRV_COMPAT
249+
#define DT_DRV_COMPAT murata_ncp15xh103
250+
251+
static __unused const struct ntc_compensation comp_murata_ncp15xh103[] = {
252+
{ -25, 87558 },
253+
{ -15, 53649 },
254+
{ -5, 33892 },
255+
{ 5, 22021 },
256+
{ 15, 14673 },
257+
{ 25, 10000 },
258+
{ 35, 6947 },
259+
{ 45, 4916 },
260+
{ 55, 3535 },
261+
{ 64, 2586 },
262+
{ 75, 1924 },
263+
{ 85, 1452 },
264+
{ 95, 1109 },
265+
{ 105, 858 },
266+
{ 115, 671 },
267+
{ 125, 531 },
268+
};
269+
270+
DT_INST_FOREACH_STATUS_OKAY_VARGS(NTC_THERMISTOR_DEFINE, DT_DRV_COMPAT,
271+
comp_murata_ncp15xh103)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2024 Silicom Connectivity Solutions Ltd.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: MURATA NCP15XH103 thermistor
5+
6+
compatible: "murata,ncp15xh103"
7+
8+
include: ntc-thermistor.yaml

tests/drivers/build_all/sensor/adc.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,12 @@ test_lm35: lm35 {
8585
io-channels = <&adc0 0>;
8686
status = "okay";
8787
};
88+
89+
test_murata_ncp15xh103: murata-ncp15xh103 {
90+
compatible = "murata,ncp15xh103";
91+
io-channels = <&test_adc 0>;
92+
pullup-uv = <3300000>;
93+
pullup-ohm = <0>;
94+
pulldown-ohm = <10000>;
95+
connected-positive;
96+
};

0 commit comments

Comments
 (0)