File Index
Files and directories
Sign in
FILE

awinic,aw9523-pinctrl.yaml

File preview with syntax highlighting.

linux-6.19.14/Documentation/devicetree/bindings/pinctrl/awinic,aw9523-pinctrl.yaml YAML
  1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2%YAML 1.2
  3---
  4$id: http://devicetree.org/schemas/pinctrl/awinic,aw9523-pinctrl.yaml#
  5$schema: http://devicetree.org/meta-schemas/core.yaml#
  6
  7title: Awinic AW9523/AW9523B I2C GPIO Expander
  8
  9maintainers:
 10  - AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
 11
 12description: |
 13  The Awinic AW9523/AW9523B I2C GPIO Expander featuring 16 multi-function
 14  I/O, 256 steps PWM mode and interrupt support.
 15
 16properties:
 17  compatible:
 18    const: awinic,aw9523-pinctrl
 19
 20  reg:
 21    maxItems: 1
 22
 23  '#gpio-cells':
 24    description: |
 25      Specifying the pin number and flags, as defined in
 26      include/dt-bindings/gpio/gpio.h
 27    const: 2
 28
 29  gpio-controller: true
 30
 31  gpio-ranges:
 32    maxItems: 1
 33
 34  interrupt-controller: true
 35
 36  interrupts:
 37    maxItems: 1
 38    description: Specifies the INTN pin IRQ.
 39
 40  '#interrupt-cells':
 41    description:
 42      Specifies the PIN numbers and Flags, as defined in defined in
 43      include/dt-bindings/interrupt-controller/irq.h
 44    const: 2
 45
 46  reset-gpios:
 47    maxItems: 1
 48
 49# PIN CONFIGURATION NODES
 50patternProperties:
 51  '-pins$':
 52    type: object
 53    description:
 54      Pinctrl node's client devices use subnodes for desired pin configuration.
 55      Client device subnodes use below standard properties.
 56    $ref: /schemas/pinctrl/pincfg-node.yaml
 57
 58    properties:
 59      pins:
 60        description:
 61          List of gpio pins affected by the properties specified in
 62          this subnode.
 63        items:
 64          pattern: "^gpio([0-9]|1[0-5])$"
 65        minItems: 1
 66        maxItems: 16
 67
 68      function:
 69        description:
 70          Specify the alternative function to be configured for the
 71          specified pins.
 72
 73        enum: [ gpio, pwm ]
 74
 75      bias-disable: true
 76      bias-pull-down: true
 77      bias-pull-up: true
 78      drive-open-drain: true
 79      drive-push-pull: true
 80      input-enable: true
 81      input-disable: true
 82      output-high: true
 83      output-low: true
 84
 85    required:
 86      - pins
 87      - function
 88
 89    additionalProperties: false
 90
 91required:
 92  - compatible
 93  - reg
 94  - gpio-controller
 95  - '#gpio-cells'
 96  - gpio-ranges
 97
 98additionalProperties: false
 99
100examples:
101  # Example configuration to drive pins for a keyboard matrix
102  - |
103    #include <dt-bindings/gpio/gpio.h>
104    #include <dt-bindings/interrupt-controller/irq.h>
105
106    i2c {
107        #address-cells = <1>;
108        #size-cells = <0>;
109
110        aw9523: gpio-expander@58 {
111                compatible = "awinic,aw9523-pinctrl";
112                reg = <0x58>;
113                interrupt-parent = <&tlmm>;
114                interrupts = <50 IRQ_TYPE_EDGE_FALLING>;
115                gpio-controller;
116                #gpio-cells = <2>;
117                gpio-ranges = <&tlmm 0 0 16>;
118                interrupt-controller;
119                #interrupt-cells = <2>;
120                reset-gpios = <&tlmm 51 GPIO_ACTIVE_HIGH>;
121
122                keyboard-matrix-col-pins {
123                        pins = "gpio8", "gpio9", "gpio10", "gpio11",
124                               "gpio12", "gpio13", "gpio14", "gpio15";
125                        function = "gpio";
126                        input-disable;
127                        output-low;
128                };
129
130                keyboard-matrix-row-pins {
131                        pins = "gpio0", "gpio1", "gpio2", "gpio3",
132                               "gpio4", "gpio5", "gpio6", "gpio7";
133                        function = "gpio";
134                        bias-pull-up;
135                        drive-open-drain;
136                        input-enable;
137                };
138        };
139    };
~/ Read-only file preview.