1*4882a593SmuzhiyunHigh Speed Synchronous Serial Interface (HSI) 2*4882a593Smuzhiyun============================================= 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunIntroduction 5*4882a593Smuzhiyun--------------- 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunHigh Speed Syncronous Interface (HSI) is a fullduplex, low latency protocol, 8*4882a593Smuzhiyunthat is optimized for die-level interconnect between an Application Processor 9*4882a593Smuzhiyunand a Baseband chipset. It has been specified by the MIPI alliance in 2003 and 10*4882a593Smuzhiyunimplemented by multiple vendors since then. 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunThe HSI interface supports full duplex communication over multiple channels 13*4882a593Smuzhiyun(typically 8) and is capable of reaching speeds up to 200 Mbit/s. 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunThe serial protocol uses two signals, DATA and FLAG as combined data and clock 16*4882a593Smuzhiyunsignals and an additional READY signal for flow control. An additional WAKE 17*4882a593Smuzhiyunsignal can be used to wakeup the chips from standby modes. The signals are 18*4882a593Smuzhiyuncommonly prefixed by AC for signals going from the application die to the 19*4882a593Smuzhiyuncellular die and CA for signals going the other way around. 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun:: 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun +------------+ +---------------+ 24*4882a593Smuzhiyun | Cellular | | Application | 25*4882a593Smuzhiyun | Die | | Die | 26*4882a593Smuzhiyun | | - - - - - - CAWAKE - - - - - - >| | 27*4882a593Smuzhiyun | T|------------ CADATA ------------>|R | 28*4882a593Smuzhiyun | X|------------ CAFLAG ------------>|X | 29*4882a593Smuzhiyun | |<----------- ACREADY ------------| | 30*4882a593Smuzhiyun | | | | 31*4882a593Smuzhiyun | | | | 32*4882a593Smuzhiyun | |< - - - - - ACWAKE - - - - - - -| | 33*4882a593Smuzhiyun | R|<----------- ACDATA -------------|T | 34*4882a593Smuzhiyun | X|<----------- ACFLAG -------------|X | 35*4882a593Smuzhiyun | |------------ CAREADY ----------->| | 36*4882a593Smuzhiyun | | | | 37*4882a593Smuzhiyun | | | | 38*4882a593Smuzhiyun +------------+ +---------------+ 39*4882a593Smuzhiyun 40*4882a593SmuzhiyunHSI Subsystem in Linux 41*4882a593Smuzhiyun------------------------- 42*4882a593Smuzhiyun 43*4882a593SmuzhiyunIn the Linux kernel the hsi subsystem is supposed to be used for HSI devices. 44*4882a593SmuzhiyunThe hsi subsystem contains drivers for hsi controllers including support for 45*4882a593Smuzhiyunmulti-port controllers and provides a generic API for using the HSI ports. 46*4882a593Smuzhiyun 47*4882a593SmuzhiyunIt also contains HSI client drivers, which make use of the generic API to 48*4882a593Smuzhiyunimplement a protocol used on the HSI interface. These client drivers can 49*4882a593Smuzhiyunuse an arbitrary number of channels. 50*4882a593Smuzhiyun 51*4882a593Smuzhiyunhsi-char Device 52*4882a593Smuzhiyun------------------ 53*4882a593Smuzhiyun 54*4882a593SmuzhiyunEach port automatically registers a generic client driver called hsi_char, 55*4882a593Smuzhiyunwhich provides a charecter device for userspace representing the HSI port. 56*4882a593SmuzhiyunIt can be used to communicate via HSI from userspace. Userspace may 57*4882a593Smuzhiyunconfigure the hsi_char device using the following ioctl commands: 58*4882a593Smuzhiyun 59*4882a593SmuzhiyunHSC_RESET 60*4882a593Smuzhiyun flush the HSI port 61*4882a593Smuzhiyun 62*4882a593SmuzhiyunHSC_SET_PM 63*4882a593Smuzhiyun enable or disable the client. 64*4882a593Smuzhiyun 65*4882a593SmuzhiyunHSC_SEND_BREAK 66*4882a593Smuzhiyun send break 67*4882a593Smuzhiyun 68*4882a593SmuzhiyunHSC_SET_RX 69*4882a593Smuzhiyun set RX configuration 70*4882a593Smuzhiyun 71*4882a593SmuzhiyunHSC_GET_RX 72*4882a593Smuzhiyun get RX configuration 73*4882a593Smuzhiyun 74*4882a593SmuzhiyunHSC_SET_TX 75*4882a593Smuzhiyun set TX configuration 76*4882a593Smuzhiyun 77*4882a593SmuzhiyunHSC_GET_TX 78*4882a593Smuzhiyun get TX configuration 79*4882a593Smuzhiyun 80*4882a593SmuzhiyunThe kernel HSI API 81*4882a593Smuzhiyun------------------ 82*4882a593Smuzhiyun 83*4882a593Smuzhiyun.. kernel-doc:: include/linux/hsi/hsi.h 84*4882a593Smuzhiyun :internal: 85*4882a593Smuzhiyun 86*4882a593Smuzhiyun.. kernel-doc:: drivers/hsi/hsi_core.c 87*4882a593Smuzhiyun :export: 88*4882a593Smuzhiyun 89