1*833e5d42SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*833e5d42SEmmanuel Vadot%YAML 1.2 3*833e5d42SEmmanuel Vadot--- 4*833e5d42SEmmanuel Vadot$id: http://devicetree.org/schemas/apm,xgene-gpio-sb.yaml# 5*833e5d42SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*833e5d42SEmmanuel Vadot 7*833e5d42SEmmanuel Vadottitle: APM X-Gene Standby GPIO controller 8*833e5d42SEmmanuel Vadot 9*833e5d42SEmmanuel Vadotmaintainers: 10*833e5d42SEmmanuel Vadot - Khuong Dinh <khuong@os.amperecomputing.com> 11*833e5d42SEmmanuel Vadot 12*833e5d42SEmmanuel Vadotdescription: | 13*833e5d42SEmmanuel Vadot This is a gpio controller in the standby domain. It also supports interrupt in 14*833e5d42SEmmanuel Vadot some particular pins which are sourced to its parent interrupt controller 15*833e5d42SEmmanuel Vadot as diagram below: 16*833e5d42SEmmanuel Vadot +-----------------+ 17*833e5d42SEmmanuel Vadot | X-Gene standby | 18*833e5d42SEmmanuel Vadot | GPIO controller +------ GPIO_0 19*833e5d42SEmmanuel Vadot +------------+ | | ... 20*833e5d42SEmmanuel Vadot | Parent IRQ | EXT_INT_0 | +------ GPIO_8/EXT_INT_0 21*833e5d42SEmmanuel Vadot | controller | (SPI40) | | ... 22*833e5d42SEmmanuel Vadot | (GICv2) +--------------+ +------ GPIO_[N+8]/EXT_INT_N 23*833e5d42SEmmanuel Vadot | | ... | | 24*833e5d42SEmmanuel Vadot | | EXT_INT_N | +------ GPIO_[N+9] 25*833e5d42SEmmanuel Vadot | | (SPI[40 + N])| | ... 26*833e5d42SEmmanuel Vadot | +--------------+ +------ GPIO_MAX 27*833e5d42SEmmanuel Vadot +------------+ +-----------------+ 28*833e5d42SEmmanuel Vadot 29*833e5d42SEmmanuel Vadotproperties: 30*833e5d42SEmmanuel Vadot compatible: 31*833e5d42SEmmanuel Vadot const: apm,xgene-gpio-sb 32*833e5d42SEmmanuel Vadot 33*833e5d42SEmmanuel Vadot reg: 34*833e5d42SEmmanuel Vadot maxItems: 1 35*833e5d42SEmmanuel Vadot 36*833e5d42SEmmanuel Vadot '#gpio-cells': 37*833e5d42SEmmanuel Vadot const: 2 38*833e5d42SEmmanuel Vadot 39*833e5d42SEmmanuel Vadot gpio-controller: true 40*833e5d42SEmmanuel Vadot 41*833e5d42SEmmanuel Vadot interrupts: 42*833e5d42SEmmanuel Vadot description: 43*833e5d42SEmmanuel Vadot List of interrupt specifiers for EXT_INT_0 through EXT_INT_N. The first 44*833e5d42SEmmanuel Vadot entry must correspond to EXT_INT_0. 45*833e5d42SEmmanuel Vadot 46*833e5d42SEmmanuel Vadot '#interrupt-cells': 47*833e5d42SEmmanuel Vadot const: 2 48*833e5d42SEmmanuel Vadot description: 49*833e5d42SEmmanuel Vadot First cell selects EXT_INT_N (0-N), second cell specifies flags 50*833e5d42SEmmanuel Vadot 51*833e5d42SEmmanuel Vadot interrupt-controller: true 52*833e5d42SEmmanuel Vadot 53*833e5d42SEmmanuel Vadot apm,nr-gpios: 54*833e5d42SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 55*833e5d42SEmmanuel Vadot description: Number of GPIO pins 56*833e5d42SEmmanuel Vadot 57*833e5d42SEmmanuel Vadot apm,nr-irqs: 58*833e5d42SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 59*833e5d42SEmmanuel Vadot description: Number of interrupt pins 60*833e5d42SEmmanuel Vadot 61*833e5d42SEmmanuel Vadot apm,irq-start: 62*833e5d42SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 63*833e5d42SEmmanuel Vadot description: Lowest GPIO pin supporting interrupts 64*833e5d42SEmmanuel Vadot 65*833e5d42SEmmanuel Vadotrequired: 66*833e5d42SEmmanuel Vadot - compatible 67*833e5d42SEmmanuel Vadot - reg 68*833e5d42SEmmanuel Vadot - '#gpio-cells' 69*833e5d42SEmmanuel Vadot - gpio-controller 70*833e5d42SEmmanuel Vadot - interrupts 71*833e5d42SEmmanuel Vadot - '#interrupt-cells' 72*833e5d42SEmmanuel Vadot - interrupt-controller 73*833e5d42SEmmanuel Vadot 74*833e5d42SEmmanuel VadotadditionalProperties: false 75*833e5d42SEmmanuel Vadot 76*833e5d42SEmmanuel Vadotexamples: 77*833e5d42SEmmanuel Vadot - | 78*833e5d42SEmmanuel Vadot gpio@17001000 { 79*833e5d42SEmmanuel Vadot compatible = "apm,xgene-gpio-sb"; 80*833e5d42SEmmanuel Vadot reg = <0x17001000 0x400>; 81*833e5d42SEmmanuel Vadot #gpio-cells = <2>; 82*833e5d42SEmmanuel Vadot gpio-controller; 83*833e5d42SEmmanuel Vadot interrupts = <0x0 0x28 0x1>, 84*833e5d42SEmmanuel Vadot <0x0 0x29 0x1>, 85*833e5d42SEmmanuel Vadot <0x0 0x2a 0x1>, 86*833e5d42SEmmanuel Vadot <0x0 0x2b 0x1>, 87*833e5d42SEmmanuel Vadot <0x0 0x2c 0x1>, 88*833e5d42SEmmanuel Vadot <0x0 0x2d 0x1>; 89*833e5d42SEmmanuel Vadot #interrupt-cells = <2>; 90*833e5d42SEmmanuel Vadot interrupt-controller; 91*833e5d42SEmmanuel Vadot apm,nr-gpios = <22>; 92*833e5d42SEmmanuel Vadot apm,nr-irqs = <6>; 93*833e5d42SEmmanuel Vadot apm,irq-start = <8>; 94*833e5d42SEmmanuel Vadot }; 95