drivers: sensor: ntc-thermistor: Add Murata NCP15WB473 thermistor

Add murata,ncp15wb473 property together with a compensation table. The
table can be found on the vendor's website
(Resistance VS. Temperature tab):
https://www.murata.com/en-us/products/productdetail?partno=NCP15WB473F03RC

Signed-off-by: Paweł Anikiel <pan@semihalf.com>
This commit is contained in:
Paweł Anikiel 2023-08-04 10:36:54 +00:00 committed by Maureen Helm
parent 5db05878ab
commit ebdfb6b5e2
4 changed files with 45 additions and 1 deletions

View file

@ -6,7 +6,8 @@ config NTC_THERMISTOR
bool "NTC Thermistor"
default y
depends on DT_HAS_NTC_THERMISTOR_GENERIC_ENABLED || \
DT_HAS_EPCOS_B57861S0103A039_ENABLED
DT_HAS_EPCOS_B57861S0103A039_ENABLED || \
DT_HAS_MURATA_NCP15WB473_ENABLED
select ADC
help
Enable driver for Zephyr NTC Thermistor.

View file

@ -156,3 +156,29 @@ static __unused const struct ntc_compensation comp_epcos_b57861s0103a039[] = {
DT_INST_FOREACH_STATUS_OKAY_VARGS(NTC_THERMISTOR_DEFINE, DT_DRV_COMPAT,
comp_epcos_b57861s0103a039)
/* murata,ncp15wb473 */
#undef DT_DRV_COMPAT
#define DT_DRV_COMPAT murata_ncp15wb473
static __unused const struct ntc_compensation comp_murata_ncp15wb473[] = {
{ -25, 655802 },
{ -15, 360850 },
{ -5, 206463 },
{ 5, 122259 },
{ 15, 74730 },
{ 25, 47000 },
{ 35, 30334 },
{ 45, 20048 },
{ 55, 13539 },
{ 65, 9328 },
{ 75, 6544 },
{ 85, 4674 },
{ 95, 3388 },
{ 105, 2494 },
{ 115, 1860 },
{ 125, 1406 },
};
DT_INST_FOREACH_STATUS_OKAY_VARGS(NTC_THERMISTOR_DEFINE, DT_DRV_COMPAT,
comp_murata_ncp15wb473)

View file

@ -0,0 +1,8 @@
# Copyright (c) 2023 Google LLC
# SPDX-License-Identifier: Apache-2.0
description: MURATA NCP15WB473 thermistor
compatible: "murata,ncp15wb473"
include: ntc-thermistor.yaml

View file

@ -51,3 +51,12 @@ test_epcos_b57861s0103a039: epcos-b57861s0103a039 {
pulldown-ohm = <10000>;
connected-positive;
};
test_murata_ncp15wb473: murata-ncp15wb473 {
compatible = "murata,ncp15wb473";
io-channels = <&adc0 0>;
pullup-uv = <3300000>;
pullup-ohm = <0>;
pulldown-ohm = <10000>;
connected-positive;
};