1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/iio/temperature/microchip,mcp9600.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Microchip MCP9600 and similar thermocouple EMF converters 8 9maintainers: 10 - Andrew Hepp <andrew.hepp@ahepp.dev> 11 12description: 13 https://ww1.microchip.com/downloads/en/DeviceDoc/MCP960X-Data-Sheet-20005426.pdf 14 15properties: 16 compatible: 17 oneOf: 18 - const: microchip,mcp9600 19 - items: 20 - const: microchip,mcp9601 21 - const: microchip,mcp9600 22 23 reg: 24 maxItems: 1 25 26 interrupts: 27 minItems: 1 28 maxItems: 6 29 30 interrupt-names: 31 minItems: 1 32 maxItems: 6 33 items: 34 enum: 35 - open-circuit 36 - short-circuit 37 - alert1 38 - alert2 39 - alert3 40 - alert4 41 42 thermocouple-type: 43 $ref: /schemas/types.yaml#/definitions/uint32 44 default: 3 45 description: 46 Type of thermocouple (THERMOCOUPLE_TYPE_K if omitted). 47 Use defines in dt-bindings/iio/temperature/thermocouple.h. 48 Supported types are B, E, J, K, N, R, S, T. 49 50 microchip,vsense: 51 type: boolean 52 description: 53 This flag indicates that the chip has been wired with VSENSE to 54 enable open and short circuit detect. 55 56 vdd-supply: true 57 58allOf: 59 - if: 60 properties: 61 compatible: 62 not: 63 contains: 64 const: microchip,mcp9601 65 then: 66 properties: 67 interrupts: 68 minItems: 1 69 maxItems: 4 70 interrupt-names: 71 minItems: 1 72 maxItems: 4 73 items: 74 enum: 75 - alert1 76 - alert2 77 - alert3 78 - alert4 79 microchip,vsense: false 80 81required: 82 - compatible 83 - reg 84 85additionalProperties: false 86 87examples: 88 - | 89 #include <dt-bindings/iio/temperature/thermocouple.h> 90 #include <dt-bindings/interrupt-controller/irq.h> 91 i2c { 92 #address-cells = <1>; 93 #size-cells = <0>; 94 95 temperature-sensor@60 { 96 compatible = "microchip,mcp9600"; 97 reg = <0x60>; 98 interrupt-parent = <&gpio>; 99 interrupts = <25 IRQ_TYPE_EDGE_RISING>; 100 interrupt-names = "alert1"; 101 thermocouple-type = <THERMOCOUPLE_TYPE_K>; 102 vdd-supply = <&vdd>; 103 }; 104 }; 105 - | 106 #include <dt-bindings/interrupt-controller/irq.h> 107 i2c { 108 #address-cells = <1>; 109 #size-cells = <0>; 110 111 temperature-sensor@62 { 112 compatible = "microchip,mcp9601", "microchip,mcp9600"; 113 reg = <0x62>; 114 interrupt-parent = <&gpio>; 115 interrupts = <22 IRQ_TYPE_EDGE_RISING>, <23 IRQ_TYPE_EDGE_RISING>; 116 interrupt-names = "open-circuit", "short-circuit"; 117 vdd-supply = <&vdd>; 118 microchip,vsense; 119 }; 120 }; 121