xref: /freebsd/sys/contrib/device-tree/Bindings/input/ti,nspire-keypad.yaml (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1*0e8011faSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*0e8011faSEmmanuel Vadot%YAML 1.2
3*0e8011faSEmmanuel Vadot---
4*0e8011faSEmmanuel Vadot$id: http://devicetree.org/schemas/input/ti,nspire-keypad.yaml#
5*0e8011faSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*0e8011faSEmmanuel Vadot
7*0e8011faSEmmanuel Vadottitle: TI-NSPIRE Keypad
8*0e8011faSEmmanuel Vadot
9*0e8011faSEmmanuel Vadotmaintainers:
10*0e8011faSEmmanuel Vadot  - Andrew Davis <afd@ti.com>
11*0e8011faSEmmanuel Vadot
12*0e8011faSEmmanuel VadotallOf:
13*0e8011faSEmmanuel Vadot  - $ref: input.yaml#
14*0e8011faSEmmanuel Vadot  - $ref: matrix-keymap.yaml#
15*0e8011faSEmmanuel Vadot
16*0e8011faSEmmanuel Vadotproperties:
17*0e8011faSEmmanuel Vadot  compatible:
18*0e8011faSEmmanuel Vadot    enum:
19*0e8011faSEmmanuel Vadot      - ti,nspire-keypad
20*0e8011faSEmmanuel Vadot
21*0e8011faSEmmanuel Vadot  reg:
22*0e8011faSEmmanuel Vadot    maxItems: 1
23*0e8011faSEmmanuel Vadot
24*0e8011faSEmmanuel Vadot  interrupts:
25*0e8011faSEmmanuel Vadot    maxItems: 1
26*0e8011faSEmmanuel Vadot
27*0e8011faSEmmanuel Vadot  clocks:
28*0e8011faSEmmanuel Vadot    maxItems: 1
29*0e8011faSEmmanuel Vadot
30*0e8011faSEmmanuel Vadot  scan-interval:
31*0e8011faSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
32*0e8011faSEmmanuel Vadot    description: How often to scan in us. Based on a APB speed of 33MHz, the
33*0e8011faSEmmanuel Vadot      maximum and minimum delay time is ~2000us and ~500us respectively
34*0e8011faSEmmanuel Vadot
35*0e8011faSEmmanuel Vadot  row-delay:
36*0e8011faSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
37*0e8011faSEmmanuel Vadot    description: How long to wait between scanning each row in us.
38*0e8011faSEmmanuel Vadot
39*0e8011faSEmmanuel Vadot  active-low:
40*0e8011faSEmmanuel Vadot    description: Specify that the keypad is active low.
41*0e8011faSEmmanuel Vadot
42*0e8011faSEmmanuel Vadotrequired:
43*0e8011faSEmmanuel Vadot  - compatible
44*0e8011faSEmmanuel Vadot  - reg
45*0e8011faSEmmanuel Vadot  - interrupts
46*0e8011faSEmmanuel Vadot  - clocks
47*0e8011faSEmmanuel Vadot  - scan-interval
48*0e8011faSEmmanuel Vadot  - row-delay
49*0e8011faSEmmanuel Vadot  - linux,keymap
50*0e8011faSEmmanuel Vadot
51*0e8011faSEmmanuel VadotunevaluatedProperties: false
52*0e8011faSEmmanuel Vadot
53*0e8011faSEmmanuel Vadotexamples:
54*0e8011faSEmmanuel Vadot  - |
55*0e8011faSEmmanuel Vadot    #include <dt-bindings/input/input.h>
56*0e8011faSEmmanuel Vadot    keypad@900e0000 {
57*0e8011faSEmmanuel Vadot        compatible = "ti,nspire-keypad";
58*0e8011faSEmmanuel Vadot        reg = <0x900e0000 0x1000>;
59*0e8011faSEmmanuel Vadot        interrupts = <16>;
60*0e8011faSEmmanuel Vadot
61*0e8011faSEmmanuel Vadot        clocks = <&apb_pclk>;
62*0e8011faSEmmanuel Vadot
63*0e8011faSEmmanuel Vadot        scan-interval = <1000>;
64*0e8011faSEmmanuel Vadot        row-delay = <200>;
65*0e8011faSEmmanuel Vadot
66*0e8011faSEmmanuel Vadot        linux,keymap = <
67*0e8011faSEmmanuel Vadot            MATRIX_KEY(0,  0, KEY_ENTER)
68*0e8011faSEmmanuel Vadot            MATRIX_KEY(0,  1, KEY_ENTER)
69*0e8011faSEmmanuel Vadot            MATRIX_KEY(0,  4, KEY_SPACE)
70*0e8011faSEmmanuel Vadot            MATRIX_KEY(0,  5, KEY_Z)
71*0e8011faSEmmanuel Vadot            MATRIX_KEY(0,  6, KEY_Y)
72*0e8011faSEmmanuel Vadot            MATRIX_KEY(0,  7, KEY_0)
73*0e8011faSEmmanuel Vadot        >;
74*0e8011faSEmmanuel Vadot    };
75