18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
28c2ecf20Sopenharmony_ci%YAML 1.2
38c2ecf20Sopenharmony_ci---
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci$id: http://devicetree.org/schemas/hwmon/ti,tmp513.yaml#
68c2ecf20Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_cititle: TMP513/512 system monitor sensor
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_cimaintainers:
118c2ecf20Sopenharmony_ci  - Eric Tremblay <etremblay@distech-controls.com>
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_cidescription: |
148c2ecf20Sopenharmony_ci  The TMP512 (dual-channel) and TMP513 (triple-channel) are system monitors
158c2ecf20Sopenharmony_ci  that include remote sensors, a local temperature sensor, and a high-side
168c2ecf20Sopenharmony_ci  current shunt monitor. These system monitors have the capability of measuring
178c2ecf20Sopenharmony_ci  remote temperatures, on-chip temperatures, and system voltage/power/current
188c2ecf20Sopenharmony_ci  consumption.
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci  Datasheets:
218c2ecf20Sopenharmony_ci  https://www.ti.com/lit/gpn/tmp513
228c2ecf20Sopenharmony_ci  https://www.ti.com/lit/gpn/tmp512
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ciproperties:
268c2ecf20Sopenharmony_ci  compatible:
278c2ecf20Sopenharmony_ci    enum:
288c2ecf20Sopenharmony_ci      - ti,tmp512
298c2ecf20Sopenharmony_ci      - ti,tmp513
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci  reg:
328c2ecf20Sopenharmony_ci    maxItems: 1
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci  shunt-resistor-micro-ohms:
358c2ecf20Sopenharmony_ci    description: |
368c2ecf20Sopenharmony_ci      If 0, the calibration process will be skiped and the current and power
378c2ecf20Sopenharmony_ci      measurement engine will not work. Temperature and voltage measurement
388c2ecf20Sopenharmony_ci      will continue to work. The shunt value also need to respect:
398c2ecf20Sopenharmony_ci      rshunt <= pga-gain * 40 * 1000 * 1000.
408c2ecf20Sopenharmony_ci      If not, it's not possible to compute a valid calibration value.
418c2ecf20Sopenharmony_ci    default: 1000
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci  ti,pga-gain:
448c2ecf20Sopenharmony_ci    description: |
458c2ecf20Sopenharmony_ci      The gain value for the PGA function. This is 8, 4, 2 or 1.
468c2ecf20Sopenharmony_ci      The PGA gain affect the shunt voltage range.
478c2ecf20Sopenharmony_ci      The range will be equal to: pga-gain * 40mV
488c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
498c2ecf20Sopenharmony_ci    enum: [1, 2, 4, 8]
508c2ecf20Sopenharmony_ci    default: 8
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci  ti,bus-range-microvolt:
538c2ecf20Sopenharmony_ci    description: |
548c2ecf20Sopenharmony_ci      This is the operating range of the bus voltage in microvolt
558c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
568c2ecf20Sopenharmony_ci    enum: [16000000, 32000000]
578c2ecf20Sopenharmony_ci    default: 32000000
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci  ti,nfactor:
608c2ecf20Sopenharmony_ci    description: |
618c2ecf20Sopenharmony_ci      Array of three(TMP513) or two(TMP512) n-Factor value for each remote
628c2ecf20Sopenharmony_ci      temperature channel.
638c2ecf20Sopenharmony_ci      See datasheet Table 11 for n-Factor range list and value interpretation.
648c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#definitions/uint32-array
658c2ecf20Sopenharmony_ci    minItems: 2
668c2ecf20Sopenharmony_ci    maxItems: 3
678c2ecf20Sopenharmony_ci    items:
688c2ecf20Sopenharmony_ci      default: 0x00
698c2ecf20Sopenharmony_ci      minimum: 0x00
708c2ecf20Sopenharmony_ci      maximum: 0xFF
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_cirequired:
738c2ecf20Sopenharmony_ci  - compatible
748c2ecf20Sopenharmony_ci  - reg
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ciadditionalProperties: false
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ciexamples:
798c2ecf20Sopenharmony_ci  - |
808c2ecf20Sopenharmony_ci    i2c {
818c2ecf20Sopenharmony_ci          #address-cells = <1>;
828c2ecf20Sopenharmony_ci          #size-cells = <0>;
838c2ecf20Sopenharmony_ci
848c2ecf20Sopenharmony_ci          tmp513@5c {
858c2ecf20Sopenharmony_ci              compatible = "ti,tmp513";
868c2ecf20Sopenharmony_ci              reg = <0x5C>;
878c2ecf20Sopenharmony_ci              shunt-resistor-micro-ohms = <330000>;
888c2ecf20Sopenharmony_ci              ti,bus-range-microvolt = <32000000>;
898c2ecf20Sopenharmony_ci              ti,pga-gain = <8>;
908c2ecf20Sopenharmony_ci              ti,nfactor = <0x1 0xF3 0x00>;
918c2ecf20Sopenharmony_ci          };
928c2ecf20Sopenharmony_ci    };
93