summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/mfd/iqs62x.yaml
blob: 044cd7542c2bcf5030b93de98b3314e6d63fce7f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/iqs62x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Azoteq IQS620A/621/622/624/625 Multi-Function Sensors

maintainers:
  - Jeff LaBundy <jeff@labundy.com>

description: |
  The Azoteq IQS620A, IQS621, IQS622, IQS624 and IQS625 multi-function sensors
  integrate multiple sensing technologies in a single package.

  Link to datasheets: https://www.azoteq.com/

properties:
  compatible:
    enum:
      - azoteq,iqs620a
      - azoteq,iqs621
      - azoteq,iqs622
      - azoteq,iqs624
      - azoteq,iqs625

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  firmware-name:
    $ref: /schemas/types.yaml#/definitions/string
    description:
      Specifies the name of the calibration and configuration file selected by
      the driver. If this property is omitted, the name is chosen based on the
      device name with ".bin" as the extension (e.g. iqs620a.bin for IQS620A).

  keys:
    $ref: ../input/iqs62x-keys.yaml

  pwm:
    $ref: ../pwm/iqs620a-pwm.yaml

required:
  - compatible
  - reg
  - interrupts

additionalProperties: false

examples:
  - |
    /*
     * Dual capacitive buttons with proximity-activated function, unipolar lid
     * switch and panel-mounted LED.
     */
    #include <dt-bindings/input/input.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    i2c {
            #address-cells = <1>;
            #size-cells = <0>;

            iqs620a@44 {
                    compatible = "azoteq,iqs620a";
                    reg = <0x44>;
                    interrupt-parent = <&gpio>;
                    interrupts = <17 IRQ_TYPE_LEVEL_LOW>;

                    keys {
                            compatible = "azoteq,iqs620a-keys";

                            linux,keycodes = <KEY_SELECT>,
                                             <KEY_MENU>,
                                             <KEY_OK>,
                                             <KEY_MENU>;

                            hall-switch-south {
                                    linux,code = <SW_LID>;
                                    azoteq,use-prox;
                            };
                    };

                    iqs620a_pwm: pwm {
                            compatible = "azoteq,iqs620a-pwm";
                            #pwm-cells = <2>;
                    };
            };
    };

    pwmleds {
            compatible = "pwm-leds";

            led-1 {
                    pwms = <&iqs620a_pwm 0 1000000>;
                    max-brightness = <255>;
            };
    };

  - |
    /* Single inductive button with bipolar dock/tablet-mode switch. */
    #include <dt-bindings/input/input.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    i2c {
            #address-cells = <1>;
            #size-cells = <0>;

            iqs620a@44 {
                    compatible = "azoteq,iqs620a";
                    reg = <0x44>;
                    interrupt-parent = <&gpio>;
                    interrupts = <17 IRQ_TYPE_LEVEL_LOW>;

                    firmware-name = "iqs620a_coil.bin";

                    keys {
                            compatible = "azoteq,iqs620a-keys";

                            linux,keycodes = <0>,
                                             <0>,
                                             <0>,
                                             <0>,
                                             <0>,
                                             <0>,
                                             <KEY_MUTE>;

                            hall-switch-north {
                                    linux,code = <SW_DOCK>;
                            };

                            hall-switch-south {
                                    linux,code = <SW_TABLET_MODE>;
                            };
                    };
            };
    };

  - |
    /* Dual capacitive buttons with volume knob. */
    #include <dt-bindings/input/input.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    i2c {
            #address-cells = <1>;
            #size-cells = <0>;

            iqs624@44 {
                    compatible = "azoteq,iqs624";
                    reg = <0x44>;
                    interrupt-parent = <&gpio>;
                    interrupts = <17 IRQ_TYPE_LEVEL_LOW>;

                    keys {
                            compatible = "azoteq,iqs624-keys";

                            linux,keycodes = <BTN_0>,
                                             <0>,
                                             <BTN_1>,
                                             <0>,
                                             <0>,
                                             <0>,
                                             <0>,
                                             <0>,
                                             <0>,
                                             <0>,
                                             <0>,
                                             <0>,
                                             <0>,
                                             <0>,
                                             <KEY_VOLUMEUP>,
                                             <KEY_VOLUMEDOWN>;
                    };
            };
    };

...