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

Commit a1140745 authored by Siddartha Mohanadoss's avatar Siddartha Mohanadoss
Browse files

mhi_dev: mhi: Add MHI device driver



The Modem Host Interface (MHI) device driver supports
clients to send control and data packets such as
IP data packets, control messages and diagnostic
data between the host and the device. It follows the
MHI specification to transfer data.

The driver interfaces with the IPA driver for hardware
accelerated channels and PCIe endpoint driver to
communicate between the host and the device.

The driver exposes to both userspace and kernel space
generic IO read/write/open/close system calls and
kernel APIs to communicate and transfer data between
the host and the device.

Change-Id: I369a0ab198b17d3d8d043836397cecde7ba7dbd3
Signed-off-by: default avatarSiddartha Mohanadoss <smohanad@codeaurora.org>
parent eb310418
Loading
Loading
Loading
Loading
+32 −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.
  - interrupts: The MHI interrupt used when Host issues request to
		process pending data to be read by the device.
  - interrupt-names: Should be mhi-device-inta for MHI interrupt.

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";
		interrupts = <0 42 0>;
		interrupt-names = "mhi-device-inta";
	};
+10 −0
Original line number Diff line number Diff line
@@ -169,6 +169,16 @@ config MSM_MHI_UCI
	  read, write and ioctl operations to communicate with the
	  attached device.

config MSM_MHI_DEV
        tristate "Modem Device Interface Driver"
	depends on EP_PCIE && IPA
        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 PFT
	bool "Per-File-Tagger driver"
	default n
+1 −0
Original line number Diff line number Diff line
@@ -21,3 +21,4 @@ obj-$(CONFIG_GPIO_USB_DETECT) += gpio-usbdetect.o
obj-$(CONFIG_USB_BAM) += usb_bam.o
obj-$(CONFIG_MSM_AVTIMER) += avtimer.o
obj-$(CONFIG_MSM_11AD) += msm_11ad/
obj-$(CONFIG_MSM_MHI_DEV) += mhi_dev/
+5 −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
+1892 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading