Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5c511be authored by Rama Krishna Phani A's avatar Rama Krishna Phani A
Browse files

msm: mhi_dev: add MHI device driver snapshot



Modem host interface (MHI) device driver is
used to communicate between host and device
over PCIe.

This snapshot is taken as of msm-4.9
'commit <16158207fb4c> ("Merge "f_qc_rndis: Call
rndis_ipa_init() from rndis_qc_bind()")'.

Update handling of error conditions.

Change-Id: I5ffdaedd7f384bedb89eecd7773289b9bc399c93
Signed-off-by: default avatarRama Krishna Phani A <rphani@codeaurora.org>
parent f6f026ce
Loading
Loading
Loading
Loading
+46 −0
Original line number Diff line number Diff line
MSM MHI DEV

MSM MHI DEV enables communication with the host over a PCIe link using the
Modem Host Interface protocol. The driver interfaces with the IPA for
enabling the HW acceleration channel path and provides interface for
software channels to communicate between Host and device.

Required properties:
  - compatible: should be "qcom,msm-mhi-dev" for MHI device driver.
  - reg: MHI MMIO physical register space.
  - reg-names: resource names used for the MHI MMIO physical address region,
	       IPA uC command and event ring doorbell mail box address.
	       Should be "mhi_mmio_base" for MHI MMIO physical address,
	       "ipa_uc_mbox_crdb" for IPA uC Command Ring doorbell,
	       "ipa_uc_mbox_erdb" for IPA uC Event Ring doorbell passed to
	       the IPA driver.
  - qcom,mhi-ifc-id: ID of HW interface via which MHI on device side
		communicates with host side.
  - qcom,mhi-ep-msi: End point MSI number.
  - qcom,mhi-version: MHI specification version supported by the device.

Optional property:
  - qcom,use-ipa-software-channel: If property is present use IPA hardware
		accelerated path for MHI software channel data transfers
		between host and device.
  - qcom,mhi-config-iatu: If property is present map the control and data region
		between host and device using iatu.
  - qcom,mhi-interrupt: If property is present register for mhi interrupt.
  - qcom,mhi-local-pa-base: The physical base address on the device used by the
		MHI device driver to map the control and data region with the
		MHI driver on the host. This property is required if iatu
		property qcom,mhi-config-iatu is present.

Example:

	mhi: qcom,msm-mhi-dev {
		compatible = "qcom,msm-mhi-dev";
		reg = <0xfc527000 0x1000>,
		     <0xfd4fa000 0x1>,
		     <0xfd4fa080 0x1>;
		reg-names = "mhi_mmio_base", "ipa_uc_mbox_crdb",
			    "ipa_uc_mbox_erdb";
		qcom,mhi-ifc-id = <0x030017cb>;
		qcom,mhi-ep-msi = <1>;
		qcom,mhi-version = <0x1000000>;
	};
+10 −0
Original line number Diff line number Diff line
@@ -104,6 +104,16 @@ config GSI_REGISTER_VERSION_2
	  new registers offsets, new registers fields structure and
	  new registers.

config MSM_MHI_DEV
        tristate "Modem Device Interface Driver"
	depends on EP_PCIE && IPA3
        help
          This kernel module is used to interact with PCIe Root complex
          supporting MHI protocol. MHI is a data transmission protocol
          involving communication between a host and a device over shared
          memory. MHI interacts with the IPA for supporting transfers
	  on the HW accelerated channels between Host and device.

config IPA3
	tristate "IPA3 support"
	select GSI
+1 −0
Original line number Diff line number Diff line
@@ -10,5 +10,6 @@ obj-$(CONFIG_GSI) += gsi/
obj-$(CONFIG_IPA) += ipa/
obj-$(CONFIG_IPA3) += ipa/
obj-$(CONFIG_EP_PCIE) += ep_pcie/
obj-$(CONFIG_MSM_MHI_DEV) += mhi_dev/
obj-$(CONFIG_MSM_11AD) += msm_11ad/
obj-$(CONFIG_SEEMP_CORE) += seemp_core/
+7 −0
Original line number Diff line number Diff line
# Makefile for MHI driver
obj-y += mhi_mmio.o
obj-y += mhi.o
obj-y += mhi_ring.o
obj-y += mhi_uci.o
obj-y += mhi_sm.o
obj-y += mhi_dev_net.o
+2997 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading