brintos

brintos / linux-shallow public Read only

0
0
Text · 2.2 KiB · 12e6418 Raw
86 lines · yaml
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause2%YAML 1.23---4$id: http://devicetree.org/schemas/thermal/generic-adc-thermal.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: General Purpose Analog To Digital Converter (ADC) based thermal sensor8 9maintainers:10  - Laxman Dewangan <ldewangan@nvidia.com>11 12description:13  On some of platforms, thermal sensor like thermistors are connected to14  one of ADC channel and sensor resistance is read via voltage across the15  sensor resistor. The voltage read across the sensor is mapped to16  temperature using voltage-temperature lookup table.17 18$ref: thermal-sensor.yaml#19 20properties:21  compatible:22    const: generic-adc-thermal23 24  '#thermal-sensor-cells':25    const: 026 27  io-channels:28    maxItems: 129 30  io-channel-names:31    const: sensor-channel32 33  temperature-lookup-table:34    description: |35      Lookup table to map the relation between ADC value and temperature.36      When ADC is read, the value is looked up on the table to get the37      equivalent temperature.38 39      If not specified, driver assumes the ADC channel gives milliCelsius40      directly.41    $ref: /schemas/types.yaml#/definitions/int32-matrix42    items:43      items:44        - description: Temperature in milliCelsius45        - description: ADC read value46 47required:48  - compatible49  - io-channels50  - io-channel-names51 52unevaluatedProperties: false53 54examples:55  - |56    #include <dt-bindings/thermal/thermal.h>57 58    thermal-sensor {59        compatible = "generic-adc-thermal";60        #thermal-sensor-cells = <0>;61        io-channels = <&ads1015 1>;62        io-channel-names = "sensor-channel";63        temperature-lookup-table = <64              (-40000) 257865              (-39000) 257766              (-38000) 257667              (-37000) 257568              (-36000) 257469              (-35000) 257370              (-34000) 257271              (-33000) 257172              (-32000) 256973              (-31000) 256874              (-30000) 256775              /* skip */76              118000 25477              119000 24778              120000 24079              121000 23380              122000 22681              123000 22082              124000 21483              125000 208>;84    };85...86