xref: /openbmc/linux/Documentation/devicetree/bindings/input/syna,rmi4.yaml (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
1*3b44738eSKrzysztof Kozlowski# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*3b44738eSKrzysztof Kozlowski%YAML 1.2
3*3b44738eSKrzysztof Kozlowski---
4*3b44738eSKrzysztof Kozlowski$id: http://devicetree.org/schemas/input/syna,rmi4.yaml#
5*3b44738eSKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml#
6*3b44738eSKrzysztof Kozlowski
7*3b44738eSKrzysztof Kozlowskititle: Synaptics RMI4 compliant devices
8*3b44738eSKrzysztof Kozlowski
9*3b44738eSKrzysztof Kozlowskimaintainers:
10*3b44738eSKrzysztof Kozlowski  - Jason A. Donenfeld <Jason@zx2c4.com>
11*3b44738eSKrzysztof Kozlowski  - Matthias Schiffer <matthias.schiffer@ew.tq-group.com
12*3b44738eSKrzysztof Kozlowski  - Vincent Huang <vincent.huang@tw.synaptics.com>
13*3b44738eSKrzysztof Kozlowski
14*3b44738eSKrzysztof Kozlowskidescription: |
15*3b44738eSKrzysztof Kozlowski  The Synaptics RMI4 (Register Mapped Interface 4) core is able to support RMI4
16*3b44738eSKrzysztof Kozlowski  devices using different transports (I2C, SPI) and different functions (e.g.
17*3b44738eSKrzysztof Kozlowski  Function 1, 2D sensors using Function 11 or 12).
18*3b44738eSKrzysztof Kozlowski
19*3b44738eSKrzysztof Kozlowskiproperties:
20*3b44738eSKrzysztof Kozlowski  compatible:
21*3b44738eSKrzysztof Kozlowski    enum:
22*3b44738eSKrzysztof Kozlowski      - syna,rmi4-i2c
23*3b44738eSKrzysztof Kozlowski      - syna,rmi4-spi
24*3b44738eSKrzysztof Kozlowski
25*3b44738eSKrzysztof Kozlowski  reg:
26*3b44738eSKrzysztof Kozlowski    maxItems: 1
27*3b44738eSKrzysztof Kozlowski
28*3b44738eSKrzysztof Kozlowski  '#address-cells':
29*3b44738eSKrzysztof Kozlowski    const: 1
30*3b44738eSKrzysztof Kozlowski
31*3b44738eSKrzysztof Kozlowski  '#size-cells':
32*3b44738eSKrzysztof Kozlowski    const: 0
33*3b44738eSKrzysztof Kozlowski
34*3b44738eSKrzysztof Kozlowski  interrupts:
35*3b44738eSKrzysztof Kozlowski    maxItems: 1
36*3b44738eSKrzysztof Kozlowski
37*3b44738eSKrzysztof Kozlowski  reset-gpios:
38*3b44738eSKrzysztof Kozlowski    maxItems: 1
39*3b44738eSKrzysztof Kozlowski    description: Active low signal
40*3b44738eSKrzysztof Kozlowski
41*3b44738eSKrzysztof Kozlowski  spi-cpha: true
42*3b44738eSKrzysztof Kozlowski  spi-cpol: true
43*3b44738eSKrzysztof Kozlowski
44*3b44738eSKrzysztof Kozlowski  syna,reset-delay-ms:
45*3b44738eSKrzysztof Kozlowski    description:
46*3b44738eSKrzysztof Kozlowski      Delay to wait after resetting the device.
47*3b44738eSKrzysztof Kozlowski
48*3b44738eSKrzysztof Kozlowski  syna,startup-delay-ms:
49*3b44738eSKrzysztof Kozlowski    description:
50*3b44738eSKrzysztof Kozlowski      Delay to wait after powering on the device.
51*3b44738eSKrzysztof Kozlowski
52*3b44738eSKrzysztof Kozlowski  vdd-supply: true
53*3b44738eSKrzysztof Kozlowski  vio-supply: true
54*3b44738eSKrzysztof Kozlowski
55*3b44738eSKrzysztof Kozlowski  rmi4-f01@1:
56*3b44738eSKrzysztof Kozlowski    type: object
57*3b44738eSKrzysztof Kozlowski    additionalProperties: false
58*3b44738eSKrzysztof Kozlowski    description:
59*3b44738eSKrzysztof Kozlowski      Function 1
60*3b44738eSKrzysztof Kozlowski
61*3b44738eSKrzysztof Kozlowski    properties:
62*3b44738eSKrzysztof Kozlowski      reg:
63*3b44738eSKrzysztof Kozlowski        maxItems: 1
64*3b44738eSKrzysztof Kozlowski
65*3b44738eSKrzysztof Kozlowski      syna,nosleep-mode:
66*3b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
67*3b44738eSKrzysztof Kozlowski        enum: [0, 1, 2]
68*3b44738eSKrzysztof Kozlowski        description:
69*3b44738eSKrzysztof Kozlowski          If set the device will run at full power without sleeping.  nosleep
70*3b44738eSKrzysztof Kozlowski          has 3 modes, 0 will not change the default setting, 1 will disable
71*3b44738eSKrzysztof Kozlowski          nosleep (allow sleeping), and 2 will enable nosleep (disabling
72*3b44738eSKrzysztof Kozlowski          sleep).
73*3b44738eSKrzysztof Kozlowski
74*3b44738eSKrzysztof Kozlowski      syna,wakeup-threshold:
75*3b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
76*3b44738eSKrzysztof Kozlowski        description:
77*3b44738eSKrzysztof Kozlowski          Defines the amplitude of the disturbance to the background
78*3b44738eSKrzysztof Kozlowski          capacitance that will cause the device to wake from dozing.
79*3b44738eSKrzysztof Kozlowski
80*3b44738eSKrzysztof Kozlowski      syna,doze-holdoff-ms:
81*3b44738eSKrzysztof Kozlowski        description:
82*3b44738eSKrzysztof Kozlowski          The delay to wait after the last finger lift and the first doze
83*3b44738eSKrzysztof Kozlowski          cycle.
84*3b44738eSKrzysztof Kozlowski
85*3b44738eSKrzysztof Kozlowski      syna,doze-interval-ms:
86*3b44738eSKrzysztof Kozlowski        description:
87*3b44738eSKrzysztof Kozlowski          The time period that the device sleeps between finger activity.
88*3b44738eSKrzysztof Kozlowski
89*3b44738eSKrzysztof Kozlowski    required:
90*3b44738eSKrzysztof Kozlowski      - reg
91*3b44738eSKrzysztof Kozlowski
92*3b44738eSKrzysztof KozlowskipatternProperties:
93*3b44738eSKrzysztof Kozlowski  "^rmi4-f1[12]@1[12]$":
94*3b44738eSKrzysztof Kozlowski    type: object
95*3b44738eSKrzysztof Kozlowski    unevaluatedProperties: false
96*3b44738eSKrzysztof Kozlowski    $ref: /schemas/input/touchscreen/touchscreen.yaml#
97*3b44738eSKrzysztof Kozlowski    description:
98*3b44738eSKrzysztof Kozlowski      RMI4 Function 11 and Function 12 are for 2D touch position sensing.
99*3b44738eSKrzysztof Kozlowski
100*3b44738eSKrzysztof Kozlowski    properties:
101*3b44738eSKrzysztof Kozlowski      reg:
102*3b44738eSKrzysztof Kozlowski        maxItems: 1
103*3b44738eSKrzysztof Kozlowski
104*3b44738eSKrzysztof Kozlowski      syna,clip-x-low:
105*3b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
106*3b44738eSKrzysztof Kozlowski        description:
107*3b44738eSKrzysztof Kozlowski          Minimum value for X.
108*3b44738eSKrzysztof Kozlowski
109*3b44738eSKrzysztof Kozlowski      syna,clip-y-low:
110*3b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
111*3b44738eSKrzysztof Kozlowski        description:
112*3b44738eSKrzysztof Kozlowski          Minimum value for Y.
113*3b44738eSKrzysztof Kozlowski
114*3b44738eSKrzysztof Kozlowski      syna,clip-x-high:
115*3b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
116*3b44738eSKrzysztof Kozlowski        description:
117*3b44738eSKrzysztof Kozlowski          Maximum value for X.
118*3b44738eSKrzysztof Kozlowski
119*3b44738eSKrzysztof Kozlowski      syna,clip-y-high:
120*3b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
121*3b44738eSKrzysztof Kozlowski        description:
122*3b44738eSKrzysztof Kozlowski          Maximum value for Y.
123*3b44738eSKrzysztof Kozlowski
124*3b44738eSKrzysztof Kozlowski      syna,offset-x:
125*3b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
126*3b44738eSKrzysztof Kozlowski        description:
127*3b44738eSKrzysztof Kozlowski          Add an offset to X.
128*3b44738eSKrzysztof Kozlowski
129*3b44738eSKrzysztof Kozlowski      syna,offset-y:
130*3b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
131*3b44738eSKrzysztof Kozlowski        description:
132*3b44738eSKrzysztof Kozlowski          Add an offset to Y.
133*3b44738eSKrzysztof Kozlowski
134*3b44738eSKrzysztof Kozlowski      syna,delta-x-threshold:
135*3b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
136*3b44738eSKrzysztof Kozlowski        description:
137*3b44738eSKrzysztof Kozlowski          Minimum distance on the X axis required to generate an interrupt in
138*3b44738eSKrzysztof Kozlowski          reduced reporting mode.
139*3b44738eSKrzysztof Kozlowski
140*3b44738eSKrzysztof Kozlowski      syna,delta-y-threshold:
141*3b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
142*3b44738eSKrzysztof Kozlowski        description:
143*3b44738eSKrzysztof Kozlowski          Minimum distance on the Y axis required to generate an interrupt in
144*3b44738eSKrzysztof Kozlowski          reduced reporting mode.
145*3b44738eSKrzysztof Kozlowski
146*3b44738eSKrzysztof Kozlowski      syna,sensor-type:
147*3b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
148*3b44738eSKrzysztof Kozlowski        enum: [1, 2]
149*3b44738eSKrzysztof Kozlowski        description: |
150*3b44738eSKrzysztof Kozlowski          Sensor type: 1 for touchscreen 2 for touchpad.
151*3b44738eSKrzysztof Kozlowski
152*3b44738eSKrzysztof Kozlowski      syna,disable-report-mask:
153*3b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
154*3b44738eSKrzysztof Kozlowski        description:
155*3b44738eSKrzysztof Kozlowski          Mask for disabling posiiton reporting. Used to disable reporing
156*3b44738eSKrzysztof Kozlowski          absolute position data.
157*3b44738eSKrzysztof Kozlowski
158*3b44738eSKrzysztof Kozlowski      syna,rezero-wait-ms:
159*3b44738eSKrzysztof Kozlowski        description:
160*3b44738eSKrzysztof Kozlowski          Time to wait after issuing a rezero command.
161*3b44738eSKrzysztof Kozlowski
162*3b44738eSKrzysztof Kozlowski    required:
163*3b44738eSKrzysztof Kozlowski      - reg
164*3b44738eSKrzysztof Kozlowski
165*3b44738eSKrzysztof Kozlowski  "^rmi4-f[0-9a-f]+@[0-9a-f]+$":
166*3b44738eSKrzysztof Kozlowski    type: object
167*3b44738eSKrzysztof Kozlowski    description:
168*3b44738eSKrzysztof Kozlowski      Other functions, not documented yet.
169*3b44738eSKrzysztof Kozlowski
170*3b44738eSKrzysztof Kozlowski    properties:
171*3b44738eSKrzysztof Kozlowski      reg:
172*3b44738eSKrzysztof Kozlowski        maxItems: 1
173*3b44738eSKrzysztof Kozlowski
174*3b44738eSKrzysztof Kozlowski    required:
175*3b44738eSKrzysztof Kozlowski      - reg
176*3b44738eSKrzysztof Kozlowski
177*3b44738eSKrzysztof Kozlowskirequired:
178*3b44738eSKrzysztof Kozlowski  - compatible
179*3b44738eSKrzysztof Kozlowski  - reg
180*3b44738eSKrzysztof Kozlowski
181*3b44738eSKrzysztof KozlowskiunevaluatedProperties: false
182*3b44738eSKrzysztof Kozlowski
183*3b44738eSKrzysztof KozlowskiallOf:
184*3b44738eSKrzysztof Kozlowski  - $ref: /schemas/spi/spi-peripheral-props.yaml#
185*3b44738eSKrzysztof Kozlowski
186*3b44738eSKrzysztof Kozlowski  - if:
187*3b44738eSKrzysztof Kozlowski      properties:
188*3b44738eSKrzysztof Kozlowski        compatible:
189*3b44738eSKrzysztof Kozlowski          contains:
190*3b44738eSKrzysztof Kozlowski            const: syna,rmi4-i2c
191*3b44738eSKrzysztof Kozlowski    then:
192*3b44738eSKrzysztof Kozlowski      properties:
193*3b44738eSKrzysztof Kozlowski        spi-rx-delay-us: false
194*3b44738eSKrzysztof Kozlowski        spi-tx-delay-us: false
195*3b44738eSKrzysztof Kozlowski    else:
196*3b44738eSKrzysztof Kozlowski      properties:
197*3b44738eSKrzysztof Kozlowski        syna,reset-delay-ms: false
198*3b44738eSKrzysztof Kozlowski        syna,startup-delay-ms: false
199*3b44738eSKrzysztof Kozlowski
200*3b44738eSKrzysztof Kozlowskiexamples:
201*3b44738eSKrzysztof Kozlowski  - |
202*3b44738eSKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/irq.h>
203*3b44738eSKrzysztof Kozlowski
204*3b44738eSKrzysztof Kozlowski    i2c {
205*3b44738eSKrzysztof Kozlowski        #address-cells = <1>;
206*3b44738eSKrzysztof Kozlowski        #size-cells = <0>;
207*3b44738eSKrzysztof Kozlowski
208*3b44738eSKrzysztof Kozlowski        touchscreen@20 {
209*3b44738eSKrzysztof Kozlowski            compatible = "syna,rmi4-i2c";
210*3b44738eSKrzysztof Kozlowski            reg = <0x20>;
211*3b44738eSKrzysztof Kozlowski            interrupt-parent = <&gpx1>;
212*3b44738eSKrzysztof Kozlowski            interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
213*3b44738eSKrzysztof Kozlowski
214*3b44738eSKrzysztof Kozlowski            syna,startup-delay-ms = <100>;
215*3b44738eSKrzysztof Kozlowski            vdd-supply = <&tsp_vdd>;
216*3b44738eSKrzysztof Kozlowski            vio-supply = <&ldo32_reg>;
217*3b44738eSKrzysztof Kozlowski
218*3b44738eSKrzysztof Kozlowski            pinctrl-0 = <&touch_irq>;
219*3b44738eSKrzysztof Kozlowski            pinctrl-names = "default";
220*3b44738eSKrzysztof Kozlowski            #address-cells = <1>;
221*3b44738eSKrzysztof Kozlowski            #size-cells = <0>;
222*3b44738eSKrzysztof Kozlowski
223*3b44738eSKrzysztof Kozlowski            rmi4-f01@1 {
224*3b44738eSKrzysztof Kozlowski                reg = <0x1>;
225*3b44738eSKrzysztof Kozlowski                syna,nosleep-mode = <1>;
226*3b44738eSKrzysztof Kozlowski            };
227*3b44738eSKrzysztof Kozlowski
228*3b44738eSKrzysztof Kozlowski            rmi4-f12@12 {
229*3b44738eSKrzysztof Kozlowski                reg = <0x12>;
230*3b44738eSKrzysztof Kozlowski                syna,sensor-type = <1>;
231*3b44738eSKrzysztof Kozlowski            };
232*3b44738eSKrzysztof Kozlowski
233*3b44738eSKrzysztof Kozlowski            rmi4-f1a@1a {
234*3b44738eSKrzysztof Kozlowski                reg = <0x1a>;
235*3b44738eSKrzysztof Kozlowski            };
236*3b44738eSKrzysztof Kozlowski        };
237*3b44738eSKrzysztof Kozlowski    };
238*3b44738eSKrzysztof Kozlowski
239*3b44738eSKrzysztof Kozlowski  - |
240*3b44738eSKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/irq.h>
241*3b44738eSKrzysztof Kozlowski
242*3b44738eSKrzysztof Kozlowski    spi {
243*3b44738eSKrzysztof Kozlowski        #address-cells = <1>;
244*3b44738eSKrzysztof Kozlowski        #size-cells = <0>;
245*3b44738eSKrzysztof Kozlowski
246*3b44738eSKrzysztof Kozlowski        touchscreen@0 {
247*3b44738eSKrzysztof Kozlowski            compatible = "syna,rmi4-spi";
248*3b44738eSKrzysztof Kozlowski            reg = <0x0>;
249*3b44738eSKrzysztof Kozlowski            interrupt-parent = <&gpx1>;
250*3b44738eSKrzysztof Kozlowski            interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
251*3b44738eSKrzysztof Kozlowski
252*3b44738eSKrzysztof Kozlowski            spi-max-frequency = <4000000>;
253*3b44738eSKrzysztof Kozlowski            spi-rx-delay-us = <30>;
254*3b44738eSKrzysztof Kozlowski            spi-cpha;
255*3b44738eSKrzysztof Kozlowski            spi-cpol;
256*3b44738eSKrzysztof Kozlowski
257*3b44738eSKrzysztof Kozlowski            #address-cells = <1>;
258*3b44738eSKrzysztof Kozlowski            #size-cells = <0>;
259*3b44738eSKrzysztof Kozlowski
260*3b44738eSKrzysztof Kozlowski            rmi4-f01@1 {
261*3b44738eSKrzysztof Kozlowski                reg = <0x1>;
262*3b44738eSKrzysztof Kozlowski                syna,nosleep-mode = <1>;
263*3b44738eSKrzysztof Kozlowski            };
264*3b44738eSKrzysztof Kozlowski
265*3b44738eSKrzysztof Kozlowski            rmi4-f11@11 {
266*3b44738eSKrzysztof Kozlowski                reg = <0x11>;
267*3b44738eSKrzysztof Kozlowski                touchscreen-inverted-y;
268*3b44738eSKrzysztof Kozlowski                syna,sensor-type = <2>;
269*3b44738eSKrzysztof Kozlowski            };
270*3b44738eSKrzysztof Kozlowski        };
271*3b44738eSKrzysztof Kozlowski    };
272