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