xref: /freebsd/sys/contrib/device-tree/Bindings/hwmon/microchip,emc2305.yaml (revision 8ccc0d235c226d84112561d453c49904398d085c)
1*8ccc0d23SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*8ccc0d23SEmmanuel Vadot%YAML 1.2
3*8ccc0d23SEmmanuel Vadot---
4*8ccc0d23SEmmanuel Vadot$id: http://devicetree.org/schemas/hwmon/microchip,emc2305.yaml#
5*8ccc0d23SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8ccc0d23SEmmanuel Vadot
7*8ccc0d23SEmmanuel Vadottitle: Microchip EMC2305 SMBus compliant PWM fan controller
8*8ccc0d23SEmmanuel Vadot
9*8ccc0d23SEmmanuel Vadotmaintainers:
10*8ccc0d23SEmmanuel Vadot  - Michael Shych <michaelsh@nvidia.com>
11*8ccc0d23SEmmanuel Vadot
12*8ccc0d23SEmmanuel Vadotdescription:
13*8ccc0d23SEmmanuel Vadot  Microchip EMC2301/2/3/5 pwm controller which supports up to five programmable
14*8ccc0d23SEmmanuel Vadot  fan control circuits.
15*8ccc0d23SEmmanuel Vadot
16*8ccc0d23SEmmanuel Vadotproperties:
17*8ccc0d23SEmmanuel Vadot  compatible:
18*8ccc0d23SEmmanuel Vadot    oneOf:
19*8ccc0d23SEmmanuel Vadot      - enum:
20*8ccc0d23SEmmanuel Vadot          - microchip,emc2305
21*8ccc0d23SEmmanuel Vadot      - items:
22*8ccc0d23SEmmanuel Vadot          - enum:
23*8ccc0d23SEmmanuel Vadot              - microchip,emc2303
24*8ccc0d23SEmmanuel Vadot              - microchip,emc2302
25*8ccc0d23SEmmanuel Vadot              - microchip,emc2301
26*8ccc0d23SEmmanuel Vadot          - const: microchip,emc2305
27*8ccc0d23SEmmanuel Vadot
28*8ccc0d23SEmmanuel Vadot  reg:
29*8ccc0d23SEmmanuel Vadot    maxItems: 1
30*8ccc0d23SEmmanuel Vadot
31*8ccc0d23SEmmanuel Vadot  '#address-cells':
32*8ccc0d23SEmmanuel Vadot    const: 1
33*8ccc0d23SEmmanuel Vadot
34*8ccc0d23SEmmanuel Vadot  '#size-cells':
35*8ccc0d23SEmmanuel Vadot    const: 0
36*8ccc0d23SEmmanuel Vadot
37*8ccc0d23SEmmanuel Vadot  '#pwm-cells':
38*8ccc0d23SEmmanuel Vadot    const: 3
39*8ccc0d23SEmmanuel Vadot    description: |
40*8ccc0d23SEmmanuel Vadot      Number of cells in a PWM specifier.
41*8ccc0d23SEmmanuel Vadot      - cell 0: The PWM frequency
42*8ccc0d23SEmmanuel Vadot      - cell 1: The PWM polarity: 0 or PWM_POLARITY_INVERTED
43*8ccc0d23SEmmanuel Vadot      - cell 2: The PWM output config:
44*8ccc0d23SEmmanuel Vadot           - 0 (Open-Drain)
45*8ccc0d23SEmmanuel Vadot           - 1 (Push-Pull)
46*8ccc0d23SEmmanuel Vadot
47*8ccc0d23SEmmanuel VadotpatternProperties:
48*8ccc0d23SEmmanuel Vadot  '^fan@[0-4]$':
49*8ccc0d23SEmmanuel Vadot    $ref: fan-common.yaml#
50*8ccc0d23SEmmanuel Vadot    unevaluatedProperties: false
51*8ccc0d23SEmmanuel Vadot    properties:
52*8ccc0d23SEmmanuel Vadot      reg:
53*8ccc0d23SEmmanuel Vadot        description:
54*8ccc0d23SEmmanuel Vadot          The fan number used to determine the associated PWM channel.
55*8ccc0d23SEmmanuel Vadot        maxItems: 1
56*8ccc0d23SEmmanuel Vadot
57*8ccc0d23SEmmanuel Vadot    required:
58*8ccc0d23SEmmanuel Vadot      - reg
59*8ccc0d23SEmmanuel Vadot
60*8ccc0d23SEmmanuel Vadotrequired:
61*8ccc0d23SEmmanuel Vadot  - compatible
62*8ccc0d23SEmmanuel Vadot  - reg
63*8ccc0d23SEmmanuel Vadot
64*8ccc0d23SEmmanuel VadotadditionalProperties: false
65*8ccc0d23SEmmanuel Vadot
66*8ccc0d23SEmmanuel Vadotexamples:
67*8ccc0d23SEmmanuel Vadot  - |
68*8ccc0d23SEmmanuel Vadot    #include <dt-bindings/pwm/pwm.h>
69*8ccc0d23SEmmanuel Vadot    i2c {
70*8ccc0d23SEmmanuel Vadot        #address-cells = <1>;
71*8ccc0d23SEmmanuel Vadot        #size-cells = <0>;
72*8ccc0d23SEmmanuel Vadot
73*8ccc0d23SEmmanuel Vadot        fan_controller: fan-controller@2f {
74*8ccc0d23SEmmanuel Vadot            compatible = "microchip,emc2305";
75*8ccc0d23SEmmanuel Vadot            reg = <0x2f>;
76*8ccc0d23SEmmanuel Vadot            #address-cells = <1>;
77*8ccc0d23SEmmanuel Vadot            #size-cells = <0>;
78*8ccc0d23SEmmanuel Vadot            #pwm-cells = <3>;
79*8ccc0d23SEmmanuel Vadot
80*8ccc0d23SEmmanuel Vadot            fan@0 {
81*8ccc0d23SEmmanuel Vadot                reg = <0x0>;
82*8ccc0d23SEmmanuel Vadot                pwms = <&fan_controller 26000 PWM_POLARITY_INVERTED 1>;
83*8ccc0d23SEmmanuel Vadot                #cooling-cells = <2>;
84*8ccc0d23SEmmanuel Vadot            };
85*8ccc0d23SEmmanuel Vadot
86*8ccc0d23SEmmanuel Vadot            fan@1 {
87*8ccc0d23SEmmanuel Vadot                reg = <0x1>;
88*8ccc0d23SEmmanuel Vadot                pwms = <&fan_controller 26000 0 1>;
89*8ccc0d23SEmmanuel Vadot                #cooling-cells = <2>;
90*8ccc0d23SEmmanuel Vadot            };
91*8ccc0d23SEmmanuel Vadot
92*8ccc0d23SEmmanuel Vadot            fan@2 {
93*8ccc0d23SEmmanuel Vadot                reg = <0x2>;
94*8ccc0d23SEmmanuel Vadot                pwms = <&fan_controller 26000 0 1>;
95*8ccc0d23SEmmanuel Vadot                #cooling-cells = <2>;
96*8ccc0d23SEmmanuel Vadot            };
97*8ccc0d23SEmmanuel Vadot
98*8ccc0d23SEmmanuel Vadot            fan@3 {
99*8ccc0d23SEmmanuel Vadot                reg = <0x3>;
100*8ccc0d23SEmmanuel Vadot                pwms = <&fan_controller 26000 0 1>;
101*8ccc0d23SEmmanuel Vadot                #cooling-cells = <2>;
102*8ccc0d23SEmmanuel Vadot            };
103*8ccc0d23SEmmanuel Vadot
104*8ccc0d23SEmmanuel Vadot            fan@4 {
105*8ccc0d23SEmmanuel Vadot                reg = <0x4>;
106*8ccc0d23SEmmanuel Vadot                pwms = <&fan_controller 26000 0 1>;
107*8ccc0d23SEmmanuel Vadot                #cooling-cells = <2>;
108*8ccc0d23SEmmanuel Vadot            };
109*8ccc0d23SEmmanuel Vadot        };
110*8ccc0d23SEmmanuel Vadot    };
111*8ccc0d23SEmmanuel Vadot...
112