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