topology.rst 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ============
  3. MHI Topology
  4. ============
  5. This document provides information about the MHI topology modeling and
  6. representation in the kernel.
  7. MHI Controller
  8. --------------
  9. MHI controller driver manages the interaction with the MHI client devices
  10. such as the external modems and WiFi chipsets. It is also the MHI bus master
  11. which is in charge of managing the physical link between the host and device.
  12. It is however not involved in the actual data transfer as the data transfer
  13. is taken care by the physical bus such as PCIe. Each controller driver exposes
  14. channels and events based on the client device type.
  15. Below are the roles of the MHI controller driver:
  16. * Turns on the physical bus and establishes the link to the device
  17. * Configures IRQs, IOMMU, and IOMEM
  18. * Allocates struct mhi_controller and registers with the MHI bus framework
  19. with channel and event configurations using mhi_register_controller.
  20. * Initiates power on and shutdown sequence
  21. * Initiates suspend and resume power management operations of the device.
  22. MHI Device
  23. ----------
  24. MHI device is the logical device which binds to a maximum of two MHI channels
  25. for bi-directional communication. Once MHI is in powered on state, the MHI
  26. core will create MHI devices based on the channel configuration exposed
  27. by the controller. There can be a single MHI device for each channel or for a
  28. couple of channels.
  29. Each supported device is enumerated in::
  30. /sys/bus/mhi/devices/
  31. MHI Driver
  32. ----------
  33. MHI driver is the client driver which binds to one or more MHI devices. The MHI
  34. driver sends and receives the upper-layer protocol packets like IP packets,
  35. modem control messages, and diagnostics messages over MHI. The MHI core will
  36. bind the MHI devices to the MHI driver.
  37. Each supported driver is enumerated in::
  38. /sys/bus/mhi/drivers/
  39. Below are the roles of the MHI driver:
  40. * Registers the driver with the MHI bus framework using mhi_driver_register.
  41. * Prepares the device for transfer by calling mhi_prepare_for_transfer.
  42. * Initiates data transfer by calling mhi_queue_transfer.
  43. * Once the data transfer is finished, calls mhi_unprepare_from_transfer to
  44. end data transfer.