1ba96b2e7SSrinivas Neeli# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2ba96b2e7SSrinivas Neeli%YAML 1.2 3ba96b2e7SSrinivas Neeli--- 4ba96b2e7SSrinivas Neeli$id: http://devicetree.org/schemas/gpio/xlnx,gpio-xilinx.yaml# 5ba96b2e7SSrinivas Neeli$schema: http://devicetree.org/meta-schemas/core.yaml# 6ba96b2e7SSrinivas Neeli 7ba96b2e7SSrinivas Neelititle: Xilinx AXI GPIO controller 8ba96b2e7SSrinivas Neeli 9ba96b2e7SSrinivas Neelimaintainers: 10*d5c421d2SMichal Simek - Neeli Srinivas <srinivas.neeli@amd.com> 11ba96b2e7SSrinivas Neeli 12ba96b2e7SSrinivas Neelidescription: 13ba96b2e7SSrinivas Neeli The AXI GPIO design provides a general purpose input/output interface 14ba96b2e7SSrinivas Neeli to an AXI4-Lite interface. The AXI GPIO can be configured as either 15ba96b2e7SSrinivas Neeli a single or a dual-channel device. The width of each channel is 16ba96b2e7SSrinivas Neeli independently configurable. The channels can be configured to 17ba96b2e7SSrinivas Neeli generate an interrupt when a transition on any of their inputs occurs. 18ba96b2e7SSrinivas Neeli 19ba96b2e7SSrinivas Neeliproperties: 20ba96b2e7SSrinivas Neeli compatible: 21ba96b2e7SSrinivas Neeli enum: 22ba96b2e7SSrinivas Neeli - xlnx,xps-gpio-1.00.a 23ba96b2e7SSrinivas Neeli 24ba96b2e7SSrinivas Neeli reg: 25ba96b2e7SSrinivas Neeli maxItems: 1 26ba96b2e7SSrinivas Neeli 27ba96b2e7SSrinivas Neeli "#gpio-cells": 28ba96b2e7SSrinivas Neeli const: 2 29ba96b2e7SSrinivas Neeli 30ba96b2e7SSrinivas Neeli interrupts: 31ba96b2e7SSrinivas Neeli maxItems: 1 32ba96b2e7SSrinivas Neeli 33ba96b2e7SSrinivas Neeli gpio-controller: true 34ba96b2e7SSrinivas Neeli 35ba96b2e7SSrinivas Neeli gpio-line-names: 36ba96b2e7SSrinivas Neeli description: strings describing the names of each gpio line 37ba96b2e7SSrinivas Neeli minItems: 1 38ba96b2e7SSrinivas Neeli maxItems: 64 39ba96b2e7SSrinivas Neeli 40ba96b2e7SSrinivas Neeli interrupt-controller: true 41ba96b2e7SSrinivas Neeli 42ba96b2e7SSrinivas Neeli "#interrupt-cells": 43ba96b2e7SSrinivas Neeli const: 2 44ba96b2e7SSrinivas Neeli 45ba96b2e7SSrinivas Neeli clocks: 46ba96b2e7SSrinivas Neeli maxItems: 1 47ba96b2e7SSrinivas Neeli 48ba96b2e7SSrinivas Neeli interrupt-names: true 49ba96b2e7SSrinivas Neeli 50ba96b2e7SSrinivas Neeli xlnx,all-inputs: 51ba96b2e7SSrinivas Neeli $ref: /schemas/types.yaml#/definitions/uint32 52ba96b2e7SSrinivas Neeli description: This option sets this GPIO channel1 bits in input mode. 53ba96b2e7SSrinivas Neeli 54ba96b2e7SSrinivas Neeli xlnx,all-inputs-2: 55ba96b2e7SSrinivas Neeli $ref: /schemas/types.yaml#/definitions/uint32 56ba96b2e7SSrinivas Neeli description: This option sets this GPIO channel2 bits in input mode. 57ba96b2e7SSrinivas Neeli 58ba96b2e7SSrinivas Neeli xlnx,all-outputs: 59ba96b2e7SSrinivas Neeli $ref: /schemas/types.yaml#/definitions/uint32 60ba96b2e7SSrinivas Neeli description: This option sets this GPIO channel1 bits in output mode. 61ba96b2e7SSrinivas Neeli 62ba96b2e7SSrinivas Neeli xlnx,all-outputs-2: 63ba96b2e7SSrinivas Neeli $ref: /schemas/types.yaml#/definitions/uint32 64ba96b2e7SSrinivas Neeli description: This option sets this GPIO channel2 bits in output mode. 65ba96b2e7SSrinivas Neeli 66ba96b2e7SSrinivas Neeli xlnx,dout-default: 67ba96b2e7SSrinivas Neeli $ref: /schemas/types.yaml#/definitions/uint32 68ba96b2e7SSrinivas Neeli description: Sets the default value of all the enabled bits of 69ba96b2e7SSrinivas Neeli channel1. 70ba96b2e7SSrinivas Neeli default: 0 71ba96b2e7SSrinivas Neeli 72ba96b2e7SSrinivas Neeli xlnx,dout-default-2: 73ba96b2e7SSrinivas Neeli $ref: /schemas/types.yaml#/definitions/uint32 74ba96b2e7SSrinivas Neeli description: Sets the default value of all the enabled bits of 75ba96b2e7SSrinivas Neeli channel2. 76ba96b2e7SSrinivas Neeli default: 0 77ba96b2e7SSrinivas Neeli 78ba96b2e7SSrinivas Neeli xlnx,gpio-width: 79ba96b2e7SSrinivas Neeli $ref: /schemas/types.yaml#/definitions/uint32 80ba96b2e7SSrinivas Neeli description: The value defines the bit width of the GPIO channel1. 81ba96b2e7SSrinivas Neeli minimum: 1 82ba96b2e7SSrinivas Neeli maximum: 32 83ba96b2e7SSrinivas Neeli default: 32 84ba96b2e7SSrinivas Neeli 85ba96b2e7SSrinivas Neeli xlnx,gpio2-width: 86ba96b2e7SSrinivas Neeli $ref: /schemas/types.yaml#/definitions/uint32 87ba96b2e7SSrinivas Neeli description: The value defines the bit width of the GPIO channel2. 88ba96b2e7SSrinivas Neeli minimum: 1 89ba96b2e7SSrinivas Neeli maximum: 32 90ba96b2e7SSrinivas Neeli default: 32 91ba96b2e7SSrinivas Neeli 92ba96b2e7SSrinivas Neeli xlnx,interrupt-present: 93ba96b2e7SSrinivas Neeli $ref: /schemas/types.yaml#/definitions/uint32 94ba96b2e7SSrinivas Neeli description: This parameter enables interrupt control logic 95ba96b2e7SSrinivas Neeli and interrupt registers in GPIO module. 96ba96b2e7SSrinivas Neeli minimum: 0 97ba96b2e7SSrinivas Neeli maximum: 1 98ba96b2e7SSrinivas Neeli default: 0 99ba96b2e7SSrinivas Neeli 100ba96b2e7SSrinivas Neeli xlnx,is-dual: 101ba96b2e7SSrinivas Neeli $ref: /schemas/types.yaml#/definitions/uint32 102ba96b2e7SSrinivas Neeli description: This parameter enables a second GPIO channel (GPIO2). 103ba96b2e7SSrinivas Neeli minimum: 0 104ba96b2e7SSrinivas Neeli maximum: 1 105ba96b2e7SSrinivas Neeli default: 0 106ba96b2e7SSrinivas Neeli 107ba96b2e7SSrinivas Neeli xlnx,tri-default: 108ba96b2e7SSrinivas Neeli $ref: /schemas/types.yaml#/definitions/uint32 109ba96b2e7SSrinivas Neeli description: This value configures the input or output mode 110ba96b2e7SSrinivas Neeli of each bit of GPIO channel1. 111ba96b2e7SSrinivas Neeli 112ba96b2e7SSrinivas Neeli xlnx,tri-default-2: 113ba96b2e7SSrinivas Neeli $ref: /schemas/types.yaml#/definitions/uint32 114ba96b2e7SSrinivas Neeli description: This value configures the input or output mode 115ba96b2e7SSrinivas Neeli of each bit of GPIO channel2. 116ba96b2e7SSrinivas Neeli 117ba96b2e7SSrinivas Neelirequired: 118ba96b2e7SSrinivas Neeli - reg 119ba96b2e7SSrinivas Neeli - compatible 120ba96b2e7SSrinivas Neeli - gpio-controller 121ba96b2e7SSrinivas Neeli - "#gpio-cells" 122ba96b2e7SSrinivas Neeli 123ba96b2e7SSrinivas NeeliunevaluatedProperties: false 124ba96b2e7SSrinivas Neeli 125ba96b2e7SSrinivas Neeliexamples: 126ba96b2e7SSrinivas Neeli - | 127ba96b2e7SSrinivas Neeli #include <dt-bindings/interrupt-controller/arm-gic.h> 128ba96b2e7SSrinivas Neeli 129ba96b2e7SSrinivas Neeli gpio@e000a000 { 130ba96b2e7SSrinivas Neeli compatible = "xlnx,xps-gpio-1.00.a"; 131ba96b2e7SSrinivas Neeli reg = <0xa0020000 0x10000>; 132ba96b2e7SSrinivas Neeli #gpio-cells = <2>; 133ba96b2e7SSrinivas Neeli #interrupt-cells = <0x2>; 134ba96b2e7SSrinivas Neeli clocks = <&zynqmp_clk 71>; 135ba96b2e7SSrinivas Neeli gpio-controller; 136ba96b2e7SSrinivas Neeli interrupt-controller; 137ba96b2e7SSrinivas Neeli interrupt-names = "ip2intc_irpt"; 138ba96b2e7SSrinivas Neeli interrupt-parent = <&gic>; 139ba96b2e7SSrinivas Neeli interrupts = <0 89 4>; 140ba96b2e7SSrinivas Neeli xlnx,all-inputs = <0x0>; 141ba96b2e7SSrinivas Neeli xlnx,all-inputs-2 = <0x0>; 142ba96b2e7SSrinivas Neeli xlnx,all-outputs = <0x0>; 143ba96b2e7SSrinivas Neeli xlnx,all-outputs-2 = <0x0>; 144ba96b2e7SSrinivas Neeli xlnx,dout-default = <0x0>; 145ba96b2e7SSrinivas Neeli xlnx,dout-default-2 = <0x0>; 146ba96b2e7SSrinivas Neeli xlnx,gpio-width = <0x20>; 147ba96b2e7SSrinivas Neeli xlnx,gpio2-width = <0x20>; 148ba96b2e7SSrinivas Neeli xlnx,interrupt-present = <0x1>; 149ba96b2e7SSrinivas Neeli xlnx,is-dual = <0x1>; 150ba96b2e7SSrinivas Neeli xlnx,tri-default = <0xFFFFFFFF>; 151ba96b2e7SSrinivas Neeli xlnx,tri-default-2 = <0xFFFFFFFF>; 152ba96b2e7SSrinivas Neeli }; 153ba96b2e7SSrinivas Neeli 154ba96b2e7SSrinivas Neeli... 155