1*8ccc0d23SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*8ccc0d23SEmmanuel Vadot%YAML 1.2 3*8ccc0d23SEmmanuel Vadot--- 4*8ccc0d23SEmmanuel Vadot 5*8ccc0d23SEmmanuel Vadot$id: http://devicetree.org/schemas/input/gpio-matrix-keypad.yaml# 6*8ccc0d23SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 7*8ccc0d23SEmmanuel Vadot 8*8ccc0d23SEmmanuel Vadottitle: GPIO matrix keypad 9*8ccc0d23SEmmanuel Vadot 10*8ccc0d23SEmmanuel Vadotmaintainers: 11*8ccc0d23SEmmanuel Vadot - Marek Vasut <marek.vasut@gmail.com> 12*8ccc0d23SEmmanuel Vadot 13*8ccc0d23SEmmanuel Vadotdescription: 14*8ccc0d23SEmmanuel Vadot GPIO driven matrix keypad is used to interface a SoC with a matrix keypad. 15*8ccc0d23SEmmanuel Vadot The matrix keypad supports multiple row and column lines, a key can be 16*8ccc0d23SEmmanuel Vadot placed at each intersection of a unique row and a unique column. The matrix 17*8ccc0d23SEmmanuel Vadot keypad can sense a key-press and key-release by means of GPIO lines and 18*8ccc0d23SEmmanuel Vadot report the event using GPIO interrupts to the cpu. 19*8ccc0d23SEmmanuel Vadot 20*8ccc0d23SEmmanuel VadotallOf: 21*8ccc0d23SEmmanuel Vadot - $ref: /schemas/input/matrix-keymap.yaml# 22*8ccc0d23SEmmanuel Vadot 23*8ccc0d23SEmmanuel Vadotproperties: 24*8ccc0d23SEmmanuel Vadot compatible: 25*8ccc0d23SEmmanuel Vadot const: gpio-matrix-keypad 26*8ccc0d23SEmmanuel Vadot 27*8ccc0d23SEmmanuel Vadot row-gpios: 28*8ccc0d23SEmmanuel Vadot description: 29*8ccc0d23SEmmanuel Vadot List of GPIOs used as row lines. The gpio specifier for this property 30*8ccc0d23SEmmanuel Vadot depends on the gpio controller to which these row lines are connected. 31*8ccc0d23SEmmanuel Vadot 32*8ccc0d23SEmmanuel Vadot col-gpios: 33*8ccc0d23SEmmanuel Vadot description: 34*8ccc0d23SEmmanuel Vadot List of GPIOs used as column lines. The gpio specifier for this property 35*8ccc0d23SEmmanuel Vadot depends on the gpio controller to which these column lines are connected. 36*8ccc0d23SEmmanuel Vadot 37*8ccc0d23SEmmanuel Vadot linux,keymap: true 38*8ccc0d23SEmmanuel Vadot 39*8ccc0d23SEmmanuel Vadot linux,no-autorepeat: 40*8ccc0d23SEmmanuel Vadot type: boolean 41*8ccc0d23SEmmanuel Vadot description: Do not enable autorepeat feature. 42*8ccc0d23SEmmanuel Vadot 43*8ccc0d23SEmmanuel Vadot gpio-activelow: 44*8ccc0d23SEmmanuel Vadot type: boolean 45*8ccc0d23SEmmanuel Vadot description: 46*8ccc0d23SEmmanuel Vadot Force GPIO polarity to active low. 47*8ccc0d23SEmmanuel Vadot In the absence of this property GPIOs are treated as active high. 48*8ccc0d23SEmmanuel Vadot 49*8ccc0d23SEmmanuel Vadot debounce-delay-ms: 50*8ccc0d23SEmmanuel Vadot description: Debounce interval in milliseconds. 51*8ccc0d23SEmmanuel Vadot default: 0 52*8ccc0d23SEmmanuel Vadot 53*8ccc0d23SEmmanuel Vadot col-scan-delay-us: 54*8ccc0d23SEmmanuel Vadot description: 55*8ccc0d23SEmmanuel Vadot Delay, measured in microseconds, that is needed 56*8ccc0d23SEmmanuel Vadot before we can scan keypad after activating column gpio. 57*8ccc0d23SEmmanuel Vadot default: 0 58*8ccc0d23SEmmanuel Vadot 59*8ccc0d23SEmmanuel Vadot all-cols-on-delay-us: 60*8ccc0d23SEmmanuel Vadot description: 61*8ccc0d23SEmmanuel Vadot Delay, measured in microseconds, that is needed 62*8ccc0d23SEmmanuel Vadot after activating all column gpios. 63*8ccc0d23SEmmanuel Vadot default: 0 64*8ccc0d23SEmmanuel Vadot 65*8ccc0d23SEmmanuel Vadot drive-inactive-cols: 66*8ccc0d23SEmmanuel Vadot type: boolean 67*8ccc0d23SEmmanuel Vadot description: 68*8ccc0d23SEmmanuel Vadot Drive inactive columns during scan, 69*8ccc0d23SEmmanuel Vadot default is to turn inactive columns into inputs. 70*8ccc0d23SEmmanuel Vadot 71*8ccc0d23SEmmanuel Vadot wakeup-source: true 72*8ccc0d23SEmmanuel Vadot 73*8ccc0d23SEmmanuel Vadotrequired: 74*8ccc0d23SEmmanuel Vadot - compatible 75*8ccc0d23SEmmanuel Vadot - row-gpios 76*8ccc0d23SEmmanuel Vadot - col-gpios 77*8ccc0d23SEmmanuel Vadot - linux,keymap 78*8ccc0d23SEmmanuel Vadot 79*8ccc0d23SEmmanuel VadotadditionalProperties: false 80*8ccc0d23SEmmanuel Vadot 81*8ccc0d23SEmmanuel Vadotexamples: 82*8ccc0d23SEmmanuel Vadot - | 83*8ccc0d23SEmmanuel Vadot matrix-keypad { 84*8ccc0d23SEmmanuel Vadot compatible = "gpio-matrix-keypad"; 85*8ccc0d23SEmmanuel Vadot debounce-delay-ms = <5>; 86*8ccc0d23SEmmanuel Vadot col-scan-delay-us = <2>; 87*8ccc0d23SEmmanuel Vadot 88*8ccc0d23SEmmanuel Vadot row-gpios = <&gpio2 25 0 89*8ccc0d23SEmmanuel Vadot &gpio2 26 0 90*8ccc0d23SEmmanuel Vadot &gpio2 27 0>; 91*8ccc0d23SEmmanuel Vadot 92*8ccc0d23SEmmanuel Vadot col-gpios = <&gpio2 21 0 93*8ccc0d23SEmmanuel Vadot &gpio2 22 0>; 94*8ccc0d23SEmmanuel Vadot 95*8ccc0d23SEmmanuel Vadot linux,keymap = <0x0000008B 96*8ccc0d23SEmmanuel Vadot 0x0100009E 97*8ccc0d23SEmmanuel Vadot 0x02000069 98*8ccc0d23SEmmanuel Vadot 0x0001006A 99*8ccc0d23SEmmanuel Vadot 0x0101001C 100*8ccc0d23SEmmanuel Vadot 0x0201006C>; 101*8ccc0d23SEmmanuel Vadot 102*8ccc0d23SEmmanuel Vadot wakeup-source; 103*8ccc0d23SEmmanuel Vadot }; 104