1*8d13bc63SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*8d13bc63SEmmanuel Vadot%YAML 1.2
3*8d13bc63SEmmanuel Vadot---
4*8d13bc63SEmmanuel Vadot$id: http://devicetree.org/schemas/input/gpio-mouse.yaml#
5*8d13bc63SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8d13bc63SEmmanuel Vadot
7*8d13bc63SEmmanuel Vadottitle: GPIO attached mouse
8*8d13bc63SEmmanuel Vadot
9*8d13bc63SEmmanuel Vadotdescription: |
10*8d13bc63SEmmanuel Vadot  This simply uses standard GPIO handles to define a simple mouse connected
11*8d13bc63SEmmanuel Vadot  to 5-7 GPIO lines.
12*8d13bc63SEmmanuel Vadot
13*8d13bc63SEmmanuel Vadotmaintainers:
14*8d13bc63SEmmanuel Vadot  - Anshul Dalal <anshulusr@gmail.com>
15*8d13bc63SEmmanuel Vadot
16*8d13bc63SEmmanuel Vadotproperties:
17*8d13bc63SEmmanuel Vadot  compatible:
18*8d13bc63SEmmanuel Vadot    const: gpio-mouse
19*8d13bc63SEmmanuel Vadot
20*8d13bc63SEmmanuel Vadot  scan-interval-ms:
21*8d13bc63SEmmanuel Vadot    maxItems: 1
22*8d13bc63SEmmanuel Vadot
23*8d13bc63SEmmanuel Vadot  up-gpios:
24*8d13bc63SEmmanuel Vadot    maxItems: 1
25*8d13bc63SEmmanuel Vadot
26*8d13bc63SEmmanuel Vadot  down-gpios:
27*8d13bc63SEmmanuel Vadot    maxItems: 1
28*8d13bc63SEmmanuel Vadot
29*8d13bc63SEmmanuel Vadot  left-gpios:
30*8d13bc63SEmmanuel Vadot    maxItems: 1
31*8d13bc63SEmmanuel Vadot
32*8d13bc63SEmmanuel Vadot  right-gpios:
33*8d13bc63SEmmanuel Vadot    maxItems: 1
34*8d13bc63SEmmanuel Vadot
35*8d13bc63SEmmanuel Vadot  button-left-gpios:
36*8d13bc63SEmmanuel Vadot    maxItems: 1
37*8d13bc63SEmmanuel Vadot
38*8d13bc63SEmmanuel Vadot  button-middle-gpios:
39*8d13bc63SEmmanuel Vadot    maxItems: 1
40*8d13bc63SEmmanuel Vadot
41*8d13bc63SEmmanuel Vadot  button-right-gpios:
42*8d13bc63SEmmanuel Vadot    maxItems: 1
43*8d13bc63SEmmanuel Vadot
44*8d13bc63SEmmanuel Vadotrequired:
45*8d13bc63SEmmanuel Vadot  - compatible
46*8d13bc63SEmmanuel Vadot  - scan-interval-ms
47*8d13bc63SEmmanuel Vadot  - up-gpios
48*8d13bc63SEmmanuel Vadot  - down-gpios
49*8d13bc63SEmmanuel Vadot  - left-gpios
50*8d13bc63SEmmanuel Vadot  - right-gpios
51*8d13bc63SEmmanuel Vadot
52*8d13bc63SEmmanuel VadotadditionalProperties: false
53*8d13bc63SEmmanuel Vadot
54*8d13bc63SEmmanuel Vadotexamples:
55*8d13bc63SEmmanuel Vadot  - |
56*8d13bc63SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
57*8d13bc63SEmmanuel Vadot
58*8d13bc63SEmmanuel Vadot    gpio-mouse {
59*8d13bc63SEmmanuel Vadot        compatible = "gpio-mouse";
60*8d13bc63SEmmanuel Vadot        scan-interval-ms = <50>;
61*8d13bc63SEmmanuel Vadot        up-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
62*8d13bc63SEmmanuel Vadot        down-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
63*8d13bc63SEmmanuel Vadot        left-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
64*8d13bc63SEmmanuel Vadot        right-gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
65*8d13bc63SEmmanuel Vadot        button-left-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
66*8d13bc63SEmmanuel Vadot        button-middle-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
67*8d13bc63SEmmanuel Vadot        button-right-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
68*8d13bc63SEmmanuel Vadot    };
69