Resguardo inicial

This commit is contained in:
lastdragon
2026-09-06 12:53:21 -06:00
parent 662efe3c2a
commit ad2088d178
94853 changed files with 43200404 additions and 0 deletions
@@ -0,0 +1,63 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/abilis,tb10x-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Abilis TB10x GPIO controller
maintainers:
- Christian Ruppert <christian.ruppert@abilis.com>
properties:
compatible:
const: abilis,tb10x-gpio
reg:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
gpio-ranges: true
gpio-ranges-group-names: true
interrupt-controller: true
'#interrupt-cells':
const: 1
description: Interrupts are triggered on both edges
interrupts:
maxItems: 1
abilis,ngpio:
description: Number of GPIO pins this driver controls
$ref: /schemas/types.yaml#/definitions/uint32
required:
- compatible
- reg
- gpio-controller
- '#gpio-cells'
- abilis,ngpio
additionalProperties: false
examples:
- |
gpio@ff140000 {
compatible = "abilis,tb10x-gpio";
interrupt-controller;
#interrupt-cells = <1>;
interrupts = <27 2>;
reg = <0xff140000 0x1000>;
gpio-controller;
#gpio-cells = <2>;
abilis,ngpio = <3>;
gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpioa_pins";
};
@@ -0,0 +1,51 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/adi,ds4520-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: DS4520 I2C GPIO expander
maintainers:
- Okan Sahin <okan.sahin@analog.com>
properties:
compatible:
enum:
- adi,ds4520-gpio
reg:
maxItems: 1
gpio-controller: true
"#gpio-cells":
const: 2
ngpios:
minimum: 1
maximum: 9
required:
- compatible
- reg
- gpio-controller
- "#gpio-cells"
- ngpios
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
gpio@50 {
compatible = "adi,ds4520-gpio";
reg = <0x50>;
ngpios = <9>;
gpio-controller;
#gpio-cells = <2>;
};
};
@@ -0,0 +1,66 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/airoha,en7523-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Airoha EN7523 GPIO controller
maintainers:
- John Crispin <john@phrozen.org>
description: |
Airoha's GPIO controller on their ARM EN7523 SoCs consists of two banks of 32
GPIOs.
properties:
$nodename:
pattern: "^gpio@[0-9a-f]+$"
compatible:
items:
- const: airoha,en7523-gpio
reg:
description: |
The first tuple points to the input register.
The second and third tuple point to the direction registers
The fourth tuple points to the output register
maxItems: 4
"#gpio-cells":
const: 2
gpio-controller: true
required:
- compatible
- reg
- "#gpio-cells"
- gpio-controller
additionalProperties: false
examples:
- |
gpio0: gpio@1fbf0200 {
compatible = "airoha,en7523-gpio";
reg = <0x1fbf0204 0x4>,
<0x1fbf0200 0x4>,
<0x1fbf0220 0x4>,
<0x1fbf0214 0x4>;
gpio-controller;
#gpio-cells = <2>;
};
gpio1: gpio@1fbf0270 {
compatible = "airoha,en7523-gpio";
reg = <0x1fbf0270 0x4>,
<0x1fbf0260 0x4>,
<0x1fbf0264 0x4>,
<0x1fbf0278 0x4>;
gpio-controller;
#gpio-cells = <2>;
};
...
@@ -0,0 +1,75 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/altr-pio-1.0.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Altera GPIO controller
maintainers:
- Dinh Nguyen <dinguyen@kernel.org>
- Marek Vasut <marex@denx.de>
- Mathieu Malaterre <malat@debian.org>
- Tien Hock Loh <thloh@altera.com>
properties:
compatible:
const: altr,pio-1.0
reg:
maxItems: 1
gpio-controller: true
"#gpio-cells":
const: 2
description:
First cell is the GPIO offset number. Second cell is reserved and
currently unused.
interrupts:
maxItems: 1
interrupt-controller: true
"#interrupt-cells":
const: 2
altr,ngpio:
$ref: /schemas/types.yaml#/definitions/uint32
description: Width of the GPIO bank.
default: 32
altr,interrupt-type:
$ref: /schemas/types.yaml#/definitions/uint32
description: >
Specifies the interrupt trigger type synthesized by hardware.
Values defined in <dt-bindings/interrupt-controller/irq.h>.
enum: [1, 2, 3, 4]
required:
- compatible
- reg
- gpio-controller
- "#gpio-cells"
- interrupts
- interrupt-controller
- "#interrupt-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
gpio@ff200000 {
compatible = "altr,pio-1.0";
reg = <0xff200000 0x10>;
interrupts = <45 4>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
altr,ngpio = <32>;
altr,interrupt-type = <IRQ_TYPE_EDGE_RISING>;
};
@@ -0,0 +1,94 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/apm,xgene-gpio-sb.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: APM X-Gene Standby GPIO controller
maintainers:
- Khuong Dinh <khuong@os.amperecomputing.com>
description: |
This is a gpio controller in the standby domain. It also supports interrupt in
some particular pins which are sourced to its parent interrupt controller
as diagram below:
+-----------------+
| X-Gene standby |
| GPIO controller +------ GPIO_0
+------------+ | | ...
| Parent IRQ | EXT_INT_0 | +------ GPIO_8/EXT_INT_0
| controller | (SPI40) | | ...
| (GICv2) +--------------+ +------ GPIO_[N+8]/EXT_INT_N
| | ... | |
| | EXT_INT_N | +------ GPIO_[N+9]
| | (SPI[40 + N])| | ...
| +--------------+ +------ GPIO_MAX
+------------+ +-----------------+
properties:
compatible:
const: apm,xgene-gpio-sb
reg:
maxItems: 1
'#gpio-cells':
const: 2
gpio-controller: true
interrupts:
description:
List of interrupt specifiers for EXT_INT_0 through EXT_INT_N. The first
entry must correspond to EXT_INT_0.
'#interrupt-cells':
const: 2
description:
First cell selects EXT_INT_N (0-N), second cell specifies flags
interrupt-controller: true
apm,nr-gpios:
$ref: /schemas/types.yaml#/definitions/uint32
description: Number of GPIO pins
apm,nr-irqs:
$ref: /schemas/types.yaml#/definitions/uint32
description: Number of interrupt pins
apm,irq-start:
$ref: /schemas/types.yaml#/definitions/uint32
description: Lowest GPIO pin supporting interrupts
required:
- compatible
- reg
- '#gpio-cells'
- gpio-controller
- interrupts
- '#interrupt-cells'
- interrupt-controller
additionalProperties: false
examples:
- |
gpio@17001000 {
compatible = "apm,xgene-gpio-sb";
reg = <0x17001000 0x400>;
#gpio-cells = <2>;
gpio-controller;
interrupts = <0x0 0x28 0x1>,
<0x0 0x29 0x1>,
<0x0 0x2a 0x1>,
<0x0 0x2b 0x1>,
<0x0 0x2c 0x1>,
<0x0 0x2d 0x1>;
#interrupt-cells = <2>;
interrupt-controller;
apm,nr-gpios = <22>;
apm,nr-irqs = <6>;
apm,irq-start = <8>;
};
@@ -0,0 +1,29 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/apple,smc-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Apple Mac System Management Controller GPIO
maintainers:
- Sven Peter <sven@kernel.org>
description:
Apple Mac System Management Controller GPIO block.
properties:
compatible:
const: apple,smc-gpio
gpio-controller: true
'#gpio-cells':
const: 2
required:
- compatible
- gpio-controller
- '#gpio-cells'
additionalProperties: false
@@ -0,0 +1,169 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/aspeed,ast2400-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Aspeed GPIO controller
maintainers:
- Andrew Jeffery <andrew@codeconstruct.com.au>
properties:
compatible:
enum:
- aspeed,ast2400-gpio
- aspeed,ast2500-gpio
- aspeed,ast2600-gpio
- aspeed,ast2700-gpio
reg:
maxItems: 1
clocks:
maxItems: 1
description: The clock to use for debounce timings
gpio-controller: true
gpio-line-names:
minItems: 12
maxItems: 232
gpio-ranges: true
"#gpio-cells":
const: 2
interrupts:
maxItems: 1
interrupt-controller: true
"#interrupt-cells":
const: 2
ngpios:
minimum: 12
maximum: 232
patternProperties:
"-hog(-[0-9]+)?$":
type: object
required:
- gpio-hog
required:
- compatible
- reg
- interrupts
- interrupt-controller
- "#interrupt-cells"
- gpio-controller
- "#gpio-cells"
allOf:
- if:
properties:
compatible:
contains:
const: aspeed,ast2400-gpio
then:
properties:
gpio-line-names:
minItems: 220
maxItems: 220
ngpios:
const: 220
- if:
properties:
compatible:
contains:
const: aspeed,ast2500-gpio
then:
properties:
gpio-line-names:
minItems: 232
maxItems: 232
ngpios:
const: 232
- if:
properties:
compatible:
contains:
const: aspeed,ast2600-gpio
then:
properties:
gpio-line-names:
minItems: 36
maxItems: 208
ngpios:
enum: [ 36, 208 ]
required:
- ngpios
- if:
properties:
compatible:
contains:
const: aspeed,ast2700-gpio
then:
properties:
gpio-line-names:
minItems: 12
maxItems: 216
ngpios:
enum: [ 12, 216 ]
required:
- ngpios
additionalProperties: false
examples:
- |
gpio@1e780000 {
compatible = "aspeed,ast2400-gpio";
reg = <0x1e780000 0x1000>;
interrupts = <20>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
};
- |
gpio: gpio@1e780000 {
compatible = "aspeed,ast2500-gpio";
reg = <0x1e780000 0x200>;
interrupts = <20>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl 0 0 232>;
};
- |
#include <dt-bindings/clock/ast2600-clock.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
gpio0: gpio@1e780000 {
compatible = "aspeed,ast2600-gpio";
reg = <0x1e780000 0x400>;
clocks = <&syscon ASPEED_CLK_APB2>;
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
#gpio-cells = <2>;
gpio-controller;
gpio-ranges = <&pinctrl 0 0 208>;
ngpios = <208>;
};
gpio1: gpio@1e780800 {
compatible = "aspeed,ast2600-gpio";
reg = <0x1e780800 0x800>;
clocks = <&syscon ASPEED_CLK_APB1>;
interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl 0 208 36>;
ngpios = <36>;
};
@@ -0,0 +1,89 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/aspeed,sgpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Aspeed SGPIO controller
maintainers:
- Andrew Jeffery <andrew@aj.id.au>
description:
This SGPIO controller is for ASPEED AST2400, AST2500, AST2600 and AST2700 SoC,
AST2700 have two sgpio master both with 256 pins,
AST2600 have two sgpio master one with 128 pins another one with 80 pins,
AST2500/AST2400 have one sgpio master with 80 pins. Each of the Serial
GPIO pins can be programmed to support the following options
- Support interrupt option for each input port and various interrupt
sensitivity option (level-high, level-low, edge-high, edge-low)
- Support reset tolerance option for each output port
- Directly connected to APB bus and its shift clock is from APB bus clock
divided by a programmable value.
- Co-work with external signal-chained TTL components (74LV165/74LV595)
properties:
compatible:
enum:
- aspeed,ast2400-sgpio
- aspeed,ast2500-sgpio
- aspeed,ast2600-sgpiom
- aspeed,ast2700-sgpiom
reg:
maxItems: 1
gpio-controller: true
# Each SGPIO is represented as a pair of input and output GPIOs
gpio-line-names:
minItems: 160
maxItems: 256
'#gpio-cells':
const: 2
interrupts:
maxItems: 1
interrupt-controller: true
'#interrupt-cells':
const: 2
clocks:
maxItems: 1
ngpios: true
bus-frequency: true
required:
- compatible
- reg
- gpio-controller
- '#gpio-cells'
- interrupts
- interrupt-controller
- '#interrupt-cells'
- ngpios
- clocks
- bus-frequency
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/aspeed-clock.h>
sgpio: sgpio@1e780200 {
#gpio-cells = <2>;
compatible = "aspeed,ast2500-sgpio";
gpio-controller;
interrupts = <40>;
reg = <0x1e780200 0x0100>;
clocks = <&syscon ASPEED_CLK_APB>;
interrupt-controller;
#interrupt-cells = <2>;
ngpios = <80>;
bus-frequency = <12000000>;
};
@@ -0,0 +1,81 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/atmel,at91rm9200-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip GPIO controller (PIO)
maintainers:
- Manikandan Muralidharan <manikandan.m@microchip.com>
properties:
compatible:
oneOf:
- items:
- enum:
- atmel,at91sam9x5-gpio
- microchip,sam9x60-gpio
- const: atmel,at91rm9200-gpio
- items:
- enum:
- microchip,sam9x7-gpio
- const: microchip,sam9x60-gpio
- const: atmel,at91rm9200-gpio
- items:
- const: atmel,at91rm9200-gpio
reg:
maxItems: 1
interrupts:
maxItems: 1
interrupt-controller: true
"#interrupt-cells":
const: 2
gpio-controller: true
gpio-line-names: true
"#gpio-cells":
const: 2
clocks:
maxItems: 1
"#gpio-lines":
description:
Number of gpio, 32 by default if absent
maxItems: 1
default: 32
required:
- compatible
- reg
- interrupts
- interrupt-controller
- "#interrupt-cells"
- gpio-controller
- "#gpio-cells"
- clocks
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/at91.h>
#include <dt-bindings/interrupt-controller/irq.h>
gpio@fffff400 {
compatible = "atmel,at91rm9200-gpio";
reg = <0xfffff400 0x200>;
interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
#gpio-cells = <2>;
gpio-controller;
interrupt-controller;
#interrupt-cells = <2>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 2>;
};
...
@@ -0,0 +1,77 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/blaize,blzp1600-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Blaize BLZP1600 GPIO controller
description:
Blaize BLZP1600 GPIO controller is an implementation of the VeriSilicon
APB GPIO v0.2 IP block. It has 32 ports each of which are intended to be
represented as child nodes with the generic GPIO-controller properties
as described in this binding's file.
maintainers:
- Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com>
- James Cowgill <james.cowgill@blaize.com>
- Matt Redfearn <matt.redfearn@blaize.com>
- Neil Jones <neil.jones@blaize.com>
properties:
$nodename:
pattern: "^gpio@[0-9a-f]+$"
compatible:
enum:
- blaize,blzp1600-gpio
reg:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
ngpios:
default: 32
minimum: 1
maximum: 32
interrupts:
maxItems: 1
gpio-line-names: true
interrupt-controller: true
'#interrupt-cells':
const: 2
required:
- compatible
- reg
- gpio-controller
- '#gpio-cells'
dependencies:
interrupt-controller: [ interrupts ]
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
gpio: gpio@4c0000 {
compatible = "blaize,blzp1600-gpio";
reg = <0x004c0000 0x1000>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <32>;
interrupt-controller;
#interrupt-cells = <2>;
interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
};
...
@@ -0,0 +1,72 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/brcm,bcm63xx-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom BCM63xx GPIO controller
maintainers:
- Álvaro Fernández Rojas <noltari@gmail.com>
- Jonas Gorski <jonas.gorski@gmail.com>
description: |+
Bindings for Broadcom's BCM63xx memory-mapped GPIO controllers.
These bindings can be used on any BCM63xx SoC. However, BCM6338 and BCM6345
are the only ones which don't need a pinctrl driver.
BCM6338 have 8-bit data and dirout registers, where GPIO state can be read
and/or written, and the direction changed from input to output.
BCM6318, BCM6328, BCM6358, BCM6362, BCM6368 and BCM63268 have 32-bit data
and dirout registers, where GPIO state can be read and/or written, and the
direction changed from input to output.
properties:
compatible:
enum:
- brcm,bcm6318-gpio
- brcm,bcm6328-gpio
- brcm,bcm6358-gpio
- brcm,bcm6362-gpio
- brcm,bcm6368-gpio
- brcm,bcm63268-gpio
gpio-controller: true
"#gpio-cells":
const: 2
gpio-ranges:
maxItems: 1
native-endian: true
reg:
maxItems: 2
reg-names:
items:
- const: dirout
- const: dat
required:
- compatible
- reg
- reg-names
- gpio-controller
- '#gpio-cells'
additionalProperties: false
examples:
- |
gpio@0 {
compatible = "brcm,bcm63268-gpio";
reg-names = "dirout", "dat";
reg = <0x0 0x8>, <0x8 0x8>;
gpio-controller;
gpio-ranges = <&pinctrl 0 0 52>;
#gpio-cells = <2>;
};
@@ -0,0 +1,111 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/brcm,brcmstb-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom STB "UPG GIO" GPIO controller
description: >
The controller's registers are organized as sets of eight 32-bit
registers with each set controlling a bank of up to 32 pins. A single
interrupt is shared for all of the banks handled by the controller.
maintainers:
- Doug Berger <opendmb@gmail.com>
- Florian Fainelli <f.fainelli@gmail.com>
properties:
compatible:
items:
- enum:
- brcm,bcm7445-gpio
- const: brcm,brcmstb-gpio
reg:
maxItems: 1
description: >
Define the base and range of the I/O address space containing
the brcmstb GPIO controller registers
"#gpio-cells":
const: 2
description: >
The first cell is the pin number (within the controller's
pin space), and the second is used for the following:
bit[0]: polarity (0 for active-high, 1 for active-low)
gpio-controller: true
brcm,gpio-bank-widths:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: >
Number of GPIO lines for each bank. Number of elements must
correspond to number of banks suggested by the 'reg' property.
interrupts:
maxItems: 1
description: >
The interrupt shared by all GPIO lines for this controller.
"#interrupt-cells":
const: 2
description: |
The first cell is the GPIO number, the second should specify
flags. The following subset of flags is supported:
- bits[3:0] trigger type and level flags
1 = low-to-high edge triggered
2 = high-to-low edge triggered
4 = active high level-sensitive
8 = active low level-sensitive
Valid combinations are 1, 2, 3, 4, 8.
interrupt-controller: true
gpio-ranges: true
gpio-line-names:
minItems: 1
maxItems: 128
wakeup-source:
type: boolean
description: >
GPIOs for this controller can be used as a wakeup source
required:
- compatible
- reg
- gpio-controller
- "#gpio-cells"
- brcm,gpio-bank-widths
additionalProperties: false
examples:
- |
upg_gio: gpio@f040a700 {
#gpio-cells = <2>;
#interrupt-cells = <2>;
compatible = "brcm,bcm7445-gpio", "brcm,brcmstb-gpio";
gpio-controller;
interrupt-controller;
reg = <0xf040a700 0x80>;
interrupt-parent = <&irq0_intc>;
interrupts = <0x6>;
brcm,gpio-bank-widths = <32 32 32 24>;
gpio-ranges = <&pinctrl 0 0 120>;
};
upg_gio_aon: gpio@f04172c0 {
#gpio-cells = <2>;
#interrupt-cells = <2>;
compatible = "brcm,bcm7445-gpio", "brcm,brcmstb-gpio";
gpio-controller;
interrupt-controller;
reg = <0xf04172c0 0x40>;
interrupt-parent = <&irq0_aon_intc>;
interrupts = <0x6>;
wakeup-source;
brcm,gpio-bank-widths = <18 4>;
};
@@ -0,0 +1,100 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/brcm,kona-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom Kona family GPIO controller
description:
The Broadcom GPIO Controller IP can be configured prior to synthesis to
support up to 8 banks of 32 GPIOs where each bank has its own IRQ. The
GPIO controller only supports edge, not level, triggering of interrupts.
maintainers:
- Ray Jui <rjui@broadcom.com>
properties:
compatible:
items:
- enum:
- brcm,bcm11351-gpio
- brcm,bcm21664-gpio
- brcm,bcm23550-gpio
- const: brcm,kona-gpio
reg:
maxItems: 1
interrupts:
minItems: 4
maxItems: 6
description:
The interrupt outputs from the controller. There is one GPIO interrupt
per GPIO bank. The number of interrupts listed depends on the number of
GPIO banks on the SoC. The interrupts must be ordered by bank, starting
with bank 0. There is always a 1:1 mapping between banks and IRQs.
'#gpio-cells':
const: 2
'#interrupt-cells':
const: 2
gpio-controller: true
interrupt-controller: true
required:
- compatible
- reg
- interrupts
- '#gpio-cells'
- '#interrupt-cells'
- gpio-controller
- interrupt-controller
allOf:
- if:
properties:
compatible:
contains:
const: brcm,bcm11351-gpio
then:
properties:
interrupts:
minItems: 6
- if:
properties:
compatible:
contains:
enum:
- brcm,bcm21664-gpio
- brcm,bcm23550-gpio
then:
properties:
interrupts:
maxItems: 4
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
gpio@35003000 {
compatible = "brcm,bcm11351-gpio", "brcm,kona-gpio";
reg = <0x35003000 0x800>;
interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
#gpio-cells = <2>;
#interrupt-cells = <2>;
gpio-controller;
interrupt-controller;
};
...
@@ -0,0 +1,69 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/brcm,xgs-iproc-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom XGS iProc GPIO controller
maintainers:
- Chris Packham <chris.packham@alliedtelesis.co.nz>
description: |
This controller is the Chip Common A GPIO present on a number of Broadcom
switch ASICs with integrated SoCs.
properties:
compatible:
const: brcm,iproc-gpio-cca
reg:
items:
- description: the I/O address containing the GPIO controller registers.
- description: the I/O address containing the Chip Common A interrupt registers.
gpio-controller: true
'#gpio-cells':
const: 2
ngpios:
minimum: 0
maximum: 32
interrupt-controller: true
'#interrupt-cells':
const: 2
interrupts:
maxItems: 1
required:
- compatible
- reg
- "#gpio-cells"
- gpio-controller
additionalProperties: false
dependencies:
interrupt-controller: [ interrupts ]
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
gpio@18000060 {
compatible = "brcm,iproc-gpio-cca";
#gpio-cells = <2>;
reg = <0x18000060 0x50>,
<0x18000000 0x50>;
ngpios = <12>;
gpio-controller;
interrupt-controller;
#interrupt-cells = <2>;
interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
};
...
@@ -0,0 +1,62 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/cavium,octeon-3860-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cavium Octeon 3860 GPIO controller
maintainers:
- Bartosz Golaszewski <brgl@bgdev.pl>
properties:
compatible:
const: cavium,octeon-3860-gpio
reg:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
interrupt-controller: true
'#interrupt-cells':
const: 2
interrupts:
maxItems: 16
required:
- compatible
- reg
- gpio-controller
- '#gpio-cells'
- interrupt-controller
- '#interrupt-cells'
- interrupts
additionalProperties: false
examples:
- |
bus {
#address-cells = <2>;
#size-cells = <2>;
gpio@1070000000800 {
compatible = "cavium,octeon-3860-gpio";
reg = <0x10700 0x00000800 0x0 0x100>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
/* The GPIO pin connect to 16 consecutive CUI bits */
interrupts = <0 16>, <0 17>, <0 18>, <0 19>,
<0 20>, <0 21>, <0 22>, <0 23>,
<0 24>, <0 25>, <0 26>, <0 27>,
<0 28>, <0 29>, <0 30>, <0 31>;
};
};
@@ -0,0 +1,84 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/cdns,gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cadence GPIO Controller
maintainers:
- Jan Kotas <jank@cadence.com>
properties:
compatible:
oneOf:
- const: cdns,gpio-r1p02
- items:
- enum:
- axiado,ax3000-gpio
- const: cdns,gpio-r1p02
reg:
maxItems: 1
clocks:
maxItems: 1
ngpios:
minimum: 1
maximum: 32
gpio-controller: true
"#gpio-cells":
const: 2
description: |
- First cell is the GPIO line number.
- Second cell is flags as defined in <dt-bindings/gpio/gpio.h>,
only GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW supported.
interrupt-controller: true
"#interrupt-cells":
const: 2
description: |
- First cell is the GPIO line number used as IRQ.
- Second cell is the trigger type, as defined in
<dt-bindings/interrupt-controller/irq.h>.
interrupts:
maxItems: 1
required:
- compatible
- reg
- clocks
- gpio-controller
- "#gpio-cells"
if:
required: [interrupt-controller]
then:
required:
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
gpio0: gpio-controller@fd060000 {
compatible = "cdns,gpio-r1p02";
reg = <0xfd060000 0x1000>;
clocks = <&gpio_clk>;
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
@@ -0,0 +1,49 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/cirrus,clps711x-mctrl-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ARM Cirrus Logic CLPS711X SYSFLG1 MCTRL GPIOs
maintainers:
- Alexander Shiyan <shc_work@mail.ru>
properties:
compatible:
oneOf:
- items:
- const: cirrus,ep7312-mctrl-gpio
- const: cirrus,ep7209-mctrl-gpio
- const: cirrus,ep7209-mctrl-gpio
gpio-controller: true
'#gpio-cells':
const: 2
gpio,syscon-dev:
description:
Phandle and offset of device's specific registers within the syscon state
control registers
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
- items:
- description: phandle to syscon
- description: register offset within state control registers
required:
- compatible
- gpio-controller
- '#gpio-cells'
additionalProperties: false
examples:
- |
sysgpio: sysgpio {
compatible = "cirrus,ep7312-mctrl-gpio",
"cirrus,ep7209-mctrl-gpio";
gpio-controller;
#gpio-cells = <2>;
};
@@ -0,0 +1,39 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/delta,tn48m-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Delta Networks TN48M CPLD GPIO controller
maintainers:
- Robert Marko <robert.marko@sartura.hr>
description: |
This module is part of the Delta TN48M multi-function device. For more
details see ../mfd/delta,tn48m-cpld.yaml.
Delta TN48M has an onboard Lattice CPLD that is used as an GPIO expander.
It provides 12 pins in total, they are input-only or ouput-only type.
properties:
compatible:
enum:
- delta,tn48m-gpo
- delta,tn48m-gpi
reg:
maxItems: 1
"#gpio-cells":
const: 2
gpio-controller: true
required:
- compatible
- reg
- "#gpio-cells"
- gpio-controller
additionalProperties: false
@@ -0,0 +1,75 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/exar,xra1403.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: XRA1403 16-bit GPIO Expander with Reset Input
maintainers:
- Nandor Han <nandor.han@ge.com>
description: >
The XRA1403 is an 16-bit GPIO expander with an SPI interface. Features
available:
- Individually programmable inputs:
- Internal pull-up resistors
- Polarity inversion
- Individual interrupt enable
- Rising edge and/or Falling edge interrupt
- Input filter
- Individually programmable outputs:
- Output Level Control
- Output Three-State Control
properties:
compatible:
const: exar,xra1403
reg:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
interrupt-controller: true
'#interrupt-cells':
const: 2
reset-gpios:
description: Control line for the device reset.
required:
- compatible
- reg
- gpio-controller
- '#gpio-cells'
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
gpio@2 {
compatible = "exar,xra1403";
reg = <2>;
spi-max-frequency = <1000000>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
reset-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>;
};
};
@@ -0,0 +1,97 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/fairchild,74hc595.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Generic 8-bit shift register
description: |
NOTE: These chips nominally don't have a chip select pin. They do however
have a rising-edge triggered latch clock (or storage register clock) pin,
which behaves like an active-low chip select.
After the bits are shifted into the shift register, CS# is driven high, which
the 74HC595 sees as a rising edge on the latch clock that results in a
transfer of the bits from the shift register to the storage register and thus
to the output pins.
_ _ _ _
shift clock ____| |_| |_..._| |_| |_________
latch clock * trigger
___ ________
chip select# |___________________|
maintainers:
- Maxime Ripard <mripard@kernel.org>
properties:
compatible:
enum:
- fairchild,74hc595
- nxp,74lvc594
reg:
maxItems: 1
gpio-controller: true
'#gpio-cells':
description:
The second cell is only used to specify the GPIO polarity.
const: 2
registers-number:
$ref: /schemas/types.yaml#/definitions/uint32
description: Number of daisy-chained shift registers
lines-initial-states:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Bitmask that specifies the initial state of each output line, written
by the driver before the gpiochip is registered. Bit N corresponds to
GPIO line N, following the convention already documented for
nxp,pcf8575. Because the 74HC595/74LVC594 family is push-pull output
only, a bit set to zero drives the line low and a bit set to one
drives it high. The bitmask covers up to 32 lines (four cascaded
registers); outputs beyond that come up zeroed. When the property is
absent all outputs come up low, preserving the previous behaviour.
enable-gpios:
description: GPIO connected to the OE (Output Enable) pin.
maxItems: 1
patternProperties:
"^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
type: object
required:
- gpio-hog
required:
- compatible
- reg
- gpio-controller
- '#gpio-cells'
- registers-number
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples:
- |
spi {
#address-cells = <1>;
#size-cells = <0>;
gpio5@0 {
compatible = "fairchild,74hc595";
reg = <0>;
gpio-controller;
#gpio-cells = <2>;
registers-number = <4>;
lines-initial-states = <0xffff0000>;
spi-max-frequency = <100000>;
};
};
@@ -0,0 +1,65 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/faraday,ftgpio010.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Faraday Technology FTGPIO010 GPIO Controller
maintainers:
- Linus Walleij <linusw@kernel.org>
properties:
compatible:
oneOf:
- items:
- const: cortina,gemini-gpio
- const: faraday,ftgpio010
- items:
- const: moxa,moxart-gpio
- const: faraday,ftgpio010
- const: faraday,ftgpio010
reg:
maxItems: 1
resets:
maxItems: 1
clocks:
maxItems: 1
interrupts:
maxItems: 1
description: Should contain the interrupt line for the GPIO block
gpio-controller: true
"#gpio-cells":
const: 2
interrupt-controller: true
"#interrupt-cells":
const: 2
required:
- compatible
- reg
- interrupts
- "#gpio-cells"
- interrupt-controller
- "#interrupt-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
gpio@4d000000 {
compatible = "cortina,gemini-gpio", "faraday,ftgpio010";
reg = <0x4d000000 0x100>;
interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
@@ -0,0 +1,39 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/fsl,imx8qxp-sc-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: GPIO driver over IMX SCU firmware API
maintainers:
- Shenwei Wang <shenwei.wang@nxp.com>
description: |
This module provides the standard interface to control the
resource pins in SCU domain on i.MX8 platforms.
properties:
compatible:
enum:
- fsl,imx8qxp-sc-gpio
"#gpio-cells":
const: 2
gpio-controller: true
required:
- compatible
- "#gpio-cells"
- gpio-controller
additionalProperties: false
examples:
- |
gpio0: gpio {
compatible = "fsl,imx8qxp-sc-gpio";
gpio-controller;
#gpio-cells = <2>;
};
@@ -0,0 +1,95 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/fsl,qoriq-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale MPC512x/MPC8xxx/QorIQ/Layerscape GPIO controller
maintainers:
- Frank Li <Frank.Li@nxp.com>
properties:
compatible:
oneOf:
- enum:
- fsl,mpc5121-gpio
- fsl,mpc5125-gpio
- fsl,mpc8314-gpio
- fsl,mpc8349-gpio
- fsl,mpc8572-gpio
- fsl,mpc8610-gpio
- fsl,pq3-gpio
- items:
- enum:
- fsl,ls1021a-gpio
- fsl,ls1028a-gpio
- fsl,ls1043a-gpio
- fsl,ls1046a-gpio
- fsl,ls1088a-gpio
- fsl,ls2080a-gpio
- const: fsl,qoriq-gpio
- items:
- enum:
- fsl,mpc8308-gpio
- fsl,mpc8377-gpio
- fsl,mpc8378-gpio
- fsl,mpc8379-gpio
- const: fsl,mpc8349-gpio
reg:
maxItems: 1
interrupts:
maxItems: 1
"#gpio-cells":
const: 2
gpio-controller: true
interrupt-controller: true
"#interrupt-cells":
const: 2
gpio-line-names:
minItems: 1
maxItems: 32
little-endian:
$ref: /schemas/types.yaml#/definitions/flag
description:
GPIO registers are used as little endian. If not
present registers are used as big endian by default.
required:
- compatible
- reg
- interrupts
- "#gpio-cells"
additionalProperties: false
examples:
- |
gpio@1100 {
compatible = "fsl,mpc5125-gpio";
reg = <0x1100 0x080>;
interrupts = <78 0x8>;
gpio-controller;
#gpio-cells = <2>;
};
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
gpio@2300000 {
compatible = "fsl,ls2080a-gpio", "fsl,qoriq-gpio";
reg = <0x2300000 0x10000>;
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
little-endian;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
@@ -0,0 +1,114 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/fsl-imx-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale i.MX/MXC GPIO controller
maintainers:
- Shawn Guo <shawnguo@kernel.org>
- Sascha Hauer <s.hauer@pengutronix.de>
- Fabio Estevam <festevam@gmail.com>
properties:
compatible:
oneOf:
- enum:
- fsl,imx1-gpio
- fsl,imx21-gpio
- fsl,imx31-gpio
- fsl,imx35-gpio
- fsl,imx7d-gpio
- items:
- enum:
- fsl,imx27-gpio
- const: fsl,imx21-gpio
- items:
- const: fsl,imx35-gpio
- const: fsl,imx31-gpio
- items:
- enum:
- fsl,imx25-gpio
- const: fsl,imx35-gpio
- items:
- enum:
- fsl,imx50-gpio
- fsl,imx51-gpio
- fsl,imx53-gpio
- fsl,imx6q-gpio
- fsl,imx6sl-gpio
- fsl,imx6sll-gpio
- fsl,imx6sx-gpio
- fsl,imx6ul-gpio
- fsl,imx7d-gpio
- fsl,imx8dxl-gpio
- fsl,imx8mm-gpio
- fsl,imx8mn-gpio
- fsl,imx8mp-gpio
- fsl,imx8mq-gpio
- fsl,imx8qm-gpio
- fsl,imx8qxp-gpio
- fsl,imxrt1050-gpio
- fsl,imxrt1170-gpio
- const: fsl,imx35-gpio
reg:
maxItems: 1
interrupts:
description: |
Should be the port interrupt shared by all 32 pins, if one number.
If two numbers, the first one is the interrupt shared by low 16 pins
and the second one is for high 16 pins.
minItems: 1
maxItems: 2
interrupt-controller: true
"#interrupt-cells":
const: 2
clocks:
maxItems: 1
"#gpio-cells":
const: 2
gpio-controller: true
gpio-line-names: true
gpio-ranges: true
power-domains:
maxItems: 1
patternProperties:
"^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
type: object
required:
- gpio-hog
required:
- compatible
- reg
- interrupts
- interrupt-controller
- "#interrupt-cells"
- "#gpio-cells"
- gpio-controller
additionalProperties: false
examples:
- |
gpio0: gpio@73f84000 {
compatible = "fsl,imx35-gpio";
reg = <0x73f84000 0x4000>;
interrupts = <50 51>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
...
@@ -0,0 +1,50 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/fujitsu,mb86s70-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Fujitsu MB86S7x GPIO Controller
maintainers:
- Jassi Brar <jaswinder.singh@linaro.org>
properties:
compatible:
oneOf:
- items:
- const: socionext,synquacer-gpio
- const: fujitsu,mb86s70-gpio
- const: fujitsu,mb86s70-gpio
reg:
maxItems: 1
'#gpio-cells':
const: 2
gpio-controller: true
gpio-line-names: true
clocks:
maxItems: 1
required:
- compatible
- reg
- '#gpio-cells'
- gpio-controller
- clocks
additionalProperties: false
examples:
- |
gpio@31000000 {
compatible = "fujitsu,mb86s70-gpio";
reg = <0x31000000 0x10000>;
gpio-controller;
#gpio-cells = <2>;
clocks = <&clk 0 2 1>;
};
...
@@ -0,0 +1,33 @@
Avionic Design N-bit GPIO expander bindings
Required properties:
- compatible: should be "ad,gpio-adnp"
- reg: The I2C slave address for this device.
- interrupts: Interrupt specifier for the controllers interrupt.
- #gpio-cells: Should be 2. The first cell is the GPIO number and the
second cell is used to specify optional parameters:
- bit 0: polarity (0: normal, 1: inverted)
- gpio-controller: Marks the device as a GPIO controller
- nr-gpios: The number of pins supported by the controller.
The GPIO expander can optionally be used as an interrupt controller, in
which case it uses the default two cell specifier as described in
Documentation/devicetree/bindings/interrupt-controller/interrupts.txt.
Example:
gpioext: gpio-controller@41 {
compatible = "ad,gpio-adnp";
reg = <0x41>;
interrupt-parent = <&gpio>;
interrupts = <160 1>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
nr-gpios = <64>;
};
@@ -0,0 +1,64 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-consumer-common.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Common GPIO lines
maintainers:
- Bartosz Golaszewski <brgl@bgdev.pl>
- Linus Walleij <linusw@kernel.org>
description:
Pay attention to using proper GPIO flag (e.g. GPIO_ACTIVE_LOW) for the GPIOs
using inverted signal (e.g. RESETN).
select: true
properties:
enable-gpios:
maxItems: 1
description:
GPIO connected to the enable control pin.
reset-gpios:
description:
GPIO (or GPIOs for power sequence) connected to the device reset pin
(e.g. RESET or RESETN).
powerdown-gpios:
maxItems: 1
description:
GPIO connected to the power down pin (hardware power down or power cut,
e.g. PD or PWDN).
pwdn-gpios:
maxItems: 1
description: Use powerdown-gpios
deprecated: true
wakeup-gpios:
maxItems: 1
description:
GPIO connected to the pin waking up the device from suspend or other
power-saving modes.
allOf:
- if:
properties:
compatible:
contains:
enum:
- mmc-pwrseq-simple
then:
properties:
reset-gpios:
minItems: 1
maxItems: 32
else:
properties:
reset-gpios:
maxItems: 1
additionalProperties: true
@@ -0,0 +1,187 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-davinci.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: GPIO controller for Davinci and keystone devices
maintainers:
- Keerthy <j-keerthy@ti.com>
properties:
compatible:
oneOf:
- items:
- enum:
- ti,k2g-gpio
- ti,am654-gpio
- ti,j721e-gpio
- ti,am64-gpio
- const: ti,keystone-gpio
- items:
- enum:
- ti,dm6441-gpio
- ti,keystone-gpio
reg:
maxItems: 1
gpio-controller: true
gpio-ranges: true
gpio-reserved-ranges: true
gpio-line-names:
description: strings describing the names of each gpio line.
minItems: 1
maxItems: 144
"#gpio-cells":
const: 2
description:
first cell is the pin number and second cell is used to specify optional parameters (unused).
interrupts:
description:
The interrupts are specified as per the interrupt parent. Only banked
or unbanked IRQs are supported at a time. If the interrupts are
banked then provide list of interrupts corresponding to each bank, else
provide the list of interrupts for each gpio.
minItems: 1
maxItems: 100
ti,ngpio:
$ref: /schemas/types.yaml#/definitions/uint32
description: The number of GPIO pins supported consecutively.
minimum: 1
ti,davinci-gpio-unbanked:
$ref: /schemas/types.yaml#/definitions/uint32
description: The number of GPIOs that have an individual interrupt line to processor.
minimum: 0
clocks:
maxItems: 1
clock-names:
const: gpio
interrupt-controller: true
power-domains:
maxItems: 1
"#interrupt-cells":
const: 2
patternProperties:
"^(.+-hog(-[0-9]+)?)$":
type: object
required:
- gpio-hog
required:
- compatible
- reg
- gpio-controller
- "#gpio-cells"
- interrupts
- ti,ngpio
- ti,davinci-gpio-unbanked
- clocks
- clock-names
additionalProperties: false
examples:
- |
#include<dt-bindings/interrupt-controller/arm-gic.h>
gpio0: gpio@2603000 {
compatible = "ti,k2g-gpio", "ti,keystone-gpio";
reg = <0x02603000 0x100>;
gpio-controller;
#gpio-cells = <2>;
interrupts = <GIC_SPI 432 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 433 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 434 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 435 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 436 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 437 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 438 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 439 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 440 IRQ_TYPE_EDGE_RISING>;
interrupt-controller;
#interrupt-cells = <2>;
ti,ngpio = <144>;
ti,davinci-gpio-unbanked = <0>;
clocks = <&k2g_clks 0x001b 0x0>;
clock-names = "gpio";
};
- |
#include<dt-bindings/interrupt-controller/arm-gic.h>
gpio1: gpio@260bf00 {
compatible = "ti,keystone-gpio";
reg = <0x0260bf00 0x100>;
gpio-controller;
#gpio-cells = <2>;
/* HW Interrupts mapped to GPIO pins */
interrupts = <GIC_SPI 120 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 121 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 122 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 123 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 124 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 125 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 126 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 127 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 128 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 129 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 130 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 131 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 132 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 133 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 134 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 135 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 136 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 137 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 138 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 139 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 140 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 141 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 142 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 143 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 144 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 145 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 146 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 147 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 148 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 149 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 150 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
clocks = <&clkgpio>;
clock-names = "gpio";
ti,ngpio = <32>;
ti,davinci-gpio-unbanked = <32>;
};
- |
wkup_gpio0: gpio0@42110000 {
compatible = "ti,am654-gpio", "ti,keystone-gpio";
reg = <0x42110000 0x100>;
gpio-controller;
#gpio-cells = <2>;
interrupt-parent = <&intr_wkup_gpio>;
interrupts = <60>, <61>, <62>, <63>;
interrupt-controller;
#interrupt-cells = <2>;
ti,ngpio = <56>;
ti,davinci-gpio-unbanked = <0>;
clocks = <&k3_clks 59 0>;
clock-names = "gpio";
};
@@ -0,0 +1,79 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-delay.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: GPIO delay controller
maintainers:
- Alexander Stein <alexander.stein@ew.tq-group.com>
description: |
This binding describes an electrical setup where setting an GPIO output
is delayed by some external setup, e.g. RC circuit.
+----------+ +-----------+
| | VCC_B | |
| | | | |
| | VCC_A _ | |
| GPIO | | | R | Consumer |
|controller| ___ |_| | |
| | | | | | |
| [IOx|-------| |--+-----|-----+ |
| | |___| | | input |
| | | | |
+----------+ --- C +-----------+
---
|
-
GND
If the input on the consumer is controlled by an open-drain signal
attached to an RC circuit the ramp-up delay is not under control
of the GPIO controller.
properties:
compatible:
const: gpio-delay
"#gpio-cells":
description: |
Specifies the pin, ramp-up and ramp-down delays. The
delays are specified in microseconds.
const: 3
gpios:
description: Array of GPIOs which output signal change is delayed
minItems: 1
maxItems: 32
gpio-controller: true
gpio-line-names:
minItems: 1
maxItems: 32
required:
- compatible
- "#gpio-cells"
- gpio-controller
- gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
enable_delay: enable-delay {
compatible = "gpio-delay";
#gpio-cells = <3>;
gpio-controller;
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>,
<&gpio3 1 GPIO_ACTIVE_HIGH>;
};
consumer {
enable-gpios = <&enable_delay 0 130000 30000>;
};
@@ -0,0 +1,157 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-ep9301.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: EP93xx GPIO controller
maintainers:
- Linus Walleij <linusw@kernel.org>
- Bartosz Golaszewski <brgl@bgdev.pl>
- Nikita Shubin <nikita.shubin@maquefel.me>
properties:
compatible:
oneOf:
- const: cirrus,ep9301-gpio
- items:
- enum:
- cirrus,ep9302-gpio
- cirrus,ep9307-gpio
- cirrus,ep9312-gpio
- cirrus,ep9315-gpio
- const: cirrus,ep9301-gpio
reg:
minItems: 2
items:
- description: data register
- description: direction register
- description: interrupt registers base
reg-names:
minItems: 2
items:
- const: data
- const: dir
- const: intr
gpio-controller: true
gpio-ranges: true
"#gpio-cells":
const: 2
interrupt-controller: true
"#interrupt-cells":
const: 2
interrupts:
oneOf:
- maxItems: 1
- description: port F has dedicated irq line for each gpio line
maxItems: 8
required:
- compatible
- reg
- gpio-controller
- "#gpio-cells"
additionalProperties: false
examples:
- |
gpio@80840000 {
compatible = "cirrus,ep9301-gpio";
reg = <0x80840000 0x04>,
<0x80840010 0x04>,
<0x80840090 0x1c>;
reg-names = "data", "dir", "intr";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&vic1>;
interrupts = <27>;
};
gpio@80840004 {
compatible = "cirrus,ep9301-gpio";
reg = <0x80840004 0x04>,
<0x80840014 0x04>,
<0x808400ac 0x1c>;
reg-names = "data", "dir", "intr";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&vic1>;
interrupts = <27>;
};
gpio@80840008 {
compatible = "cirrus,ep9301-gpio";
reg = <0x80840008 0x04>,
<0x80840018 0x04>;
reg-names = "data", "dir";
gpio-controller;
#gpio-cells = <2>;
};
gpio@8084000c {
compatible = "cirrus,ep9301-gpio";
reg = <0x8084000c 0x04>,
<0x8084001c 0x04>;
reg-names = "data", "dir";
gpio-controller;
#gpio-cells = <2>;
};
gpio@80840020 {
compatible = "cirrus,ep9301-gpio";
reg = <0x80840020 0x04>,
<0x80840024 0x04>;
reg-names = "data", "dir";
gpio-controller;
#gpio-cells = <2>;
};
gpio@80840030 {
compatible = "cirrus,ep9301-gpio";
reg = <0x80840030 0x04>,
<0x80840034 0x04>,
<0x8084004c 0x1c>;
reg-names = "data", "dir", "intr";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
interrupts-extended = <&vic0 19>, <&vic0 20>,
<&vic0 21>, <&vic0 22>,
<&vic1 15>, <&vic1 16>,
<&vic1 17>, <&vic1 18>;
};
gpio@80840038 {
compatible = "cirrus,ep9301-gpio";
reg = <0x80840038 0x04>,
<0x8084003c 0x04>;
reg-names = "data", "dir";
gpio-controller;
#gpio-cells = <2>;
};
gpio@80840040 {
compatible = "cirrus,ep9301-gpio";
reg = <0x80840040 0x04>,
<0x80840044 0x04>;
reg-names = "data", "dir";
gpio-controller;
#gpio-cells = <2>;
};
...
@@ -0,0 +1,5 @@
Exportable MPIO interface of Exar UART chips
Required properties of the device:
- exar,first-pin: first exportable pins (0..15)
- ngpios: number of exportable pins (1..16)
@@ -0,0 +1,26 @@
Aeroflex Gaisler GRGPIO General Purpose I/O cores.
The GRGPIO GPIO core is available in the GRLIB VHDL IP core library.
Note: In the ordinary environment for the GRGPIO core, a Leon SPARC system,
these properties are built from information in the AMBA plug&play.
Required properties:
- name : Should be "GAISLER_GPIO" or "01_01a"
- reg : Address and length of the register set for the device
- interrupts : Interrupt numbers for this device
Optional properties:
- nbits : The number of gpio lines. If not present driver assumes 32 lines.
- irqmap : An array with an index for each gpio line. An index is either a valid
index into the interrupts property array, or 0xffffffff that indicates
no irq for that line. Driver provides no interrupt support if not
present.
For further information look in the documentation for the GLIB IP core library:
http://www.gaisler.com/products/grlib/grip.pdf
@@ -0,0 +1,94 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-latch.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: GPIO latch controller
maintainers:
- Sascha Hauer <s.hauer@pengutronix.de>
description: |
This binding describes a GPIO multiplexer based on latches connected to
other GPIOs, like this:
CLK0 ----------------------. ,--------.
CLK1 -------------------. `--------|> #0 |
| | |
OUT0 ----------------+--|-----------|D0 Q0|-----|<
OUT1 --------------+-|--|-----------|D1 Q1|-----|<
OUT2 ------------+-|-|--|-----------|D2 Q2|-----|<
OUT3 ----------+-|-|-|--|-----------|D3 Q3|-----|<
OUT4 --------+-|-|-|-|--|-----------|D4 Q4|-----|<
OUT5 ------+-|-|-|-|-|--|-----------|D5 Q5|-----|<
OUT6 ----+-|-|-|-|-|-|--|-----------|D6 Q6|-----|<
OUT7 --+-|-|-|-|-|-|-|--|-----------|D7 Q7|-----|<
| | | | | | | | | `--------'
| | | | | | | | |
| | | | | | | | | ,--------.
| | | | | | | | `-----------|> #1 |
| | | | | | | | | |
| | | | | | | `--------------|D0 Q0|-----|<
| | | | | | `----------------|D1 Q1|-----|<
| | | | | `------------------|D2 Q2|-----|<
| | | | `--------------------|D3 Q3|-----|<
| | | `----------------------|D4 Q4|-----|<
| | `------------------------|D5 Q5|-----|<
| `--------------------------|D6 Q6|-----|<
`----------------------------|D7 Q7|-----|<
`--------'
The number of clk-gpios and latched-gpios is not fixed. The actual number
of number of latches and the number of inputs per latch is derived from
the number of GPIOs given in the corresponding device tree properties.
properties:
compatible:
const: gpio-latch
"#gpio-cells":
const: 2
clk-gpios:
description: Array of GPIOs to be used to clock a latch
latched-gpios:
description: Array of GPIOs to be used as inputs per latch
setup-duration-ns:
description: Delay in nanoseconds to wait after the latch inputs have been
set up
clock-duration-ns:
description: Delay in nanoseconds to wait between clock output changes
gpio-controller: true
gpio-line-names: true
required:
- compatible
- "#gpio-cells"
- gpio-controller
- clk-gpios
- latched-gpios
additionalProperties: false
examples:
- |
gpio-latch {
#gpio-cells = <2>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_di_do_leds>;
compatible = "gpio-latch";
gpio-controller;
setup-duration-ns = <100>;
clock-duration-ns = <100>;
clk-gpios = <&gpio3 7 0>, <&gpio3 8 0>;
latched-gpios = <&gpio3 21 0>, <&gpio3 22 0>,
<&gpio3 23 0>, <&gpio3 24 0>,
<&gpio3 25 0>, <&gpio3 26 0>,
<&gpio3 27 0>, <&gpio3 28 0>;
};
@@ -0,0 +1,107 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-line-mux.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: GPIO line mux
maintainers:
- Jonas Jelonek <jelonek.jonas@gmail.com>
description: |
A GPIO controller to provide virtual GPIOs for a 1-to-many input-only mapping
backed by a single shared GPIO and a multiplexer. A simple illustrated
example is:
+----- A
IN /
<-----o------- B
/ |\
| | +----- C
| | \
| | +--- D
| |
M1 M0
MUX CONTROL
M1 M0 IN
0 0 A
0 1 B
1 0 C
1 1 D
This can be used in case a real GPIO is connected to multiple inputs and
controlled by a multiplexer, and another subsystem/driver does not work
directly with the multiplexer subsystem.
properties:
compatible:
const: gpio-line-mux
gpio-controller: true
"#gpio-cells":
const: 2
gpio-line-mux-states:
description: Mux states corresponding to the virtual GPIOs.
$ref: /schemas/types.yaml#/definitions/uint32-array
gpio-line-names: true
mux-controls:
maxItems: 1
description:
Phandle to the multiplexer to control access to the GPIOs.
ngpios: false
muxed-gpios:
maxItems: 1
description:
GPIO which is the '1' in 1-to-many and is shared by the virtual GPIOs
and controlled via the mux.
required:
- compatible
- gpio-controller
- gpio-line-mux-states
- mux-controls
- muxed-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/mux/mux.h>
sfp_gpio_mux: mux-controller-1 {
compatible = "gpio-mux";
mux-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>,
<&gpio0 1 GPIO_ACTIVE_HIGH>;
#mux-control-cells = <0>;
idle-state = <MUX_IDLE_AS_IS>;
};
sfp1_gpio: sfp-gpio-1 {
compatible = "gpio-line-mux";
gpio-controller;
#gpio-cells = <2>;
mux-controls = <&sfp_gpio_mux>;
muxed-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
gpio-line-mux-states = <0>, <1>, <3>;
};
sfp1: sfp-p1 {
compatible = "sff,sfp";
i2c-bus = <&sfp1_i2c>;
los-gpios = <&sfp1_gpio 0 GPIO_ACTIVE_HIGH>;
mod-def0-gpios = <&sfp1_gpio 1 GPIO_ACTIVE_LOW>;
tx-fault-gpios = <&sfp1_gpio 2 GPIO_ACTIVE_HIGH>;
};
@@ -0,0 +1,163 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-mmio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Generic MMIO GPIO
maintainers:
- Linus Walleij <linusw@kernel.org>
- Bartosz Golaszewski <brgl@bgdev.pl>
description:
Some simple GPIO controllers may consist of a single data register or a pair
of set/clear-bit registers. Such controllers are common for glue logic in
FPGAs or ASICs. Commonly, these controllers are accessed over memory-mapped
NAND-style parallel busses.
properties:
compatible:
enum:
- brcm,bcm6345-gpio
- intel,ixp4xx-expansion-bus-mmio-gpio
- ni,169445-nand-gpio
- opencores,gpio
- wd,mbl-gpio # Western Digital MyBook Live memory-mapped GPIO controller
big-endian: true
'#gpio-cells':
const: 2
gpio-controller: true
little-endian: true
reg:
minItems: 1
description:
A list of registers in the controller. The width of each register is
determined by its size. All registers must have the same width. The number
of GPIOs is set by the width, with bit 0 corresponding to GPIO 0, unless
the ngpios property further restricts the number of used lines.
items:
- description:
Register to READ the value of the GPIO lines. If GPIO line is high,
the bit will be set. If the GPIO line is low, the bit will be cleared.
This register may also be used to drive GPIOs if the SET register is
omitted.
- description:
Register to SET the value of the GPIO lines. Setting a bit in this
register will drive the GPIO line high.
- description:
Register to CLEAR the value of the GPIO lines. Setting a bit in this
register will drive the GPIO line low. If this register is omitted,
the SET register will be used to clear the GPIO lines as well, by
actively writing the line with 0.
- description:
Register to set the line as OUTPUT. Setting a bit in this register
will turn that line into an output line. Conversely, clearing a bit
will turn that line into an input.
- description:
Register to set this line as INPUT. Setting a bit in this register
will turn that line into an input line. Conversely, clearing a bit
will turn that line into an output.
reg-names:
minItems: 1
maxItems: 5
items:
enum:
- dat
- set
- clr
- dirout
- dirin
native-endian: true
ngpios:
minimum: 1
maximum: 63
description:
If this property is present the number of usable GPIO lines are restricted
to the first 0 .. ngpios lines. This is useful when the GPIO MMIO register
has 32 bits for GPIO but only the first 12 are actually connected to
real electronics, and then we set ngpios to 12.
no-output:
$ref: /schemas/types.yaml#/definitions/flag
description:
If this property is present, the controller cannot drive the GPIO lines.
if:
properties:
compatible:
contains:
const: intel,ixp4xx-expansion-bus-mmio-gpio
then:
$ref: /schemas/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml#
patternProperties:
"^.+-hog(-[0-9]+)?$":
type: object
required:
- gpio-hog
required:
- compatible
- reg
- reg-names
- '#gpio-cells'
- gpio-controller
unevaluatedProperties: false
examples:
- |
gpio@1f300010 {
compatible = "ni,169445-nand-gpio";
reg = <0x1f300010 0x4>;
reg-names = "dat";
gpio-controller;
#gpio-cells = <2>;
};
gpio@e0100000 {
compatible = "wd,mbl-gpio";
reg-names = "dat";
reg = <0xe0100000 0x1>;
#gpio-cells = <2>;
gpio-controller;
no-output;
};
gpio@fffe0406 {
compatible = "brcm,bcm6345-gpio";
reg-names = "dirout", "dat";
reg = <0xfffe0406 2>, <0xfffe040a 2>;
ngpios = <15>;
native-endian;
gpio-controller;
#gpio-cells = <2>;
};
bus@c4000000 {
compatible = "intel,ixp42x-expansion-bus-controller", "syscon";
reg = <0xc4000000 0x30>;
native-endian;
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0x0 0x50000000 0x01000000>;
dma-ranges = <0 0x0 0x50000000 0x01000000>;
gpio@1,0 {
compatible = "intel,ixp4xx-expansion-bus-mmio-gpio";
gpio-controller;
#gpio-cells = <2>;
big-endian;
reg = <1 0x00000000 0x2>;
reg-names = "dat";
intel,ixp4xx-eb-write-enable = <1>;
};
};
@@ -0,0 +1,156 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-mvebu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Marvell EBU GPIO controller
maintainers:
- Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
- Andrew Lunn <andrew@lunn.ch>
properties:
compatible:
oneOf:
- enum:
- marvell,armada-8k-gpio
- marvell,orion-gpio
- items:
- enum:
- marvell,mv78200-gpio
- marvell,armada-370-gpio
- const: marvell,orion-gpio
- description: Deprecated binding
items:
- const: marvell,armadaxp-gpio
- const: marvell,orion-gpio
deprecated: true
reg:
description: |
Address and length of the register set for the device. Not used for
marvell,armada-8k-gpio.
A second entry can be provided, for the PWM function using the GPIO Blink
Counter on/off registers.
minItems: 1
maxItems: 2
reg-names:
items:
- const: gpio
- const: pwm
minItems: 1
offset:
$ref: /schemas/types.yaml#/definitions/uint32
description: Offset in the register map for the gpio registers (in bytes)
interrupts:
description: |
The list of interrupts that are used for all the pins managed by this
GPIO bank. There can be more than one interrupt (example: 1 interrupt
per 8 pins on Armada XP, which means 4 interrupts per bank of 32
GPIOs).
minItems: 1
maxItems: 4
interrupt-controller: true
"#interrupt-cells":
const: 2
gpio-controller: true
ngpios:
minimum: 1
maximum: 32
"#gpio-cells":
const: 2
gpio-ranges:
maxItems: 1
marvell,pwm-offset:
$ref: /schemas/types.yaml#/definitions/uint32
description: Offset in the register map for the pwm registers (in bytes)
"#pwm-cells":
description:
The first cell is the GPIO line number. The second cell is the period
in nanoseconds.
const: 2
clocks:
description:
Clock(s) used for PWM function.
items:
- description: Core clock
- description: AXI bus clock
minItems: 1
clock-names:
items:
- const: core
- const: axi
minItems: 1
patternProperties:
"^(.+-hog(-[0-9]+)?)$":
type: object
required:
- gpio-hog
required:
- compatible
- gpio-controller
- ngpios
- "#gpio-cells"
allOf:
- if:
properties:
compatible:
contains:
const: marvell,armada-8k-gpio
then:
required:
- offset
else:
required:
- reg
unevaluatedProperties: false
examples:
- |
gpio@d0018100 {
compatible = "marvell,armadaxp-gpio", "marvell,orion-gpio";
reg = <0xd0018100 0x40>, <0xd0018800 0x30>;
ngpios = <32>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
interrupts = <16>, <17>, <18>, <19>;
};
- |
gpio@18140 {
compatible = "marvell,armada-370-gpio", "marvell,orion-gpio";
reg = <0x18140 0x40>, <0x181c8 0x08>;
reg-names = "gpio", "pwm";
ngpios = <17>;
gpio-controller;
#gpio-cells = <2>;
#pwm-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
interrupts = <87>, <88>, <89>;
clocks = <&coreclk 0>;
};
@@ -0,0 +1,206 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-mxs.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale MXS GPIO controller
maintainers:
- Shawn Guo <shawnguo@kernel.org>
description: |
The Freescale MXS GPIO controller is part of MXS PIN controller.
The GPIOs are organized in port/bank, each port consists of 32 GPIOs.
As the GPIO controller is embedded in the PIN controller and all the
GPIO ports share the same IO space with PIN controller, the GPIO node
will be represented as sub-nodes of MXS pinctrl node.
properties:
compatible:
items:
- enum:
- fsl,imx23-pinctrl
- fsl,imx28-pinctrl
# Over 10 years old devices, driver use simple-bus to probe child gpio
# Devices. Keep it as it to be compatible existed dts files.
- const: simple-bus
'#address-cells':
const: 1
'#size-cells':
const: 0
reg:
maxItems: 1
patternProperties:
'^(?!gpio@)[^@]+@[0-9]+$':
type: object
properties:
fsl,pinmux-ids:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: |
An integer array. Each integer in the array specify a pin
with given mux function, with bank, pin and mux packed as below.
[15..12] : bank number
[11..4] : pin number
[3..0] : mux selection
This integer with mux selection packed is used as an entity by both group
and config nodes to identify a pin. The mux selection in the integer takes
effects only on group node, and will get ignored by driver with config node,
since config node is only meant to set up pin configurations.
Valid values for these integers are listed below.
reg:
items:
- description: |
pin group index. NOTE: it is supposed wrong use reg property
here. But it is over 10 years devices. Just keep it as it.
fsl,drive-strength:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3]
description: |
0: MXS_DRIVE_4mA
1: MXS_DRIVE_8mA
2: MXS_DRIVE_12mA
3: MXS_DRIVE_16mA
fsl,voltage:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1]
description: |
0: MXS_VOLTAGE_LOW - 1.8 V
1: MXS_VOLTAGE_HIGH - 3.3 V
fsl,pull-up:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1]
description: |
0: MXS_PULL_DISABLE - Disable the internal pull-up
1: MXS_PULL_ENABLE - Enable the internal pull-up
Note that when enabling the pull-up, the internal pad keeper gets disabled.
Also, some pins doesn't have a pull up, in that case, setting the fsl,pull-up
will only disable the internal pad keeper.
required:
- fsl,pinmux-ids
additionalProperties: false
'^gpio@[0-9]+$':
type: object
properties:
compatible:
enum:
- fsl,imx23-gpio
- fsl,imx28-gpio
reg:
maxItems: 1
interrupts:
description: Should be the port interrupt shared by all 32 pins.
maxItems: 1
interrupt-controller: true
'#interrupt-cells':
const: 2
'#gpio-cells':
const: 2
gpio-controller: true
required:
- compatible
- reg
- interrupts
- interrupt-controller
- '#interrupt-cells'
- '#gpio-cells'
- gpio-controller
additionalProperties: false
required:
- compatible
- reg
- '#address-cells'
- '#size-cells'
additionalProperties: false
examples:
- |
pinctrl@80018000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,imx28-pinctrl", "simple-bus";
reg = <0x80018000 0x2000>;
gpio@0 {
compatible = "fsl,imx28-gpio";
reg = <0>;
interrupts = <127>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
gpio@1 {
compatible = "fsl,imx28-gpio";
reg = <1>;
interrupts = <126>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
gpio@2 {
compatible = "fsl,imx28-gpio";
reg = <2>;
interrupts = <125>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
gpio@3 {
compatible = "fsl,imx28-gpio";
reg = <3>;
interrupts = <124>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
gpio@4 {
compatible = "fsl,imx28-gpio";
reg = <4>;
interrupts = <123>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
lcdif-apx4@5 {
reg = <5>;
fsl,pinmux-ids = <0x1181 0x1191>;
fsl,drive-strength = <0>;
fsl,voltage = <0>;
fsl,pull-up = <0>;
};
};
@@ -0,0 +1,233 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-pca95xx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP PCA95xx I2C GPIO multiplexer
maintainers:
- Krzysztof Kozlowski <krzk@kernel.org>
description: |+
Bindings for the family of I2C GPIO multiplexers/expanders: NXP PCA95xx,
Maxim MAX73xx
properties:
compatible:
oneOf:
- items:
- const: toradex,ecgpiol16
- const: nxp,pcal6416
- items:
- const: diodes,pi4ioe5v6534q
- const: nxp,pcal6534
- items:
- enum:
- exar,xra1202
- maxim,max7310
- maxim,max7312
- maxim,max7313
- maxim,max7315
- maxim,max7319
- maxim,max7320
- maxim,max7321
- maxim,max7322
- maxim,max7323
- maxim,max7324
- maxim,max7325
- maxim,max7326
- maxim,max7327
- nxp,pca6408
- nxp,pca6416
- nxp,pca9505
- nxp,pca9506
- nxp,pca9534
- nxp,pca9535
- nxp,pca9536
- nxp,pca9537
- nxp,pca9538
- nxp,pca9539
- nxp,pca9554
- nxp,pca9555
- nxp,pca9556
- nxp,pca9557
- nxp,pca9574
- nxp,pca9575
- nxp,pca9698
- nxp,pcal6408
- nxp,pcal6416
- nxp,pcal6524
- nxp,pcal6534
- nxp,pcal9535
- nxp,pcal9554b
- nxp,pcal9555a
- onnn,cat9554
- onnn,pca9654
- ti,pca6107
- ti,pca9536
- ti,tca6408
- ti,tca6416
- ti,tca6418
- ti,tca6424
- ti,tca9535
- ti,tca9538
- ti,tca9539
- ti,tca9554
- ti,tcal6408
- ti,tcal6416
reg:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
gpio-line-names:
minItems: 1
maxItems: 40
interrupts:
maxItems: 1
interrupt-controller: true
'#interrupt-cells':
const: 2
reset-gpios:
maxItems: 1
description:
GPIO specification for the RESET input. This is an active low signal to
the PCA953x. Not valid for Maxim MAX732x devices.
vcc-supply:
description:
Optional power supply. Not valid for Maxim MAX732x devices.
wakeup-source:
$ref: /schemas/types.yaml#/definitions/flag
patternProperties:
"^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
type: object
required:
- gpio-hog
required:
- compatible
- reg
- gpio-controller
- "#gpio-cells"
additionalProperties: false
allOf:
- if:
properties:
compatible:
contains:
enum:
- maxim,max7320
- maxim,max7321
- maxim,max7322
- maxim,max7323
- maxim,max7324
- maxim,max7325
- maxim,max7326
- maxim,max7327
- toradex,ecgpiol16
then:
properties:
reset-gpios: false
vcc-supply: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
gpio@20 {
compatible = "nxp,pca9505";
reg = <0x20>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pca9505>;
gpio-controller;
#gpio-cells = <2>;
interrupt-parent = <&gpio3>;
interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
usb3-sata-sel-hog {
gpio-hog;
gpios = <4 GPIO_ACTIVE_HIGH>;
output-low;
line-name = "usb3_sata_sel";
};
};
};
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
gpio99: gpio@22 {
compatible = "nxp,pcal6524";
reg = <0x22>;
interrupt-parent = <&gpio6>;
interrupts = <1 IRQ_TYPE_EDGE_FALLING>; /* gpio6_161 */
interrupt-controller;
#interrupt-cells = <2>;
vcc-supply = <&vdds_1v8_main>;
gpio-controller;
#gpio-cells = <2>;
gpio-line-names = "hdmi-ct-hpd", "hdmi.ls-oe", "p02", "p03",
"vibra", "fault2", "p06", "p07", "en-usb",
"en-host1", "en-host2", "chg-int", "p14", "p15",
"mic-int", "en-modem", "shdn-hs-amp",
"chg-status+red", "green", "blue", "en-esata",
"fault1", "p26", "p27";
};
};
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
/* MAX7325 with interrupt support enabled */
gpio@6d {
compatible = "maxim,max7325";
reg = <0x6d>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&gpio4>;
interrupts = <29 IRQ_TYPE_EDGE_FALLING>;
};
};
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
/* MAX7325 with interrupt support disabled */
gpio@6e {
compatible = "maxim,max7325";
reg = <0x6e>;
gpio-controller;
#gpio-cells = <2>;
};
};
@@ -0,0 +1,50 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-rda.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: RDA Micro GPIO controller
maintainers:
- Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
properties:
compatible:
const: rda,8810pl-gpio
reg:
maxItems: 1
gpio-controller: true
"#gpio-cells":
const: 2
ngpios:
description:
Number of available gpios in a bank.
minimum: 1
maximum: 32
interrupt-controller: true
"#interrupt-cells":
const: 2
interrupts:
maxItems: 1
required:
- compatible
- reg
- gpio-controller
- "#gpio-cells"
- ngpios
- interrupt-controller
- "#interrupt-cells"
- interrupts
additionalProperties: false
...
@@ -0,0 +1,99 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-stp-xway.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Lantiq SoC Serial To Parallel (STP) GPIO controller
description: |
The Serial To Parallel (STP) is found on MIPS based Lantiq socs. It is a
peripheral controller used to drive external shift register cascades. At most
3 groups of 8 bits can be driven. The hardware is able to allow the DSL modem
and Ethernet PHYs to drive some bytes of the cascade automatically.
maintainers:
- John Crispin <john@phrozen.org>
properties:
$nodename:
pattern: "^gpio@[0-9a-f]+$"
compatible:
const: lantiq,gpio-stp-xway
reg:
maxItems: 1
gpio-controller: true
"#gpio-cells":
description:
The first cell is the pin number and the second cell is used to specify
consumer flags.
const: 2
lantiq,shadow:
description:
The default value that we shall assume as already set on the
shift register cascade.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0x000000
maximum: 0xffffff
lantiq,groups:
description:
Set the 3 bit mask to select which of the 3 groups are enabled
in the shift register cascade.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0x0
maximum: 0x7
lantiq,dsl:
description:
The dsl core can control the 2 LSBs of the gpio cascade. This 2 bit
property can enable this feature.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0x0
maximum: 0x3
lantiq,rising:
description:
Use rising instead of falling edge for the shift register.
type: boolean
patternProperties:
"^lantiq,phy[1-4]$":
description:
The gphy core can control 3 bits of the gpio cascade. In the xRX200 family
phy[1-2] are available, in xRX330 phy[1-3] and in XRX330 phy[1-4].
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0x0
maximum: 0x7
required:
- compatible
- reg
- gpio-controller
- "#gpio-cells"
additionalProperties: false
examples:
- |
gpio@e100bb0 {
compatible = "lantiq,gpio-stp-xway";
reg = <0xE100BB0 0x40>;
#gpio-cells = <2>;
gpio-controller;
pinctrl-0 = <&stp_pins>;
pinctrl-names = "default";
lantiq,shadow = <0xffffff>;
lantiq,groups = <0x7>;
lantiq,dsl = <0x3>;
lantiq,phy1 = <0x7>;
lantiq,phy2 = <0x7>;
};
...
@@ -0,0 +1,135 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-vf610.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale VF610 PORT/GPIO module
maintainers:
- Stefan Agner <stefan@agner.ch>
description: |
The Freescale PORT/GPIO modules are two adjacent modules providing GPIO
functionality. Each pair serves 32 GPIOs. The VF610 has 5 instances of
each, and each PORT module has its own interrupt.
Note: Each GPIO port should have an alias correctly numbered in "aliases"
node.
properties:
compatible:
oneOf:
- const: fsl,imx8ulp-gpio
- const: fsl,vf610-gpio
- items:
- const: fsl,imx7ulp-gpio
- const: fsl,vf610-gpio
- items:
- enum:
- fsl,imx93-gpio
- fsl,imx94-gpio
- fsl,imx95-gpio
- const: fsl,imx8ulp-gpio
reg:
minItems: 1
maxItems: 2
interrupts:
items:
- description: GPIO Trustzone non-secure interrupt number
- description: GPIO Trustzone secure interrupt number
minItems: 1
interrupt-controller: true
"#interrupt-cells":
const: 2
"#gpio-cells":
const: 2
gpio-controller: true
gpio-line-names:
minItems: 1
maxItems: 32
clocks:
items:
- description: SoC GPIO clock
- description: SoC PORT clock
clock-names:
items:
- const: gpio
- const: port
gpio-ranges:
minItems: 1
maxItems: 4
gpio-reserved-ranges: true
ngpios:
minimum: 1
maximum: 32
default: 32
patternProperties:
"^.+-hog(-[0-9]+)?$":
type: object
required:
- gpio-hog
required:
- compatible
- reg
- interrupts
- interrupt-controller
- "#interrupt-cells"
- "#gpio-cells"
- gpio-controller
allOf:
- if:
properties:
compatible:
contains:
enum:
- fsl,vf610-gpio
- fsl,imx7ulp-gpio
then:
properties:
interrupts:
maxItems: 1
reg:
items:
- description: PORT register base address
- description: GPIO register base address
else:
properties:
interrupts:
minItems: 2
reg:
items:
- description: GPIO register base address
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
gpio1: gpio@40049000 {
compatible = "fsl,vf610-gpio";
reg = <0x40049000 0x1000>, <0x400ff000 0x40>;
interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-ranges = <&iomuxc 0 0 32>;
};
@@ -0,0 +1,59 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-virtio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Virtio GPIO controller
maintainers:
- Viresh Kumar <viresh.kumar@linaro.org>
allOf:
- $ref: /schemas/virtio/virtio-device.yaml#
description:
Virtio GPIO controller, see /schemas/virtio/virtio-device.yaml for more
details.
properties:
$nodename:
const: gpio
compatible:
const: virtio,device29
gpio-controller: true
"#gpio-cells":
const: 2
interrupt-controller: true
"#interrupt-cells":
const: 2
required:
- compatible
- gpio-controller
- "#gpio-cells"
unevaluatedProperties: false
examples:
- |
virtio@3000 {
compatible = "virtio,mmio";
reg = <0x3000 0x100>;
interrupts = <41>;
gpio {
compatible = "virtio,device29";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
};
...
@@ -0,0 +1,127 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-zynq.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Xilinx Zynq GPIO controller
maintainers:
- Michal Simek <michal.simek@amd.com>
properties:
compatible:
enum:
- xlnx,eio-gpio-1.0
- xlnx,pmc-gpio-1.0
- xlnx,versal-gpio-1.0
- xlnx,zynq-gpio-1.0
- xlnx,zynqmp-gpio-1.0
reg:
maxItems: 1
"#gpio-cells":
const: 2
interrupts:
maxItems: 1
gpio-controller: true
gpio-line-names:
description: strings describing the names of each gpio line
minItems: 52
maxItems: 174
interrupt-controller: true
"#interrupt-cells":
const: 2
clocks:
maxItems: 1
power-domains:
maxItems: 1
allOf:
- if:
properties:
compatible:
enum:
- xlnx,zynqmp-gpio-1.0
then:
properties:
gpio-line-names:
minItems: 174
maxItems: 174
- if:
properties:
compatible:
enum:
- xlnx,zynq-gpio-1.0
then:
properties:
gpio-line-names:
minItems: 118
maxItems: 118
- if:
properties:
compatible:
enum:
- xlnx,versal-gpio-1.0
then:
properties:
gpio-line-names:
minItems: 58
maxItems: 58
- if:
properties:
compatible:
enum:
- xlnx,pmc-gpio-1.0
then:
properties:
gpio-line-names:
minItems: 116
maxItems: 116
- if:
properties:
compatible:
enum:
- xlnx,eio-gpio-1.0
then:
properties:
gpio-line-names:
maxItems: 52
required:
- compatible
- reg
- "#gpio-cells"
- interrupts
- gpio-controller
- interrupt-controller
- "#interrupt-cells"
- clocks
additionalProperties: false
examples:
- |
gpio@e000a000 {
#gpio-cells = <2>;
compatible = "xlnx,zynq-gpio-1.0";
clocks = <&clkc 42>;
gpio-controller;
interrupt-parent = <&intc>;
interrupts = <0 20 4>;
interrupt-controller;
#interrupt-cells = <2>;
reg = <0xe000a000 0x1000>;
};
@@ -0,0 +1,348 @@
Specifying GPIO information for devices
=======================================
1) gpios property
-----------------
GPIO properties should be named "[<name>-]gpios", with <name> being the purpose
of this GPIO for the device. While a non-existent <name> is considered valid
for compatibility reasons (resolving to the "gpios" property), it is not allowed
for new bindings. Also, GPIO properties named "[<name>-]gpio" are valid and old
bindings use it, but are only supported for compatibility reasons and should not
be used for newer bindings since it has been deprecated.
GPIO properties can contain one or more GPIO phandles, but only in exceptional
cases should they contain more than one. If your device uses several GPIOs with
distinct functions, reference each of them under its own property, giving it a
meaningful name. The only case where an array of GPIOs is accepted is when
several GPIOs serve the same function (e.g. a parallel data line).
The exact purpose of each gpios property must be documented in the device tree
binding of the device.
The following example could be used to describe GPIO pins used as device enable
and bit-banged data signals:
gpio1: gpio1 {
gpio-controller;
#gpio-cells = <2>;
};
[...]
data-gpios = <&gpio1 12 0>,
<&gpio1 13 0>,
<&gpio1 14 0>,
<&gpio1 15 0>;
In the above example, &gpio1 uses 2 cells to specify a gpio. The first cell is
a local offset to the GPIO line and the second cell represents consumer flags,
such as if the consumer desires the line to be active low (inverted) or open
drain. This is the recommended practice.
The exact meaning of each specifier cell is controller specific, and must be
documented in the device tree binding for the device, but it is strongly
recommended to use the two-cell approach.
Most controllers are specifying a generic flag bitfield in the last cell, so
for these, use the macros defined in
include/dt-bindings/gpio/gpio.h whenever possible:
Example of a node using GPIOs:
node {
enable-gpios = <&qe_pio_e 18 GPIO_ACTIVE_HIGH>;
};
GPIO_ACTIVE_HIGH is 0, so in this example gpio-specifier is "18 0" and encodes
GPIO pin number, and GPIO flags as accepted by the "qe_pio_e" gpio-controller.
Optional standard bitfield specifiers for the last cell:
- Bit 0: 0 means active high, 1 means active low
- Bit 1: 0 means push-pull wiring, see:
https://en.wikipedia.org/wiki/Push-pull_output
1 means single-ended wiring, see:
https://en.wikipedia.org/wiki/Single-ended_triode
- Bit 2: 0 means open-source, 1 means open drain, see:
https://en.wikipedia.org/wiki/Open_collector
- Bit 3: 0 means the output should be maintained during sleep/low-power mode
1 means the output state can be lost during sleep/low-power mode
- Bit 4: 0 means no pull-up resistor should be enabled
1 means a pull-up resistor should be enabled
This setting only applies to hardware with a simple on/off
control for pull-up configuration. If the hardware has more
elaborate pull-up configuration, it should be represented
using a pin control binding.
- Bit 5: 0 means no pull-down resistor should be enabled
1 means a pull-down resistor should be enabled
This setting only applies to hardware with a simple on/off
control for pull-down configuration. If the hardware has more
elaborate pull-down configuration, it should be represented
using a pin control binding.
1.1) GPIO specifier best practices
----------------------------------
A gpio-specifier should contain a flag indicating the GPIO polarity; active-
high or active-low. If it does, the following best practices should be
followed:
The gpio-specifier's polarity flag should represent the physical level at the
GPIO controller that achieves (or represents, for inputs) a logically asserted
value at the device. The exact definition of logically asserted should be
defined by the binding for the device. If the board inverts the signal between
the GPIO controller and the device, then the gpio-specifier will represent the
opposite physical level than the signal at the device's pin.
When the device's signal polarity is configurable, the binding for the
device must either:
a) Define a single static polarity for the signal, with the expectation that
any software using that binding would statically program the device to use
that signal polarity.
The static choice of polarity may be either:
a1) (Preferred) Dictated by a binding-specific DT property.
or:
a2) Defined statically by the DT binding itself.
In particular, the polarity cannot be derived from the gpio-specifier, since
that would prevent the DT from separately representing the two orthogonal
concepts of configurable signal polarity in the device, and possible board-
level signal inversion.
or:
b) Pick a single option for device signal polarity, and document this choice
in the binding. The gpio-specifier should represent the polarity of the signal
(at the GPIO controller) assuming that the device is configured for this
particular signal polarity choice. If software chooses to program the device
to generate or receive a signal of the opposite polarity, software will be
responsible for correctly interpreting (inverting) the GPIO signal at the GPIO
controller.
2) gpio-controller nodes
------------------------
Every GPIO controller node must contain both an empty "gpio-controller"
property, and a #gpio-cells integer property, which indicates the number of
cells in a gpio-specifier.
Some system-on-chips (SoCs) use the concept of GPIO banks. A GPIO bank is an
instance of a hardware IP core on a silicon die, usually exposed to the
programmer as a coherent range of I/O addresses. Usually each such bank is
exposed in the device tree as an individual gpio-controller node, reflecting
the fact that the hardware was synthesized by reusing the same IP block a
few times over.
Optionally, a GPIO controller may have a "ngpios" property. This property
indicates the number of in-use slots of available slots for GPIOs. The
typical example is something like this: the hardware register is 32 bits
wide, but only 18 of the bits have a physical counterpart. The driver is
generally written so that all 32 bits can be used, but the IP block is reused
in a lot of designs, some using all 32 bits, some using 18 and some using
12. In this case, setting "ngpios = <18>;" informs the driver that only the
first 18 GPIOs, at local offset 0 .. 17, are in use.
If these GPIOs do not happen to be the first N GPIOs at offset 0...N-1, an
additional set of tuples is needed to specify which GPIOs are unusable, with
the gpio-reserved-ranges binding. This property indicates the start and size
of the GPIOs that can't be used.
Optionally, a GPIO controller may have a "gpio-line-names" property. This is
an array of strings defining the names of the GPIO lines going out of the
GPIO controller.
For lines which are routed to on-board devices, this name should be
the most meaningful producer name for the system, such as a rail name
indicating the usage. Package names, such as a pin name, are discouraged:
such lines have opaque names (since they are by definition general-purpose)
and such names are usually not very helpful. For example "MMC-CD", "Red LED
Vdd" and "ethernet reset" are reasonable line names as they describe what
the line is used for. "GPIO0" is not a good name to give to a GPIO line
that is hard-wired to a specific device.
However, in the case of lines that are routed to a general purpose header
(e.g. the Raspberry Pi 40-pin header), and therefore are not hard-wired to
specific devices, using a pin number or the names on the header is fine
provided these are real (preferably unique) names. Using an SoC's pad name
or package name, or names made up from kernel-internal software constructs,
are strongly discouraged. For example "pin8 [gpio14/uart0_txd]" is fine
if the board's documentation labels pin 8 as such. However "PortB_24" (an
example of a name from an SoC's reference manual) would not be desirable.
In either case placeholders are discouraged: rather use the "" (blank
string) if the use of the GPIO line is undefined in your design. Ideally,
try to add comments to the dts file describing the naming convention
you have chosen, and specifying from where the names are derived.
The names are assigned starting from line offset 0, from left to right,
from the passed array. An incomplete array (where the number of passed
names is less than ngpios) will be used up until the last provided valid
line index.
Example:
gpio-controller@00000000 {
compatible = "foo";
reg = <0x00000000 0x1000>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <18>;
gpio-reserved-ranges = <0 4>, <12 2>;
gpio-line-names = "MMC-CD", "MMC-WP", "VDD eth", "RST eth", "LED R",
"LED G", "LED B", "Col A", "Col B", "Col C", "Col D",
"Row A", "Row B", "Row C", "Row D", "NMI button",
"poweroff", "reset";
}
The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism
providing automatic GPIO request and configuration as part of the
gpio-controller's driver probe function.
Each GPIO hog definition is represented as a child node of the GPIO controller.
Required properties:
- gpio-hog: A property specifying that this child node represents a GPIO hog.
- gpios: Store the GPIO information (id, flags, ...) for each GPIO to
affect. Shall contain an integer multiple of the number of cells
specified in its parent node (GPIO controller node).
Only one of the following properties scanned in the order shown below.
This means that when multiple properties are present they will be searched
in the order presented below and the first match is taken as the intended
configuration.
- input: A property specifying to set the GPIO direction as input.
- output-low A property specifying to set the GPIO direction as output with
the value low.
- output-high A property specifying to set the GPIO direction as output with
the value high.
Optional properties:
- line-name: The GPIO label name. If not present the node name is used.
Example of two SOC GPIO banks defined as gpio-controller nodes:
qe_pio_a: gpio-controller@1400 {
compatible = "fsl,qe-pario-bank-a", "fsl,qe-pario-bank";
reg = <0x1400 0x18>;
gpio-controller;
#gpio-cells = <2>;
line_b-hog {
gpio-hog;
gpios = <6 0>;
output-low;
line-name = "foo-bar-gpio";
};
};
qe_pio_e: gpio-controller@1460 {
compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank";
reg = <0x1460 0x18>;
gpio-controller;
#gpio-cells = <2>;
};
2.1) gpio- and pin-controller interaction
-----------------------------------------
Some or all of the GPIOs provided by a GPIO controller may be routed to pins
on the package via a pin controller. This allows muxing those pins between
GPIO and other functions. It is a fairly common practice among silicon
engineers.
2.2) Ordinary (numerical) GPIO ranges
-------------------------------------
It is useful to represent which GPIOs correspond to which pins on which pin
controllers. The gpio-ranges property described below represents this with
a discrete set of ranges mapping pins from the pin controller local number space
to pins in the GPIO controller local number space.
The format is: <[pin controller phandle], [GPIO controller offset],
[pin controller offset], [number of pins]>;
The GPIO controller offset pertains to the GPIO controller node containing the
range definition.
The pin controller node referenced by the phandle must conform to the bindings
described in pinctrl/pinctrl-bindings.txt.
Each offset runs from 0 to N. It is perfectly fine to pile any number of
ranges with just one pin-to-GPIO line mapping if the ranges are concocted, but
in practice these ranges are often lumped in discrete sets.
Example:
gpio-ranges = <&foo 0 20 10>, <&bar 10 50 20>;
This means:
- pins 20..29 on pin controller "foo" is mapped to GPIO line 0..9 and
- pins 50..69 on pin controller "bar" is mapped to GPIO line 10..29
Verbose example:
qe_pio_e: gpio-controller@1460 {
#gpio-cells = <2>;
compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank";
reg = <0x1460 0x18>;
gpio-controller;
gpio-ranges = <&pinctrl1 0 20 10>, <&pinctrl2 10 50 20>;
};
Here, a single GPIO controller has GPIOs 0..9 routed to pin controller
pinctrl1's pins 20..29, and GPIOs 10..29 routed to pin controller pinctrl2's
pins 50..69.
2.3) GPIO ranges from named pin groups
--------------------------------------
It is also possible to use pin groups for gpio ranges when pin groups are the
easiest and most convenient mapping.
Both <pinctrl-base> and <count> must be set to 0 when using named pin groups
names.
The property gpio-ranges-group-names must contain exactly one string for each
range.
Elements of gpio-ranges-group-names must contain the name of a pin group
defined in the respective pin controller. The number of pins/GPIO lines in the
range is the number of pins in that pin group. The number of pins of that
group is defined in the implementation and not in the device tree.
If numerical and named pin groups are mixed, the string corresponding to a
numerical pin range in gpio-ranges-group-names must be empty.
Example:
gpio_pio_i: gpio-controller@14b0 {
#gpio-cells = <2>;
compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank";
reg = <0x1480 0x18>;
gpio-controller;
gpio-ranges = <&pinctrl1 0 20 10>,
<&pinctrl2 10 0 0>,
<&pinctrl1 15 0 10>,
<&pinctrl2 25 0 0>;
gpio-ranges-group-names = "",
"foo",
"",
"bar";
};
Here, three GPIO ranges are defined referring to two pin controllers.
pinctrl1 GPIO ranges are defined using pin numbers whereas the GPIO ranges
in pinctrl2 are defined using the pin groups named "foo" and "bar".
Previous versions of this binding required all pin controller nodes that
were referenced by any gpio-ranges property to contain a property named
#gpio-range-cells with value <3>. This requirement is now deprecated.
However, that property may still exist in older device trees for
compatibility reasons, and would still be required even in new device
trees that need to be compatible with older software.
@@ -0,0 +1,56 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/hisilicon,ascend910-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: HiSilicon common GPIO controller
maintainers:
- Jay Fang <f.fangjian@huawei.com>
description:
The HiSilicon common GPIO controller can be used for many different
types of SoC such as Huawei Ascend AI series chips.
properties:
compatible:
const: hisilicon,ascend910-gpio
reg:
maxItems: 1
interrupts:
maxItems: 1
gpio-controller: true
"#gpio-cells":
const: 2
ngpios:
minimum: 1
maximum: 32
required:
- compatible
- reg
- interrupts
- gpio-controller
- "#gpio-cells"
- ngpios
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
gpio@840d0000 {
compatible = "hisilicon,ascend910-gpio";
reg = <0x840d0000 0x1000>;
ngpios = <32>;
gpio-controller;
#gpio-cells = <2>;
interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
};
@@ -0,0 +1,67 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/idt,32434-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: IDT 79RC32434 GPIO controller
maintainers:
- Thomas Bogendoerfer <tsbogend@alpha.franken.de>
properties:
compatible:
const: idt,32434-gpio
reg:
maxItems: 2
reg-names:
items:
- const: gpio
- const: pic
gpio-controller: true
"#gpio-cells":
const: 2
ngpios:
minimum: 1
maximum: 32
interrupt-controller: true
"#interrupt-cells":
const: 2
interrupts:
maxItems: 1
required:
- compatible
- reg
- reg-names
- gpio-controller
- "#gpio-cells"
additionalProperties: false
examples:
- |
gpio0: gpio@50004 {
compatible = "idt,32434-gpio";
reg = <0x50004 0x10>, <0x38030 0x0c>;
reg-names = "gpio", "pic";
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&cpuintc>;
interrupts = <6>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <14>;
};
@@ -0,0 +1,73 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/intel,ixp4xx-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Intel IXP4xx XScale Networking Processors GPIO Controller
description: |
This GPIO controller is found in the Intel IXP4xx
processors. It supports 16 GPIO lines.
The interrupt portions of the GPIO controller is hierarchical.
The synchronous edge detector is part of the GPIO block, but the
actual enabling/disabling of the interrupt line is done in the
main IXP4xx interrupt controller which has a 1-to-1 mapping for
the first 12 GPIO lines to 12 system interrupts.
The remaining 4 GPIO lines can not be used for receiving
interrupts.
The interrupt parent of this GPIO controller must be the
IXP4xx interrupt controller.
GPIO 14 and 15 can be used as clock outputs rather than GPIO,
and this can be enabled by a special flag.
maintainers:
- Linus Walleij <linusw@kernel.org>
properties:
compatible:
const: intel,ixp4xx-gpio
reg:
maxItems: 1
gpio-controller: true
"#gpio-cells":
const: 2
interrupt-controller: true
"#interrupt-cells":
const: 2
intel,ixp4xx-gpio14-clkout:
description: If defined, enables clock output on GPIO 14
instead of GPIO.
type: boolean
intel,ixp4xx-gpio15-clkout:
description: If defined, enables clock output on GPIO 15
instead of GPIO.
type: boolean
required:
- compatible
- reg
- "#gpio-cells"
- interrupt-controller
- "#interrupt-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
gpio@c8004000 {
compatible = "intel,ixp4xx-gpio";
reg = <0xc8004000 0x1000>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
@@ -0,0 +1,54 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/kontron,sl28cpld-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: GPIO driver for the sl28cpld board management controller
maintainers:
- Michael Walle <michael@walle.cc>
description: |
This module is part of the sl28cpld multi-function device. For more
details see ../embedded-controller/kontron,sl28cpld.yaml.
There are three flavors of the GPIO controller, one full featured
input/output with interrupt support (kontron,sl28cpld-gpio), one
output-only (kontron,sl28-gpo) and one input-only (kontron,sl28-gpi).
Each controller supports 8 GPIO lines.
properties:
compatible:
enum:
- kontron,sl28cpld-gpio
- kontron,sl28cpld-gpi
- kontron,sl28cpld-gpo
reg:
maxItems: 1
interrupts:
maxItems: 1
"#interrupt-cells":
const: 2
interrupt-controller: true
"#gpio-cells":
const: 2
gpio-controller: true
gpio-line-names:
minItems: 1
maxItems: 8
required:
- compatible
- "#gpio-cells"
- gpio-controller
additionalProperties: false
@@ -0,0 +1,60 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/lacie,netxbig-gpio-ext.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NetxBig GPIO extension bus
maintainers:
- Simon Guinot <simon.guinot@sequanux.org>
description: >
GPIO extension bus found on some LaCie/Seagate boards
(Example: 2Big/5Big Network v2, 2Big NAS).
properties:
compatible:
items:
- const: lacie,netxbig-gpio-ext
addr-gpios:
description: GPIOs representing the address register (LSB->MSB).
items:
- description: bit 0 (LSB)
- description: bit 1
- description: bit 2 (MSB)
data-gpios:
description: GPIOs representing the data register (LSB->MSB).
items:
- description: bit 0 (LSB)
- description: bit 1
- description: bit 2 (MSB)
enable-gpio:
description: Latches the new configuration (address, data) on raising edge.
maxItems: 1
required:
- compatible
- addr-gpios
- data-gpios
- enable-gpio
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
gpio {
compatible = "lacie,netxbig-gpio-ext";
addr-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH
&gpio1 16 GPIO_ACTIVE_HIGH
&gpio1 17 GPIO_ACTIVE_HIGH>;
data-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH
&gpio1 13 GPIO_ACTIVE_HIGH
&gpio1 14 GPIO_ACTIVE_HIGH>;
enable-gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>;
};
@@ -0,0 +1,54 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/lantiq,gpio-mm-lantiq.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Lantiq SoC External Bus memory mapped GPIO controller
maintainers:
- John Crispin <john@phrozen.org>
description: |
By attaching hardware latches to the EBU it is possible to create output
only gpios. This driver configures a special memory address, which when
written to outputs 16 bit to the latches.
The node describing the memory mapped GPIOs needs to be a child of the node
describing the "lantiq,localbus".
properties:
compatible:
enum:
- lantiq,gpio-mm-lantiq
- lantiq,gpio-mm
reg:
maxItems: 1
'#gpio-cells':
const: 2
gpio-controller: true
lantiq,shadow:
description: The default value that we shall assume as already set on the shift register cascade.
$ref: /schemas/types.yaml#/definitions/uint32
required:
- compatible
- reg
- '#gpio-cells'
- gpio-controller
additionalProperties: false
examples:
- |
gpio@4000000 {
compatible = "lantiq,gpio-mm-lantiq";
reg = <0x4000000 0x10>;
gpio-controller;
#gpio-cells = <2>;
lantiq,shadow = <0x77f>;
};
@@ -0,0 +1,168 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/loongson,ls-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Loongson GPIO controller.
maintainers:
- Yinbo Zhu <zhuyinbo@loongson.cn>
properties:
compatible:
oneOf:
- enum:
- loongson,ls2k-gpio
- loongson,ls2k0300-gpio
- loongson,ls2k0500-gpio0
- loongson,ls2k0500-gpio1
- loongson,ls2k2000-gpio0
- loongson,ls2k2000-gpio1
- loongson,ls2k2000-gpio2
- loongson,ls3a5000-gpio
- loongson,ls3a6000-gpio # Loongson-3A6000 node GPIO
- loongson,ls7a-gpio
- loongson,ls7a2000-gpio1 # LS7A2000 chipset GPIO
- loongson,ls7a2000-gpio2 # LS7A2000 ACPI GPIO
- items:
- const: loongson,ls2k1000-gpio
- const: loongson,ls2k-gpio
- items:
- const: loongson,ls7a1000-gpio
- const: loongson,ls7a-gpio
reg:
maxItems: 1
ngpios:
minimum: 1
maximum: 128
"#gpio-cells":
const: 2
gpio-controller: true
gpio-ranges: true
interrupts:
minItems: 1
maxItems: 64
"#interrupt-cells":
const: 2
interrupt-controller: true
resets:
maxItems: 1
required:
- compatible
- reg
- ngpios
- "#gpio-cells"
- gpio-controller
- gpio-ranges
- interrupts
allOf:
- if:
properties:
compatible:
contains:
const: loongson,ls2k0300-gpio
then:
required:
- "#interrupt-cells"
- interrupt-controller
- resets
else:
properties:
"#interrupts-cells": false
interrupt-controller: false
resets: false
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
gpio0: gpio@1fe00500 {
compatible = "loongson,ls2k1000-gpio", "loongson,ls2k-gpio";
reg = <0x1fe00500 0x38>;
ngpios = <64>;
#gpio-cells = <2>;
gpio-controller;
gpio-ranges = <&pctrl 0 0 15>,
<&pctrl 16 16 15>,
<&pctrl 32 32 10>,
<&pctrl 44 44 20>;
interrupt-parent = <&liointc1>;
interrupts = <28 IRQ_TYPE_LEVEL_LOW>,
<29 IRQ_TYPE_LEVEL_LOW>,
<30 IRQ_TYPE_LEVEL_LOW>,
<30 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<>,
<>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>,
<27 IRQ_TYPE_LEVEL_LOW>;
};
@@ -0,0 +1,43 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/lsi,zevio-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Zevio GPIO controller
maintainers:
- Pratik Farkase <pratikfarkase94@gmail.com>
properties:
compatible:
items:
- const: lsi,zevio-gpio
reg:
maxItems: 1
interrupts:
maxItems: 1
"#gpio-cells":
const: 2
gpio-controller: true
required:
- compatible
- reg
- "#gpio-cells"
- gpio-controller
unevaluatedProperties: false
examples:
- |
gpio@90000000 {
compatible = "lsi,zevio-gpio";
reg = <0x90000000 0x1000>;
gpio-controller;
#gpio-cells = <2>;
};
@@ -0,0 +1,104 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/maxim,max31910.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim MAX3191x GPIO serializer
maintainers:
- Lukas Wunner <lukas@wunner.de>
properties:
compatible:
enum:
- maxim,max31910
- maxim,max31911
- maxim,max31912
- maxim,max31913
- maxim,max31953
- maxim,max31963
reg:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
'#daisy-chained-devices':
description: Number of chips in the daisy-chain.
default: 1
maxim,modesel-gpios:
description:
GPIO pins to configure modesel of each chip. The number of GPIOs must
equal "#daisy-chained-devices" (if each chip is driven by a separate pin)
or 1 (if all chips are wired to the same pin).
maxim,fault-gpios:
description:
GPIO pins to read fault of each chip. The number of GPIOs must equal
"#daisy-chained-devices" or 1.
maxim,db0-gpios:
description:
GPIO pins to configure debounce of each chip. The number of GPIOs must
equal "#daisy-chained-devices" or 1.
maxim,db1-gpios:
description:
GPIO pins to configure debounce of each chip. The number of GPIOs must
equal "maxim,db0-gpios".
maxim,modesel-8bit:
description:
Boolean whether the modesel pin of the chips is pulled high (8-bit mode).
Use this if the modesel pin is hardwired and consequently
"maxim,modesel-gpios" cannot be specified. By default if neither this nor
"maxim,modesel-gpios" is given, the driver assumes that modesel is pulled
low (16-bit mode).
type: boolean
maxim,ignore-undervoltage:
description:
Boolean whether to ignore undervoltage alarms signaled by the
"maxim,fault-gpios" or by the status byte (in 16-bit mode). Use this if
the chips are powered through 5VOUT instead of VCC24V, in which case they
will constantly signal undervoltage.
type: boolean
required:
- compatible
- reg
- gpio-controller
- '#gpio-cells'
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
gpio@0 {
compatible = "maxim,max31913";
reg = <0>;
gpio-controller;
#gpio-cells = <2>;
maxim,modesel-gpios = <&gpio2 23>;
maxim,fault-gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
maxim,db0-gpios = <&gpio2 25>;
maxim,db1-gpios = <&gpio2 26>;
spi-max-frequency = <25000000>;
};
};
@@ -0,0 +1,83 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/maxim,max7360-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim MAX7360 GPIO controller
maintainers:
- Kamel Bouhara <kamel.bouhara@bootlin.com>
- Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
description: |
Maxim MAX7360 GPIO controller, in MAX7360 chipset
https://www.analog.com/en/products/max7360.html
The device provides two series of GPIOs, referred here as GPIOs and GPOs.
PORT0 to PORT7 pins can be used as GPIOs, with support for interrupts and
constant-current mode. These pins will also be used by the rotary encoder and
PWM functionalities.
COL2 to COL7 pins can be used as GPOs, there is no input capability. COL pins
will be partitioned, with the first pins being affected to the keypad
functionality and the last ones as GPOs.
properties:
compatible:
enum:
- maxim,max7360-gpio
- maxim,max7360-gpo
gpio-controller: true
"#gpio-cells":
const: 2
interrupt-controller: true
"#interrupt-cells":
const: 2
maxim,constant-current-disable:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Bit field, each bit disables constant-current output of the associated
GPIO, starting from the least significant bit for the first GPIO.
maximum: 0xff
required:
- compatible
- gpio-controller
allOf:
- if:
properties:
compatible:
contains:
enum:
- maxim,max7360-gpio
ngpios: false
then:
required:
- interrupt-controller
else:
properties:
interrupt-controller: false
maxim,constant-current-disable: false
additionalProperties: false
examples:
- |
gpio {
compatible = "maxim,max7360-gpio";
gpio-controller;
#gpio-cells = <2>;
maxim,constant-current-disable = <0x06>;
interrupt-controller;
#interrupt-cells = <2>;
};
@@ -0,0 +1,44 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/maxim,max77759-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim Integrated MAX77759 GPIO
maintainers:
- André Draszik <andre.draszik@linaro.org>
description: |
This module is part of the MAX77759 PMIC. For additional information, see
Documentation/devicetree/bindings/mfd/maxim,max77759.yaml.
The MAX77759 is a PMIC integrating, amongst others, a GPIO controller
including interrupt support for 2 GPIO lines.
properties:
compatible:
const: maxim,max77759-gpio
"#gpio-cells":
const: 2
gpio-controller: true
gpio-line-names:
minItems: 1
maxItems: 2
"#interrupt-cells":
const: 2
interrupt-controller: true
required:
- compatible
- "#gpio-cells"
- gpio-controller
- "#interrupt-cells"
- interrupt-controller
additionalProperties: false
@@ -0,0 +1,72 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/mediatek,mt7621-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Mediatek MT7621 SoC GPIO controller
maintainers:
- Sergio Paracuellos <sergio.paracuellos@gmail.com>
description: |
The IP core used inside these SoCs has 3 banks of 32 GPIOs each.
The registers of all the banks are interwoven inside one single IO range.
We load one GPIO controller instance per bank. Also the GPIO controller can receive
interrupts on any of the GPIOs, either edge or level. It then interrupts the CPU
using GIC INT12.
properties:
$nodename:
pattern: "^gpio@[0-9a-f]+$"
compatible:
const: mediatek,mt7621-gpio
reg:
maxItems: 1
"#gpio-cells":
const: 2
gpio-controller: true
gpio-ranges: true
interrupt-controller: true
"#interrupt-cells":
const: 2
interrupts:
maxItems: 1
required:
- compatible
- reg
- "#gpio-cells"
- gpio-controller
- gpio-ranges
- interrupt-controller
- "#interrupt-cells"
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/mips-gic.h>
gpio@600 {
compatible = "mediatek,mt7621-gpio";
reg = <0x600 0x100>;
#gpio-cells = <2>;
gpio-controller;
gpio-ranges = <&pinctrl 0 0 95>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&gic>;
interrupts = <GIC_SHARED 12 IRQ_TYPE_LEVEL_HIGH>;
};
...
@@ -0,0 +1,108 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/microchip,mpfs-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip MPFS GPIO Controller
maintainers:
- Conor Dooley <conor.dooley@microchip.com>
properties:
compatible:
oneOf:
- items:
- const: microchip,pic64gx-gpio
- const: microchip,mpfs-gpio
- enum:
- microchip,mpfs-gpio
- microchip,coregpio-rtl-v3
reg:
maxItems: 1
interrupts:
description:
Interrupt mapping, one per GPIO. Maximum 32 GPIOs.
minItems: 1
maxItems: 32
interrupt-controller: true
clocks:
maxItems: 1
resets:
maxItems: 1
"#gpio-cells":
const: 2
"#interrupt-cells":
const: 2
ngpios:
description:
The number of GPIOs available.
minimum: 1
maximum: 32
default: 32
gpio-controller: true
gpio-line-names: true
patternProperties:
"^.+-hog(-[0-9]+)?$":
type: object
required:
- gpio-hog
allOf:
- if:
properties:
compatible:
contains:
const: microchip,mpfs-gpio
then:
properties:
ngpios:
enum: [14, 24, 32]
interrupts:
minItems: 14
required:
- interrupts
- "#interrupt-cells"
- interrupt-controller
required:
- compatible
- reg
- "#gpio-cells"
- gpio-controller
- clocks
additionalProperties: false
examples:
- |
gpio@20122000 {
compatible = "microchip,mpfs-gpio";
reg = <0x20122000 0x1000>;
clocks = <&clkcfg 25>;
interrupt-parent = <&irqmux>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <32>;
interrupt-controller;
#interrupt-cells = <2>;
interrupts = <64>, <65>, <66>, <67>,
<68>, <69>, <70>, <71>,
<72>, <73>, <74>, <75>,
<76>, <77>, <78>, <79>,
<80>, <81>, <82>, <83>,
<84>, <85>, <86>, <87>,
<88>, <89>, <90>, <91>,
<92>, <93>, <94>, <95>;
};
...
@@ -0,0 +1,71 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/microchip,pic32mzda-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip PIC32 GPIO controller
maintainers:
- Joshua Henderson <joshua.henderson@microchip.com>
- Purna Chandra Mandal <purna.mandal@microchip.com>
properties:
compatible:
const: microchip,pic32mzda-gpio
reg:
maxItems: 1
gpio-controller: true
gpio-ranges: true
"#gpio-cells":
const: 2
interrupts:
maxItems: 1
interrupt-controller: true
"#interrupt-cells":
const: 2
clocks:
maxItems: 1
microchip,gpio-bank:
description: Bank index owned by the controller
$ref: /schemas/types.yaml#/definitions/uint32
required:
- compatible
- reg
- gpio-controller
- gpio-ranges
- "#gpio-cells"
- interrupts
- interrupt-controller
- "#interrupt-cells"
- clocks
- microchip,gpio-bank
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
gpio@1f860000 {
compatible = "microchip,pic32mzda-gpio";
reg = <0x1f860000 0x100>;
interrupts = <118 IRQ_TYPE_LEVEL_HIGH>;
#gpio-cells = <2>;
gpio-controller;
interrupt-controller;
#interrupt-cells = <2>;
clocks = <&rootclk 11>;
microchip,gpio-bank = <0>;
gpio-ranges = <&pic32_pinctrl 0 0 16>;
};
@@ -0,0 +1,172 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/mrvl-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Marvell PXA GPIO controller
maintainers:
- Linus Walleij <linusw@kernel.org>
- Bartosz Golaszewski <bgolaszewski@baylibre.com>
- Rob Herring <robh@kernel.org>
allOf:
- if:
properties:
compatible:
contains:
enum:
- intel,pxa25x-gpio
- intel,pxa26x-gpio
- intel,pxa27x-gpio
- intel,pxa3xx-gpio
then:
properties:
interrupts:
minItems: 3
maxItems: 3
interrupt-names:
items:
- const: gpio0
- const: gpio1
- const: gpio_mux
- if:
properties:
compatible:
contains:
enum:
- marvell,mmp-gpio
- marvell,mmp2-gpio
then:
properties:
interrupts:
maxItems: 1
interrupt-names:
items:
- const: gpio_mux
properties:
$nodename:
pattern: '^gpio@[0-9a-f]+$'
compatible:
enum:
- intel,pxa25x-gpio
- intel,pxa26x-gpio
- intel,pxa27x-gpio
- intel,pxa3xx-gpio
- marvell,mmp-gpio
- marvell,mmp2-gpio
- marvell,pxa93x-gpio
reg:
maxItems: 1
clocks:
maxItems: 1
resets:
maxItems: 1
ranges: true
'#address-cells':
const: 1
'#size-cells':
const: 1
gpio-controller: true
'#gpio-cells':
const: 2
gpio-ranges: true
interrupts: true
interrupt-names: true
interrupt-controller: true
'#interrupt-cells':
const: 2
patternProperties:
'^gpio@[0-9a-f]*$':
type: object
properties:
reg:
maxItems: 1
required:
- reg
additionalProperties: false
required:
- compatible
- '#address-cells'
- '#size-cells'
- reg
- gpio-controller
- '#gpio-cells'
- interrupts
- interrupt-names
- interrupt-controller
- '#interrupt-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/pxa-clock.h>
gpio@40e00000 {
compatible = "intel,pxa3xx-gpio";
#address-cells = <1>;
#size-cells = <1>;
reg = <0x40e00000 0x10000>;
gpio-controller;
#gpio-cells = <2>;
interrupts = <8>, <9>, <10>;
interrupt-names = "gpio0", "gpio1", "gpio_mux";
clocks = <&clks CLK_GPIO>;
interrupt-controller;
#interrupt-cells = <2>;
};
- |
#include <dt-bindings/clock/marvell,pxa910.h>
gpio@d4019000 {
compatible = "marvell,mmp-gpio";
#address-cells = <1>;
#size-cells = <1>;
reg = <0xd4019000 0x1000>;
gpio-controller;
#gpio-cells = <2>;
interrupts = <49>;
interrupt-names = "gpio_mux";
clocks = <&soc_clocks PXA910_CLK_GPIO>;
resets = <&soc_clocks PXA910_CLK_GPIO>;
interrupt-controller;
#interrupt-cells = <2>;
ranges;
gpio@d4019000 {
reg = <0xd4019000 0x4>;
};
gpio@d4019004 {
reg = <0xd4019004 0x4>;
};
gpio@d4019008 {
reg = <0xd4019008 0x4>;
};
gpio@d4019100 {
reg = <0xd4019100 0x4>;
};
};
...
@@ -0,0 +1,61 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/mstar,msc313-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MStar/SigmaStar GPIO controller
maintainers:
- Daniel Palmer <daniel@thingy.jp>
properties:
$nodename:
pattern: "^gpio@[0-9a-f]+$"
compatible:
enum:
- mstar,msc313-gpio
- sstar,ssd20xd-gpio
reg:
maxItems: 1
gpio-controller: true
"#gpio-cells":
const: 2
gpio-ranges: true
interrupt-controller: true
"#interrupt-cells":
const: 2
required:
- compatible
- reg
- gpio-controller
- "#gpio-cells"
- interrupt-controller
- "#interrupt-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/msc313-gpio.h>
gpio: gpio@207800 {
compatible = "mstar,msc313-gpio";
#gpio-cells = <2>;
reg = <0x207800 0x200>;
gpio-controller;
gpio-ranges = <&pinctrl 0 36 22>,
<&pinctrl 22 63 4>,
<&pinctrl 26 68 6>;
#interrupt-cells = <2>;
interrupt-controller;
interrupt-parent = <&intc_fiq>;
};
@@ -0,0 +1,87 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/nuvoton,sgpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nuvoton SGPIO controller
maintainers:
- Jim LIU <JJLIU0@nuvoton.com>
description: |
This SGPIO controller is for NUVOTON NPCM7xx and NPCM8xx SoC and detailed
information is in the NPCM7XX/8XX SERIAL I/O EXPANSION INTERFACE section.
Nuvoton NPCM7xx SGPIO module is combines a serial to parallel IC (HC595)
and a parallel to serial IC (HC165).
Clock is a division of the APB3 clock.
This interface has 4 pins (D_out , D_in, S_CLK, LDSH).
NPCM7xx/NPCM8xx have two sgpio modules. Each module can support up
to 64 output pins, and up to 64 input pins, the pin is only for GPI or GPO.
GPIO pins can be programmed to support the following options
- Support interrupt option for each input port and various interrupt
sensitivity options (level-high, level-low, edge-high, edge-low)
- ngpios is number of nuvoton,input-ngpios GPIO lines and nuvoton,output-ngpios GPIO lines.
nuvoton,input-ngpios GPIO lines is only for GPI.
nuvoton,output-ngpios GPIO lines is only for GPO.
properties:
compatible:
enum:
- nuvoton,npcm750-sgpio
- nuvoton,npcm845-sgpio
reg:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
interrupts:
maxItems: 1
clocks:
maxItems: 1
nuvoton,input-ngpios:
$ref: /schemas/types.yaml#/definitions/uint32
description:
The numbers of GPIO's exposed. GPIO lines are only for GPI.
minimum: 0
maximum: 64
nuvoton,output-ngpios:
$ref: /schemas/types.yaml#/definitions/uint32
description:
The numbers of GPIO's exposed. GPIO lines are only for GPO.
minimum: 0
maximum: 64
required:
- compatible
- reg
- gpio-controller
- '#gpio-cells'
- interrupts
- nuvoton,input-ngpios
- nuvoton,output-ngpios
- clocks
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/nuvoton,npcm7xx-clock.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
gpio8: gpio@101000 {
compatible = "nuvoton,npcm750-sgpio";
reg = <0x101000 0x200>;
clocks = <&clk NPCM7XX_CLK_APB3>;
interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
nuvoton,input-ngpios = <64>;
nuvoton,output-ngpios = <64>;
};
@@ -0,0 +1,247 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/nvidia,tegra186-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra GPIO Controller (Tegra186 and later)
maintainers:
- Thierry Reding <thierry.reding@gmail.com>
- Jon Hunter <jonathanh@nvidia.com>
description: |
Tegra186 contains two GPIO controllers; a main controller and an "AON"
controller. This binding document applies to both controllers. The register
layouts for the controllers share many similarities, but also some
significant differences. Hence, this document describes closely related but
different bindings and compatible values.
The Tegra186 GPIO controller allows software to set the IO direction of,
and read/write the value of, numerous GPIO signals. Routing of GPIO signals
to package balls is under the control of a separate pin controller hardware
block. Two major sets of registers exist:
a) Security registers, which allow configuration of allowed access to the
GPIO register set. These registers exist in a single contiguous block
of physical address space. The size of this block, and the security
features available, varies between the different GPIO controllers.
Access to this set of registers is not necessary in all circumstances.
Code that wishes to configure access to the GPIO registers needs access
to these registers to do so. Code which simply wishes to read or write
GPIO data does not need access to these registers.
b) GPIO registers, which allow manipulation of the GPIO signals. In some
GPIO controllers, these registers are exposed via multiple "physical
aliases" in address space, each of which access the same underlying
state. See the hardware documentation for rationale. Any particular
GPIO client is expected to access just one of these physical aliases.
Tegra HW documentation describes a unified naming convention for all GPIOs
implemented by the SoC. Each GPIO is assigned to a port, and a port may
control a number of GPIOs. Thus, each GPIO is named according to an
alphabetical port name and an integer GPIO name within the port. For
example, GPIO_PA0, GPIO_PN6, or GPIO_PCC3.
The number of ports implemented by each GPIO controller varies. The number
of implemented GPIOs within each port varies. GPIO registers within a
controller are grouped and laid out according to the port they affect.
The mapping from port name to the GPIO controller that implements that
port, and the mapping from port name to register offset within a
controller, are both extremely non-linear. The header file
<dt-bindings/gpio/tegra186-gpio.h> describes the port-level mapping. In
that file, the naming convention for ports matches the HW documentation.
The values chosen for the names are alphabetically sorted within a
particular controller. Drivers need to map between the DT GPIO IDs and HW
register offsets using a lookup table.
Each GPIO controller can generate a number of interrupt signals. Each
signal represents the aggregate status for all GPIOs within a set of
ports. Thus, the number of interrupt signals generated by a controller
varies as a rough function of the number of ports it implements. Note
that the HW documentation refers to both the overall controller HW
module and the sets-of-ports as "controllers".
Each GPIO controller in fact generates multiple interrupts signals for
each set of ports. Each GPIO may be configured to feed into a specific
one of the interrupt signals generated by a set-of-ports. The intent is
for each generated signal to be routed to a different CPU, thus allowing
different CPUs to each handle subsets of the interrupts within a port.
The status of each of these per-port-set signals is reported via a
separate register. Thus, a driver needs to know which status register to
observe. This binding currently defines no configuration mechanism for
this. By default, drivers should use register
GPIO_${port}_INTERRUPT_STATUS_G1_0. Future revisions to the binding could
define a property to configure this.
properties:
compatible:
enum:
- nvidia,tegra186-gpio
- nvidia,tegra186-gpio-aon
- nvidia,tegra194-gpio
- nvidia,tegra194-gpio-aon
- nvidia,tegra234-gpio
- nvidia,tegra234-gpio-aon
- nvidia,tegra238-gpio
- nvidia,tegra238-gpio-aon
- nvidia,tegra256-gpio
- nvidia,tegra264-gpio
- nvidia,tegra264-gpio-uphy
- nvidia,tegra264-gpio-aon
reg-names:
items:
- const: security
- const: gpio
minItems: 1
reg:
items:
- description: Security configuration registers.
- description: |
GPIO control registers. This may cover either:
a) The single physical alias that this OS should use.
b) All physical aliases that exist in the controller. This is
appropriate when the OS is responsible for managing assignment
of the physical aliases.
minItems: 1
interrupts:
description: The interrupt outputs from the HW block, one per set of
ports, in the order the HW manual describes them. The number of entries
required varies depending on compatible value.
wakeup-parent:
description: Phandle to the parent interrupt controller used for wake-up. On
Tegra, this typically references the PMC interrupt controller.
gpio-controller: true
gpio-ranges:
maxItems: 1
"#gpio-cells":
description: |
Indicates how many cells are used in a consumer's GPIO specifier. In the
specifier:
- The first cell is the pin number.
See <dt-bindings/gpio/tegra186-gpio.h>.
- The second cell contains flags:
- Bit 0 specifies polarity
- 0: Active-high (normal).
- 1: Active-low (inverted).
const: 2
interrupt-controller: true
"#interrupt-cells":
description: |
Indicates how many cells are used in a consumer's interrupt specifier.
In the specifier:
- The first cell is the GPIO number.
See <dt-bindings/gpio/tegra186-gpio.h>.
- The second cell is contains flags:
- Bits [3:0] indicate trigger type and level:
- 1: Low-to-high edge triggered.
- 2: High-to-low edge triggered.
- 4: Active high level-sensitive.
- 8: Active low level-sensitive.
Valid combinations are 1, 2, 3, 4, 8.
const: 2
allOf:
- if:
properties:
compatible:
contains:
enum:
- nvidia,tegra186-gpio
- nvidia,tegra194-gpio
- nvidia,tegra234-gpio
- nvidia,tegra238-gpio
- nvidia,tegra256-gpio
- nvidia,tegra264-gpio
- nvidia,tegra264-gpio-uphy
then:
properties:
interrupts:
minItems: 6
maxItems: 48
- if:
properties:
compatible:
contains:
enum:
- nvidia,tegra186-gpio-aon
- nvidia,tegra194-gpio-aon
- nvidia,tegra234-gpio-aon
- nvidia,tegra238-gpio-aon
- nvidia,tegra264-gpio-aon
then:
properties:
interrupts:
minItems: 1
maxItems: 4
- if:
properties:
compatible:
contains:
enum:
- nvidia,tegra238-gpio
- nvidia,tegra238-gpio-aon
- nvidia,tegra264-gpio
- nvidia,tegra264-gpio-uphy
- nvidia,tegra264-gpio-aon
then:
required:
- wakeup-parent
required:
- compatible
- reg
- reg-names
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
gpio@2200000 {
compatible = "nvidia,tegra186-gpio";
reg-names = "security", "gpio";
reg = <0x2200000 0x10000>,
<0x2210000 0x10000>;
interrupts = <0 47 IRQ_TYPE_LEVEL_HIGH>,
<0 50 IRQ_TYPE_LEVEL_HIGH>,
<0 53 IRQ_TYPE_LEVEL_HIGH>,
<0 56 IRQ_TYPE_LEVEL_HIGH>,
<0 59 IRQ_TYPE_LEVEL_HIGH>,
<0 180 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
gpio@c2f0000 {
compatible = "nvidia,tegra186-gpio-aon";
reg-names = "security", "gpio";
reg = <0xc2f0000 0x1000>,
<0xc2f1000 0x1000>;
interrupts = <0 60 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
@@ -0,0 +1,110 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/nvidia,tegra20-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra GPIO Controller (Tegra20 - Tegra210)
maintainers:
- Thierry Reding <thierry.reding@gmail.com>
- Jon Hunter <jonathanh@nvidia.com>
properties:
compatible:
oneOf:
- enum:
- nvidia,tegra20-gpio
- nvidia,tegra30-gpio
- items:
- enum:
- nvidia,tegra114-gpio
- nvidia,tegra124-gpio
- nvidia,tegra210-gpio
- const: nvidia,tegra30-gpio
reg:
maxItems: 1
interrupts:
description: The interrupt outputs from the controller. For Tegra20,
there should be 7 interrupts specified, and for Tegra30, there should
be 8 interrupts specified.
"#gpio-cells":
description: The first cell is the pin number and the second cell is used
to specify the GPIO polarity (0 = active high, 1 = active low).
const: 2
gpio-controller: true
gpio-ranges:
maxItems: 1
"#interrupt-cells":
description: |
Should be 2. The first cell is the GPIO number. The second cell is
used to specify flags:
bits[3:0] trigger type and level flags:
1 = low-to-high edge triggered.
2 = high-to-low edge triggered.
4 = active high level-sensitive.
8 = active low level-sensitive.
Valid combinations are 1, 2, 3, 4, 8.
const: 2
interrupt-controller: true
allOf:
- if:
properties:
compatible:
contains:
const: nvidia,tegra30-gpio
then:
properties:
interrupts:
minItems: 8
maxItems: 8
else:
properties:
interrupts:
minItems: 7
maxItems: 7
required:
- compatible
- reg
- interrupts
- "#gpio-cells"
- gpio-controller
- "#interrupt-cells"
- interrupt-controller
additionalProperties:
type: object
required:
- gpio-hog
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
gpio: gpio@6000d000 {
compatible = "nvidia,tegra20-gpio";
reg = <0x6000d000 0x1000>;
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
#gpio-cells = <2>;
gpio-controller;
#interrupt-cells = <2>;
interrupt-controller;
};
@@ -0,0 +1,78 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/nxp,lpc1850-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP LPC18xx/43xx GPIO controller
maintainers:
- Frank Li <Frank.Li@nxp.com>
properties:
compatible:
const: nxp,lpc1850-gpio
reg:
minItems: 1
maxItems: 4
reg-names:
minItems: 1
items:
- const: gpio
- const: gpio-pin-ic
- const: gpio-group0-ic
- const: gpio-gpoup1-ic
clocks:
maxItems: 1
resets:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
interrupt-controller: true
'#interrupt-cells':
const: 2
description: |
- The first cell is an interrupt number within
0..9 range, for GPIO pin interrupts it is equal
to 'nxp,gpio-pin-interrupt' property value of
GPIO pin configuration, 8 is for GPIO GROUP0
interrupt, 9 is for GPIO GROUP1 interrupt
- The second cell is used to specify interrupt type
gpio-ranges: true
required:
- compatible
- reg
- clocks
- gpio-controller
- '#gpio-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/lpc18xx-ccu.h>
gpio@400f4000 {
compatible = "nxp,lpc1850-gpio";
reg = <0x400f4000 0x4000>, <0x40087000 0x1000>,
<0x40088000 0x1000>, <0x40089000 0x1000>;
reg-names = "gpio", "gpio-pin-ic", "gpio-group0-ic", "gpio-gpoup1-ic";
clocks = <&ccu1 CLK_CPU_GPIO>;
resets = <&rgu 28>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
@@ -0,0 +1,50 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/nxp,lpc3220-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP LPC3220 SoC GPIO controller
maintainers:
- Animesh Agarwal <animeshagarwal28@gmail.com>
properties:
compatible:
const: nxp,lpc3220-gpio
reg:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 3
description: |
1) bank:
0: GPIO P0
1: GPIO P1
2: GPIO P2
3: GPIO P3
4: GPI P3
5: GPO P3
2) pin number
3) flags:
- bit 0 specifies polarity (0 for normal, 1 for inverted)
required:
- compatible
- reg
- gpio-controller
- '#gpio-cells'
additionalProperties: false
examples:
- |
gpio@40028000 {
compatible = "nxp,lpc3220-gpio";
reg = <0x40028000 0x1000>;
gpio-controller;
#gpio-cells = <3>; /* bank, pin, flags */
};
@@ -0,0 +1,144 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/nxp,pcf8575.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: PCF857x-compatible I/O expanders
maintainers:
- Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
description:
The PCF857x-compatible chips have "quasi-bidirectional" I/O lines that can be
driven high by a pull-up current source or driven low to ground. This
combines the direction and output level into a single bit per line, which
can't be read back. We can't actually know at initialization time whether a
line is configured (a) as output and driving the signal low/high, or (b) as
input and reporting a low/high value, without knowing the last value written
since the chip came out of reset (if any). The only reliable solution for
setting up line direction is thus to do it explicitly.
properties:
compatible:
enum:
- maxim,max7328
- maxim,max7329
- nxp,pca8574
- nxp,pca8575
- nxp,pca9670
- nxp,pca9671
- nxp,pca9672
- nxp,pca9673
- nxp,pca9674
- nxp,pca9675
- nxp,pcf8574
- nxp,pcf8574a
- nxp,pcf8575
reg:
maxItems: 1
gpio-line-names:
minItems: 1
maxItems: 16
gpio-controller: true
'#gpio-cells':
const: 2
description:
The first cell is the GPIO number and the second cell specifies GPIO
flags, as defined in <dt-bindings/gpio/gpio.h>. Only the GPIO_ACTIVE_HIGH
and GPIO_ACTIVE_LOW flags are supported.
lines-initial-states:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Bitmask that specifies the initial state of each line.
When a bit is set to zero, the corresponding line will be initialized to
the input (pulled-up) state.
When the bit is set to one, the line will be initialized to the
low-level output state.
If the property is not specified all lines will be initialized to the
input state.
interrupts:
maxItems: 1
interrupt-controller: true
'#interrupt-cells':
const: 2
wakeup-source: true
reset-gpios:
maxItems: 1
description:
GPIO controlling the (reset active LOW) RESET# pin.
The active polarity of the GPIO must translate to the low state of the
RESET# pin on the IC, i.e. if a GPIO is directly routed to the RESET# pin
without any inverter, GPIO_ACTIVE_LOW is expected.
Performing a reset makes all lines initialized to their input (pulled-up)
state.
allOf:
- if:
properties:
compatible:
not:
contains:
enum:
- nxp,pca9670
- nxp,pca9671
- nxp,pca9672
- nxp,pca9673
then:
properties:
reset-gpios: false
# lines-initial-states XOR reset-gpios
# Performing a reset reinitializes all lines to a known state which
# may not match passed lines-initial-states
- if:
required:
- lines-initial-states
then:
properties:
reset-gpios: false
patternProperties:
"^(.+-hog(-[0-9]+)?)$":
type: object
required:
- gpio-hog
required:
- compatible
- reg
- gpio-controller
- '#gpio-cells'
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
gpio@20 {
compatible = "nxp,pcf8575";
reg = <0x20>;
interrupt-parent = <&irqpin2>;
interrupts = <3 0>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
};
@@ -0,0 +1,59 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/pin-control-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Pin control based generic GPIO controller
description:
The pin control-based GPIO will facilitate a pin controller's ability
to drive electric lines high/low and other generic properties of a
pin controller to perform general-purpose one-bit binary I/O.
maintainers:
- Dan Carpenter <dan.carpenter@linaro.org>
properties:
compatible:
const: scmi-pinctrl-gpio
gpio-controller: true
"#gpio-cells":
const: 2
gpio-line-names: true
gpio-ranges: true
ngpios: true
patternProperties:
"^.+-hog(-[0-9]+)?$":
type: object
required:
- gpio-hog
required:
- compatible
- gpio-controller
- "#gpio-cells"
- gpio-ranges
- ngpios
additionalProperties: false
examples:
- |
gpio {
compatible = "scmi-pinctrl-gpio";
gpio-controller;
#gpio-cells = <2>;
ngpios = <4>;
gpio-line-names = "gpio_5_17", "gpio_5_20", "gpio_5_22", "gpio_2_1";
gpio-ranges = <&scmi_pinctrl 0 30 4>;
pinctrl-names = "default";
pinctrl-0 = <&keys_pins>;
};
@@ -0,0 +1,67 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/pisosr-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Generic Parallel-in/Serial-out Shift Register GPIO Driver
description:
This binding describes generic parallel-in/serial-out shift register
devices that can be used for GPI (General Purpose Input). This includes
SN74165 serial-out shift registers and the SN65HVS88x series of
industrial serializers.
maintainers:
- Frank Li <Frank.Li@nxp.com>
properties:
compatible:
enum:
- pisosr-gpio
gpio-controller: true
'#gpio-cells':
const: 2
ngpios:
maximum: 32
default: 8
load-gpios:
description:
GPIO pin specifier attached to load enable, this
pin is pulsed before reading from the device to
load input pin values into the device.
spi-cpol: true
required:
- compatible
- gpio-controller
- '#gpio-cells'
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
gpio@0 {
compatible = "pisosr-gpio";
reg = <0>;
gpio-controller;
#gpio-cells = <2>;
load-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
spi-max-frequency = <1000000>;
spi-cpol;
};
};
@@ -0,0 +1,69 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/pl061-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ARM PL061 GPIO controller
maintainers:
- Linus Walleij <linusw@kernel.org>
- Rob Herring <robh@kernel.org>
# We need a select here so we don't match all nodes with 'arm,primecell'
select:
properties:
compatible:
contains:
const: arm,pl061
required:
- compatible
properties:
$nodename:
pattern: "^gpio@[0-9a-f]+$"
compatible:
items:
- const: arm,pl061
- const: arm,primecell
reg:
maxItems: 1
interrupts:
oneOf:
- maxItems: 1
- maxItems: 8
interrupt-controller: true
"#interrupt-cells":
const: 2
clocks:
maxItems: 1
clock-names: true
"#gpio-cells":
const: 2
gpio-controller: true
gpio-line-names: true
gpio-ranges:
minItems: 1
maxItems: 8
required:
- compatible
- reg
- clocks
- "#gpio-cells"
- gpio-controller
additionalProperties: false
...
@@ -0,0 +1,60 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/qca,ar7100-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Atheros AR7xxx/AR9xxx GPIO controller
maintainers:
- Alban Bedel <albeu@free.fr>
properties:
compatible:
oneOf:
- items:
- const: qca,ar9132-gpio
- const: qca,ar7100-gpio
- enum:
- qca,ar7100-gpio
- qca,ar9340-gpio
reg:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
ngpios: true
interrupts:
maxItems: 1
interrupt-controller: true
'#interrupt-cells':
const: 2
required:
- compatible
- reg
- gpio-controller
- '#gpio-cells'
- ngpios
additionalProperties: false
examples:
- |
gpio@18040000 {
compatible = "qca,ar9132-gpio", "qca,ar7100-gpio";
reg = <0x18040000 0x30>;
interrupts = <2>;
ngpios = <22>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
@@ -0,0 +1,47 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/qcom,wcd934x-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: WCD9340/WCD9341 GPIO controller
maintainers:
- Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
description: |
Qualcomm Technologies Inc WCD9340/WCD9341 Audio Codec has integrated
gpio controller to control 5 gpios on the chip.
properties:
compatible:
enum:
- qcom,wcd9340-gpio
- qcom,wcd9341-gpio
reg:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
required:
- compatible
- reg
- gpio-controller
- "#gpio-cells"
additionalProperties: false
examples:
- |
wcdgpio: gpio@42 {
compatible = "qcom,wcd9340-gpio";
reg = <0x042 0x2>;
gpio-controller;
#gpio-cells = <2>;
};
...
@@ -0,0 +1,109 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/realtek,otto-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Realtek Otto GPIO controller
maintainers:
- Sander Vanheule <sander@svanheule.net>
- Bert Vermeulen <bert@biot.com>
description: |
Realtek's GPIO controller on their MIPS switch SoCs (Otto platform) consists
of two banks of 32 GPIOs. These GPIOs can generate edge-triggered interrupts.
Each bank's interrupts are cascased into one interrupt line on the parent
interrupt controller, if provided.
This binding allows defining a single bank in the devicetree. The interrupt
controller is not supported on the fallback compatible name, which only
allows for GPIO port use.
properties:
$nodename:
pattern: "^gpio@[0-9a-f]+$"
compatible:
items:
- enum:
- realtek,rtl8380-gpio
- realtek,rtl8390-gpio
- realtek,rtl9300-gpio
- realtek,rtl9310-gpio
- realtek,rtl9607-gpio
- const: realtek,otto-gpio
reg: true
"#gpio-cells":
const: 2
gpio-controller: true
ngpios:
minimum: 1
maximum: 32
interrupt-controller: true
"#interrupt-cells":
const: 2
interrupts:
maxItems: 1
if:
properties:
compatible:
contains:
const: realtek,rtl9300-gpio
then:
properties:
reg:
items:
- description: GPIO and interrupt control
- description: interrupt CPU map
else:
properties:
reg:
items:
- description: GPIO and interrupt control
required:
- compatible
- reg
- "#gpio-cells"
- gpio-controller
additionalProperties: false
dependencies:
interrupt-controller: [ interrupts ]
examples:
- |
gpio@3500 {
compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio";
reg = <0x3500 0x1c>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <24>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&rtlintc>;
interrupts = <23>;
};
- |
gpio@3300 {
compatible = "realtek,rtl9300-gpio", "realtek,otto-gpio";
reg = <0x3300 0x1c>, <0x3338 0x8>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <24>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&rtlintc>;
interrupts = <13>;
};
...
@@ -0,0 +1,69 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2023 Realtek Semiconductor Corporation
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/realtek,rtd-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Realtek DHC GPIO controller
maintainers:
- Tzuyi Chang <tychang@realtek.com>
description:
The GPIO controller is designed for the Realtek DHC (Digital Home Center)
RTD series SoC family, which are high-definition media processor SoCs.
properties:
compatible:
enum:
- realtek,rtd1295-misc-gpio
- realtek,rtd1295-iso-gpio
- realtek,rtd1315e-iso-gpio
- realtek,rtd1319-iso-gpio
- realtek,rtd1319d-iso-gpio
- realtek,rtd1395-iso-gpio
- realtek,rtd1619-iso-gpio
- realtek,rtd1619b-iso-gpio
reg:
items:
- description: GPIO controller registers
- description: GPIO interrupt registers
interrupts:
items:
- description: Interrupt number of the assert GPIO interrupt, which is
triggered when there is a rising edge.
- description: Interrupt number of the deassert GPIO interrupt, which is
triggered when there is a falling edge.
gpio-ranges: true
gpio-controller: true
"#gpio-cells":
const: 2
required:
- compatible
- reg
- interrupts
- gpio-ranges
- gpio-controller
- "#gpio-cells"
additionalProperties: false
examples:
- |
gpio@100 {
compatible = "realtek,rtd1319d-iso-gpio";
reg = <0x100 0x100>,
<0x0 0xb0>;
interrupt-parent = <&iso_irq_mux>;
interrupts = <19>, <20>;
gpio-ranges = <&pinctrl 0 0 82>;
gpio-controller;
#gpio-cells = <2>;
};
@@ -0,0 +1,70 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/renesas,em-gio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Renesas EMMA Mobile General Purpose I/O Interface
maintainers:
- Magnus Damm <magnus.damm@gmail.com>
properties:
compatible:
const: renesas,em-gio
reg:
items:
- description: First set of contiguous registers
- description: Second set of contiguous registers
interrupts:
items:
- description: Interrupt for the first set of 16 GPIO ports
- description: Interrupt for the second set of 16 GPIO ports
gpio-controller: true
'#gpio-cells':
const: 2
gpio-ranges:
maxItems: 1
ngpios:
minimum: 1
maximum: 32
interrupt-controller: true
'#interrupt-cells':
const: 2
required:
- compatible
- reg
- interrupts
- gpio-controller
- '#gpio-cells'
- gpio-ranges
- ngpios
- interrupt-controller
- '#interrupt-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
gpio0: gpio@e0050000 {
compatible = "renesas,em-gio";
reg = <0xe0050000 0x2c>, <0xe0050040 0x20>;
interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pfc 0 0 32>;
ngpios = <32>;
interrupt-controller;
#interrupt-cells = <2>;
};
@@ -0,0 +1,153 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/renesas,rcar-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Renesas R-Car General-Purpose Input/Output Ports (GPIO)
maintainers:
- Geert Uytterhoeven <geert+renesas@glider.be>
properties:
compatible:
oneOf:
- items:
- enum:
- renesas,gpio-r8a7778 # R-Car M1
- renesas,gpio-r8a7779 # R-Car H1
- const: renesas,rcar-gen1-gpio # R-Car Gen1
- items:
- enum:
- renesas,gpio-r8a7742 # RZ/G1H
- renesas,gpio-r8a7743 # RZ/G1M
- renesas,gpio-r8a7744 # RZ/G1N
- renesas,gpio-r8a7745 # RZ/G1E
- renesas,gpio-r8a77470 # RZ/G1C
- renesas,gpio-r8a7790 # R-Car H2
- renesas,gpio-r8a7791 # R-Car M2-W
- renesas,gpio-r8a7792 # R-Car V2H
- renesas,gpio-r8a7793 # R-Car M2-N
- renesas,gpio-r8a7794 # R-Car E2
- const: renesas,rcar-gen2-gpio # R-Car Gen2 or RZ/G1
- items:
- enum:
- renesas,gpio-r8a774a1 # RZ/G2M
- renesas,gpio-r8a774b1 # RZ/G2N
- renesas,gpio-r8a774c0 # RZ/G2E
- renesas,gpio-r8a774e1 # RZ/G2H
- renesas,gpio-r8a7795 # R-Car H3
- renesas,gpio-r8a7796 # R-Car M3-W
- renesas,gpio-r8a77961 # R-Car M3-W+
- renesas,gpio-r8a77965 # R-Car M3-N
- renesas,gpio-r8a77970 # R-Car V3M
- renesas,gpio-r8a77980 # R-Car V3H
- renesas,gpio-r8a77990 # R-Car E3
- renesas,gpio-r8a77995 # R-Car D3
- const: renesas,rcar-gen3-gpio # R-Car Gen3 or RZ/G2
- items:
- enum:
- renesas,gpio-r8a779a0 # R-Car V3U
- renesas,gpio-r8a779f0 # R-Car S4-8
- renesas,gpio-r8a779g0 # R-Car V4H
- renesas,gpio-r8a779h0 # R-Car V4M
- const: renesas,rcar-gen4-gpio # R-Car Gen4
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
power-domains:
maxItems: 1
resets:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
interrupt-controller: true
'#interrupt-cells':
const: 2
gpio-ranges:
maxItems: 1
gpio-reserved-ranges:
minItems: 1
maxItems: 8
patternProperties:
"^.*$":
if:
type: object
then:
properties:
gpio-hog: true
gpios: true
input: true
output-high: true
output-low: true
line-name: true
required:
- gpio-hog
- gpios
additionalProperties: false
required:
- compatible
- reg
- interrupts
- gpio-controller
- '#gpio-cells'
- gpio-ranges
- interrupt-controller
- '#interrupt-cells'
if:
not:
properties:
compatible:
contains:
enum:
- renesas,rcar-gen1-gpio
then:
required:
- clocks
- power-domains
- resets
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/r8a77470-cpg-mssr.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/r8a77470-sysc.h>
gpio3: gpio@e6053000 {
compatible = "renesas,gpio-r8a77470", "renesas,rcar-gen2-gpio";
reg = <0xe6053000 0x50>;
interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 909>;
power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
resets = <&cpg 909>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pfc 0 96 30>;
gpio-reserved-ranges = <17 10>;
interrupt-controller;
#interrupt-cells = <2>;
};
@@ -0,0 +1,99 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/rockchip,gpio-bank.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Rockchip GPIO bank
maintainers:
- Heiko Stuebner <heiko@sntech.de>
properties:
compatible:
enum:
- rockchip,gpio-bank
- rockchip,rk3188-gpio-bank0
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
minItems: 1
items:
- description: APB interface clock source
- description: GPIO debounce reference clock source
gpio-ranges: true
gpio-controller: true
gpio-line-names: true
"#gpio-cells":
const: 2
interrupt-controller: true
"#interrupt-cells":
const: 2
power-domains:
maxItems: 1
patternProperties:
"^.+-hog(-[0-9]+)?$":
type: object
required:
- gpio-hog
required:
- compatible
- reg
- interrupts
- clocks
- gpio-controller
- "#gpio-cells"
- interrupt-controller
- "#interrupt-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
pinctrl: pinctrl {
#address-cells = <1>;
#size-cells = <1>;
ranges;
gpio0: gpio@2000a000 {
compatible = "rockchip,rk3188-gpio-bank0";
reg = <0x2000a000 0x100>;
interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk_gates8 9>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
gpio1: gpio@2003c000 {
compatible = "rockchip,gpio-bank";
reg = <0x2003c000 0x100>;
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk_gates8 10>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
};
@@ -0,0 +1,93 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/sifive,gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: SiFive GPIO controller
maintainers:
- Paul Walmsley <paul.walmsley@sifive.com>
properties:
compatible:
items:
- enum:
- sifive,fu540-c000-gpio
- sifive,fu740-c000-gpio
- canaan,k210-gpiohs
- const: sifive,gpio0
reg:
maxItems: 1
interrupts:
description:
Interrupt mapping, one per GPIO. Maximum 32 GPIOs.
minItems: 1
maxItems: 32
interrupt-controller: true
"#interrupt-cells":
const: 2
clocks:
maxItems: 1
"#gpio-cells":
const: 2
ngpios:
description:
The number of GPIOs available on the controller implementation.
It is 16 for the SiFive SoCs and 32 for the Canaan K210.
minimum: 1
maximum: 32
default: 16
gpio-line-names:
minItems: 1
maxItems: 32
gpio-controller: true
required:
- compatible
- reg
- interrupts
- interrupt-controller
- "#interrupt-cells"
- "#gpio-cells"
- gpio-controller
if:
properties:
compatible:
contains:
enum:
- sifive,fu540-c000-gpio
- sifive,fu740-c000-gpio
then:
required:
- clocks
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/sifive-fu540-prci.h>
gpio@10060000 {
compatible = "sifive,fu540-c000-gpio", "sifive,gpio0";
interrupt-parent = <&plic>;
interrupts = <7>, <8>, <9>, <10>, <11>, <12>, <13>, <14>, <15>, <16>,
<17>, <18>, <19>, <20>, <21>, <22>;
reg = <0x10060000 0x1000>;
clocks = <&tlclk FU540_PRCI_CLK_TLCLK>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
...
@@ -0,0 +1,151 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/snps,dw-apb-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Synopsys DesignWare APB GPIO controller
description: |
Synopsys DesignWare GPIO controllers have a configurable number of ports,
each of which are intended to be represented as child nodes with the generic
GPIO-controller properties as described in this bindings file.
maintainers:
- Hoan Tran <hoan@os.amperecomputing.com>
- Serge Semin <fancer.lancer@gmail.com>
properties:
$nodename:
pattern: "^gpio@[0-9a-f]+$"
compatible:
const: snps,dw-apb-gpio
"#address-cells":
const: 1
"#size-cells":
const: 0
reg:
maxItems: 1
clocks:
minItems: 1
items:
- description: APB interface clock source
- description: DW GPIO debounce reference clock source
clock-names:
minItems: 1
items:
- const: bus
- const: db
resets:
maxItems: 1
patternProperties:
"^gpio-(port|controller)@[0-9a-f]+$":
type: object
properties:
compatible:
const: snps,dw-apb-gpio-port
reg:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
gpio-line-names:
minItems: 1
maxItems: 32
gpio-ranges: true
ngpios:
default: 32
minimum: 1
maximum: 32
snps,nr-gpios:
description: The number of GPIO pins exported by the port.
deprecated: true
$ref: /schemas/types.yaml#/definitions/uint32
default: 32
minimum: 1
maximum: 32
interrupts:
description: |
The interrupts to the parent controller raised when GPIOs generate
the interrupts. If the controller provides one combined interrupt
for all GPIOs, specify a single interrupt. If the controller provides
one interrupt for each GPIO, provide a list of interrupts that
correspond to each of the GPIO pins.
minItems: 1
maxItems: 32
interrupt-controller: true
'#interrupt-cells':
const: 2
patternProperties:
"^.+-hog(-[0-9]+)?$":
type: object
required:
- gpio-hog
required:
- compatible
- reg
- gpio-controller
- '#gpio-cells'
dependencies:
interrupt-controller: [ interrupts ]
additionalProperties: false
additionalProperties: false
required:
- compatible
- reg
- '#address-cells'
- '#size-cells'
examples:
- |
gpio: gpio@20000 {
compatible = "snps,dw-apb-gpio";
reg = <0x20000 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
porta: gpio-port@0 {
compatible = "snps,dw-apb-gpio-port";
reg = <0>;
gpio-controller;
#gpio-cells = <2>;
snps,nr-gpios = <8>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&vic1>;
interrupts = <0>;
};
portb: gpio-port@1 {
compatible = "snps,dw-apb-gpio-port";
reg = <1>;
gpio-controller;
#gpio-cells = <2>;
snps,nr-gpios = <8>;
};
};
...
@@ -0,0 +1,101 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/socionext,uniphier-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: UniPhier GPIO controller
maintainers:
- Masahiro Yamada <yamada.masahiro@socionext.com>
properties:
$nodename:
pattern: "^gpio@[0-9a-f]+$"
compatible:
const: socionext,uniphier-gpio
reg:
maxItems: 1
gpio-controller: true
"#gpio-cells":
const: 2
interrupt-controller: true
"#interrupt-cells":
description: |
The first cell defines the interrupt number.
The second cell bits[3:0] is used to specify trigger type as follows:
1 = low-to-high edge triggered
2 = high-to-low edge triggered
4 = active high level-sensitive
8 = active low level-sensitive
Valid combinations are 1, 2, 3, 4, 8.
const: 2
ngpios:
minimum: 0
maximum: 512
gpio-ranges: true
gpio-ranges-group-names: true
socionext,interrupt-ranges:
description: |
Specifies an interrupt number mapping between this GPIO controller and
its interrupt parent, in the form of arbitrary number of
<child-interrupt-base parent-interrupt-base length> triplets.
$ref: /schemas/types.yaml#/definitions/uint32-matrix
patternProperties:
"^.+-hog(-[0-9]+)?$":
type: object
required:
- gpio-hog
required:
- compatible
- reg
- gpio-controller
- "#gpio-cells"
- interrupt-controller
- "#interrupt-cells"
- ngpios
- gpio-ranges
- socionext,interrupt-ranges
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/gpio/uniphier-gpio.h>
gpio: gpio@55000000 {
compatible = "socionext,uniphier-gpio";
reg = <0x55000000 0x200>;
interrupt-parent = <&aidet>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl 0 0 0>;
gpio-ranges-group-names = "gpio_range";
ngpios = <248>;
socionext,interrupt-ranges = <0 48 16>, <16 154 5>, <21 217 3>;
};
// Consumer:
// Please note UNIPHIER_GPIO_PORT(29, 4) represents PORT294 in the SoC
// document. Unfortunately, only the one's place is octal in the port
// numbering. (That is, PORT 8, 9, 18, 19, 28, 29, ... do not exist.)
// UNIPHIER_GPIO_PORT() is a helper macro to calculate 29 * 8 + 4.
sdhci0_pwrseq {
compatible = "mmc-pwrseq-emmc";
reset-gpios = <&gpio UNIPHIER_GPIO_PORT(29, 4) GPIO_ACTIVE_LOW>;
};
@@ -0,0 +1,48 @@
GPIO controller on CE4100 / Sodaville SoCs
==========================================
The bindings for CE4100's GPIO controller match the generic description
which is covered by the gpio.txt file in this folder.
The only additional property is the intel,muxctl property which holds the
value which is written into the MUXCNTL register.
There is no compatible property for now because the driver is probed via
PCI id (vendor 0x8086 device 0x2e67).
The interrupt specifier consists of two cells encoded as follows:
- <1st cell>: The interrupt-number that identifies the interrupt source.
- <2nd cell>: The level-sense information, encoded as follows:
4 - active high level-sensitive
8 - active low level-sensitive
Example of the GPIO device and one user:
pcigpio: gpio@b,1 {
/* two cells for GPIO and interrupt */
#gpio-cells = <2>;
#interrupt-cells = <2>;
compatible = "pci8086,2e67.2",
"pci8086,2e67",
"pciclassff0000",
"pciclassff00";
reg = <0x15900 0x0 0x0 0x0 0x0>;
/* Interrupt line of the gpio device */
interrupts = <15 1>;
/* It is an interrupt and GPIO controller itself */
interrupt-controller;
gpio-controller;
intel,muxctl = <0>;
};
testuser@20 {
compatible = "example,testuser";
/* User the 11th GPIO line as an active high triggered
* level interrupt
*/
interrupts = <11 8>;
interrupt-parent = <&pcigpio>;
/* Use this GPIO also with the gpio functions */
gpios = <&pcigpio 11 0>;
};
@@ -0,0 +1,98 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/spacemit,k1-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: SpacemiT K1 GPIO controller
maintainers:
- Yixun Lan <dlan@gentoo.org>
description:
The controller's registers are organized as sets of eight 32-bit
registers with each set of port controlling 32 pins. A single
interrupt line is shared for all of the pins by the controller.
properties:
$nodename:
pattern: "^gpio@[0-9a-f]+$"
compatible:
enum:
- spacemit,k1-gpio
- spacemit,k3-gpio
reg:
maxItems: 1
clocks:
items:
- description: GPIO Core Clock
- description: GPIO Bus Clock
clock-names:
items:
- const: core
- const: bus
resets:
maxItems: 1
gpio-controller: true
"#gpio-cells":
const: 3
description:
The first two cells are the GPIO bank index and offset inside the bank,
the third cell should specify GPIO flag.
gpio-ranges: true
interrupts:
maxItems: 1
interrupt-controller: true
"#interrupt-cells":
const: 3
description:
The first two cells are the GPIO bank index and offset inside the bank,
the third cell should specify interrupt flag. The controller does not
support level interrupts, so flags of IRQ_TYPE_LEVEL_HIGH,
IRQ_TYPE_LEVEL_LOW should not be used.
Refer <dt-bindings/interrupt-controller/irq.h> for valid flags.
required:
- compatible
- reg
- clocks
- clock-names
- gpio-controller
- "#gpio-cells"
- interrupts
- interrupt-controller
- "#interrupt-cells"
- gpio-ranges
additionalProperties: false
examples:
- |
gpio@d4019000 {
compatible = "spacemit,k1-gpio";
reg = <0xd4019000 0x800>;
clocks = <&ccu 9>, <&ccu 61>;
clock-names = "core", "bus";
gpio-controller;
#gpio-cells = <3>;
interrupts = <58>;
interrupt-controller;
interrupt-parent = <&plic>;
#interrupt-cells = <3>;
gpio-ranges = <&pinctrl 0 0 0 32>,
<&pinctrl 1 0 32 32>,
<&pinctrl 2 0 64 32>,
<&pinctrl 3 0 96 32>;
};
...
@@ -0,0 +1,124 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright 2022 Unisoc Inc.
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/sprd,gpio-eic.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Unisoc EIC controller
maintainers:
- Orson Zhai <orsonzhai@gmail.com>
- Baolin Wang <baolin.wang7@gmail.com>
- Chunyan Zhang <zhang.lyra@gmail.com>
description: |
The EIC is the abbreviation of external interrupt controller, which can
be used only in input mode. The Spreadtrum platform has 2 EIC controllers,
one is in digital chip, and another one is in PMIC. The digital chip EIC
controller contains 4 sub-modules, i.e. EIC-debounce, EIC-latch, EIC-async and
EIC-sync. But the PMIC EIC controller contains only one EIC-debounce sub-
module.
The EIC-debounce sub-module provides up to 8 source input signal
connections. A debounce mechanism is used to capture the input signals'
stable status (millisecond resolution) and a single-trigger mechanism
is introduced into this sub-module to enhance the input event detection
reliability. In addition, this sub-module's clock can be shut off
automatically to reduce power dissipation. Moreover the debounce range
is from 1ms to 4s with a step size of 1ms. The input signal will be
ignored if it is asserted for less than 1 ms.
The EIC-latch sub-module is used to latch some special power down signals
and generate interrupts, since the EIC-latch does not depend on the APB
clock to capture signals.
The EIC-async sub-module uses a 32kHz clock to capture the short signals
(microsecond resolution) to generate interrupts by level or edge trigger.
The EIC-sync is similar with GPIO's input function, which is a synchronized
signal input register. It can generate interrupts by level or edge trigger
when detecting input signals.
properties:
compatible:
oneOf:
- enum:
- sprd,sc9860-eic-debounce
- sprd,sc9860-eic-latch
- sprd,sc9860-eic-async
- sprd,sc9860-eic-sync
- sprd,sc2731-eic
- items:
- enum:
- sprd,ums512-eic-debounce
- const: sprd,sc9860-eic-debounce
- items:
- enum:
- sprd,ums512-eic-latch
- const: sprd,sc9860-eic-latch
- items:
- enum:
- sprd,ums512-eic-async
- const: sprd,sc9860-eic-async
- items:
- enum:
- sprd,ums512-eic-sync
- const: sprd,sc9860-eic-sync
- items:
- enum:
- sprd,sc2730-eic
- const: sprd,sc2731-eic
reg:
minItems: 1
maxItems: 3
description:
EIC controller can support maximum 3 banks which has its own
address base.
gpio-controller: true
"#gpio-cells":
const: 2
interrupt-controller: true
"#interrupt-cells":
const: 2
interrupts:
maxItems: 1
description:
The interrupt shared by all GPIO lines for this controller.
required:
- compatible
- reg
- gpio-controller
- "#gpio-cells"
- interrupt-controller
- "#interrupt-cells"
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
soc {
#address-cells = <2>;
#size-cells = <2>;
eic_debounce: gpio@40210000 {
compatible = "sprd,sc9860-eic-debounce";
reg = <0 0x40210000 0 0x80>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
};
};
...
@@ -0,0 +1,75 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright 2022 Unisoc Inc.
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/sprd,gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Unisoc GPIO controller
maintainers:
- Orson Zhai <orsonzhai@gmail.com>
- Baolin Wang <baolin.wang7@gmail.com>
- Chunyan Zhang <zhang.lyra@gmail.com>
description: |
The controller's registers are organized as sets of sixteen 16-bit
registers with each set controlling a bank of up to 16 pins. A single
interrupt is shared for all of the banks handled by the controller.
properties:
compatible:
oneOf:
- const: sprd,sc9860-gpio
- items:
- enum:
- sprd,ums512-gpio
- const: sprd,sc9860-gpio
reg:
maxItems: 1
gpio-controller: true
"#gpio-cells":
const: 2
interrupt-controller: true
"#interrupt-cells":
const: 2
interrupts:
maxItems: 1
description: The interrupt shared by all GPIO lines for this controller.
required:
- compatible
- reg
- gpio-controller
- "#gpio-cells"
- interrupt-controller
- "#interrupt-cells"
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
soc {
#address-cells = <2>;
#size-cells = <2>;
ap_gpio: gpio@40280000 {
compatible = "sprd,sc9860-gpio";
reg = <0 0x40280000 0 0x1000>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
};
};
...
@@ -0,0 +1,96 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/st,nomadik-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nomadik GPIO controller
description:
The Nomadik GPIO driver handles Nomadik SoC GPIO blocks. This block has also
been called ST STA2X11. On the Nomadik platform, this driver is intertwined
with pinctrl-nomadik.
maintainers:
- Linus Walleij <linusw@kernel.org>
properties:
$nodename:
pattern: "^gpio@[0-9a-f]+$"
compatible:
enum:
- st,nomadik-gpio
- mobileye,eyeq5-gpio
reg:
maxItems: 1
interrupts:
maxItems: 1
"#gpio-cells":
const: 2
gpio-controller: true
interrupt-controller: true
"#interrupt-cells":
const: 2
gpio-bank:
description: System-wide GPIO bank index.
$ref: /schemas/types.yaml#/definitions/uint32
st,supports-sleepmode:
description: Whether the controller can sleep or not.
$ref: /schemas/types.yaml#/definitions/flag
clocks:
maxItems: 1
gpio-ranges:
maxItems: 1
ngpios:
minimum: 0
maximum: 32
resets:
maxItems: 1
required:
- compatible
- reg
- interrupts
- "#gpio-cells"
- gpio-controller
- interrupt-controller
- gpio-bank
unevaluatedProperties: false
allOf:
- if:
properties:
compatible:
contains:
const: mobileye,eyeq5-gpio
then:
properties:
st,supports-sleepmode: false
examples:
- |
gpio@8012e080 {
compatible = "st,nomadik-gpio";
reg = <0x8012e080 0x80>;
interrupts = <0 120 0x4>;
#gpio-cells = <2>;
gpio-controller;
#interrupt-cells = <2>;
interrupt-controller;
st,supports-sleepmode;
gpio-bank = <1>;
};
@@ -0,0 +1,82 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/st,spear-spics-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ST Microelectronics SPEAr SPI CS GPIO Controller
maintainers:
- Viresh Kumar <vireshk@kernel.org>
description: >
SPEAr platform provides a provision to control chipselects of ARM PL022 Prime
Cell spi controller through its system registers, which otherwise remains
under PL022 control. If chipselect remain under PL022 control then they would
be released as soon as transfer is over and TxFIFO becomes empty. This is not
desired by some of the device protocols above spi which expect (multiple)
transfers without releasing their chipselects.
Chipselects can be controlled by software by turning them as GPIOs. SPEAr
provides another interface through system registers through which software can
directly control each PL022 chipselect. Hence, it is natural for SPEAr to
export the control of this interface as gpio.
properties:
compatible:
const: st,spear-spics-gpio
reg:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
st-spics,peripcfg-reg:
description: Offset of the peripcfg register.
$ref: /schemas/types.yaml#/definitions/uint32
st-spics,sw-enable-bit:
description: Bit offset to enable software chipselect control.
$ref: /schemas/types.yaml#/definitions/uint32
st-spics,cs-value-bit:
description: Bit offset to drive chipselect low or high.
$ref: /schemas/types.yaml#/definitions/uint32
st-spics,cs-enable-mask:
description: Bitmask selecting which chipselects to enable.
$ref: /schemas/types.yaml#/definitions/uint32
st-spics,cs-enable-shift:
description: Bit shift for programming chipselect number.
$ref: /schemas/types.yaml#/definitions/uint32
required:
- compatible
- reg
- gpio-controller
- '#gpio-cells'
- st-spics,peripcfg-reg
- st-spics,sw-enable-bit
- st-spics,cs-value-bit
- st-spics,cs-enable-mask
- st-spics,cs-enable-shift
additionalProperties: false
examples:
- |
gpio@e0700000 {
compatible = "st,spear-spics-gpio";
reg = <0xe0700000 0x1000>;
st-spics,peripcfg-reg = <0x3b0>;
st-spics,sw-enable-bit = <12>;
st-spics,cs-value-bit = <11>;
st-spics,cs-enable-mask = <3>;
st-spics,cs-enable-shift = <8>;
gpio-controller;
#gpio-cells = <2>;
};
@@ -0,0 +1,57 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/st,stmpe-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: STMicroelectonics Port Expander (STMPE) GPIO Block
description:
STMicroelectronics Port Expander (STMPE) is a series of slow
bus controllers for various expanded peripherals such as GPIO, keypad,
touchscreen, ADC, PWM or rotator. It can contain one or several different
peripherals connected to SPI or I2C. These bindings pertain to the
GPIO portions of these expanders.
maintainers:
- Linus Walleij <linusw@kernel.org>
properties:
compatible:
const: st,stmpe-gpio
"#gpio-cells":
const: 2
"#interrupt-cells":
const: 2
gpio-controller: true
gpio-line-names:
minItems: 1
maxItems: 24
interrupt-controller: true
st,norequest-mask:
description:
A bitmask of GPIO lines that cannot be requested because for
for example not being connected to anything on the system
$ref: /schemas/types.yaml#/definitions/uint32
patternProperties:
"^.+-hog(-[0-9]+)?$":
type: object
required:
- gpio-hog
additionalProperties: false
required:
- compatible
- "#gpio-cells"
- "#interrupt-cells"
- gpio-controller
- interrupt-controller
@@ -0,0 +1,65 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/ti,keystone-dsp-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Keystone 2 DSP GPIO controller
maintainers:
- Grygorii Strashko <grygorii.strashko@ti.com>
description: |
HOST OS userland running on ARM can send interrupts to DSP cores using
the DSP GPIO controller IP. It provides 28 IRQ signals per each DSP core.
This is one of the component used by the IPC mechanism used on Keystone SOCs.
For example TCI6638K2K SoC has 8 DSP GPIO controllers:
- 8 for C66x CorePacx CPUs 0-7
Keystone 2 DSP GPIO controller has specific features:
- each GPIO can be configured only as output pin;
- setting GPIO value to 1 causes IRQ generation on target DSP core;
- reading pin value returns 0 - if IRQ was handled or 1 - IRQ is still
pending.
properties:
compatible:
const: ti,keystone-dsp-gpio
reg:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
gpio,syscon-dev:
description:
Phandle and offset of device's specific registers within the syscon state
control registers
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
- items:
- description: phandle to syscon
- description: register offset within state control registers
required:
- compatible
- reg
- gpio-controller
- '#gpio-cells'
- gpio,syscon-dev
additionalProperties: false
examples:
- |
gpio@240 {
compatible = "ti,keystone-dsp-gpio";
reg = <0x240 0x4>;
gpio-controller;
#gpio-cells = <2>;
gpio,syscon-dev = <&devctrl 0x240>;
};
@@ -0,0 +1,108 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/ti,omap-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: OMAP GPIO controller
maintainers:
- Grygorii Strashko <grygorii.strashko@ti.com>
description: |
The general-purpose interface combines general-purpose input/output (GPIO) banks.
Each GPIO banks provides up to 32 dedicated general-purpose pins with input
and output capabilities; interrupt generation in active mode and wake-up
request generation in idle mode upon the detection of external events.
properties:
compatible:
oneOf:
- enum:
- ti,omap2-gpio
- ti,omap3-gpio
- ti,omap4-gpio
- items:
- const: ti,am4372-gpio
- const: ti,omap4-gpio
reg:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
interrupt-controller: true
'#interrupt-cells':
const: 2
interrupts:
maxItems: 1
gpio-ranges: true
gpio-line-names:
minItems: 1
maxItems: 32
ti,gpio-always-on:
$ref: /schemas/types.yaml#/definitions/flag
description:
Indicates if a GPIO bank is always powered and will never lose its logic state.
ti,hwmods:
$ref: /schemas/types.yaml#/definitions/string
deprecated: true
description:
Name of the hwmod associated with the GPIO. Needed on some legacy OMAP
SoCs which have not been converted to the ti,sysc interconnect hierarchy.
ti,no-reset-on-init:
$ref: /schemas/types.yaml#/definitions/flag
deprecated: true
description:
Do not reset on init. Used with ti,hwmods on some legacy OMAP SoCs which
have not been converted to the ti,sysc interconnect hierarchy.
patternProperties:
"^(.+-hog(-[0-9]+)?)$":
type: object
required:
- gpio-hog
required:
- compatible
- reg
- gpio-controller
- "#gpio-cells"
- interrupt-controller
- "#interrupt-cells"
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
gpio0: gpio@0 {
compatible = "ti,omap4-gpio";
reg = <0x0 0x1000>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
interrupts = <96>;
ti,gpio-always-on;
ls-buf-en-hog {
gpio-hog;
gpios = <10 GPIO_ACTIVE_HIGH>;
output-high;
line-name = "LS_BUF_EN";
};
};
@@ -0,0 +1,61 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/ti,twl4030-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI TWL4030 GPIO controller
maintainers:
- Aaro Koskinen <aaro.koskinen@iki.fi>
- Andreas Kemnade <andreas@kemnade.info>
- Kevin Hilman <khilman@baylibre.com>
- Roger Quadros <rogerq@kernel.org>
- Tony Lindgren <tony@atomide.com>
properties:
compatible:
const: ti,twl4030-gpio
'#gpio-cells':
const: 2
gpio-controller: true
'#interrupt-cells':
const: 1
interrupt-controller: true
ti,debounce:
description: Debounce control bits. Each bit corresponds to a GPIO pin.
$ref: /schemas/types.yaml#/definitions/uint32
ti,mmc-cd:
description: MMC card detect control bits. Each bit corresponds to a GPIO pin for VMMC(n+1).
$ref: /schemas/types.yaml#/definitions/uint32
ti,pullups:
description: Pull-up control bits. Each bit corresponds to a GPIO pin.
$ref: /schemas/types.yaml#/definitions/uint32
ti,pulldowns:
description: Pull-down control bits. Each bit corresponds to a GPIO pin.
$ref: /schemas/types.yaml#/definitions/uint32
ti,use-leds:
type: boolean
description: Enables LEDA and LEDB outputs if set
additionalProperties: false
examples:
- |
gpio {
compatible = "ti,twl4030-gpio";
#gpio-cells = <2>;
gpio-controller;
#interrupt-cells = <1>;
interrupt-controller;
ti,use-leds;
};
@@ -0,0 +1,69 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/toshiba,gpio-visconti.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Toshiba Visconti ARM SoCs GPIO controller
maintainers:
- Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
properties:
compatible:
items:
- const: toshiba,gpio-tmpv7708
reg:
maxItems: 1
"#gpio-cells":
const: 2
gpio-ranges: true
gpio-controller: true
interrupt-controller: true
"#interrupt-cells":
const: 2
interrupts:
description:
interrupt mapping one per GPIO.
minItems: 16
maxItems: 16
required:
- compatible
- reg
- "#gpio-cells"
- gpio-ranges
- gpio-controller
- interrupt-controller
- "#interrupt-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
soc {
#address-cells = <2>;
#size-cells = <2>;
gpio: gpio@28020000 {
compatible = "toshiba,gpio-tmpv7708";
reg = <0 0x28020000 0 0x1000>;
#gpio-cells = <0x2>;
gpio-ranges = <&pmux 0 0 32>;
gpio-controller;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&gic>;
};
};
...
@@ -0,0 +1,110 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/trivial-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Trivial 2-cell GPIO controllers
maintainers:
- Bartosz Golaszewski <brgl@bgdev.pl>
properties:
compatible:
oneOf:
- items:
- enum:
- cirrus,ep7312-gpio
- const: cirrus,ep7209-gpio
- enum:
- apm,xgene-gpio
- cirrus,ep7209-gpio
- cznic,moxtet-gpio
- dlg,slg7xl45106
- fcs,fxl6408
- fsl,ls1046aqds-fpga-gpio-stat-pres2
- fsl,lx2160ardb-fpga-gpio-sfp
- gateworks,pld-gpio
- ibm,ppc4xx-gpio
- loongson,ls1x-gpio
- nintendo,hollywood-gpio
- nxp,pca9570
- nxp,pca9571
- rockchip,rk3328-grf-gpio
- snps,creg-gpio-hsdk
- technologic,ts4800-gpio
- technologic,ts4900-gpio
- technologic,ts7970-gpio
- ti,741g125 # for 741G125 (1-bit Input),
- ti,741g174 # for 741G74 (1-bit Output),
- ti,742g125 # for 742G125 (2-bit Input),
- ti,7474 # for 7474 (2-bit Output),
- ti,74125 # for 74125 (4-bit Input),
- ti,74175 # for 74175 (4-bit Output),
- ti,74365 # for 74365 (6-bit Input),
- ti,74174 # for 74174 (6-bit Output),
- ti,74244 # for 74244 (8-bit Input),
- ti,74273 # for 74273 (8-bit Output),
- ti,741624 # for 741624 (16-bit Input),
- ti,7416374 # for 7416374 (16-bit Output).
- ti,lp3943-gpio
- ti,palmas-gpio
- ti,tpic2810
- ti,tps80036-gpio
- ti,tps65913-gpio
- ti,tps65914-gpio
reg:
maxItems: 1
'#gpio-cells':
const: 2
gpio-controller: true
gpio-line-names: true
ngpios: true
# Don't add more properties
patternProperties:
"^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
type: object
required:
- gpio-hog
required:
- compatible
- '#gpio-cells'
- gpio-controller
allOf:
- if:
properties:
compatible:
contains:
enum:
- rockchip,rk3328-grf-gpio
- ti,lp3943-gpio
- ti,palmas-gpio
- ti,tps80036-gpio
- ti,tps65913-gpio
- ti,tps65914-gpio
then:
properties:
reg: false
else:
required:
- reg
additionalProperties: false
examples:
- |
gpio@1701c000 {
compatible = "apm,xgene-gpio";
reg = <0x1701c000 0x40>;
gpio-controller;
#gpio-cells = <2>;
};
@@ -0,0 +1,73 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/waveshare,dsi-touch-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Waveshare GPIO controller on DSI TOUCH panels
maintainers:
- Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
description:
Waveshare DSI TOUCH panel kits contain separate GPIO controller for toggling
power supplies and panel / touchscreen resets.
properties:
compatible:
const: waveshare,dsi-touch-gpio
reg:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
required:
- compatible
- reg
- gpio-controller
- "#gpio-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
wsgpio: gpio@45 {
compatible = "waveshare,dsi-touch-gpio";
reg = <0x45>;
gpio-controller;
#gpio-cells = <2>;
};
};
panel_avdd: regulator-panel-avdd {
compatible = "regulator-fixed";
regulator-name = "panel-avdd";
gpios = <&wsgpio 0 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
panel_iovcc: regulator-panel-iovcc {
compatible = "regulator-fixed";
regulator-name = "panel-iovcc";
gpios = <&wsgpio 4 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
panel_vcc: regulator-panel-vcc {
compatible = "regulator-fixed";
regulator-name = "panel-vcc";
gpios = <&wsgpio 8 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-always-on;
};
...
@@ -0,0 +1,63 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/x-powers,axp209-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: X-Powers AXP209 GPIO
maintainers:
- Chen-Yu Tsai <wens@csie.org>
properties:
"#gpio-cells":
const: 2
description: >
The first cell is the pin number and the second is the GPIO flags.
compatible:
oneOf:
- enum:
- x-powers,axp209-gpio
- x-powers,axp221-gpio
- x-powers,axp813-gpio
- items:
- enum:
- x-powers,axp223-gpio
- x-powers,axp809-gpio
- const: x-powers,axp221-gpio
- items:
- const: x-powers,axp803-gpio
- const: x-powers,axp813-gpio
gpio-controller: true
patternProperties:
"^.*-pins?$":
$ref: /schemas/pinctrl/pinmux-node.yaml#
additionalProperties: false
properties:
pins:
items:
enum:
- GPIO0
- GPIO1
- GPIO2
- GPIO3
function:
enum:
- adc
- ldo
- gpio_in
- gpio_out
required:
- compatible
- "#gpio-cells"
- gpio-controller
additionalProperties: false
...
@@ -0,0 +1,155 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/xlnx,gpio-xilinx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Xilinx AXI GPIO controller
maintainers:
- Neeli Srinivas <srinivas.neeli@amd.com>
description:
The AXI GPIO design provides a general purpose input/output interface
to an AXI4-Lite interface. The AXI GPIO can be configured as either
a single or a dual-channel device. The width of each channel is
independently configurable. The channels can be configured to
generate an interrupt when a transition on any of their inputs occurs.
properties:
compatible:
enum:
- xlnx,xps-gpio-1.00.a
reg:
maxItems: 1
"#gpio-cells":
const: 2
interrupts:
maxItems: 1
gpio-controller: true
gpio-line-names:
description: strings describing the names of each gpio line
minItems: 1
maxItems: 64
interrupt-controller: true
"#interrupt-cells":
const: 2
clocks:
maxItems: 1
interrupt-names: true
xlnx,all-inputs:
$ref: /schemas/types.yaml#/definitions/uint32
description: This option sets this GPIO channel1 bits in input mode.
xlnx,all-inputs-2:
$ref: /schemas/types.yaml#/definitions/uint32
description: This option sets this GPIO channel2 bits in input mode.
xlnx,all-outputs:
$ref: /schemas/types.yaml#/definitions/uint32
description: This option sets this GPIO channel1 bits in output mode.
xlnx,all-outputs-2:
$ref: /schemas/types.yaml#/definitions/uint32
description: This option sets this GPIO channel2 bits in output mode.
xlnx,dout-default:
$ref: /schemas/types.yaml#/definitions/uint32
description: Sets the default value of all the enabled bits of
channel1.
default: 0
xlnx,dout-default-2:
$ref: /schemas/types.yaml#/definitions/uint32
description: Sets the default value of all the enabled bits of
channel2.
default: 0
xlnx,gpio-width:
$ref: /schemas/types.yaml#/definitions/uint32
description: The value defines the bit width of the GPIO channel1.
minimum: 1
maximum: 32
default: 32
xlnx,gpio2-width:
$ref: /schemas/types.yaml#/definitions/uint32
description: The value defines the bit width of the GPIO channel2.
minimum: 1
maximum: 32
default: 32
xlnx,interrupt-present:
$ref: /schemas/types.yaml#/definitions/uint32
description: This parameter enables interrupt control logic
and interrupt registers in GPIO module.
minimum: 0
maximum: 1
default: 0
xlnx,is-dual:
$ref: /schemas/types.yaml#/definitions/uint32
description: This parameter enables a second GPIO channel (GPIO2).
minimum: 0
maximum: 1
default: 0
xlnx,tri-default:
$ref: /schemas/types.yaml#/definitions/uint32
description: This value configures the input or output mode
of each bit of GPIO channel1.
xlnx,tri-default-2:
$ref: /schemas/types.yaml#/definitions/uint32
description: This value configures the input or output mode
of each bit of GPIO channel2.
required:
- reg
- compatible
- clocks
- gpio-controller
- "#gpio-cells"
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
gpio@a0020000 {
compatible = "xlnx,xps-gpio-1.00.a";
reg = <0xa0020000 0x10000>;
#gpio-cells = <2>;
#interrupt-cells = <0x2>;
clocks = <&zynqmp_clk 71>;
gpio-controller;
interrupt-controller;
interrupt-names = "ip2intc_irpt";
interrupt-parent = <&gic>;
interrupts = <0 89 4>;
xlnx,all-inputs = <0x0>;
xlnx,all-inputs-2 = <0x0>;
xlnx,all-outputs = <0x0>;
xlnx,all-outputs-2 = <0x0>;
xlnx,dout-default = <0x0>;
xlnx,dout-default-2 = <0x0>;
xlnx,gpio-width = <0x20>;
xlnx,gpio2-width = <0x20>;
xlnx,interrupt-present = <0x1>;
xlnx,is-dual = <0x1>;
xlnx,tri-default = <0xFFFFFFFF>;
xlnx,tri-default-2 = <0xFFFFFFFF>;
};
...
@@ -0,0 +1,46 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/xlnx,zynqmp-gpio-modepin.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ZynqMP Mode Pin GPIO controller
description:
PS_MODE is 4-bits boot mode pins sampled on POR deassertion. Mode Pin
GPIO controller with configurable from numbers of pins (from 0 to 3 per
PS_MODE). Every pin can be configured as input/output.
maintainers:
- Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
properties:
compatible:
const: xlnx,zynqmp-gpio-modepin
gpio-controller: true
"#gpio-cells":
const: 2
label: true
required:
- compatible
- gpio-controller
- "#gpio-cells"
additionalProperties: false
examples:
- |
zynqmp-firmware {
gpio {
compatible = "xlnx,zynqmp-gpio-modepin";
gpio-controller;
#gpio-cells = <2>;
label = "modepin";
};
};
...
@@ -0,0 +1,71 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2019 Bootlin
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/xylon,logicvc-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Xylon LogiCVC GPIO controller
maintainers:
- Paul Kocialkowski <paul.kocialkowski@bootlin.com>
description: |
The LogiCVC GPIO describes the GPIO block included in the LogiCVC display
controller. These are meant to be used for controlling display-related
signals.
The controller exposes GPIOs from the display and power control registers,
which are mapped by the driver as follows:
- GPIO[4:0] (display control) mapped to index 0-4
- EN_BLIGHT (power control) mapped to index 5
- EN_VDD (power control) mapped to index 6
- EN_VEE (power control) mapped to index 7
- V_EN (power control) mapped to index 8
properties:
$nodename:
pattern: "^gpio@[0-9a-f]+$"
compatible:
enum:
- xylon,logicvc-3.02.a-gpio
reg:
maxItems: 1
"#gpio-cells":
const: 2
gpio-controller: true
gpio-line-names:
minItems: 1
maxItems: 9
required:
- compatible
- reg
- "#gpio-cells"
- gpio-controller
additionalProperties: false
examples:
- |
logicvc: logicvc@43c00000 {
compatible = "xylon,logicvc-3.02.a", "syscon", "simple-mfd";
reg = <0x43c00000 0x6000>;
#address-cells = <1>;
#size-cells = <1>;
logicvc_gpio: gpio@40 {
compatible = "xylon,logicvc-3.02.a-gpio";
reg = <0x40 0x40>;
gpio-controller;
#gpio-cells = <2>;
gpio-line-names = "GPIO0", "GPIO1", "GPIO2", "GPIO3", "GPIO4",
"EN_BLIGHT", "EN_VDD", "EN_VEE", "V_EN";
};
};