Mediatek's Keypad Controller

Schema identifier ($id): "http://devicetree.org/schemas/input/mediatek,mt6779-keypad.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Mattijs Korpershoek <mkorpershoek@kernel.org>"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): /schemas/input/matrix-keymap.yaml#

Mediatek's Keypad controller is used to interface a SoC with a matrix-type keypad device. The keypad controller supports multiple row and column lines. A key can be placed at each intersection of a unique row and a unique column. The keypad controller can sense a key-press and key-release and report the event using a interrupt to the cpu.

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Exact value (const): "mediatek,mt6779-keypad"

Rule 2

Array item rules (items)

Item 1

Allowed values (enum): "mediatek,mt6873-keypad", "mediatek,mt8183-keypad", "mediatek,mt8365-keypad", "mediatek,mt8516-keypad"

Item 2

Exact value (const): "mediatek,mt6779-keypad"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — required here #

Maximum number of items (maxItems): 1

clocks — required here #

Maximum number of items (maxItems): 1

clock-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "kpd"

wakeup-source — not listed as required here #

use any event on keypad as wakeup event

Value type (type): "boolean"

debounce-delay-ms — not listed as required here #

Maximum value (maximum): 256

Default value (default): 16

mediatek,keys-per-group — not listed as required here #

each (row, column) group has multiple keys

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Default value (default): 1

Maximum value (maximum): 2

Required in this object (required): "compatible", "reg", "interrupts", "clocks", "clock-names"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>

soc {
    #address-cells = <2>;
    #size-cells = <2>;

    keyboard@10010000 {
      compatible = "mediatek,mt6779-keypad";
      reg = <0 0x10010000 0 0x1000>;
      interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_FALLING>;
      clocks = <&clk26m>;
      clock-names = "kpd";
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

Edit this page