xref: /linux/Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.yaml (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
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:
296416a6ecSKrzysztof Kozlowski          - qcom,qdu1000-pdc
30*7bab88f1SNikunj Kela          - qcom,sa8255p-pdc
31a1c86caaSBartosz Golaszewski          - qcom,sa8775p-pdc
3213ef76d8SLuca Weiss          - qcom,sc7180-pdc
3313ef76d8SLuca Weiss          - qcom,sc7280-pdc
34e6995658SBjorn Andersson          - qcom,sc8180x-pdc
35f980520bSLuca Weiss          - qcom,sc8280xp-pdc
365de0b4a4SKonrad Dybcio          - qcom,sdm670-pdc
3713ef76d8SLuca Weiss          - qcom,sdm845-pdc
38f980520bSLuca Weiss          - qcom,sdx55-pdc
39f980520bSLuca Weiss          - qcom,sdx65-pdc
40ca41ae8fSRohit Agarwal          - qcom,sdx75-pdc
41bc17fd92STengfei Fan          - qcom,sm4450-pdc
4213ef76d8SLuca Weiss          - qcom,sm6350-pdc
4313ef76d8SLuca Weiss          - qcom,sm8150-pdc
4413ef76d8SLuca Weiss          - qcom,sm8250-pdc
4513ef76d8SLuca Weiss          - qcom,sm8350-pdc
46f980520bSLuca Weiss          - qcom,sm8450-pdc
476767b6f4SAbel Vesa          - qcom,sm8550-pdc
48c1c647f6SNeil Armstrong          - qcom,sm8650-pdc
49daa92494SSibi Sankar          - qcom,x1e80100-pdc
5013ef76d8SLuca Weiss      - const: qcom,pdc
5113ef76d8SLuca Weiss
5213ef76d8SLuca Weiss  reg:
5313ef76d8SLuca Weiss    minItems: 1
5413ef76d8SLuca Weiss    items:
5513ef76d8SLuca Weiss      - description: PDC base register region
5613ef76d8SLuca Weiss      - description: Edge or Level config register for SPI interrupts
5713ef76d8SLuca Weiss
5813ef76d8SLuca Weiss  '#interrupt-cells':
5913ef76d8SLuca Weiss    const: 2
6013ef76d8SLuca Weiss
6113ef76d8SLuca Weiss  interrupt-controller: true
6213ef76d8SLuca Weiss
6313ef76d8SLuca Weiss  qcom,pdc-ranges:
6413ef76d8SLuca Weiss    $ref: /schemas/types.yaml#/definitions/uint32-matrix
6513ef76d8SLuca Weiss    minItems: 1
66a1c86caaSBartosz Golaszewski    maxItems: 128 # no hard limit
6713ef76d8SLuca Weiss    items:
6813ef76d8SLuca Weiss      items:
6913ef76d8SLuca Weiss        - description: starting PDC port
7013ef76d8SLuca Weiss        - description: GIC hwirq number for the PDC port
7113ef76d8SLuca Weiss        - description: number of interrupts in sequence
7213ef76d8SLuca Weiss    description: |
7313ef76d8SLuca Weiss      Specifies the PDC pin offset and the number of PDC ports.
7413ef76d8SLuca Weiss      The tuples indicates the valid mapping of valid PDC ports
7513ef76d8SLuca Weiss      and their hwirq mapping.
7613ef76d8SLuca Weiss
7713ef76d8SLuca Weissrequired:
7813ef76d8SLuca Weiss  - compatible
7913ef76d8SLuca Weiss  - reg
8013ef76d8SLuca Weiss  - '#interrupt-cells'
8113ef76d8SLuca Weiss  - interrupt-controller
8213ef76d8SLuca Weiss  - qcom,pdc-ranges
8313ef76d8SLuca Weiss
8413ef76d8SLuca WeissadditionalProperties: false
8513ef76d8SLuca Weiss
8613ef76d8SLuca Weissexamples:
8713ef76d8SLuca Weiss  - |
8813ef76d8SLuca Weiss    #include <dt-bindings/interrupt-controller/irq.h>
8913ef76d8SLuca Weiss
9013ef76d8SLuca Weiss    pdc: interrupt-controller@b220000 {
9113ef76d8SLuca Weiss        compatible = "qcom,sdm845-pdc", "qcom,pdc";
9213ef76d8SLuca Weiss        reg = <0xb220000 0x30000>;
9313ef76d8SLuca Weiss        qcom,pdc-ranges = <0 512 94>, <94 641 15>, <115 662 7>;
9413ef76d8SLuca Weiss        #interrupt-cells = <2>;
9513ef76d8SLuca Weiss        interrupt-parent = <&intc>;
9613ef76d8SLuca Weiss        interrupt-controller;
9713ef76d8SLuca Weiss    };
9813ef76d8SLuca Weiss
9913ef76d8SLuca Weiss    wake-device {
10013ef76d8SLuca Weiss        interrupts-extended = <&pdc 2 IRQ_TYPE_LEVEL_HIGH>;
10113ef76d8SLuca Weiss    };
102