1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/hwmon/adt7475.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: ADT7475 hwmon sensor 8 9maintainers: 10 - Jean Delvare <jdelvare@suse.com> 11 12description: | 13 The ADT7473, ADT7475, ADT7476, and ADT7490 are thermal monitors and multiple 14 PWN fan controllers. 15 16 They support monitoring and controlling up to four fans (the ADT7490 can only 17 control up to three). They support reading a single on chip temperature 18 sensor and two off chip temperature sensors (the ADT7490 additionally 19 supports measuring up to three current external temperature sensors with 20 series resistance cancellation (SRC)). 21 22 Datasheets: 23 https://www.onsemi.com/pub/Collateral/ADT7473-D.PDF 24 https://www.onsemi.com/pub/Collateral/ADT7475-D.PDF 25 https://www.onsemi.com/pub/Collateral/ADT7476-D.PDF 26 https://www.onsemi.com/pub/Collateral/ADT7490-D.PDF 27 28 Description taken from onsemiconductors specification sheets, with minor 29 rephrasing. 30 31properties: 32 compatible: 33 enum: 34 - adi,adt7473 35 - adi,adt7475 36 - adi,adt7476 37 - adi,adt7490 38 39 reg: 40 maxItems: 1 41 42 adi,pwm-active-state: 43 description: | 44 Integer array, represents the active state of the pwm outputs If set to 0 45 the pwm uses a logic low output for 100% duty cycle. If set to 1 the pwm 46 uses a logic high output for 100% duty cycle. 47 $ref: /schemas/types.yaml#/definitions/uint32-array 48 deprecated: true 49 minItems: 3 50 maxItems: 3 51 items: 52 enum: [0, 1] 53 default: 1 54 55 "#pwm-cells": 56 oneOf: 57 - const: 3 58 - const: 4 59 deprecated: true 60 description: | 61 Number of cells in a PWM specifier. 62 - 0: The PWM channel 63 - 1: The PWM period in nanoseconds 64 - 90909091 (11 Hz) 65 - 71428571 (14 Hz) 66 - 45454545 (22 Hz) 67 - 34482759 (29 Hz) 68 - 28571429 (35 Hz) 69 - 22727273 (44 Hz) 70 - 17241379 (58 Hz) 71 - 11363636 (88 Hz) 72 - 44444 (22 kHz) 73 - 2: PWM flags 0 or PWM_POLARITY_INVERTED 74 - 3: The default PWM duty cycle in nanoseconds, defaults to period. 75 76patternProperties: 77 "^adi,bypass-attenuator-in[0-4]$": 78 description: | 79 Configures bypassing the individual voltage input attenuator. If 80 set to 1 the attenuator is bypassed if set to 0 the attenuator is 81 not bypassed. If the property is absent then the attenuator 82 retains its configuration from the bios/bootloader. 83 $ref: /schemas/types.yaml#/definitions/uint32 84 enum: [0, 1] 85 86 "^adi,pin(5|10)-function$": 87 description: | 88 Configures the function for pin 5 on the adi,adt7473 and adi,adt7475. Or 89 pin 10 on the adi,adt7476 and adi,adt7490. 90 $ref: /schemas/types.yaml#/definitions/string 91 enum: 92 - pwm2 93 - smbalert# 94 95 "^adi,pin(9|14)-function$": 96 description: | 97 Configures the function for pin 9 on the adi,adt7473 and adi,adt7475. Or 98 pin 14 on the adi,adt7476 and adi,adt7490 99 $ref: /schemas/types.yaml#/definitions/string 100 enum: 101 - tach4 102 - therm# 103 - smbalert# 104 - gpio 105 106 "^fan-[0-9]+$": 107 $ref: fan-common.yaml# 108 unevaluatedProperties: false 109 110required: 111 - compatible 112 - reg 113 114additionalProperties: false 115 116examples: 117 - | 118 #include <dt-bindings/pwm/pwm.h> 119 i2c { 120 #address-cells = <1>; 121 #size-cells = <0>; 122 123 pwm: hwmon@2e { 124 compatible = "adi,adt7476"; 125 reg = <0x2e>; 126 adi,bypass-attenuator-in0 = <1>; 127 adi,bypass-attenuator-in1 = <0>; 128 adi,pin10-function = "smbalert#"; 129 adi,pin14-function = "tach4"; 130 #pwm-cells = <3>; 131 132 /* PWMs at 22.5 kHz frequency */ 133 fan-0 { 134 pwms = <&pwm 0 44444 0>; 135 }; 136 137 fan-1 { 138 pwms = <&pwm 2 44444 0>; 139 }; 140 }; 141 }; 142