brintos

brintos / linux-shallow public Read only

0
0
Text · 15.3 KiB · 312febe Raw
561 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/iio/temperature/adi,ltc2983.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Analog Devices LTC2983, LTC2986, LTM2985 Multi-sensor Temperature system8 9maintainers:10  - Nuno Sá <nuno.sa@analog.com>11 12description: |13  Analog Devices LTC2983, LTC2984, LTC2986, LTM2985 Multi-Sensor Digital14  Temperature Measurement Systems15 16  https://www.analog.com/media/en/technical-documentation/data-sheets/2983fc.pdf17  https://www.analog.com/media/en/technical-documentation/data-sheets/2984fb.pdf18  https://www.analog.com/media/en/technical-documentation/data-sheets/29861fa.pdf19  https://www.analog.com/media/en/technical-documentation/data-sheets/ltm2985.pdf20 21$defs:22  sensor-node:23    type: object24    description: Sensor node common constraints25 26    properties:27      reg:28        description:29          Channel number. Connects the sensor to the channel with this number30          of the device.31        minimum: 132        maximum: 2033 34      adi,sensor-type:35        description: Type of sensor connected to the device.36        $ref: /schemas/types.yaml#/definitions/uint3237 38    required:39      - reg40      - adi,sensor-type41 42 43properties:44  compatible:45    oneOf:46      - enum:47          - adi,ltc298348          - adi,ltc298649          - adi,ltm298550      - items:51          - const: adi,ltc298452          - const: adi,ltc298353 54  reg:55    maxItems: 156 57  interrupts:58    maxItems: 159 60  vdd-supply: true61 62  adi,mux-delay-config-us:63    description: |64      Extra delay prior to each conversion, in addition to the internal 1ms65      delay, for the multiplexer to switch input configurations and66      excitation values.67 68      This property is supposed to be in microseconds, but to maintain69      compatibility, this value will be multiplied by 100 before usage.70    maximum: 25571    default: 072 73  adi,filter-notch-freq:74    description:75      Notch frequency of the digital filter.76      0 - 50/60Hz rejection77      1 - 60Hz rejection78      2 - 50Hz rejection79    $ref: /schemas/types.yaml#/definitions/uint3280    minimum: 081    maximum: 282    default: 083 84  '#address-cells':85    const: 186 87  '#size-cells':88    const: 089 90patternProperties:91  "^thermocouple@":92    $ref: '#/$defs/sensor-node'93    unevaluatedProperties: false94 95    description: Thermocouple sensor.96 97    properties:98      adi,sensor-type:99        description: |100          1 - Type J Thermocouple101          2 - Type K Thermocouple102          3 - Type E Thermocouple103          4 - Type N Thermocouple104          5 - Type R Thermocouple105          6 - Type S Thermocouple106          7 - Type T Thermocouple107          8 - Type B Thermocouple108          9 - Custom Thermocouple109        $ref: /schemas/types.yaml#/definitions/uint32110        minimum: 1111        maximum: 9112 113      adi,single-ended:114        description: Whether the sensor is single-ended.115        type: boolean116 117      adi,sensor-oc-current-microamp:118        description: Pulsed current value applied during open-circuit detect.119        enum: [10, 100, 500, 1000]120        default: 10121 122      adi,cold-junction-handle:123        description:124          Sensor responsible for measuring the thermocouple cold junction125          temperature.126        $ref: /schemas/types.yaml#/definitions/phandle127 128      adi,custom-thermocouple:129        description:130          Used for digitizing custom thermocouples.131          See Page 59 of the datasheet.132        $ref: /schemas/types.yaml#/definitions/int64-matrix133        minItems: 3134        maxItems: 64135        items:136          items:137            - description: Voltage point in nV, signed.138            - description: Temperature point in uK.139 140    allOf:141      - if:142          properties:143            adi,sensor-type:144              const: 9145        then:146          required:147            - adi,custom-thermocouple148 149  "^diode@":150    $ref: '#/$defs/sensor-node'151    unevaluatedProperties: false152 153    description: Diode sensor.154 155    properties:156      adi,sensor-type:157        description: Sensor type for diodes.158        $ref: /schemas/types.yaml#/definitions/uint32159        const: 28160 161      adi,single-ended:162        description: Whether the sensor is single-ended.163        type: boolean164 165      adi,three-conversion-cycles:166        description:167          Whether to use three conversion cycles to remove parasitic168          resistance between the device and the diode.169        type: boolean170 171      adi,average-on:172        description:173          Whether to use a running average of the diode temperature174          reading to reduce the noise when the diode is used as a cold175          junction temperature element on an isothermal block where176          temperatures change slowly.177        type: boolean178 179      adi,excitation-current-microamp:180        description:181          Magnitude of the 1l excitation current applied to the diode.182          4l excitation current will be 4 times this value, and 8l183          excitation current will be 8 times value.184        enum: [10, 20, 40, 80]185        default: 10186 187      adi,ideal-factor-value:188        description:189          Diode ideality factor.190          Set this property to 1000000 times the real value.191        $ref: /schemas/types.yaml#/definitions/uint32192        default: 0193 194  "^rtd@":195    $ref: '#/$defs/sensor-node'196    unevaluatedProperties: false197    description: RTD sensor.198 199    properties:200      reg:201        minimum: 2202        maximum: 20203 204      adi,sensor-type:205        description: |206          10 - RTD PT-10207          11 - RTD PT-50208          12 - RTD PT-100209          13 - RTD PT-200210          14 - RTD PT-500211          15 - RTD PT-1000212          16 - RTD PT-1000 (0.00375)213          17 - RTD NI-120214          18 - RTD Custom215        $ref: /schemas/types.yaml#/definitions/uint32216        minimum: 10217        maximum: 18218 219      adi,rsense-handle:220        description: Associated sense resistor sensor.221        $ref: /schemas/types.yaml#/definitions/phandle222 223      adi,number-of-wires:224        description:225          Number of wires used by the RTD.226          5 means 4 wires with Kelvin sense resistor.227        $ref: /schemas/types.yaml#/definitions/uint32228        enum: [2, 3, 4, 5]229        default: 2230 231      adi,rsense-share:232        description:233          Whether to enable sense resistor sharing, where one sense234          resistor is used by multiple sensors.235        type: boolean236 237      adi,excitation-current-microamp:238        description: Excitation current applied to the RTD.239        enum: [5, 10, 25, 50, 100, 250, 500, 1000]240        default: 5241 242      adi,rtd-curve:243        description: |244          RTD curve and the corresponding Callendar-VanDusen constants.245          0 - European246          1 - American247          2 - Japanese248          3 - ITS-90249        $ref: /schemas/types.yaml#/definitions/uint32250        minimum: 0251        maximum: 3252        default: 0253 254      adi,custom-rtd:255        description:256          Used for digitizing custom RTDs.257          See Page 62 of the datasheet.258        $ref: /schemas/types.yaml#/definitions/uint64-matrix259        minItems: 3260        maxItems: 64261        items:262          items:263            - description: Resistance point in uOhms.264            - description: Temperature point in uK.265 266    required:267      - adi,rsense-handle268 269    allOf:270      - if:271          properties:272            adi,number-of-wires:273              const: 4274        then:275          properties:276            adi,current-rotate:277              description:278                Whether to enable excitation current rotation to automatically279                remove parasitic thermocouple effects.280              type: boolean281 282          dependencies:283            adi,current-rotate: [ "adi,rsense-share" ]284 285      - if:286          properties:287            adi,sensor-type:288              const: 18289        then:290          required:291            - adi,custom-rtd292 293  "^thermistor@":294    $ref: '#/$defs/sensor-node'295    unevaluatedProperties: false296    description: Thermistor sensor.297 298    properties:299      adi,sensor-type:300        description:301          19 - Thermistor 44004/44033 2.252kohm at 25°C302          20 - Thermistor 44005/44030 3kohm at 25°C303          21 - Thermistor 44007/44034 5kohm at 25°C304          22 - Thermistor 44006/44031 10kohm at 25°C305          23 - Thermistor 44008/44032 30kohm at 25°C306          24 - Thermistor YSI 400 2.252kohm at 25°C307          25 - Thermistor Spectrum 1003k 1kohm308          26 - Thermistor Custom Steinhart-Hart309          27 - Custom Thermistor310        $ref: /schemas/types.yaml#/definitions/uint32311        minimum: 19312        maximum: 27313 314      adi,rsense-handle:315        description: Associated sense resistor sensor.316        $ref: /schemas/types.yaml#/definitions/phandle317 318      adi,single-ended:319        description: Whether the sensor is single-ended.320        type: boolean321 322      adi,rsense-share:323        description:324          Whether to enable sense resistor sharing, where one sense325          resistor is used by multiple sensors.326        type: boolean327 328      adi,current-rotate:329        description:330          Whether to enable excitation current rotation to automatically331          remove parasitic thermocouple effects.332        type: boolean333 334      adi,excitation-current-nanoamp:335        description:336          Excitation current applied to the thermistor.337          0 sets the sensor in auto-range mode.338        enum: [0, 250, 500, 1000, 5000, 10000, 25000, 50000, 100000, 250000,339               500000, 1000000]340        default: 0341 342      adi,custom-thermistor:343        description:344          Used for digitizing custom thermistors.345          See Page 65 of the datasheet.346        $ref: /schemas/types.yaml#/definitions/uint64-matrix347        minItems: 3348        maxItems: 64349        items:350          items:351            - description: Resistance point in uOhms.352            - description: Temperature point in uK.353 354      adi,custom-steinhart:355        description:356          Steinhart-Hart coefficients in raw format, used for digitizing357          custom thermistors.358          See Page 68 of the datasheet.359        $ref: /schemas/types.yaml#/definitions/uint32-array360        minItems: 6361        maxItems: 6362 363    required:364      - adi,rsense-handle365 366    dependencies:367      adi,current-rotate: [ "adi,rsense-share" ]368 369    allOf:370      - if:371          properties:372            adi,sensor-type:373              const: 26374        then:375          properties:376            adi,excitation-current-nanoamp:377              enum: [250, 500, 1000, 5000, 10000, 25000, 50000, 100000,378                     250000, 500000, 1000000]379              default: 1000380          required:381            - adi,custom-steinhart382      - if:383          properties:384            adi,sensor-type:385              const: 27386        then:387          properties:388            adi,excitation-current-nanoamp:389              enum: [250, 500, 1000, 5000, 10000, 25000, 50000, 100000,390                     250000, 500000, 1000000]391              default: 1000392          required:393            - adi,custom-thermistor394 395  "^adc@":396    $ref: '#/$defs/sensor-node'397    unevaluatedProperties: false398    description: Direct ADC sensor.399 400    properties:401      adi,sensor-type:402        description: Sensor type for direct ADC sensors.403        $ref: /schemas/types.yaml#/definitions/uint32404        const: 30405 406      adi,single-ended:407        description: Whether the sensor is single-ended.408        type: boolean409 410  "^temp@":411    $ref: '#/$defs/sensor-node'412    unevaluatedProperties: false413    description: Active analog temperature sensor.414 415    properties:416      adi,sensor-type:417        description: Sensor type for active analog temperature sensors.418        $ref: /schemas/types.yaml#/definitions/uint32419        const: 31420 421      adi,single-ended:422        description: Whether the sensor is single-ended.423        type: boolean424 425      adi,custom-temp:426        description:427          Used for digitizing active analog temperature sensors.428          See Page 67 of the LTM2985 datasheet.429        $ref: /schemas/types.yaml#/definitions/uint64-matrix430        minItems: 3431        maxItems: 64432        items:433          items:434            - description: Voltage point in nV, signed.435            - description: Temperature point in uK.436 437    required:438      - adi,custom-temp439 440  "^rsense@":441    $ref: '#/$defs/sensor-node'442    unevaluatedProperties: false443    description: Sense resistor sensor.444 445    properties:446      reg:447        minimum: 2448        maximum: 20449 450      adi,sensor-type:451        description: Sensor type sense resistor sensors.452        $ref: /schemas/types.yaml#/definitions/uint32453        const: 29454 455      adi,rsense-val-milli-ohms:456        description: Value of the sense resistor.457 458    required:459      - adi,rsense-val-milli-ohms460 461required:462  - compatible463  - reg464  - interrupts465  - vdd-supply466 467additionalProperties: false468 469allOf:470  - if:471      properties:472        compatible:473          contains:474            enum:475              - adi,ltc2983476              - adi,ltc2984477    then:478      patternProperties:479        "^temp@": false480 481examples:482  - |483    #include <dt-bindings/interrupt-controller/irq.h>484    spi {485        #address-cells = <1>;486        #size-cells = <0>;487 488        temperature-sensor@0 {489            compatible = "adi,ltc2983";490            reg = <0>;491 492            #address-cells = <1>;493            #size-cells = <0>;494 495            vdd-supply = <&supply>;496            interrupts = <20 IRQ_TYPE_EDGE_RISING>;497            interrupt-parent = <&gpio>;498 499            thermocouple@18 {500                reg = <18>;501                adi,sensor-type = <8>; //Type B502                adi,sensor-oc-current-microamp = <10>;503                adi,cold-junction-handle = <&diode5>;504            };505 506            diode5: diode@5 {507                reg = <5>;508                adi,sensor-type = <28>;509            };510 511            rsense2: rsense@2 {512                reg = <2>;513                adi,sensor-type = <29>;514                adi,rsense-val-milli-ohms = <1200000>; //1.2Kohms515            };516 517            rtd@14 {518                reg = <14>;519                adi,sensor-type = <15>; //PT1000520                /*2-wire, internal gnd, no current rotation*/521                adi,number-of-wires = <2>;522                adi,rsense-share;523                adi,excitation-current-microamp = <500>;524                adi,rsense-handle = <&rsense2>;525            };526 527            adc@10 {528                reg = <10>;529                adi,sensor-type = <30>;530                adi,single-ended;531            };532 533            thermistor@12 {534                reg = <12>;535                adi,sensor-type = <26>; //Steinhart536                adi,rsense-handle = <&rsense2>;537                adi,custom-steinhart = <0x00f371ec 0x12345678538                                0x2c0f8733 0x10018c66 0xa0feaccd539                                0x90021d99>; //6 entries540            };541 542            thermocouple@20 {543                reg = <20>;544                adi,sensor-type = <9>; //custom thermocouple545                adi,single-ended;546                adi,custom-thermocouple =547                         /bits/ 64 <(-50220000) 0>,548                         /bits/ 64 <(-30200000) 99100000>,549                         /bits/ 64 <(-5300000) 135400000>,550                         /bits/ 64 <0 273150000>,551                         /bits/ 64 <40200000 361200000>,552                         /bits/ 64 <55300000 522100000>,553                         /bits/ 64 <88300000 720300000>,554                         /bits/ 64 <132200000 811200000>,555                         /bits/ 64 <188700000 922500000>,556                         /bits/ 64 <460400000 1000000000>; //10 pairs557            };558        };559    };560...561