xref: /freebsd/sys/contrib/device-tree/Bindings/input/gpio-mouse.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1Device-Tree bindings for GPIO attached mice
2
3This simply uses standard GPIO handles to define a simple mouse connected
4to 5-7 GPIO lines.
5
6Required properties:
7	- compatible: must be "gpio-mouse"
8	- scan-interval-ms: The scanning interval in milliseconds
9	- up-gpios: GPIO line phandle to the line indicating "up"
10	- down-gpios: GPIO line phandle to the line indicating "down"
11	- left-gpios: GPIO line phandle to the line indicating "left"
12	- right-gpios: GPIO line phandle to the line indicating "right"
13
14Optional properties:
15	- button-left-gpios: GPIO line handle to the left mouse button
16	- button-middle-gpios: GPIO line handle to the middle mouse button
17	- button-right-gpios: GPIO line handle to the right mouse button
18Example:
19
20#include <dt-bindings/gpio/gpio.h>
21
22gpio-mouse {
23	compatible = "gpio-mouse";
24	scan-interval-ms = <50>;
25	up-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
26	down-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
27	left-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
28	right-gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
29	button-left-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
30	button-middle-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
31	button-right-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
32};
33