Documentation / devicetree / bindings / gpio / brcm,kona-gpio.yaml


Based on kernel version 6.8. Page generated on 2024-03-11 21:26 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 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 96 97 98 99 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;
    };
...