WIP FPC-III support
[linux/fpc-iii.git] / Documentation / devicetree / bindings / mfd / iqs62x.yaml
blob541b06d80e7337a8f1b5c195ecdb3061d6b7f4b5
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/mfd/iqs62x.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Azoteq IQS620A/621/622/624/625 Multi-Function Sensors
9 maintainers:
10   - Jeff LaBundy <jeff@labundy.com>
12 description: |
13   The Azoteq IQS620A, IQS621, IQS622, IQS624 and IQS625 multi-function sensors
14   integrate multiple sensing technologies in a single package.
16   Link to datasheets: https://www.azoteq.com/
18 properties:
19   compatible:
20     enum:
21       - azoteq,iqs620a
22       - azoteq,iqs621
23       - azoteq,iqs622
24       - azoteq,iqs624
25       - azoteq,iqs625
27   reg:
28     maxItems: 1
30   interrupts:
31     maxItems: 1
33   firmware-name:
34     $ref: /schemas/types.yaml#/definitions/string
35     description:
36       Specifies the name of the calibration and configuration file selected by
37       the driver. If this property is omitted, the name is chosen based on the
38       device name with ".bin" as the extension (e.g. iqs620a.bin for IQS620A).
40   keys:
41     $ref: ../input/iqs62x-keys.yaml
43   pwm:
44     $ref: ../pwm/iqs620a-pwm.yaml
46 required:
47   - compatible
48   - reg
49   - interrupts
51 additionalProperties: false
53 examples:
54   - |
55     /*
56      * Dual capacitive buttons with proximity-activated function, unipolar lid
57      * switch and panel-mounted LED.
58      */
59     #include <dt-bindings/input/input.h>
60     #include <dt-bindings/interrupt-controller/irq.h>
62     i2c {
63             #address-cells = <1>;
64             #size-cells = <0>;
66             iqs620a@44 {
67                     compatible = "azoteq,iqs620a";
68                     reg = <0x44>;
69                     interrupt-parent = <&gpio>;
70                     interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
72                     keys {
73                             compatible = "azoteq,iqs620a-keys";
75                             linux,keycodes = <KEY_SELECT>,
76                                              <KEY_MENU>,
77                                              <KEY_OK>,
78                                              <KEY_MENU>;
80                             hall-switch-south {
81                                     linux,code = <SW_LID>;
82                                     azoteq,use-prox;
83                             };
84                     };
86                     iqs620a_pwm: pwm {
87                             compatible = "azoteq,iqs620a-pwm";
88                             #pwm-cells = <2>;
89                     };
90             };
91     };
93     pwmleds {
94             compatible = "pwm-leds";
96             panel {
97                     pwms = <&iqs620a_pwm 0 1000000>;
98                     max-brightness = <255>;
99             };
100     };
102   - |
103     /* Single inductive button with bipolar dock/tablet-mode switch. */
104     #include <dt-bindings/input/input.h>
105     #include <dt-bindings/interrupt-controller/irq.h>
107     i2c {
108             #address-cells = <1>;
109             #size-cells = <0>;
111             iqs620a@44 {
112                     compatible = "azoteq,iqs620a";
113                     reg = <0x44>;
114                     interrupt-parent = <&gpio>;
115                     interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
117                     firmware-name = "iqs620a_coil.bin";
119                     keys {
120                             compatible = "azoteq,iqs620a-keys";
122                             linux,keycodes = <0>,
123                                              <0>,
124                                              <0>,
125                                              <0>,
126                                              <0>,
127                                              <0>,
128                                              <KEY_MUTE>;
130                             hall-switch-north {
131                                     linux,code = <SW_DOCK>;
132                             };
134                             hall-switch-south {
135                                     linux,code = <SW_TABLET_MODE>;
136                             };
137                     };
138             };
139     };
141   - |
142     /* Dual capacitive buttons with volume knob. */
143     #include <dt-bindings/input/input.h>
144     #include <dt-bindings/interrupt-controller/irq.h>
146     i2c {
147             #address-cells = <1>;
148             #size-cells = <0>;
150             iqs624@44 {
151                     compatible = "azoteq,iqs624";
152                     reg = <0x44>;
153                     interrupt-parent = <&gpio>;
154                     interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
156                     keys {
157                             compatible = "azoteq,iqs624-keys";
159                             linux,keycodes = <BTN_0>,
160                                              <0>,
161                                              <BTN_1>,
162                                              <0>,
163                                              <0>,
164                                              <0>,
165                                              <0>,
166                                              <0>,
167                                              <0>,
168                                              <0>,
169                                              <0>,
170                                              <0>,
171                                              <0>,
172                                              <0>,
173                                              <KEY_VOLUMEUP>,
174                                              <KEY_VOLUMEDOWN>;
175                     };
176             };
177     };