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

Commit 14fcb5c1 authored by Andrei Danaila's avatar Andrei Danaila Committed by Matt Wagantall
Browse files

msm: mhi: Add MHI core driver



Enable the MHI core driver for communication
between host and device using PCIe as an interconnect
and supporting MHI as the communication protocol.

The driver exposes several kernel space APIs
for use by other kernel entities to interface to
the PCIe device over MHI.

APIs for read and write and other notifications
are supported by this MHI driver.

Support for full power management and device reset
is also included.

CRs-Fixed: 689329
Change-Id: Ibc2fd7c2d5689001485f71b1133ada2c4ca236a9
Signed-off-by: default avatarAndrei Danaila <adanaila@codeaurora.org>
parent 6759c3c1
Loading
Loading
Loading
Loading
+36 −0
Original line number Diff line number Diff line
MSM MHI

MSM MHI enables communication with a device over a PCIe link using the
Modem Host Interface protocol. The bindings referred to below, enable
the correct configuration of the interface and required sideband
signals.

Required properties:
  - compatible: should be "qcom,mhi"
  - Refer to "Documentation/devicetree/bindings/esoc/esoc_client.txt" for
    below properties:
	- esoc-names
	- esoc-0
  - wakeup-gpios: gpio used to wake device from low power mode.
  - Refer to "Documentation/devicetree/bindings/arm/msm/msm_bus.txt" for
    below optional properties:
	- qcom,msm-bus,name
	- qcom,msm-bus,num-cases
	- qcom,msm-bus,num-paths
	- qcom,msm-bus,vectors-KBps

Example:

	mhi: qcom,mhi {
		compatible = "qcom,mhi";
		esoc-names = "mdm";
		esoc-0 = <&mdm1>;
		mhi-device-wake-gpio =
			<&msmgpio 108 0>;
		qcom,msm-bus,name = "mhi";
		qcom,msm-bus,num-cases = <2>;
		qcom,msm-bus,num-paths = <1>;
		qcom,msm-bus,vectors-KBps =
				<100 512 0 0>,
				<100 512 1200000000 1200000000>;
	};
+4 −0
Original line number Diff line number Diff line
@@ -1738,6 +1738,10 @@
					 <0>, <0>, <0>, <0>, <0>, <0>, <0>;
	};

	mhi: qcom,mhi {
		compatible = "qcom,mhi";
	};

        qcom,ipc-spinlock@740000 {
                compatible = "qcom,ipc-spinlock-sfpb";
                reg = <0x740000 0x8000>;
+9 −0
Original line number Diff line number Diff line
@@ -118,6 +118,15 @@ config RMNET_IPA
	  for RmNet Data Driver and also exchange of QMI messages between
	  A7 and Q6 IPA-driver.

config MSM_MHI
	tristate "Modem Host Interface Driver"
	help
	  This kernel module is used to interact with PCIe endpoints
	  supporting MHI protocol. MHI is a data transmission protocol
	  involving communication between a host and a device over shared
	  memory. The MHI driver manages the shared memory by use of logical
	  unidirectional channels.

config MSM_MHI_UCI
	 tristate "MHI Usperspace Control Interface Driver"
	 depends on MSM_MHI
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@

obj-$(CONFIG_MSM_BUS_SCALING) += msm_bus/
obj-$(CONFIG_MSM_SPMI) += spmi/
obj-$(CONFIG_MSM_MHI) += mhi/
obj-$(CONFIG_MSM_MHI_UCI) += mhi_uci/
obj-$(CONFIG_QPNP_POWER_ON) += qpnp-power-on.o
obj-$(CONFIG_QPNP_REVID) += qpnp-revid.o
+12 −0
Original line number Diff line number Diff line
# Makefile for MHI driver
obj-y += mhi_main.o
obj-y += mhi_iface.o
obj-y += mhi_init.o
obj-y += mhi_isr.o
obj-y += mhi_mmio_ops.o
obj-y += mhi_ring_ops.o
obj-y += mhi_states.o
obj-y += mhi_sys.o
obj-y += mhi_bhi.o
obj-y += mhi_pm.o
obj-y += mhi_ssr.o
Loading