Browse Source

feat: add support for TDK NTCG103JF103FT1 thermistor

Adds compensation table and bindings for NTCG103JF103FT1 thermistor

Signed-off-by: Maxmillion McLaughlin <github@maxmclau.com>
pull/66311/head
Maxmillion McLaughlin 2 years ago committed by Fabio Baltieri
parent
commit
8ab1c75e9b
  1. 3
      drivers/sensor/ntc_thermistor/Kconfig
  2. 26
      drivers/sensor/ntc_thermistor/ntc_thermistor.c
  3. 8
      dts/bindings/sensor/tdk,ntcg163jf103ft1.yaml
  4. 1
      dts/bindings/vendor-prefixes.txt
  5. 9
      tests/drivers/build_all/sensor/adc.dtsi

3
drivers/sensor/ntc_thermistor/Kconfig

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

26
drivers/sensor/ntc_thermistor/ntc_thermistor.c

@ -217,3 +217,29 @@ static __unused const struct ntc_compensation comp_murata_ncp15wb473[] = { @@ -217,3 +217,29 @@ static __unused const struct ntc_compensation comp_murata_ncp15wb473[] = {
DT_INST_FOREACH_STATUS_OKAY_VARGS(NTC_THERMISTOR_DEFINE, DT_DRV_COMPAT,
comp_murata_ncp15wb473)
/* tdk,ntcg163jf103ft1 */
#undef DT_DRV_COMPAT
#define DT_DRV_COMPAT tdk_ntcg163jf103ft1
static __unused const struct ntc_compensation comp_tdk_ntcg163jf103ft1[] = {
{ -25, 86560 },
{ -15, 53460 },
{ -5, 33930 },
{ 5, 22070 },
{ 15, 14700 },
{ 25, 10000 },
{ 35, 6942 },
{ 45, 4911 },
{ 55, 3536 },
{ 65, 2588 },
{ 75, 1924 },
{ 85, 1451 },
{ 95, 1110 },
{ 105, 860 },
{ 115, 674 },
{ 125, 534 },
};
DT_INST_FOREACH_STATUS_OKAY_VARGS(NTC_THERMISTOR_DEFINE, DT_DRV_COMPAT,
comp_tdk_ntcg163jf103ft1)

8
dts/bindings/sensor/tdk,ntcg163jf103ft1.yaml

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
# Copyright (c) 2023 Urban Sky LLC.
# SPDX-License-Identifier: Apache-2.0
description: TDK NTCG163JF103FT1 thermistor
compatible: "tdk,ntcg163jf103ft1"
include: ntc-thermistor.yaml

1
dts/bindings/vendor-prefixes.txt

@ -606,6 +606,7 @@ tbs-biometrics Touchless Biometric Systems AG @@ -606,6 +606,7 @@ tbs-biometrics Touchless Biometric Systems AG
tcg Trusted Computing Group
tcl Toby Churchill Ltd.
tcs Shenzhen City Tang Cheng Technology Co., Ltd.
tdk TDK Corporation.
tdo Shangai Top Display Optoelectronics Co., Ltd
technexion TechNexion
technologic Technologic Systems

9
tests/drivers/build_all/sensor/adc.dtsi

@ -70,3 +70,12 @@ test_murata_ncp15wb473: murata-ncp15wb473 { @@ -70,3 +70,12 @@ test_murata_ncp15wb473: murata-ncp15wb473 {
pulldown-ohm = <10000>;
connected-positive;
};
test_tdk_ntcg163jf103ft1: tdk-ntcg163jf103ft1 {
compatible = "tdk,ntcg163jf103ft1";
io-channels = <&adc0 0>;
pullup-uv = <3300000>;
pullup-ohm = <0>;
pulldown-ohm = <10000>;
connected-positive;
};

Loading…
Cancel
Save