xref: /freebsd-src/sys/contrib/device-tree/Bindings/interrupt-controller/qcom,pdc.yaml (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
17ef62cebSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
27ef62cebSEmmanuel Vadot%YAML 1.2
37ef62cebSEmmanuel Vadot---
47ef62cebSEmmanuel Vadot$id: http://devicetree.org/schemas/interrupt-controller/qcom,pdc.yaml#
57ef62cebSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
67ef62cebSEmmanuel Vadot
77ef62cebSEmmanuel Vadottitle: PDC interrupt controller
87ef62cebSEmmanuel Vadot
97ef62cebSEmmanuel Vadotmaintainers:
107ef62cebSEmmanuel Vadot  - Bjorn Andersson <bjorn.andersson@linaro.org>
117ef62cebSEmmanuel Vadot
127ef62cebSEmmanuel Vadotdescription: |
137ef62cebSEmmanuel Vadot  Qualcomm Technologies Inc. SoCs based on the RPM Hardened architecture have a
147ef62cebSEmmanuel Vadot  Power Domain Controller (PDC) that is on always-on domain. In addition to
157ef62cebSEmmanuel Vadot  providing power control for the power domains, the hardware also has an
167ef62cebSEmmanuel Vadot  interrupt controller that can be used to help detect edge low interrupts as
177ef62cebSEmmanuel Vadot  well detect interrupts when the GIC is non-operational.
187ef62cebSEmmanuel Vadot
197ef62cebSEmmanuel Vadot  GIC is parent interrupt controller at the highest level. Platform interrupt
207ef62cebSEmmanuel Vadot  controller PDC is next in hierarchy, followed by others. Drivers requiring
217ef62cebSEmmanuel Vadot  wakeup capabilities of their device interrupts routed through the PDC, must
227ef62cebSEmmanuel Vadot  specify PDC as their interrupt controller and request the PDC port associated
237ef62cebSEmmanuel Vadot  with the GIC interrupt. See example below.
247ef62cebSEmmanuel Vadot
257ef62cebSEmmanuel Vadotproperties:
267ef62cebSEmmanuel Vadot  compatible:
277ef62cebSEmmanuel Vadot    items:
287ef62cebSEmmanuel Vadot      - enum:
29fac71e4eSEmmanuel Vadot          - qcom,qdu1000-pdc
30fac71e4eSEmmanuel Vadot          - qcom,sa8775p-pdc
317ef62cebSEmmanuel Vadot          - qcom,sc7180-pdc
327ef62cebSEmmanuel Vadot          - qcom,sc7280-pdc
338bab661aSEmmanuel Vadot          - qcom,sc8280xp-pdc
34*aa1a8ff2SEmmanuel Vadot          - qcom,sdm670-pdc
357ef62cebSEmmanuel Vadot          - qcom,sdm845-pdc
368bab661aSEmmanuel Vadot          - qcom,sdx55-pdc
378bab661aSEmmanuel Vadot          - qcom,sdx65-pdc
387ef62cebSEmmanuel Vadot          - qcom,sm6350-pdc
397ef62cebSEmmanuel Vadot          - qcom,sm8150-pdc
407ef62cebSEmmanuel Vadot          - qcom,sm8250-pdc
417ef62cebSEmmanuel Vadot          - qcom,sm8350-pdc
428bab661aSEmmanuel Vadot          - qcom,sm8450-pdc
437ef62cebSEmmanuel Vadot      - const: qcom,pdc
447ef62cebSEmmanuel Vadot
457ef62cebSEmmanuel Vadot  reg:
467ef62cebSEmmanuel Vadot    minItems: 1
477ef62cebSEmmanuel Vadot    items:
487ef62cebSEmmanuel Vadot      - description: PDC base register region
497ef62cebSEmmanuel Vadot      - description: Edge or Level config register for SPI interrupts
507ef62cebSEmmanuel Vadot
517ef62cebSEmmanuel Vadot  '#interrupt-cells':
527ef62cebSEmmanuel Vadot    const: 2
537ef62cebSEmmanuel Vadot
547ef62cebSEmmanuel Vadot  interrupt-controller: true
557ef62cebSEmmanuel Vadot
567ef62cebSEmmanuel Vadot  qcom,pdc-ranges:
577ef62cebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-matrix
587ef62cebSEmmanuel Vadot    minItems: 1
59fac71e4eSEmmanuel Vadot    maxItems: 128 # no hard limit
607ef62cebSEmmanuel Vadot    items:
617ef62cebSEmmanuel Vadot      items:
627ef62cebSEmmanuel Vadot        - description: starting PDC port
637ef62cebSEmmanuel Vadot        - description: GIC hwirq number for the PDC port
647ef62cebSEmmanuel Vadot        - description: number of interrupts in sequence
657ef62cebSEmmanuel Vadot    description: |
667ef62cebSEmmanuel Vadot      Specifies the PDC pin offset and the number of PDC ports.
677ef62cebSEmmanuel Vadot      The tuples indicates the valid mapping of valid PDC ports
687ef62cebSEmmanuel Vadot      and their hwirq mapping.
697ef62cebSEmmanuel Vadot
707ef62cebSEmmanuel Vadotrequired:
717ef62cebSEmmanuel Vadot  - compatible
727ef62cebSEmmanuel Vadot  - reg
737ef62cebSEmmanuel Vadot  - '#interrupt-cells'
747ef62cebSEmmanuel Vadot  - interrupt-controller
757ef62cebSEmmanuel Vadot  - qcom,pdc-ranges
767ef62cebSEmmanuel Vadot
777ef62cebSEmmanuel VadotadditionalProperties: false
787ef62cebSEmmanuel Vadot
797ef62cebSEmmanuel Vadotexamples:
807ef62cebSEmmanuel Vadot  - |
817ef62cebSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
827ef62cebSEmmanuel Vadot
837ef62cebSEmmanuel Vadot    pdc: interrupt-controller@b220000 {
847ef62cebSEmmanuel Vadot        compatible = "qcom,sdm845-pdc", "qcom,pdc";
857ef62cebSEmmanuel Vadot        reg = <0xb220000 0x30000>;
867ef62cebSEmmanuel Vadot        qcom,pdc-ranges = <0 512 94>, <94 641 15>, <115 662 7>;
877ef62cebSEmmanuel Vadot        #interrupt-cells = <2>;
887ef62cebSEmmanuel Vadot        interrupt-parent = <&intc>;
897ef62cebSEmmanuel Vadot        interrupt-controller;
907ef62cebSEmmanuel Vadot    };
917ef62cebSEmmanuel Vadot
927ef62cebSEmmanuel Vadot    wake-device {
937ef62cebSEmmanuel Vadot        interrupts-extended = <&pdc 2 IRQ_TYPE_LEVEL_HIGH>;
947ef62cebSEmmanuel Vadot    };
95