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