0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/input/mediatek,mt6779-keypad.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Mediatek's Keypad Controller device tree bindings
0008
0009 maintainers:
0010 - Mattijs Korpershoek <mkorpershoek@baylibre.com>
0011
0012 allOf:
0013 - $ref: "/schemas/input/matrix-keymap.yaml#"
0014
0015 description: |
0016 Mediatek's Keypad controller is used to interface a SoC with a matrix-type
0017 keypad device. The keypad controller supports multiple row and column lines.
0018 A key can be placed at each intersection of a unique row and a unique column.
0019 The keypad controller can sense a key-press and key-release and report the
0020 event using a interrupt to the cpu.
0021
0022 properties:
0023 compatible:
0024 oneOf:
0025 - const: mediatek,mt6779-keypad
0026 - items:
0027 - enum:
0028 - mediatek,mt6873-keypad
0029 - const: mediatek,mt6779-keypad
0030
0031 reg:
0032 maxItems: 1
0033
0034 interrupts:
0035 maxItems: 1
0036
0037 clocks:
0038 maxItems: 1
0039
0040 clock-names:
0041 items:
0042 - const: kpd
0043
0044 wakeup-source:
0045 description: use any event on keypad as wakeup event
0046 type: boolean
0047
0048 debounce-delay-ms:
0049 maximum: 256
0050 default: 16
0051
0052 required:
0053 - compatible
0054 - reg
0055 - interrupts
0056 - clocks
0057 - clock-names
0058
0059 additionalProperties: false
0060
0061 examples:
0062 - |
0063 #include <dt-bindings/input/input.h>
0064 #include <dt-bindings/interrupt-controller/arm-gic.h>
0065
0066 soc {
0067 #address-cells = <2>;
0068 #size-cells = <2>;
0069
0070 keyboard@10010000 {
0071 compatible = "mediatek,mt6779-keypad";
0072 reg = <0 0x10010000 0 0x1000>;
0073 interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_FALLING>;
0074 clocks = <&clk26m>;
0075 clock-names = "kpd";
0076 };
0077 };