1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/health/maxim,max30102.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Maxim MAX30102 heart rate and pulse oximeter and MAX30105 particle-sensor
8
9maintainers:
10  - Matt Ranostay <matt.ranostay@konsulko.com>
11
12properties:
13  compatible:
14    enum:
15      - maxim,max30102
16      - maxim,max30105
17
18  reg:
19    maxItems: 1
20
21  interrupts:
22    maxItems: 1
23    description: Connected to ADC_RDY pin.
24
25  maxim,red-led-current-microamp:
26    description: RED LED current. Each step is approximately 200 microamps.
27    minimum: 0
28    maximum: 50800
29
30  maxim,ir-led-current-microamp:
31    description: IR LED current. Each step is approximately 200 microamps.
32    minimum: 0
33    maximum: 50800
34
35  maxim,green-led-current-microamp:
36    description: Green LED current. Each step is approximately 200 microamps.
37    minimum: 0
38    maximum: 50800
39
40allOf:
41  - if:
42      properties:
43        compatible:
44          contains:
45            const: maxim,max30102
46    then:
47      properties:
48        maxim,green-led-current-microamp: false
49
50additionalProperties: false
51
52required:
53  - compatible
54  - reg
55  - interrupts
56
57examples:
58  - |
59    i2c {
60        #address-cells = <1>;
61        #size-cells = <0>;
62
63        heart-rate@57 {
64            compatible = "maxim,max30102";
65            reg = <0x57>;
66            maxim,red-led-current-microamp = <7000>;
67            maxim,ir-led-current-microamp = <7000>;
68            interrupt-parent = <&gpio1>;
69            interrupts = <16 2>;
70        };
71    };
72...
73