xref: /linux/Documentation/devicetree/bindings/input/cirrus,ep9307-keypad.yaml (revision fc2d791a43d3880496d1c729b8bd74d2c19cb4e7)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/input/cirrus,ep9307-keypad.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Cirrus ep93xx keypad
8
9maintainers:
10  - Alexander Sverdlin <alexander.sverdlin@gmail.com>
11
12allOf:
13  - $ref: input.yaml#
14  - $ref: /schemas/input/matrix-keymap.yaml#
15
16description:
17  The KPP is designed to interface with a keypad matrix with 2-point contact
18  or 3-point contact keys. The KPP is designed to simplify the software task
19  of scanning a keypad matrix. The KPP is capable of detecting, debouncing,
20  and decoding one or multiple keys pressed simultaneously on a keypad.
21
22properties:
23  compatible:
24    oneOf:
25      - const: cirrus,ep9307-keypad
26      - items:
27          - enum:
28              - cirrus,ep9312-keypad
29              - cirrus,ep9315-keypad
30          - const: cirrus,ep9307-keypad
31
32  reg:
33    maxItems: 1
34
35  interrupts:
36    maxItems: 1
37
38  clocks:
39    maxItems: 1
40
41  # Time for state change interrupt to trigger
42  debounce-delay-ms: true
43
44  cirrus,prescale:
45    description: row/column counter pre-scaler load value
46    $ref: /schemas/types.yaml#/definitions/uint16
47    maximum: 1023
48
49required:
50  - compatible
51  - reg
52  - interrupts
53  - clocks
54  - linux,keymap
55
56unevaluatedProperties: false
57
58examples:
59  - |
60    #include <dt-bindings/input/input.h>
61    #include <dt-bindings/clock/cirrus,ep9301-syscon.h>
62    keypad@800f0000 {
63        compatible = "cirrus,ep9307-keypad";
64        reg = <0x800f0000 0x0c>;
65        interrupt-parent = <&vic0>;
66        interrupts = <29>;
67        clocks = <&eclk EP93XX_CLK_KEYPAD>;
68        pinctrl-names = "default";
69        pinctrl-0 = <&keypad_default_pins>;
70        linux,keymap = <KEY_UP>,
71                       <KEY_DOWN>,
72                       <KEY_VOLUMEDOWN>,
73                       <KEY_HOME>,
74                       <KEY_RIGHT>,
75                       <KEY_LEFT>,
76                       <KEY_ENTER>,
77                       <KEY_VOLUMEUP>,
78                       <KEY_F6>,
79                       <KEY_F8>,
80                       <KEY_F9>,
81                       <KEY_F10>,
82                       <KEY_F1>,
83                       <KEY_F2>,
84                       <KEY_F3>,
85                       <KEY_POWER>;
86    };
87