Analog Devices ADP5588 Keypad Controller

Schema identifier ($id): "http://devicetree.org/schemas/input/adi,adp5588.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Nuno Sá <nuno.sa@analog.com>"

Analog Devices Mobile I/O Expander and QWERTY Keypad Controller https://www.analog.com/media/en/technical-documentation/data-sheets/ADP5588.pdf

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): matrix-keymap.yaml#

Rule 2 #

Shared schema rule ($ref): input.yaml#

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "adi,adp5587", "adi,adp5588"

reg — required here #

Maximum number of items (maxItems): 1

vcc-supply — not listed as required here #

Supply Voltage Input

reset-gpios — not listed as required here #

If specified, it will be asserted during driver probe. As the line is active low, it should be marked GPIO_ACTIVE_LOW.

Maximum number of items (maxItems): 1

interrupts — not listed as required here #

Maximum number of items (maxItems): 1

gpio-controller — not listed as required here #

This property applies if either keypad,num-rows lower than 8 or keypad,num-columns lower than 10.

#gpio-cells — not listed as required here #

Exact value (const): 2

interrupt-controller — not listed as required here #

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.

#interrupt-cells — not listed as required here #

Exact value (const): 2

adi,unlock-keys — not listed as required here #

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.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 2

Property dependencies (dependencies) #

keypad,num-rows — applies when this property is present #

Also requires: "linux,keymap", "keypad,num-columns"

keypad,num-columns — applies when this property is present #

Also requires: "linux,keymap", "keypad,num-rows"

linux,keymap — applies when this property is present #

Also requires: "keypad,num-rows", "keypad,num-columns", "interrupts"

interrupt-controller — applies when this property is present #

Also requires: "interrupts"

Required in this object (required): "compatible", "reg"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
i2c {
    #address-cells = <1>;
    #size-cells = <0>;

    keys@34 {
        compatible = "adi,adp5588";
        reg = <0x34>;

        vcc-supply = <&vcc>;
        interrupts = <21 IRQ_TYPE_EDGE_FALLING>;
        interrupt-parent = <&gpio>;
        reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;

        keypad,num-rows = <1>;
        keypad,num-columns = <9>;
        linux,keymap = <
            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)
        >;
    };
};
#include <dt-bindings/gpio/gpio.h>
i2c {
    #address-cells = <1>;
    #size-cells = <0>;
    gpio@34 {
        compatible = "adi,adp5588";
        reg = <0x34>;

        #gpio-cells = <2>;
        gpio-controller;
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page