Skip to content

Commit 0050c16

Browse files
chnguyen-amperegroeck
authored andcommitted
dt-bindings: hwmon: Add maxim max31790
Add device tree bindings and an example for max31790 device. Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Message-ID: <20240822084808.299884-1-chanh@os.amperecomputing.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent b82b38a commit 0050c16

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/hwmon/maxim,max31790.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: The Maxim MAX31790 Fan Controller
8+
9+
maintainers:
10+
- Guenter Roeck <linux@roeck-us.net>
11+
- Chanh Nguyen <chanh@os.amperecomputing.com>
12+
13+
description: >
14+
The MAX31790 controls the speeds of up to six fans using six
15+
independent PWM outputs. The desired fan speeds (or PWM duty cycles)
16+
are written through the I2C interface.
17+
18+
Datasheets:
19+
https://datasheets.maximintegrated.com/en/ds/MAX31790.pdf
20+
21+
properties:
22+
compatible:
23+
const: maxim,max31790
24+
25+
reg:
26+
maxItems: 1
27+
28+
clocks:
29+
maxItems: 1
30+
31+
resets:
32+
maxItems: 1
33+
34+
"#pwm-cells":
35+
const: 1
36+
37+
patternProperties:
38+
"^fan-[0-9]+$":
39+
$ref: fan-common.yaml#
40+
unevaluatedProperties: false
41+
42+
required:
43+
- compatible
44+
- reg
45+
46+
additionalProperties: false
47+
48+
examples:
49+
- |
50+
i2c {
51+
#address-cells = <1>;
52+
#size-cells = <0>;
53+
54+
pwm_provider: fan-controller@20 {
55+
compatible = "maxim,max31790";
56+
reg = <0x20>;
57+
clocks = <&sys_clk>;
58+
resets = <&reset 0>;
59+
#pwm-cells = <1>;
60+
61+
fan-0 {
62+
pwms = <&pwm_provider 1>;
63+
};
64+
65+
fan-1 {
66+
pwms = <&pwm_provider 2>;
67+
};
68+
};
69+
};
70+

0 commit comments

Comments
 (0)