From 68e64e9d6db131ad95336d5e671dce19139a3f4b Mon Sep 17 00:00:00 2001 From: Chris Lew Date: Mon, 5 Aug 2019 17:22:31 -0700 Subject: [PATCH 1/2] dt-bindings: mailbox: Introduce MSM_QMP bindings The msm_qmp driver is used to send packets to the aop. The messages are sent over msgram owned by aop. This is a lightweight protocol that only supports one packet in flight in any direction. Change-Id: I3780bdb955f74a2609d870e65c58d228b9cf27cc --- bindings/arm/msm/msm_qmp.txt | 60 ++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 bindings/arm/msm/msm_qmp.txt diff --git a/bindings/arm/msm/msm_qmp.txt b/bindings/arm/msm/msm_qmp.txt new file mode 100644 index 000000000000..189b42b5cf54 --- /dev/null +++ b/bindings/arm/msm/msm_qmp.txt @@ -0,0 +1,60 @@ +Qualcomm Technologies, Inc. QTI Mailbox Protocol + +QMP Driver +=================== + +Required properties: +- compatible : should be "qcom,qmp-mbox". +- label : the name of the remote proc this link connects to. +- reg : The location and size of shared memory. + The irq register base address for triggering interrupts. +- reg-names : "msgram" - string to identify the shared memory region. + "irq-reg-base" - string to identify the irq register region. +- qcom,irq-mask : the bitmask to trigger an interrupt. +- mboxes: - Handle to outgoing interrupt if not using irq-reg-base +- interrupt : the receiving interrupt line. +- mbox-desc-offset : offset of mailbox descriptor from start of the msgram. +- priority : the priority of this mailbox compared to other mailboxes. +- #mbox-cells: Common mailbox binding property to identify the number of cells + required for the mailbox specifier, should be 1. + +Optional properties: +- qcom,early-boot : bool to indicate that this remote proc will boot before QMP. +- mbox-offset : offset of the mcore mailbox from the offset of msgram. If this + property is not used, qmp will use the configuration + provided by the ucore. +- mbox-size : size of the mcore mailbox. If this property is not used, qmp will + use the configuration provided by the ucore. + +Example: + qmp_aop: qcom,qmp-aop { + compatible = "qcom,qmp-mbox"; + label = "aop"; + qcom,early-boot; + reg = <0xc300000 0x100000>, + <0x1799000C 0x4>; + reg-names = "msgram", "irq-reg-base"; + qcom,irq-mask = <0x1>; + interrupt = <0 389 1>; + mbox-desc-offset = <0x100>; + priority = <1>; + mbox-offset = <0x500>; + mbox-size = <0x400>; + #mbox-cells = <1>; + }; + +Mailbox Client +============== +"mboxes" and the optional "mbox-names" (please see +Documentation/devicetree/bindings/mailbox/mailbox.txt for details). Each value +of the mboxes property should contain a phandle to the mailbox controller +device node and second argument is the channel index. It must be 0 (qmp +supports only one channel).The equivalent "mbox-names" property value can be +used to give a name to the communication channel to be used by the client user. + +Example: + qmp-client { + compatible = "qcom,qmp-client"; + mbox-names = "aop"; + mboxes = <&qmp_aop 0>, + }; From 5882ad3c3641593358366dcb076c7ec2d236b606 Mon Sep 17 00:00:00 2001 From: Chris Lew Date: Mon, 5 Aug 2019 17:39:34 -0700 Subject: [PATCH 2/2] dt-bindings: Introduce QMP debugfs client bindings The QMP debugfs client is used to send test commands to the AOP over QMP. Users can echo commands to a debugfs node and the QMP debugfs client driver will copy those commands and send them to AOP. Change-Id: I49fa586110cfe53886b5b5e0b1c9aa906d3d50cb --- bindings/arm/msm/qmp-debugfs-client.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 bindings/arm/msm/qmp-debugfs-client.txt diff --git a/bindings/arm/msm/qmp-debugfs-client.txt b/bindings/arm/msm/qmp-debugfs-client.txt new file mode 100644 index 000000000000..655bf89559c5 --- /dev/null +++ b/bindings/arm/msm/qmp-debugfs-client.txt @@ -0,0 +1,17 @@ +QMP debugfs client: +----------------- + +QTI Messaging Protocol(QMP) debugfs client is an interface for clients to +send data to the Always on processor using QMP. + +Required properties : +- compatible : must be "qcom,debugfs-qmp-client" +- mboxes : list of QMP mailbox phandle and channel identifier tuples. +- mbox-names : names of the listed mboxes + +Example : + qcom,qmp-client { + compatible = "qcom,debugfs-qmp-client"; + mboxes = <&qmp_aop 0>; + mbox-names = "aop"; + };