xref: /linux/Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.yaml (revision 6416a6ec1acbccd4191c62a57a85ef55056e69ca)
113ef76d8SLuca Weiss# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
213ef76d8SLuca Weiss%YAML 1.2
313ef76d8SLuca Weiss---
413ef76d8SLuca Weiss$id: http://devicetree.org/schemas/interrupt-controller/qcom,pdc.yaml#
513ef76d8SLuca Weiss$schema: http://devicetree.org/meta-schemas/core.yaml#
613ef76d8SLuca Weiss
713ef76d8SLuca Weisstitle: PDC interrupt controller
813ef76d8SLuca Weiss
913ef76d8SLuca Weissmaintainers:
1013ef76d8SLuca Weiss  - Bjorn Andersson <bjorn.andersson@linaro.org>
1113ef76d8SLuca Weiss
1213ef76d8SLuca Weissdescription: |
1313ef76d8SLuca Weiss  Qualcomm Technologies Inc. SoCs based on the RPM Hardened architecture have a
1413ef76d8SLuca Weiss  Power Domain Controller (PDC) that is on always-on domain. In addition to
1513ef76d8SLuca Weiss  providing power control for the power domains, the hardware also has an
1613ef76d8SLuca Weiss  interrupt controller that can be used to help detect edge low interrupts as
1713ef76d8SLuca Weiss  well detect interrupts when the GIC is non-operational.
1813ef76d8SLuca Weiss
1913ef76d8SLuca Weiss  GIC is parent interrupt controller at the highest level. Platform interrupt
2013ef76d8SLuca Weiss  controller PDC is next in hierarchy, followed by others. Drivers requiring
2113ef76d8SLuca Weiss  wakeup capabilities of their device interrupts routed through the PDC, must
2213ef76d8SLuca Weiss  specify PDC as their interrupt controller and request the PDC port associated
2313ef76d8SLuca Weiss  with the GIC interrupt. See example below.
2413ef76d8SLuca Weiss
2513ef76d8SLuca Weissproperties:
2613ef76d8SLuca Weiss  compatible:
2713ef76d8SLuca Weiss    items:
2813ef76d8SLuca Weiss      - enum:
29*6416a6ecSKrzysztof Kozlowski          - qcom,qdu1000-pdc
30a1c86caaSBartosz Golaszewski          - qcom,sa8775p-pdc
3113ef76d8SLuca Weiss          - qcom,sc7180-pdc
3213ef76d8SLuca Weiss          - qcom,sc7280-pdc
33f980520bSLuca Weiss          - qcom,sc8280xp-pdc
3413ef76d8SLuca Weiss          - qcom,sdm845-pdc
35f980520bSLuca Weiss          - qcom,sdx55-pdc
36f980520bSLuca Weiss          - qcom,sdx65-pdc
3713ef76d8SLuca Weiss          - qcom,sm6350-pdc
3813ef76d8SLuca Weiss          - qcom,sm8150-pdc
3913ef76d8SLuca Weiss          - qcom,sm8250-pdc
4013ef76d8SLuca Weiss          - qcom,sm8350-pdc
41f980520bSLuca Weiss          - qcom,sm8450-pdc
4213ef76d8SLuca Weiss      - const: qcom,pdc
4313ef76d8SLuca Weiss
4413ef76d8SLuca Weiss  reg:
4513ef76d8SLuca Weiss    minItems: 1
4613ef76d8SLuca Weiss    items:
4713ef76d8SLuca Weiss      - description: PDC base register region
4813ef76d8SLuca Weiss      - description: Edge or Level config register for SPI interrupts
4913ef76d8SLuca Weiss
5013ef76d8SLuca Weiss  '#interrupt-cells':
5113ef76d8SLuca Weiss    const: 2
5213ef76d8SLuca Weiss
5313ef76d8SLuca Weiss  interrupt-controller: true
5413ef76d8SLuca Weiss
5513ef76d8SLuca Weiss  qcom,pdc-ranges:
5613ef76d8SLuca Weiss    $ref: /schemas/types.yaml#/definitions/uint32-matrix
5713ef76d8SLuca Weiss    minItems: 1
58a1c86caaSBartosz Golaszewski    maxItems: 128 # no hard limit
5913ef76d8SLuca Weiss    items:
6013ef76d8SLuca Weiss      items:
6113ef76d8SLuca Weiss        - description: starting PDC port
6213ef76d8SLuca Weiss        - description: GIC hwirq number for the PDC port
6313ef76d8SLuca Weiss        - description: number of interrupts in sequence
6413ef76d8SLuca Weiss    description: |
6513ef76d8SLuca Weiss      Specifies the PDC pin offset and the number of PDC ports.
6613ef76d8SLuca Weiss      The tuples indicates the valid mapping of valid PDC ports
6713ef76d8SLuca Weiss      and their hwirq mapping.
6813ef76d8SLuca Weiss
6913ef76d8SLuca Weissrequired:
7013ef76d8SLuca Weiss  - compatible
7113ef76d8SLuca Weiss  - reg
7213ef76d8SLuca Weiss  - '#interrupt-cells'
7313ef76d8SLuca Weiss  - interrupt-controller
7413ef76d8SLuca Weiss  - qcom,pdc-ranges
7513ef76d8SLuca Weiss
7613ef76d8SLuca WeissadditionalProperties: false
7713ef76d8SLuca Weiss
7813ef76d8SLuca Weissexamples:
7913ef76d8SLuca Weiss  - |
8013ef76d8SLuca Weiss    #include <dt-bindings/interrupt-controller/irq.h>
8113ef76d8SLuca Weiss
8213ef76d8SLuca Weiss    pdc: interrupt-controller@b220000 {
8313ef76d8SLuca Weiss        compatible = "qcom,sdm845-pdc", "qcom,pdc";
8413ef76d8SLuca Weiss        reg = <0xb220000 0x30000>;
8513ef76d8SLuca Weiss        qcom,pdc-ranges = <0 512 94>, <94 641 15>, <115 662 7>;
8613ef76d8SLuca Weiss        #interrupt-cells = <2>;
8713ef76d8SLuca Weiss        interrupt-parent = <&intc>;
8813ef76d8SLuca Weiss        interrupt-controller;
8913ef76d8SLuca Weiss    };
9013ef76d8SLuca Weiss
9113ef76d8SLuca Weiss    wake-device {
9213ef76d8SLuca Weiss        interrupts-extended = <&pdc 2 IRQ_TYPE_LEVEL_HIGH>;
9313ef76d8SLuca Weiss    };
94