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