Awinic AW9523/AW9523B I2C GPIO Expander

Schema identifier ($id): "http://devicetree.org/schemas/pinctrl/awinic,aw9523-pinctrl.yaml#"

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

Maintainers (maintainers): "AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>"

The Awinic AW9523/AW9523B I2C GPIO Expander featuring 16 multi-function I/O, 256 steps PWM mode and interrupt support.

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "awinic,aw9523-pinctrl"

reg — required here #

Maximum number of items (maxItems): 1

#gpio-cells — required here #

Specifying the pin number and flags, as defined in include/dt-bindings/gpio/gpio.h

Exact value (const): 2

gpio-controller — required here #

true — No constraints added by this property rule.

gpio-ranges — required here #

Maximum number of items (maxItems): 1

interrupt-controller — not listed as required here #

true — No constraints added by this property rule.

interrupts — not listed as required here #

Maximum number of items (maxItems): 1

Specifies the INTN pin IRQ.

#interrupt-cells — not listed as required here #

Specifies the PIN numbers and Flags, as defined in defined in include/dt-bindings/interrupt-controller/irq.h

Exact value (const): 2

reset-gpios — not listed as required here #

Maximum number of items (maxItems): 1

Properties matching a name pattern (patternProperties) #

-pins$ — name matches this regular expression #

Value type (type): "object"

Pinctrl node's client devices use subnodes for desired pin configuration. Client device subnodes use below standard properties.

Shared schema rule ($ref): /schemas/pinctrl/pincfg-node.yaml

Properties and child nodes (properties) #

pins — required here

List of gpio pins affected by the properties specified in this subnode.

Array item rules (items)

String pattern (pattern): "^gpio([0-9]|1[0-5])$"

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 16

function — required here

Specify the alternative function to be configured for the specified pins.

Allowed values (enum): "gpio", "pwm"

bias-disable — not listed as required here

true — No constraints added by this property rule.

bias-pull-down — not listed as required here

true — No constraints added by this property rule.

bias-pull-up — not listed as required here

true — No constraints added by this property rule.

drive-open-drain — not listed as required here

true — No constraints added by this property rule.

drive-push-pull — not listed as required here

true — No constraints added by this property rule.

input-enable — not listed as required here

true — No constraints added by this property rule.

input-disable — not listed as required here

true — No constraints added by this property rule.

output-high — not listed as required here

true — No constraints added by this property rule.

output-low — not listed as required here

true — No constraints added by this property rule.

Required in this object (required): "pins", "function"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Required in this object (required): "compatible", "reg", "gpio-controller", "#gpio-cells", "gpio-ranges"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>

i2c {
    #address-cells = <1>;
    #size-cells = <0>;

    aw9523: gpio-expander@58 {
            compatible = "awinic,aw9523-pinctrl";
            reg = <0x58>;
            interrupt-parent = <&tlmm>;
            interrupts = <50 IRQ_TYPE_EDGE_FALLING>;
            gpio-controller;
            #gpio-cells = <2>;
            gpio-ranges = <&tlmm 0 0 16>;
            interrupt-controller;
            #interrupt-cells = <2>;
            reset-gpios = <&tlmm 51 GPIO_ACTIVE_HIGH>;

            keyboard-matrix-col-pins {
                    pins = "gpio8", "gpio9", "gpio10", "gpio11",
                           "gpio12", "gpio13", "gpio14", "gpio15";
                    function = "gpio";
                    input-disable;
                    output-low;
            };

            keyboard-matrix-row-pins {
                    pins = "gpio0", "gpio1", "gpio2", "gpio3",
                           "gpio4", "gpio5", "gpio6", "gpio7";
                    function = "gpio";
                    bias-pull-up;
                    drive-open-drain;
                    input-enable;
            };
    };
};

Source notes #

Annotations retained from the schema source

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

Line 49: PIN CONFIGURATION NODES

Line 101: Example configuration to drive pins for a keyboard matrix

Edit this page