From cb4ddc21a5113b5db73b7340a2a3f0ca869534c9 Mon Sep 17 00:00:00 2001 From: Prakruthi Deepak Heragu Date: Tue, 23 Jul 2019 11:29:03 -0700 Subject: [PATCH] dt-bindings: Add device-tree bindings for IPCC driver Add the device-tree bindings documentation for Inter-Processor Communication Controller (IPCC). This include the bindings for the driver as well as the test-driver. Change-Id: I8857cdbc42c9612487071c74b4bbef8f52cb4ec6 --- .../soc/qcom/qcom,ipcc-self-ping-test.yaml | 39 +++++++++ bindings/soc/qcom/qcom,ipcc.yaml | 86 +++++++++++++++++++ 2 files changed, 125 insertions(+) create mode 100644 bindings/soc/qcom/qcom,ipcc-self-ping-test.yaml create mode 100644 bindings/soc/qcom/qcom,ipcc.yaml diff --git a/bindings/soc/qcom/qcom,ipcc-self-ping-test.yaml b/bindings/soc/qcom/qcom,ipcc-self-ping-test.yaml new file mode 100644 index 00000000..d14325e8 --- /dev/null +++ b/bindings/soc/qcom/qcom,ipcc-self-ping-test.yaml @@ -0,0 +1,39 @@ +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/bindings/soc/qcom/qcom,ipcc-self-ping-test.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: The document describes the device tree binding for testing the IPCC + +maintainers: + - Raghavendra Rao Ananta + +description: |+ + For details on the IPCC driver, please see qcom,ipcc.txt + +properties: + compatible: + Usage: required + Value type: + Definition: Must be "qcom,ipcc-self-ping" + + interrupts-extended: + Usage: required + Value type: + Definition: One entry specifying the phandle to the IPCC protocol, the APPS' + client-id, signal-id and IRQ type. + + mboxes: + Usage: required + Value type: + Definition: One entry specifying the phandle to the IPCC protocol, the APPS' + client-id and the signal-id (same as interrupts-extended). + +example: + - | + ipcc_self_ping: ipcc-self-ping { + compatible = "qcom,ipcc-self-ping"; + interrupts-extended = <&ipcc_mproc IPCC_CLIENT_APSS + IPCC_MPROC_SIGNAL_SMP2P IRQ_TYPE_LEVEL_HIGH>; + mboxes = <&ipcc_mproc IPCC_CLIENT_APSS IPCC_MPROC_SIGNAL_SMP2P>; + }; diff --git a/bindings/soc/qcom/qcom,ipcc.yaml b/bindings/soc/qcom/qcom,ipcc.yaml new file mode 100644 index 00000000..cb35bc66 --- /dev/null +++ b/bindings/soc/qcom/qcom,ipcc.yaml @@ -0,0 +1,86 @@ +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/bindings/soc/qcom/qcom,ipcc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. Inter-Processor Communication Controller binding + +maintainers: + - Raghavendra Rao Ananta + +description: | + The Inter-Processor Communication Controller (IPCC) is a centralized hardware + to route the interrupts across various subsystems. It involves a three-level + addressing scheme: protocol, client and signal. For example, consider an entity + on the Application Processor Subsystem (APSS) that wants to listen to Modem's + interrupts via Shared Memory Point to Point (SMP2P) interface. In such a case, + the client would be Modem (client-id: 2) and the signal would be SMP2P + (signal-id: 2). The SMP2P itself falls under the Multiprocessor (MPROC) protocol + (protocol-id: 0). Please visit include/dt-bindings/soc/qcom/qcom,ipcc.h for the + list of IDs. + + Each protocol has a dedicated interrupt line, and as a result, each protocol is + exposed as a separate interrupt controller. One of the duties of this interrupt + controller driver would be to forward the interrupt to the correct entity + on the APPS. The children inheriting the interrupt-controller would be + mentioning the client-id and signal-id that it's interested in. + + On the other hand, sending an interrupt to a subsystem is done through the + mailbox interface, which again requires client-id and signal-id. + +properties: + compatible: + Usage: required + Value type: + Definition: Must be "qcom,ipcc" + + reg: + Usage: required + Value type: + Definition: One entry specifying the base address and size corresponding to + the protocol frame + + interrupts: + Usage: required + Value type: + Definition: One entry specifying the protocol's interrupt + + interrupt-controller: + Usage: required + Value type: + Definition: Specifies that the device acts as an interrupt controller + + #interrupt-cells: + Usage: required + Value type: + Definition: must be 3 - denoting client-id, signal-id and interrupt type + + mbox-cells: + Usage: required + Value type: + Definition: must be 2 - denoting client-id and signal-id + +example: + - | + #include + + ipcc_mproc: qcom,ipcc@408000 { + compatible = "qcom,ipcc"; + reg = <0x408000 0x1000>; + interrupts = , + interrupt-controller; + #interrupt-cells = <3>; + #mbox-cells = <2>; + }; + +client-example: + - | + qcom,smp2p-modem@1799000c { + compatible = "qcom,smp2p"; + interrupts-extended = <&ipcc_mproc IPCC_CLIENT_MPSS + IPCC_MPROC_SIGNAL_SMP2P IRQ_TYPE_EDGE_RISING>; + mboxes = <&ipcc_mproc IPCC_CLIENT_MPSS IPCC_MPROC_SIGNAL_SMP2P>; + + /* Other SMP2P fields */ + }; +