xref: /freebsd/sys/contrib/device-tree/Bindings/input/touchscreen/toradex,vf50-touchscreen.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1*b2d2a78aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*b2d2a78aSEmmanuel Vadot%YAML 1.2
3*b2d2a78aSEmmanuel Vadot---
4*b2d2a78aSEmmanuel Vadot$id: http://devicetree.org/schemas/input/touchscreen/toradex,vf50-touchscreen.yaml#
5*b2d2a78aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*b2d2a78aSEmmanuel Vadot
7*b2d2a78aSEmmanuel Vadottitle: Toradex Colibri VF50 Touchscreen
8*b2d2a78aSEmmanuel Vadot
9*b2d2a78aSEmmanuel Vadotmaintainers:
10*b2d2a78aSEmmanuel Vadot  - Dmitry Torokhov <dmitry.torokhov@gmail.com>
11*b2d2a78aSEmmanuel Vadot  - Sanchayan Maity <maitysanchayan@gmail.com>
12*b2d2a78aSEmmanuel Vadot
13*b2d2a78aSEmmanuel Vadotproperties:
14*b2d2a78aSEmmanuel Vadot  compatible:
15*b2d2a78aSEmmanuel Vadot    const: toradex,vf50-touchscreen
16*b2d2a78aSEmmanuel Vadot
17*b2d2a78aSEmmanuel Vadot  interrupts:
18*b2d2a78aSEmmanuel Vadot    maxItems: 1
19*b2d2a78aSEmmanuel Vadot
20*b2d2a78aSEmmanuel Vadot  io-channels:
21*b2d2a78aSEmmanuel Vadot    maxItems: 4
22*b2d2a78aSEmmanuel Vadot    description:
23*b2d2a78aSEmmanuel Vadot      adc channels being used by the Colibri VF50 module
24*b2d2a78aSEmmanuel Vadot      IIO ADC for Y-, X-, Y+, X+ connections
25*b2d2a78aSEmmanuel Vadot
26*b2d2a78aSEmmanuel Vadot  xp-gpios:
27*b2d2a78aSEmmanuel Vadot    description: FET gate driver for input of X+
28*b2d2a78aSEmmanuel Vadot
29*b2d2a78aSEmmanuel Vadot  xm-gpios:
30*b2d2a78aSEmmanuel Vadot    description: FET gate driver for input of X-
31*b2d2a78aSEmmanuel Vadot
32*b2d2a78aSEmmanuel Vadot  yp-gpios:
33*b2d2a78aSEmmanuel Vadot    description: FET gate driver for input of Y+
34*b2d2a78aSEmmanuel Vadot
35*b2d2a78aSEmmanuel Vadot  ym-gpios:
36*b2d2a78aSEmmanuel Vadot    description: FET gate driver for input of Y-
37*b2d2a78aSEmmanuel Vadot
38*b2d2a78aSEmmanuel Vadot  vf50-ts-min-pressure:
39*b2d2a78aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
40*b2d2a78aSEmmanuel Vadot    minimum: 50
41*b2d2a78aSEmmanuel Vadot    maximum: 2000
42*b2d2a78aSEmmanuel Vadot    description: pressure level at which to stop measuring X/Y values
43*b2d2a78aSEmmanuel Vadot
44*b2d2a78aSEmmanuel Vadotrequired:
45*b2d2a78aSEmmanuel Vadot  - compatible
46*b2d2a78aSEmmanuel Vadot  - io-channels
47*b2d2a78aSEmmanuel Vadot  - xp-gpios
48*b2d2a78aSEmmanuel Vadot  - xm-gpios
49*b2d2a78aSEmmanuel Vadot  - yp-gpios
50*b2d2a78aSEmmanuel Vadot  - ym-gpios
51*b2d2a78aSEmmanuel Vadot  - interrupts
52*b2d2a78aSEmmanuel Vadot  - vf50-ts-min-pressure
53*b2d2a78aSEmmanuel Vadot
54*b2d2a78aSEmmanuel VadotallOf:
55*b2d2a78aSEmmanuel Vadot  - $ref: touchscreen.yaml#
56*b2d2a78aSEmmanuel Vadot
57*b2d2a78aSEmmanuel VadotunevaluatedProperties: false
58*b2d2a78aSEmmanuel Vadot
59*b2d2a78aSEmmanuel Vadotexamples:
60*b2d2a78aSEmmanuel Vadot  - |
61*b2d2a78aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
62*b2d2a78aSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
63*b2d2a78aSEmmanuel Vadot
64*b2d2a78aSEmmanuel Vadot    touchscreen {
65*b2d2a78aSEmmanuel Vadot        compatible = "toradex,vf50-touchscreen";
66*b2d2a78aSEmmanuel Vadot        interrupt-parent = <&gpio0>;
67*b2d2a78aSEmmanuel Vadot        interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
68*b2d2a78aSEmmanuel Vadot        io-channels = <&adc1 0>, <&adc0 0>, <&adc0 1>, <&adc1 2>;
69*b2d2a78aSEmmanuel Vadot        xp-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
70*b2d2a78aSEmmanuel Vadot        xm-gpios = <&gpio2 29 GPIO_ACTIVE_HIGH>;
71*b2d2a78aSEmmanuel Vadot        yp-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
72*b2d2a78aSEmmanuel Vadot        ym-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
73*b2d2a78aSEmmanuel Vadot        pinctrl-names = "idle", "default";
74*b2d2a78aSEmmanuel Vadot        pinctrl-0 = <&pinctrl_touchctrl_idle>, <&pinctrl_touchctrl_gpios>;
75*b2d2a78aSEmmanuel Vadot        pinctrl-1 = <&pinctrl_touchctrl_default>, <&pinctrl_touchctrl_gpios>;
76*b2d2a78aSEmmanuel Vadot        vf50-ts-min-pressure = <200>;
77*b2d2a78aSEmmanuel Vadot    };
78