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