1*aa1a8ff2SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2*aa1a8ff2SEmmanuel Vadot%YAML 1.2 3*aa1a8ff2SEmmanuel Vadot--- 4*aa1a8ff2SEmmanuel Vadot$id: http://devicetree.org/schemas/gpio/brcm,kona-gpio.yaml# 5*aa1a8ff2SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*aa1a8ff2SEmmanuel Vadot 7*aa1a8ff2SEmmanuel Vadottitle: Broadcom Kona family GPIO controller 8*aa1a8ff2SEmmanuel Vadot 9*aa1a8ff2SEmmanuel Vadotdescription: 10*aa1a8ff2SEmmanuel Vadot The Broadcom GPIO Controller IP can be configured prior to synthesis to 11*aa1a8ff2SEmmanuel Vadot support up to 8 banks of 32 GPIOs where each bank has its own IRQ. The 12*aa1a8ff2SEmmanuel Vadot GPIO controller only supports edge, not level, triggering of interrupts. 13*aa1a8ff2SEmmanuel Vadot 14*aa1a8ff2SEmmanuel Vadotmaintainers: 15*aa1a8ff2SEmmanuel Vadot - Ray Jui <rjui@broadcom.com> 16*aa1a8ff2SEmmanuel Vadot 17*aa1a8ff2SEmmanuel Vadotproperties: 18*aa1a8ff2SEmmanuel Vadot compatible: 19*aa1a8ff2SEmmanuel Vadot items: 20*aa1a8ff2SEmmanuel Vadot - enum: 21*aa1a8ff2SEmmanuel Vadot - brcm,bcm11351-gpio 22*aa1a8ff2SEmmanuel Vadot - brcm,bcm21664-gpio 23*aa1a8ff2SEmmanuel Vadot - brcm,bcm23550-gpio 24*aa1a8ff2SEmmanuel Vadot - const: brcm,kona-gpio 25*aa1a8ff2SEmmanuel Vadot 26*aa1a8ff2SEmmanuel Vadot reg: 27*aa1a8ff2SEmmanuel Vadot maxItems: 1 28*aa1a8ff2SEmmanuel Vadot 29*aa1a8ff2SEmmanuel Vadot interrupts: 30*aa1a8ff2SEmmanuel Vadot minItems: 4 31*aa1a8ff2SEmmanuel Vadot maxItems: 6 32*aa1a8ff2SEmmanuel Vadot description: 33*aa1a8ff2SEmmanuel Vadot The interrupt outputs from the controller. There is one GPIO interrupt 34*aa1a8ff2SEmmanuel Vadot per GPIO bank. The number of interrupts listed depends on the number of 35*aa1a8ff2SEmmanuel Vadot GPIO banks on the SoC. The interrupts must be ordered by bank, starting 36*aa1a8ff2SEmmanuel Vadot with bank 0. There is always a 1:1 mapping between banks and IRQs. 37*aa1a8ff2SEmmanuel Vadot 38*aa1a8ff2SEmmanuel Vadot '#gpio-cells': 39*aa1a8ff2SEmmanuel Vadot const: 2 40*aa1a8ff2SEmmanuel Vadot 41*aa1a8ff2SEmmanuel Vadot '#interrupt-cells': 42*aa1a8ff2SEmmanuel Vadot const: 2 43*aa1a8ff2SEmmanuel Vadot 44*aa1a8ff2SEmmanuel Vadot gpio-controller: true 45*aa1a8ff2SEmmanuel Vadot 46*aa1a8ff2SEmmanuel Vadot interrupt-controller: true 47*aa1a8ff2SEmmanuel Vadot 48*aa1a8ff2SEmmanuel Vadotrequired: 49*aa1a8ff2SEmmanuel Vadot - compatible 50*aa1a8ff2SEmmanuel Vadot - reg 51*aa1a8ff2SEmmanuel Vadot - interrupts 52*aa1a8ff2SEmmanuel Vadot - '#gpio-cells' 53*aa1a8ff2SEmmanuel Vadot - '#interrupt-cells' 54*aa1a8ff2SEmmanuel Vadot - gpio-controller 55*aa1a8ff2SEmmanuel Vadot - interrupt-controller 56*aa1a8ff2SEmmanuel Vadot 57*aa1a8ff2SEmmanuel VadotallOf: 58*aa1a8ff2SEmmanuel Vadot - if: 59*aa1a8ff2SEmmanuel Vadot properties: 60*aa1a8ff2SEmmanuel Vadot compatible: 61*aa1a8ff2SEmmanuel Vadot contains: 62*aa1a8ff2SEmmanuel Vadot const: brcm,bcm11351-gpio 63*aa1a8ff2SEmmanuel Vadot then: 64*aa1a8ff2SEmmanuel Vadot properties: 65*aa1a8ff2SEmmanuel Vadot interrupts: 66*aa1a8ff2SEmmanuel Vadot minItems: 6 67*aa1a8ff2SEmmanuel Vadot - if: 68*aa1a8ff2SEmmanuel Vadot properties: 69*aa1a8ff2SEmmanuel Vadot compatible: 70*aa1a8ff2SEmmanuel Vadot contains: 71*aa1a8ff2SEmmanuel Vadot enum: 72*aa1a8ff2SEmmanuel Vadot - brcm,bcm21664-gpio 73*aa1a8ff2SEmmanuel Vadot - brcm,bcm23550-gpio 74*aa1a8ff2SEmmanuel Vadot then: 75*aa1a8ff2SEmmanuel Vadot properties: 76*aa1a8ff2SEmmanuel Vadot interrupts: 77*aa1a8ff2SEmmanuel Vadot maxItems: 4 78*aa1a8ff2SEmmanuel Vadot 79*aa1a8ff2SEmmanuel VadotadditionalProperties: false 80*aa1a8ff2SEmmanuel Vadot 81*aa1a8ff2SEmmanuel Vadotexamples: 82*aa1a8ff2SEmmanuel Vadot - | 83*aa1a8ff2SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 84*aa1a8ff2SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 85*aa1a8ff2SEmmanuel Vadot 86*aa1a8ff2SEmmanuel Vadot gpio@35003000 { 87*aa1a8ff2SEmmanuel Vadot compatible = "brcm,bcm11351-gpio", "brcm,kona-gpio"; 88*aa1a8ff2SEmmanuel Vadot reg = <0x35003000 0x800>; 89*aa1a8ff2SEmmanuel Vadot interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>, 90*aa1a8ff2SEmmanuel Vadot <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>, 91*aa1a8ff2SEmmanuel Vadot <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>, 92*aa1a8ff2SEmmanuel Vadot <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>, 93*aa1a8ff2SEmmanuel Vadot <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>, 94*aa1a8ff2SEmmanuel Vadot <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>; 95*aa1a8ff2SEmmanuel Vadot #gpio-cells = <2>; 96*aa1a8ff2SEmmanuel Vadot #interrupt-cells = <2>; 97*aa1a8ff2SEmmanuel Vadot gpio-controller; 98*aa1a8ff2SEmmanuel Vadot interrupt-controller; 99*aa1a8ff2SEmmanuel Vadot }; 100*aa1a8ff2SEmmanuel Vadot... 101