Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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