bflb,tsen

Description

Bouffalo Lab internal die temperature sensor (TSEN)

TSEN is an internal input of the GPADC. It has no external pins: the
analog front-end is shared with the general-purpose ADC and is switched
into temperature-sense mode by the BFLB ADC driver when a channel is
configured with zephyr,input-positive = 14.

Integration requirements:

  * The parent ADC controller node (e.g. &adc0) must be enabled.
  * The referenced ADC channel must use:
      - zephyr,input-positive = 14
      - zephyr,resolution = 16
      - zephyr,gain = "ADC_GAIN_1"
      - zephyr,reference = "ADC_REF_INTERNAL"
      - zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>
  * No pinctrl pins are required; an empty pinctrl state on the ADC is
    sufficient.
  * The sensor driver reads a factory calibration offset from the SoC
    efuse when available and falls back to a built-in default otherwise.

Examples

#include <zephyr/dt-bindings/adc/adc.h>

&adc0 {
    status = "okay";
    pinctrl-0 = <&adc0_default>;
    pinctrl-names = "default";

    channel@0 {
        reg = <0>;
        zephyr,gain = "ADC_GAIN_1";
        zephyr,reference = "ADC_REF_INTERNAL";
        zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
        zephyr,resolution = <16>;
        zephyr,input-positive = <14>;
    };
};

&tsen {
    status = "okay";
};

Properties

Properties not inherited from the base binding file.

Name

Type

Details

friendly-name

string

Human readable string describing the sensor. It can be used to
distinguish multiple instances of the same model (e.g., lid accelerometer
vs. base accelerometer in a laptop) to a host operating system.

This property is defined in the Generic Sensor Property Usages of the HID
Usage Tables specification
(https://usb.org/sites/default/files/hut1_3_0.pdf, section 22.5).