1*81ce5b77SNuno Sá# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*81ce5b77SNuno Sá%YAML 1.2 3*81ce5b77SNuno Sá--- 4*81ce5b77SNuno Sá$id: http://devicetree.org/schemas/input/adi,adp5588.yaml# 5*81ce5b77SNuno Sá$schema: http://devicetree.org/meta-schemas/core.yaml# 6*81ce5b77SNuno Sá 7*81ce5b77SNuno Sátitle: Analog Devices ADP5588 Keypad Controller 8*81ce5b77SNuno Sá 9*81ce5b77SNuno Sámaintainers: 10*81ce5b77SNuno Sá - Nuno Sá <nuno.sa@analog.com> 11*81ce5b77SNuno Sá 12*81ce5b77SNuno Sádescription: | 13*81ce5b77SNuno Sá Analog Devices Mobile I/O Expander and QWERTY Keypad Controller 14*81ce5b77SNuno Sá https://www.analog.com/media/en/technical-documentation/data-sheets/ADP5588.pdf 15*81ce5b77SNuno Sá 16*81ce5b77SNuno SáallOf: 17*81ce5b77SNuno Sá - $ref: matrix-keymap.yaml# 18*81ce5b77SNuno Sá - $ref: input.yaml# 19*81ce5b77SNuno Sá 20*81ce5b77SNuno Sáproperties: 21*81ce5b77SNuno Sá compatible: 22*81ce5b77SNuno Sá enum: 23*81ce5b77SNuno Sá - adi,adp5587 24*81ce5b77SNuno Sá - adi,adp5588 25*81ce5b77SNuno Sá 26*81ce5b77SNuno Sá reg: 27*81ce5b77SNuno Sá maxItems: 1 28*81ce5b77SNuno Sá 29*81ce5b77SNuno Sá vcc-supply: 30*81ce5b77SNuno Sá description: Supply Voltage Input 31*81ce5b77SNuno Sá 32*81ce5b77SNuno Sá reset-gpios: 33*81ce5b77SNuno Sá description: 34*81ce5b77SNuno Sá If specified, it will be asserted during driver probe. As the line is 35*81ce5b77SNuno Sá active low, it should be marked GPIO_ACTIVE_LOW. 36*81ce5b77SNuno Sá maxItems: 1 37*81ce5b77SNuno Sá 38*81ce5b77SNuno Sá interrupts: 39*81ce5b77SNuno Sá maxItems: 1 40*81ce5b77SNuno Sá 41*81ce5b77SNuno Sá gpio-controller: 42*81ce5b77SNuno Sá description: 43*81ce5b77SNuno Sá This property applies if either keypad,num-rows lower than 8 or 44*81ce5b77SNuno Sá keypad,num-columns lower than 10. 45*81ce5b77SNuno Sá 46*81ce5b77SNuno Sá '#gpio-cells': 47*81ce5b77SNuno Sá const: 2 48*81ce5b77SNuno Sá 49*81ce5b77SNuno Sá interrupt-controller: 50*81ce5b77SNuno Sá description: 51*81ce5b77SNuno Sá This property applies if either keypad,num-rows lower than 8 or 52*81ce5b77SNuno Sá keypad,num-columns lower than 10. 53*81ce5b77SNuno Sá 54*81ce5b77SNuno Sá '#interrupt-cells': 55*81ce5b77SNuno Sá const: 2 56*81ce5b77SNuno Sá 57*81ce5b77SNuno Sá adi,unlock-keys: 58*81ce5b77SNuno Sá description: 59*81ce5b77SNuno Sá Specifies a maximum of 2 keys that can be used to unlock the keypad. 60*81ce5b77SNuno Sá If this property is set, the keyboard will be locked and only unlocked 61*81ce5b77SNuno Sá after these keys are pressed. If only one key is set, a double click is 62*81ce5b77SNuno Sá needed to unlock the keypad. The value of this property cannot be bigger 63*81ce5b77SNuno Sá or equal than keypad,num-rows * keypad,num-columns. 64*81ce5b77SNuno Sá $ref: /schemas/types.yaml#/definitions/uint32-array 65*81ce5b77SNuno Sá minItems: 1 66*81ce5b77SNuno Sá maxItems: 2 67*81ce5b77SNuno Sá 68*81ce5b77SNuno Sárequired: 69*81ce5b77SNuno Sá - compatible 70*81ce5b77SNuno Sá - reg 71*81ce5b77SNuno Sá - interrupts 72*81ce5b77SNuno Sá - keypad,num-rows 73*81ce5b77SNuno Sá - keypad,num-columns 74*81ce5b77SNuno Sá - linux,keymap 75*81ce5b77SNuno Sá 76*81ce5b77SNuno SáunevaluatedProperties: false 77*81ce5b77SNuno Sá 78*81ce5b77SNuno Sáexamples: 79*81ce5b77SNuno Sá - | 80*81ce5b77SNuno Sá #include <dt-bindings/interrupt-controller/irq.h> 81*81ce5b77SNuno Sá #include <dt-bindings/input/input.h> 82*81ce5b77SNuno Sá #include <dt-bindings/gpio/gpio.h> 83*81ce5b77SNuno Sá i2c { 84*81ce5b77SNuno Sá #address-cells = <1>; 85*81ce5b77SNuno Sá #size-cells = <0>; 86*81ce5b77SNuno Sá 87*81ce5b77SNuno Sá keys@34 { 88*81ce5b77SNuno Sá compatible = "adi,adp5588"; 89*81ce5b77SNuno Sá reg = <0x34>; 90*81ce5b77SNuno Sá 91*81ce5b77SNuno Sá vcc-supply = <&vcc>; 92*81ce5b77SNuno Sá interrupts = <21 IRQ_TYPE_EDGE_FALLING>; 93*81ce5b77SNuno Sá interrupt-parent = <&gpio>; 94*81ce5b77SNuno Sá reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>; 95*81ce5b77SNuno Sá 96*81ce5b77SNuno Sá keypad,num-rows = <1>; 97*81ce5b77SNuno Sá keypad,num-columns = <9>; 98*81ce5b77SNuno Sá linux,keymap = < 99*81ce5b77SNuno Sá MATRIX_KEY(0x00, 0x00, KEY_1) 100*81ce5b77SNuno Sá MATRIX_KEY(0x00, 0x01, KEY_2) 101*81ce5b77SNuno Sá MATRIX_KEY(0x00, 0x02, KEY_3) 102*81ce5b77SNuno Sá MATRIX_KEY(0x00, 0x03, KEY_4) 103*81ce5b77SNuno Sá MATRIX_KEY(0x00, 0x04, KEY_5) 104*81ce5b77SNuno Sá MATRIX_KEY(0x00, 0x05, KEY_6) 105*81ce5b77SNuno Sá MATRIX_KEY(0x00, 0x06, KEY_7) 106*81ce5b77SNuno Sá MATRIX_KEY(0x00, 0x07, KEY_8) 107*81ce5b77SNuno Sá MATRIX_KEY(0x00, 0x08, KEY_9) 108*81ce5b77SNuno Sá >; 109*81ce5b77SNuno Sá }; 110*81ce5b77SNuno Sá }; 111*81ce5b77SNuno Sá... 112