xref: /linux/Documentation/devicetree/bindings/iio/pressure/honeywell,mprls0025pa.yaml (revision d2a4a07190f42e4f82805daf58e708400b703f1c)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/pressure/honeywell,mprls0025pa.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Honeywell mprls0025pa pressure sensor
8
9maintainers:
10  - Andreas Klinger <ak@it-klinger.de>
11  - Petre Rodan <petre.rodan@subdimension.ro>
12
13description: |
14  Honeywell pressure sensor of model mprls0025pa.
15
16  This sensor has an I2C and SPI interface.
17
18  There are many models with different pressure ranges available. The vendor
19  calls them "mpr series". All of them have the identical programming model and
20  differ in the pressure range, unit and transfer function.
21
22  To support different models one need to specify its pressure triplet as well
23  as the transfer function.
24
25  For custom silicon chips not covered by the Honeywell MPR series datasheet,
26  the pressure values can be specified manually via honeywell,pmin-pascal and
27  honeywell,pmax-pascal.
28  The minimal range value stands for the minimum pressure and the maximum value
29  also for the maximum pressure with linear relation inside the range.
30
31  The transfer function defines the ranges of numerical values delivered by the
32  sensor.
33
34  Specifications about the devices can be found at:
35    https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/
36      products/sensors/pressure-sensors/board-mount-pressure-sensors/
37      micropressure-mpr-series/documents/
38      sps-siot-mpr-series-datasheet-32332628-ciid-172626.pdf
39
40properties:
41  compatible:
42    const: honeywell,mprls0025pa
43
44  reg:
45    maxItems: 1
46
47  interrupts:
48    description:
49      Optional interrupt for indicating End-of-conversion.
50      If not present, the driver loops for a while until the received status
51      byte indicates correct measurement.
52    maxItems: 1
53
54  reset-gpios:
55    description:
56      Optional GPIO for resetting the device.
57      If not present the device is not reset during the probe.
58    maxItems: 1
59
60  honeywell,transfer-function:
61    description: |
62      Transfer function which defines the range of valid values delivered by the
63      sensor.
64      1 - A, 10% to 90% of 2^24 (1677722 .. 15099494)
65      2 - B, 2.5% to 22.5% of 2^24 (419430 .. 3774874)
66      3 - C, 20% to 80% of 2^24 (3355443 .. 13421773)
67    enum: [1, 2, 3]
68    $ref: /schemas/types.yaml#/definitions/uint32
69
70  honeywell,pressure-triplet:
71    description: |
72      Case-sensitive five character string that defines pressure range, unit
73      and type as part of the device nomenclature. In the unlikely case of a
74      custom chip, unset and provide pmin-pascal and pmax-pascal instead.
75    enum: [0001BA, 01.6BA, 02.5BA, 0060MG, 0100MG, 0160MG, 0250MG, 0400MG,
76           0600MG, 0001BG, 01.6BG, 02.5BG, 0100KA, 0160KA, 0250KA, 0006KG,
77           0010KG, 0016KG, 0025KG, 0040KG, 0060KG, 0100KG, 0160KG, 0250KG,
78           0015PA, 0025PA, 0030PA, 0001PG, 0005PG, 0015PG, 0030PG, 0300YG]
79    $ref: /schemas/types.yaml#/definitions/string
80
81  honeywell,pmin-pascal:
82    description:
83      Minimum pressure value the sensor can measure in pascal.
84
85  honeywell,pmax-pascal:
86    description:
87      Maximum pressure value the sensor can measure in pascal.
88
89  spi-max-frequency:
90    maximum: 800000
91
92  vdd-supply:
93    description: provide VDD power to the sensor.
94
95required:
96  - compatible
97  - reg
98  - honeywell,transfer-function
99  - vdd-supply
100
101oneOf:
102  - required:
103      - honeywell,pressure-triplet
104  - required:
105      - honeywell,pmin-pascal
106      - honeywell,pmax-pascal
107
108allOf:
109  - $ref: /schemas/spi/spi-peripheral-props.yaml
110  - if:
111      required:
112        - honeywell,pressure-triplet
113    then:
114      properties:
115        honeywell,pmin-pascal: false
116        honeywell,pmax-pascal: false
117
118additionalProperties: false
119
120examples:
121  - |
122    #include <dt-bindings/gpio/gpio.h>
123    #include <dt-bindings/interrupt-controller/irq.h>
124    i2c {
125        #address-cells = <1>;
126        #size-cells = <0>;
127
128        pressure@18 {
129            compatible = "honeywell,mprls0025pa";
130            reg = <0x18>;
131            reset-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>;
132            interrupt-parent = <&gpio3>;
133            interrupts = <21 IRQ_TYPE_EDGE_RISING>;
134
135            honeywell,pressure-triplet = "0025PA";
136            honeywell,transfer-function = <1>;
137            vdd-supply = <&vcc_3v3>;
138        };
139    };
140  - |
141    spi {
142        #address-cells = <1>;
143        #size-cells = <0>;
144
145        pressure@0 {
146            compatible = "honeywell,mprls0025pa";
147            reg = <0>;
148            spi-max-frequency = <800000>;
149            reset-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
150            interrupt-parent = <&gpio0>;
151            interrupts = <30 IRQ_TYPE_EDGE_RISING>;
152
153            honeywell,pressure-triplet = "0015PA";
154            honeywell,transfer-function = <1>;
155            vdd-supply = <&vcc_3v3>;
156        };
157    };
158...
159