xref: /freebsd-src/sys/contrib/device-tree/Bindings/interrupt-controller/apple,aic.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
12eb4d8dcSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
22eb4d8dcSEmmanuel Vadot%YAML 1.2
32eb4d8dcSEmmanuel Vadot---
42eb4d8dcSEmmanuel Vadot$id: http://devicetree.org/schemas/interrupt-controller/apple,aic.yaml#
52eb4d8dcSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
62eb4d8dcSEmmanuel Vadot
72eb4d8dcSEmmanuel Vadottitle: Apple Interrupt Controller
82eb4d8dcSEmmanuel Vadot
92eb4d8dcSEmmanuel Vadotmaintainers:
102eb4d8dcSEmmanuel Vadot  - Hector Martin <marcan@marcan.st>
112eb4d8dcSEmmanuel Vadot
122eb4d8dcSEmmanuel Vadotdescription: |
132eb4d8dcSEmmanuel Vadot  The Apple Interrupt Controller is a simple interrupt controller present on
142eb4d8dcSEmmanuel Vadot  Apple ARM SoC platforms, including various iPhone and iPad devices and the
152eb4d8dcSEmmanuel Vadot  "Apple Silicon" Macs.
162eb4d8dcSEmmanuel Vadot
172eb4d8dcSEmmanuel Vadot  It provides the following features:
182eb4d8dcSEmmanuel Vadot
192eb4d8dcSEmmanuel Vadot  - Level-triggered hardware IRQs wired to SoC blocks
202eb4d8dcSEmmanuel Vadot    - Single mask bit per IRQ
212eb4d8dcSEmmanuel Vadot    - Per-IRQ affinity setting
222eb4d8dcSEmmanuel Vadot    - Automatic masking on event delivery (auto-ack)
232eb4d8dcSEmmanuel Vadot    - Software triggering (ORed with hw line)
242eb4d8dcSEmmanuel Vadot  - 2 per-CPU IPIs (meant as "self" and "other", but they are interchangeable
252eb4d8dcSEmmanuel Vadot    if not symmetric)
262eb4d8dcSEmmanuel Vadot  - Automatic prioritization (single event/ack register per CPU, lower IRQs =
272eb4d8dcSEmmanuel Vadot    higher priority)
282eb4d8dcSEmmanuel Vadot  - Automatic masking on ack
292eb4d8dcSEmmanuel Vadot  - Default "this CPU" register view and explicit per-CPU views
302eb4d8dcSEmmanuel Vadot
312eb4d8dcSEmmanuel Vadot  This device also represents the FIQ interrupt sources on platforms using AIC,
322eb4d8dcSEmmanuel Vadot  which do not go through a discrete interrupt controller.
332eb4d8dcSEmmanuel Vadot
34*b2d2a78aSEmmanuel Vadot  IPIs may be performed via MMIO registers on all variants of AIC. Starting
35*b2d2a78aSEmmanuel Vadot  from A11, system registers may also be used for "fast" IPIs. Starting from
36*b2d2a78aSEmmanuel Vadot  M1, even faster IPIs within the same cluster may be achieved by writing to
37*b2d2a78aSEmmanuel Vadot  a "local" fast IPI register as opposed to using the "global" fast IPI
38*b2d2a78aSEmmanuel Vadot  register.
39*b2d2a78aSEmmanuel Vadot
402eb4d8dcSEmmanuel VadotallOf:
412eb4d8dcSEmmanuel Vadot  - $ref: /schemas/interrupt-controller.yaml#
422eb4d8dcSEmmanuel Vadot
432eb4d8dcSEmmanuel Vadotproperties:
442eb4d8dcSEmmanuel Vadot  compatible:
452eb4d8dcSEmmanuel Vadot    items:
46*b2d2a78aSEmmanuel Vadot      - enum:
47*b2d2a78aSEmmanuel Vadot          - apple,s5l8960x-aic
48*b2d2a78aSEmmanuel Vadot          - apple,t7000-aic
49*b2d2a78aSEmmanuel Vadot          - apple,s8000-aic
50*b2d2a78aSEmmanuel Vadot          - apple,t8010-aic
51*b2d2a78aSEmmanuel Vadot          - apple,t8015-aic
52*b2d2a78aSEmmanuel Vadot          - apple,t8103-aic
532eb4d8dcSEmmanuel Vadot      - const: apple,aic
542eb4d8dcSEmmanuel Vadot
552eb4d8dcSEmmanuel Vadot  interrupt-controller: true
562eb4d8dcSEmmanuel Vadot
572eb4d8dcSEmmanuel Vadot  '#interrupt-cells':
582eb4d8dcSEmmanuel Vadot    const: 3
592eb4d8dcSEmmanuel Vadot    description: |
602eb4d8dcSEmmanuel Vadot      The 1st cell contains the interrupt type:
612eb4d8dcSEmmanuel Vadot        - 0: Hardware IRQ
622eb4d8dcSEmmanuel Vadot        - 1: FIQ
632eb4d8dcSEmmanuel Vadot
642eb4d8dcSEmmanuel Vadot      The 2nd cell contains the interrupt number.
652eb4d8dcSEmmanuel Vadot        - HW IRQs: interrupt number
662eb4d8dcSEmmanuel Vadot        - FIQs:
672eb4d8dcSEmmanuel Vadot          - 0: physical HV timer
682eb4d8dcSEmmanuel Vadot          - 1: virtual HV timer
692eb4d8dcSEmmanuel Vadot          - 2: physical guest timer
702eb4d8dcSEmmanuel Vadot          - 3: virtual guest timer
71c9ccf3a3SEmmanuel Vadot          - 4: 'efficient' CPU PMU
72c9ccf3a3SEmmanuel Vadot          - 5: 'performance' CPU PMU
732eb4d8dcSEmmanuel Vadot
742eb4d8dcSEmmanuel Vadot      The 3rd cell contains the interrupt flags. This is normally
752eb4d8dcSEmmanuel Vadot      IRQ_TYPE_LEVEL_HIGH (4).
762eb4d8dcSEmmanuel Vadot
772eb4d8dcSEmmanuel Vadot  reg:
782eb4d8dcSEmmanuel Vadot    description: |
792eb4d8dcSEmmanuel Vadot      Specifies base physical address and size of the AIC registers.
802eb4d8dcSEmmanuel Vadot    maxItems: 1
812eb4d8dcSEmmanuel Vadot
82e67e8565SEmmanuel Vadot  power-domains:
83e67e8565SEmmanuel Vadot    maxItems: 1
84e67e8565SEmmanuel Vadot
85c9ccf3a3SEmmanuel Vadot  affinities:
86c9ccf3a3SEmmanuel Vadot    type: object
87c9ccf3a3SEmmanuel Vadot    additionalProperties: false
88c9ccf3a3SEmmanuel Vadot    description:
89c9ccf3a3SEmmanuel Vadot      FIQ affinity can be expressed as a single "affinities" node,
90c9ccf3a3SEmmanuel Vadot      containing a set of sub-nodes, one per FIQ with a non-default
91c9ccf3a3SEmmanuel Vadot      affinity.
92c9ccf3a3SEmmanuel Vadot    patternProperties:
93c9ccf3a3SEmmanuel Vadot      "^.+-affinity$":
94c9ccf3a3SEmmanuel Vadot        type: object
95c9ccf3a3SEmmanuel Vadot        additionalProperties: false
96c9ccf3a3SEmmanuel Vadot        properties:
97c9ccf3a3SEmmanuel Vadot          apple,fiq-index:
98c9ccf3a3SEmmanuel Vadot            description:
99c9ccf3a3SEmmanuel Vadot              The interrupt number specified as a FIQ, and for which
100c9ccf3a3SEmmanuel Vadot              the affinity is not the default.
101c9ccf3a3SEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/uint32
102c9ccf3a3SEmmanuel Vadot            maximum: 5
103c9ccf3a3SEmmanuel Vadot
104c9ccf3a3SEmmanuel Vadot          cpus:
105c9ccf3a3SEmmanuel Vadot            description:
106c9ccf3a3SEmmanuel Vadot              Should be a list of phandles to CPU nodes (as described in
107c9ccf3a3SEmmanuel Vadot              Documentation/devicetree/bindings/arm/cpus.yaml).
108c9ccf3a3SEmmanuel Vadot
109c9ccf3a3SEmmanuel Vadot        required:
110b97ee269SEmmanuel Vadot          - apple,fiq-index
111c9ccf3a3SEmmanuel Vadot          - cpus
112c9ccf3a3SEmmanuel Vadot
1132eb4d8dcSEmmanuel Vadotrequired:
1142eb4d8dcSEmmanuel Vadot  - compatible
1152eb4d8dcSEmmanuel Vadot  - '#interrupt-cells'
1162eb4d8dcSEmmanuel Vadot  - interrupt-controller
1172eb4d8dcSEmmanuel Vadot  - reg
1182eb4d8dcSEmmanuel Vadot
1192eb4d8dcSEmmanuel VadotadditionalProperties: false
1202eb4d8dcSEmmanuel Vadot
1212eb4d8dcSEmmanuel Vadotexamples:
1222eb4d8dcSEmmanuel Vadot  - |
1232eb4d8dcSEmmanuel Vadot    soc {
1242eb4d8dcSEmmanuel Vadot        #address-cells = <2>;
1252eb4d8dcSEmmanuel Vadot        #size-cells = <2>;
1262eb4d8dcSEmmanuel Vadot
1272eb4d8dcSEmmanuel Vadot        aic: interrupt-controller@23b100000 {
1282eb4d8dcSEmmanuel Vadot            compatible = "apple,t8103-aic", "apple,aic";
1292eb4d8dcSEmmanuel Vadot            #interrupt-cells = <3>;
1302eb4d8dcSEmmanuel Vadot            interrupt-controller;
1312eb4d8dcSEmmanuel Vadot            reg = <0x2 0x3b100000 0x0 0x8000>;
1322eb4d8dcSEmmanuel Vadot        };
1332eb4d8dcSEmmanuel Vadot    };
134