From 30269a32a2388a7ce647d727b094f6b0cc3ab72b Mon Sep 17 00:00:00 2001 From: Chris Lew Date: Tue, 6 Aug 2019 16:10:48 -0700 Subject: [PATCH 1/2] dt-bindings: net: qrtr: Add FIFO transport bindings The QRTR FIFO driver acts as a transport driver between virtual machines for the QRTR core logic. Document the bindings for the shared memory region and interrupt resources. Change-Id: Idbac7a428f0155efc1d4cfbb015cfcfe1b84fb88 --- bindings/net/qrtr-fifo-xprt.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 bindings/net/qrtr-fifo-xprt.txt diff --git a/bindings/net/qrtr-fifo-xprt.txt b/bindings/net/qrtr-fifo-xprt.txt new file mode 100644 index 00000000..69debce6 --- /dev/null +++ b/bindings/net/qrtr-fifo-xprt.txt @@ -0,0 +1,25 @@ +Qualcomm Technologies, Inc. IPC Router FIFO Transport + +Required properties: +- compatible: should be "qcom,ipcr-fifo-xprt" +- reg: the irq register to raise an interrupt +- interrupts: the receiving interrupt line +- qcom,ipc-shm: reference to shared memory phandle + +Example: + + fifo_vipc_irq@176 { + compatible = "qcom,ipcr-fifo-xprt"; + reg = <0x176>; + interrupts = <0x0 0x142 0x1>; + qcom,ipc-shm = <&ipc-shm>; + }; + + ipc-shm: shared-buffer@85af7000 { + compatible = "qcom,hypervisor-shared-memory"; + phandle = <0x1e4>; + reg = <0x0 0x85af7000 0x0 0x9000>; + label = "ipc_shm"; + qcom,tx-is-first; + }; + From 5399bf11182896978d230994b86fb03ba2791632 Mon Sep 17 00:00:00 2001 From: Chris Lew Date: Thu, 8 Aug 2019 17:22:21 -0700 Subject: [PATCH 2/2] ARM: dts: msm: Add HWSPINLOCK, SMEM and SMP2P for Lahaina Add the device tree nodes to enable smp2p communication to remote processors. Change-Id: I471633bdc1c5c36160560273899df8403864fa7a --- qcom/lahaina-smp2p.dtsi | 82 +++++++++++++++++++++++++++++++++++++++++ qcom/lahaina.dtsi | 18 +++++++++ 2 files changed, 100 insertions(+) create mode 100644 qcom/lahaina-smp2p.dtsi diff --git a/qcom/lahaina-smp2p.dtsi b/qcom/lahaina-smp2p.dtsi new file mode 100644 index 00000000..6a4d0077 --- /dev/null +++ b/qcom/lahaina-smp2p.dtsi @@ -0,0 +1,82 @@ +#include +#include + +&soc { + qcom,smp2p-adsp { + compatible = "qcom,smp2p"; + qcom,smem = <443>, <429>; + interrupt-parent = <&ipcc_mproc>; + interrupts = ; + mboxes = <&ipcc_mproc IPCC_CLIENT_LPASS + IPCC_MPROC_SIGNAL_SMP2P>; + qcom,local-pid = <0>; + qcom,remote-pid = <2>; + + adsp_smp2p_out: master-kernel { + qcom,entry-name = "master-kernel"; + #qcom,smem-state-cells = <1>; + }; + + adsp_smp2p_in: slave-kernel { + qcom,entry-name = "slave-kernel"; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; + + qcom,smp2p-dsps { + compatible = "qcom,smp2p"; + qcom,smem = <481>, <430>; + interrupt-parent = <&ipcc_mproc>; + interrupts = ; + mboxes = <&ipcc_mproc IPCC_CLIENT_SLPI IPCC_MPROC_SIGNAL_SMP2P>; + qcom,local-pid = <0>; + qcom,remote-pid = <3>; + + dsps_smp2p_out: master-kernel { + qcom,entry-name = "master-kernel"; + #qcom,smem-state-cells = <1>; + }; + + dsps_smp2p_in: slave-kernel { + qcom,entry-name = "slave-kernel"; + interrupt-controller; + #interrupt-cells = <2>; + }; + + sleepstate_smp2p_out: sleepstate-out { + qcom,entry-name = "sleepstate"; + #qcom,smem-state-cells = <1>; + }; + + sleepstate_smp2p_in: qcom,sleepstate-in { + qcom,entry-name = "sleepstate_see"; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; + + qcom,smp2p-nsp { + compatible = "qcom,smp2p"; + qcom,smem = <94>, <432>; + interrupt-parent = <&ipcc_mproc>; + interrupts = ; + mboxes = <&ipcc_mproc IPCC_CLIENT_CDSP IPCC_MPROC_SIGNAL_SMP2P>; + qcom,local-pid = <0>; + qcom,remote-pid = <5>; + + cdsp_smp2p_out: master-kernel { + qcom,entry-name = "master-kernel"; + #qcom,smem-state-cells = <1>; + }; + + cdsp_smp2p_in: slave-kernel { + qcom,entry-name = "slave-kernel"; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; +}; diff --git a/qcom/lahaina.dtsi b/qcom/lahaina.dtsi index a1fb72c5..5b49b62d 100644 --- a/qcom/lahaina.dtsi +++ b/qcom/lahaina.dtsi @@ -619,7 +619,25 @@ ; interrupt-names = "l1-l2-faultirq","l3-scu-faultirq"; }; + + tcsr_mutex_block: syscon@1f40000 { + compatible = "syscon"; + reg = <0x1f40000 0x20000>; + }; + + tcsr_mutex: hwlock { + compatible = "qcom,tcsr-mutex"; + syscon = <&tcsr_mutex_block 0 0x1000>; + #hwlock-cells = <1>; + }; + + smem: qcom,smem { + compatible = "qcom,smem"; + memory-region = <&smem_mem>; + hwlocks = <&tcsr_mutex 3>; + }; }; #include "lahaina-pinctrl.dtsi" +#include "lahaina-smp2p.dtsi" #include "msm-arm-smmu-lahaina.dtsi"