xref: /linux/Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml (revision 53597deca0e38c30e6cd4ba2114fa42d2bcd85bb)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/input/mediatek,mt6779-keypad.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Mediatek's Keypad Controller
8
9maintainers:
10  - Mattijs Korpershoek <mkorpershoek@kernel.org>
11
12allOf:
13  - $ref: input.yaml#
14  - $ref: /schemas/input/matrix-keymap.yaml#
15
16description: |
17  Mediatek's Keypad controller is used to interface a SoC with a matrix-type
18  keypad device. The keypad controller supports multiple row and column lines.
19  A key can be placed at each intersection of a unique row and a unique column.
20  The keypad controller can sense a key-press and key-release and report the
21  event using a interrupt to the cpu.
22
23properties:
24  compatible:
25    oneOf:
26      - const: mediatek,mt6779-keypad
27      - items:
28          - enum:
29              - mediatek,mt6873-keypad
30              - mediatek,mt8183-keypad
31              - mediatek,mt8365-keypad
32              - mediatek,mt8516-keypad
33          - const: mediatek,mt6779-keypad
34
35  reg:
36    maxItems: 1
37
38  interrupts:
39    maxItems: 1
40
41  clocks:
42    maxItems: 1
43
44  clock-names:
45    items:
46      - const: kpd
47
48  wakeup-source:
49    description: use any event on keypad as wakeup event
50    type: boolean
51
52  debounce-delay-ms:
53    maximum: 256
54    default: 16
55
56  mediatek,keys-per-group:
57    description: each (row, column) group has multiple keys
58    $ref: /schemas/types.yaml#/definitions/uint32
59    default: 1
60    maximum: 2
61
62required:
63  - compatible
64  - reg
65  - interrupts
66  - clocks
67  - clock-names
68
69unevaluatedProperties: false
70
71examples:
72  - |
73    #include <dt-bindings/input/input.h>
74    #include <dt-bindings/interrupt-controller/arm-gic.h>
75
76    soc {
77        #address-cells = <2>;
78        #size-cells = <2>;
79
80        keyboard@10010000 {
81          compatible = "mediatek,mt6779-keypad";
82          reg = <0 0x10010000 0 0x1000>;
83          interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_FALLING>;
84          clocks = <&clk26m>;
85          clock-names = "kpd";
86        };
87    };
88