146 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---4 5$id: http://devicetree.org/schemas/hwmon/nuvoton,nct7802.yaml#6$schema: http://devicetree.org/meta-schemas/core.yaml#7 8title: Nuvoton NCT7802Y Hardware Monitoring IC9 10maintainers:11 - Guenter Roeck <linux@roeck-us.net>12 13description: |14 The NCT7802Y is a hardware monitor IC which supports one on-die and up to15 5 remote temperature sensors with SMBus interface.16 17 Datasheets:18 https://www.nuvoton.com/export/resource-files/Nuvoton_NCT7802Y_Datasheet_V12.pdf19 20additionalProperties: false21 22properties:23 compatible:24 enum:25 - nuvoton,nct780226 27 reg:28 maxItems: 129 30 "#address-cells":31 const: 132 33 "#size-cells":34 const: 035 36patternProperties:37 "^channel@[0-3]$":38 type: object39 40 additionalProperties: false41 42 properties:43 reg:44 items:45 - enum:46 - 0 # Local Temperature Sensor ("LTD")47 - 1 # Remote Temperature Sensor or Voltage Sensor 1 ("RTD1")48 - 2 # Remote Temperature Sensor or Voltage Sensor 2 ("RTD2")49 - 3 # Remote Temperature Sensor or Voltage Sensor 3 ("RTD3")50 51 sensor-type:52 items:53 - enum:54 - temperature55 - voltage56 57 temperature-mode:58 items:59 - enum:60 - thermistor61 - thermal-diode62 63 required:64 - reg65 66 allOf:67 # For channels RTD1, RTD2 and RTD3, require sensor-type to be set.68 # Otherwise (for all other channels), do not allow temperature-mode to be69 # set.70 - if:71 properties:72 reg:73 items:74 - enum:75 - 176 - 277 - 378 then:79 required:80 - sensor-type81 else:82 not:83 required:84 - sensor-type85 86 # For channels RTD1 and RTD2 and if sensor-type is "temperature", require87 # temperature-mode to be set. Otherwise (for all other channels or88 # sensor-type settings), do not allow temperature-mode to be set89 - if:90 properties:91 reg:92 items:93 - enum:94 - 195 - 296 sensor-type:97 items:98 - enum:99 - temperature100 then:101 required:102 - temperature-mode103 else:104 not:105 required:106 - temperature-mode107 108required:109 - compatible110 - reg111 112examples:113 - |114 i2c {115 #address-cells = <1>;116 #size-cells = <0>;117 118 nct7802@28 {119 compatible = "nuvoton,nct7802";120 reg = <0x28>;121 122 #address-cells = <1>;123 #size-cells = <0>;124 125 channel@0 { /* LTD */126 reg = <0>;127 };128 129 channel@1 { /* RTD1 */130 reg = <1>;131 sensor-type = "voltage";132 };133 134 channel@2 { /* RTD2 */135 reg = <2>;136 sensor-type = "temperature";137 temperature-mode = "thermal-diode";138 };139 140 channel@3 { /* RTD3 */141 reg = <3>;142 sensor-type = "temperature";143 };144 };145 };146