# Analog Devices ADP5588 Keypad Controller

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Input bindings_

> Device-tree binding reference for Analog Devices ADP5588 Keypad Controller.

<!-- SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -->


<a id="dt-root"></a>

**Schema identifier (<code>&#36;id</code>):** <span id="dt-09f478f44eb202ea573e"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;schemas&#47;input&#47;adi&#44;adp5588&#46;yaml&#35;&#34;</code></span>

**Schema dialect (<code>&#36;schema</code>):** <span id="dt-dcb375baab6014763a68"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;meta&#45;schemas&#47;core&#46;yaml&#35;&#34;</code></span>

<a id="dt-e46b5a5dd81dbd751c9f"></a>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Nuno Sá &#60;nuno&#46;sa&#64;analog&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">Analog Devices Mobile I/O Expander and QWERTY Keypad Controller
https://www.analog.com/media/en/technical-documentation/data-sheets/ADP5588.pdf</p>
</div>

<a id="dt-935ee547587f3e75de61"></a>

## All of these rules must match (<code>allOf</code>)

<a id="dt-d33de94ac1d3652cd22a"></a>

### Rule 1

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-95c8874f25311f4b1ab1">[<code>matrix&#45;keymap&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-input/matrix-keymap.md#dt-root>)</span>

<a id="dt-22ca5ec5b89308748ecc"></a>

### Rule 2

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-8549616abc3b04702c51">[<code>input&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-input/input.md#dt-root>)</span>

<a id="dt-e1f655ed0ff4d595dadc"></a>

## Properties and child nodes (<code>properties</code>)

<a id="dt-5c1d81699dcbe840de83"></a>

### <code>compatible</code> — required here

**Allowed values (<code>enum</code>):** <a id="dt-207128c21dbd6355c894"></a> <span id="dt-bd234eb96375d77ca611"><code>&#34;adi&#44;adp5587&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;adi&#44;adp5588&#34;</code></span>

<a id="dt-9c1635fdb65d87e33d77"></a>

### <code>reg</code> — required here

**Maximum number of items (<code>maxItems</code>):** <span id="dt-71421d35675d9a533ad2"><code>1</code></span>

<a id="dt-5b20c41001654467bdea"></a>

### <code>vcc&#45;supply</code> — not listed as required here

<div id="dt-304923183fea32e69a40">
<p style="white-space: pre-wrap">Supply Voltage Input</p>
</div>

<a id="dt-fdf18029f1f43a541a62"></a>

### <code>reset&#45;gpios</code> — not listed as required here

<div id="dt-451564af2b6998692dea">
<p style="white-space: pre-wrap">If specified, it will be asserted during driver probe. As the line is active low, it should be marked GPIO_ACTIVE_LOW.</p>
</div>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-140c9736042c6903f7ff"><code>1</code></span>

<a id="dt-c2de09e7f7fd211b679d"></a>

### <code>interrupts</code> — not listed as required here

**Maximum number of items (<code>maxItems</code>):** <span id="dt-b7823fb65b2f27642d26"><code>1</code></span>

<a id="dt-f5d51cae76398cdb9d95"></a>

### <code>gpio&#45;controller</code> — not listed as required here

<div id="dt-5168d714e593428371b8">
<p style="white-space: pre-wrap">This property applies if either keypad,num-rows lower than 8 or keypad,num-columns lower than 10.</p>
</div>

<a id="dt-cfb238e0b7cdb276d83f"></a>

### <code>&#35;gpio&#45;cells</code> — not listed as required here

**Exact value (<code>const</code>):** <span id="dt-8950f722147d2cd640b8"><code>2</code></span>

<a id="dt-b98252f9c39642b1db8f"></a>

### <code>interrupt&#45;controller</code> — not listed as required here

<div id="dt-a1941b3c575a7b0aef84">
<p style="white-space: pre-wrap">This property applies if either keypad,num-rows lower than 8 or keypad,num-columns lower than 10. This property is optional if keypad,num-rows or keypad,num-columns are not specified as the device is then configured to be used purely for gpio during which interrupts may or may not be utilized.</p>
</div>

<a id="dt-8586fac2d9a71adf4795"></a>

### <code>&#35;interrupt&#45;cells</code> — not listed as required here

**Exact value (<code>const</code>):** <span id="dt-317bbf786489389e8233"><code>2</code></span>

<a id="dt-264a651eece9c6c52968"></a>

### <code>adi&#44;unlock&#45;keys</code> — not listed as required here

<div id="dt-dafedaaf565eb8053c23">
<p style="white-space: pre-wrap">Specifies a maximum of 2 keys that can be used to unlock the keypad. If this property is set, the keyboard will be locked and only unlocked after these keys are pressed. If only one key is set, a double click is needed to unlock the keypad. The value of this property cannot be bigger or equal than keypad,num-rows * keypad,num-columns.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-e87e628eade760a36483">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32&#45;array</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-03a03f95a666fe4b033c>)</span>

**Minimum number of items (<code>minItems</code>):** <span id="dt-d4a7c27ea50d8640fe6c"><code>1</code></span>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-e8ab83a8280133275770"><code>2</code></span>

<a id="dt-3d235861b18e278e9c09"></a>

## Property dependencies (<code>dependencies</code>)

<a id="dt-daefb18aed0679ca6692"></a>

### <code>keypad&#44;num&#45;rows</code> — applies when this property is present

Also requires: <span id="dt-913d444110d003799b1a"><code>&#34;linux&#44;keymap&#34;</code></span>, <span id="dt-16099e8fdcbeb9d26b49"><code>&#34;keypad&#44;num&#45;columns&#34;</code></span>

<a id="dt-c3ddc4891f27b0fb0be5"></a>

### <code>keypad&#44;num&#45;columns</code> — applies when this property is present

Also requires: <span id="dt-e0e5665b27de8eb20c58"><code>&#34;linux&#44;keymap&#34;</code></span>, <span id="dt-4f23863ca5f4512043c6"><code>&#34;keypad&#44;num&#45;rows&#34;</code></span>

<a id="dt-1a7c4aa71c4f3512f292"></a>

### <code>linux&#44;keymap</code> — applies when this property is present

Also requires: <span id="dt-71c3dbdab089a4202efa"><code>&#34;keypad&#44;num&#45;rows&#34;</code></span>, <span id="dt-d1ddb9d086af20668fd0"><code>&#34;keypad&#44;num&#45;columns&#34;</code></span>, <span id="dt-8a0615d8e06d4e40fd4f"><code>&#34;interrupts&#34;</code></span>

<a id="dt-a1c13163584362e277b1"></a>

### <code>interrupt&#45;controller</code> — applies when this property is present

Also requires: <span id="dt-f73d6262bfa47fb7a0bc"><code>&#34;interrupts&#34;</code></span>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;compatible&#34;</code></span>, <span id="dt-ee7433925c1528c16b99"><code>&#34;reg&#34;</code></span>

<a id="dt-63ab525a9812ac23c446"></a>

## Properties not evaluated by applicable rules (<code>unevaluatedProperties</code>)

<code>false</code>

Not allowed by this rule.

<a id="dt-1a130cabaa8a47b058bf"></a>

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">#include &lt;dt-bindings/interrupt-controller/irq.h&gt;
#include &lt;dt-bindings/input/input.h&gt;
#include &lt;dt-bindings/gpio/gpio.h&gt;
i2c {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    keys@34 {
        compatible = "adi,adp5588";
        reg = &lt;0x34&gt;;

        vcc-supply = &lt;&amp;vcc&gt;;
        interrupts = &lt;21 IRQ_TYPE_EDGE_FALLING&gt;;
        interrupt-parent = &lt;&amp;gpio&gt;;
        reset-gpios = &lt;&amp;gpio 20 GPIO_ACTIVE_LOW&gt;;

        keypad,num-rows = &lt;1&gt;;
        keypad,num-columns = &lt;9&gt;;
        linux,keymap = &lt;
            MATRIX_KEY(0x00, 0x00, KEY_1)
            MATRIX_KEY(0x00, 0x01, KEY_2)
            MATRIX_KEY(0x00, 0x02, KEY_3)
            MATRIX_KEY(0x00, 0x03, KEY_4)
            MATRIX_KEY(0x00, 0x04, KEY_5)
            MATRIX_KEY(0x00, 0x05, KEY_6)
            MATRIX_KEY(0x00, 0x06, KEY_7)
            MATRIX_KEY(0x00, 0x07, KEY_8)
            MATRIX_KEY(0x00, 0x08, KEY_9)
        &gt;;
    };
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">#include &lt;dt-bindings/gpio/gpio.h&gt;
i2c {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;
    gpio@34 {
        compatible = "adi,adp5588";
        reg = &lt;0x34&gt;;

        #gpio-cells = &lt;2&gt;;
        gpio-controller;
    };
};
</code></pre>

## Source notes

<details>
<summary>Annotations retained from the schema source</summary>

<p id="dt-comment-0"><strong>Line 1:</strong> <span> SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)</span></p>

</details>
