1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/hwmon/microchip,emc1812.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Microchip EMC1812/13/14/15/33 multichannel temperature sensor 8 9maintainers: 10 - Marius Cristea <marius.cristea@microchip.com> 11 12description: | 13 The Microchip EMC1812/13/14/15/33 is a high-accuracy 2-wire multichannel 14 low-voltage remote diode temperature monitor. 15 16 The datasheet can be found here: 17 https://ww1.microchip.com/downloads/aemDocuments/documents/MSLD/ProductDocuments/DataSheets/EMC1812-3-4-5-33-Data-Sheet-DS20005751.pdf 18 19 EMC1812 has one external remote temperature monitoring channel 20 EMC1813 has two external remote temperature monitoring channels 21 EMC1814 has three external remote temperature monitoring channels and 22 channels 2 and 3 support anti parallel diode 23 EMC1815 has four external remote temperature monitoring channels and 24 channels 1/2 and 3/4 support anti parallel diode 25 EMC1833 has two external remote temperature monitoring channels and 26 channels 1 and 2 support anti parallel diode 27 28properties: 29 compatible: 30 enum: 31 - microchip,emc1812 32 - microchip,emc1813 33 - microchip,emc1814 34 - microchip,emc1815 35 - microchip,emc1833 36 37 reg: 38 maxItems: 1 39 40 interrupts: 41 items: 42 - description: alert-therm2 asserts when the ALERT limit is exceeded. 43 - description: therm-addr asserts when the THERM limit is exceeded. 44 minItems: 1 45 46 interrupt-names: 47 items: 48 - const: alert-therm2 49 - const: therm-addr 50 minItems: 1 51 52 "#address-cells": 53 const: 1 54 55 "#size-cells": 56 const: 0 57 58 microchip,enable-anti-parallel: 59 description: 60 Enable anti-parallel diode mode operation. EMC1814, EMC1815 and EMC1833 61 support reading two external diodes in anti-parallel connection on the 62 same set of pins. Disabling APD functionality to implement substrate 63 diodes on devices that support APD eliminates the benefit of APD 64 (two diodes on one channel). 65 type: boolean 66 67 microchip,parasitic-res-on-channel1-2: 68 description: 69 Indicates that the chip and the diodes/transistors are sufficiently 70 far apart that a parasitic resistance is added to the wires, which can 71 affect the measurements. Due to the availability of only a single 72 configuration bit in hardware, channels 1 and 2 are affected together. 73 If channel 2 is not available in hardware, this setting affects only 74 channel 1. 75 type: boolean 76 77 microchip,parasitic-res-on-channel3-4: 78 description: 79 Indicates that the chip and the diodes/transistors are sufficiently 80 far apart that a parasitic resistance is added to the wires, which can 81 affect the measurements. Due to the availability of only a single 82 configuration bit in hardware, channels 3 and 4 are affected together. 83 If channel 4 is not available in hardware, this setting affects only 84 channel 3. 85 type: boolean 86 87 vdd-supply: true 88 89patternProperties: 90 "^channel@[0-4]$": 91 description: | 92 Represents the temperature channels. 93 0: Internal sensor 94 1-4: External remote diodes 95 type: object 96 97 properties: 98 reg: 99 maxItems: 1 100 101 label: 102 description: Unique name to identify which channel this is. 103 104 required: 105 - reg 106 107 additionalProperties: false 108 109required: 110 - compatible 111 - reg 112 - vdd-supply 113 114allOf: 115 # EMC1812: 1 Internal, 1 External Channels, No APD, 116 # parasitic-res-on-channel1-2: for channel 1 117 - if: 118 properties: 119 compatible: 120 const: microchip,emc1812 121 then: 122 properties: 123 microchip,enable-anti-parallel: false 124 microchip,parasitic-res-on-channel3-4: false 125 patternProperties: 126 "^channel@[2-4]$": false 127 128 # EMC1813: 1 Internal, 2 External Channels, No APD, 129 # parasitic-res-on-channel1-2: on both channel 1 & 2 130 - if: 131 properties: 132 compatible: 133 const: microchip,emc1813 134 then: 135 properties: 136 microchip,enable-anti-parallel: false 137 microchip,parasitic-res-on-channel3-4: false 138 patternProperties: 139 "^channel@[3-4]$": false 140 141 # EMC1833: 1 Internal, 2 External Channels, Supports APD, 142 # parasitic-res-on-channel1-2: on both channel 1 & 2 143 - if: 144 properties: 145 compatible: 146 const: microchip,emc1833 147 then: 148 properties: 149 microchip,parasitic-res-on-channel3-4: false 150 patternProperties: 151 "^channel@[3-4]$": false 152 153 # EMC1814: 1 Internal, 3 External Channels, Supports APD, 154 # parasitic-res-on-channel1-2: on both channel 1 & 2 155 # parasitic-res-on-channel3-4: for channel 3 156 - if: 157 properties: 158 compatible: 159 const: microchip,emc1814 160 then: 161 properties: 162 channel@4: false 163 164unevaluatedProperties: false 165 166examples: 167 - | 168 i2c { 169 #address-cells = <1>; 170 #size-cells = <0>; 171 172 temperature-sensor@4c { 173 compatible = "microchip,emc1813"; 174 reg = <0x4c>; 175 176 #address-cells = <1>; 177 #size-cells = <0>; 178 179 microchip,parasitic-res-on-channel1-2; 180 181 vdd-supply = <&vdd>; 182 183 channel@1 { 184 reg = <1>; 185 label = "External CH1 Temperature"; 186 }; 187 188 channel@2 { 189 reg = <2>; 190 label = "External CH2 Temperature"; 191 }; 192 }; 193 }; 194