xref: /freebsd-src/sys/contrib/device-tree/Bindings/interrupt-controller/qcom,pdc.txt (revision d5b0e70f7e04d971691517ce1304d86a1e367e2e)
1c66ec88fSEmmanuel VadotPDC interrupt controller
2c66ec88fSEmmanuel Vadot
3c66ec88fSEmmanuel VadotQualcomm Technologies Inc. SoCs based on the RPM Hardened architecture have a
4c66ec88fSEmmanuel VadotPower Domain Controller (PDC) that is on always-on domain. In addition to
5c66ec88fSEmmanuel Vadotproviding power control for the power domains, the hardware also has an
6c66ec88fSEmmanuel Vadotinterrupt controller that can be used to help detect edge low interrupts as
7c66ec88fSEmmanuel Vadotwell detect interrupts when the GIC is non-operational.
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel VadotGIC is parent interrupt controller at the highest level. Platform interrupt
10c66ec88fSEmmanuel Vadotcontroller PDC is next in hierarchy, followed by others. Drivers requiring
11c66ec88fSEmmanuel Vadotwakeup capabilities of their device interrupts routed through the PDC, must
12c66ec88fSEmmanuel Vadotspecify PDC as their interrupt controller and request the PDC port associated
13c66ec88fSEmmanuel Vadotwith the GIC interrupt. See example below.
14c66ec88fSEmmanuel Vadot
15c66ec88fSEmmanuel VadotProperties:
16c66ec88fSEmmanuel Vadot
17c66ec88fSEmmanuel Vadot- compatible:
18c66ec88fSEmmanuel Vadot	Usage: required
19c66ec88fSEmmanuel Vadot	Value type: <string>
20c66ec88fSEmmanuel Vadot	Definition: Should contain "qcom,<soc>-pdc" and "qcom,pdc"
21c66ec88fSEmmanuel Vadot		    - "qcom,sc7180-pdc": For SC7180
222eb4d8dcSEmmanuel Vadot		    - "qcom,sc7280-pdc": For SC7280
23c66ec88fSEmmanuel Vadot		    - "qcom,sdm845-pdc": For SDM845
24*d5b0e70fSEmmanuel Vadot		    - "qcom,sm6350-pdc": For SM6350
25*d5b0e70fSEmmanuel Vadot		    - "qcom,sm8150-pdc": For SM8150
26*d5b0e70fSEmmanuel Vadot		    - "qcom,sm8250-pdc": For SM8250
27*d5b0e70fSEmmanuel Vadot		    - "qcom,sm8350-pdc": For SM8350
28c66ec88fSEmmanuel Vadot
29c66ec88fSEmmanuel Vadot- reg:
30c66ec88fSEmmanuel Vadot	Usage: required
31c66ec88fSEmmanuel Vadot	Value type: <prop-encoded-array>
32c66ec88fSEmmanuel Vadot	Definition: Specifies the base physical address for PDC hardware.
33c66ec88fSEmmanuel Vadot
34c66ec88fSEmmanuel Vadot- interrupt-cells:
35c66ec88fSEmmanuel Vadot	Usage: required
36c66ec88fSEmmanuel Vadot	Value type: <u32>
37c66ec88fSEmmanuel Vadot	Definition: Specifies the number of cells needed to encode an interrupt
38c66ec88fSEmmanuel Vadot		    source.
39c66ec88fSEmmanuel Vadot		    Must be 2.
40c66ec88fSEmmanuel Vadot		    The first element of the tuple is the PDC pin for the
41c66ec88fSEmmanuel Vadot		    interrupt.
42c66ec88fSEmmanuel Vadot		    The second element is the trigger type.
43c66ec88fSEmmanuel Vadot
44c66ec88fSEmmanuel Vadot- interrupt-controller:
45c66ec88fSEmmanuel Vadot	Usage: required
46c66ec88fSEmmanuel Vadot	Value type: <bool>
47c66ec88fSEmmanuel Vadot	Definition: Identifies the node as an interrupt controller.
48c66ec88fSEmmanuel Vadot
49c66ec88fSEmmanuel Vadot- qcom,pdc-ranges:
50c66ec88fSEmmanuel Vadot	Usage: required
51c66ec88fSEmmanuel Vadot	Value type: <u32 array>
52c66ec88fSEmmanuel Vadot	Definition: Specifies the PDC pin offset and the number of PDC ports.
53c66ec88fSEmmanuel Vadot		    The tuples indicates the valid mapping of valid PDC ports
54c66ec88fSEmmanuel Vadot		    and their hwirq mapping.
55c66ec88fSEmmanuel Vadot		    The first element of the tuple is the starting PDC port.
56c66ec88fSEmmanuel Vadot		    The second element is the GIC hwirq number for the PDC port.
57c66ec88fSEmmanuel Vadot		    The third element is the number of interrupts in sequence.
58c66ec88fSEmmanuel Vadot
59c66ec88fSEmmanuel VadotExample:
60c66ec88fSEmmanuel Vadot
61c66ec88fSEmmanuel Vadot	pdc: interrupt-controller@b220000 {
62c66ec88fSEmmanuel Vadot		compatible = "qcom,sdm845-pdc";
63c66ec88fSEmmanuel Vadot		reg = <0xb220000 0x30000>;
64c66ec88fSEmmanuel Vadot		qcom,pdc-ranges = <0 512 94>, <94 641 15>, <115 662 7>;
65c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
66c66ec88fSEmmanuel Vadot		interrupt-parent = <&intc>;
67c66ec88fSEmmanuel Vadot		interrupt-controller;
68c66ec88fSEmmanuel Vadot	};
69c66ec88fSEmmanuel Vadot
70c66ec88fSEmmanuel VadotDT binding of a device that wants to use the GIC SPI 514 as a wakeup
71c66ec88fSEmmanuel Vadotinterrupt, must do -
72c66ec88fSEmmanuel Vadot
73c66ec88fSEmmanuel Vadot	wake-device {
74c66ec88fSEmmanuel Vadot		interrupts-extended = <&pdc 2 IRQ_TYPE_LEVEL_HIGH>;
75c66ec88fSEmmanuel Vadot	};
76c66ec88fSEmmanuel Vadot
77c66ec88fSEmmanuel VadotIn this case interrupt 514 would be mapped to port 2 on the PDC as defined by
78c66ec88fSEmmanuel Vadotthe qcom,pdc-ranges property.
79