Merge tag 'perf-tools-for-v5.15-2021-09-04' of git://git.kernel.org/pub/scm/linux...
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / interrupt-controller / qcom,pdc.txt
1 PDC interrupt controller
2
3 Qualcomm Technologies Inc. SoCs based on the RPM Hardened architecture have a
4 Power Domain Controller (PDC) that is on always-on domain. In addition to
5 providing power control for the power domains, the hardware also has an
6 interrupt controller that can be used to help detect edge low interrupts as
7 well detect interrupts when the GIC is non-operational.
8
9 GIC is parent interrupt controller at the highest level. Platform interrupt
10 controller PDC is next in hierarchy, followed by others. Drivers requiring
11 wakeup capabilities of their device interrupts routed through the PDC, must
12 specify PDC as their interrupt controller and request the PDC port associated
13 with the GIC interrupt. See example below.
14
15 Properties:
16
17 - compatible:
18         Usage: required
19         Value type: <string>
20         Definition: Should contain "qcom,<soc>-pdc" and "qcom,pdc"
21                     - "qcom,sc7180-pdc": For SC7180
22                     - "qcom,sc7280-pdc": For SC7280
23                     - "qcom,sdm845-pdc": For SDM845
24                     - "qcom,sdm8250-pdc": For SM8250
25                     - "qcom,sdm8350-pdc": For SM8350
26
27 - reg:
28         Usage: required
29         Value type: <prop-encoded-array>
30         Definition: Specifies the base physical address for PDC hardware.
31
32 - interrupt-cells:
33         Usage: required
34         Value type: <u32>
35         Definition: Specifies the number of cells needed to encode an interrupt
36                     source.
37                     Must be 2.
38                     The first element of the tuple is the PDC pin for the
39                     interrupt.
40                     The second element is the trigger type.
41
42 - interrupt-controller:
43         Usage: required
44         Value type: <bool>
45         Definition: Identifies the node as an interrupt controller.
46
47 - qcom,pdc-ranges:
48         Usage: required
49         Value type: <u32 array>
50         Definition: Specifies the PDC pin offset and the number of PDC ports.
51                     The tuples indicates the valid mapping of valid PDC ports
52                     and their hwirq mapping.
53                     The first element of the tuple is the starting PDC port.
54                     The second element is the GIC hwirq number for the PDC port.
55                     The third element is the number of interrupts in sequence.
56
57 Example:
58
59         pdc: interrupt-controller@b220000 {
60                 compatible = "qcom,sdm845-pdc";
61                 reg = <0xb220000 0x30000>;
62                 qcom,pdc-ranges = <0 512 94>, <94 641 15>, <115 662 7>;
63                 #interrupt-cells = <2>;
64                 interrupt-parent = <&intc>;
65                 interrupt-controller;
66         };
67
68 DT binding of a device that wants to use the GIC SPI 514 as a wakeup
69 interrupt, must do -
70
71         wake-device {
72                 interrupts-extended = <&pdc 2 IRQ_TYPE_LEVEL_HIGH>;
73         };
74
75 In this case interrupt 514 would be mapped to port 2 on the PDC as defined by
76 the qcom,pdc-ranges property.