brintos

brintos / linux-shallow public Read only

0
0
Text · 3.5 KiB · 98c310a Raw
140 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---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 Expander8 9maintainers:10  - AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>11 12description: |13  The Awinic AW9523/AW9523B I2C GPIO Expander featuring 16 multi-function14  I/O, 256 steps PWM mode and interrupt support.15 16properties:17  compatible:18    const: awinic,aw9523-pinctrl19 20  reg:21    maxItems: 122 23  '#gpio-cells':24    description: |25      Specifying the pin number and flags, as defined in26      include/dt-bindings/gpio/gpio.h27    const: 228 29  gpio-controller: true30 31  gpio-ranges:32    maxItems: 133 34  interrupt-controller: true35 36  interrupts:37    maxItems: 138    description: Specifies the INTN pin IRQ.39 40  '#interrupt-cells':41    description:42      Specifies the PIN numbers and Flags, as defined in defined in43      include/dt-bindings/interrupt-controller/irq.h44    const: 245 46  reset-gpios:47    maxItems: 148 49# PIN CONFIGURATION NODES50patternProperties:51  '-pins$':52    type: object53    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.yaml57 58    properties:59      pins:60        description:61          List of gpio pins affected by the properties specified in62          this subnode.63        items:64          pattern: "^gpio([0-9]|1[0-5])$"65        minItems: 166        maxItems: 1667 68      function:69        description:70          Specify the alternative function to be configured for the71          specified pins.72 73        enum: [ gpio, pwm ]74 75      bias-disable: true76      bias-pull-down: true77      bias-pull-up: true78      drive-open-drain: true79      drive-push-pull: true80      input-enable: true81      input-disable: true82      output-high: true83      output-low: true84 85    required:86      - pins87      - function88 89    additionalProperties: false90 91required:92  - compatible93  - reg94  - gpio-controller95  - '#gpio-cells'96  - gpio-ranges97 98additionalProperties: false99 100examples:101  # Example configuration to drive pins for a keyboard matrix102  - |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    };140