Documentation/driver-api/hsi.rst GitHub 원문 ↗

Linux 6.18.37 · Driver API

High Speed Synchronous Serial Interface (HSI)

HSI full-duplex die interconnect의 signal, Linux subsystem, hsi_char ioctl과 kernel API를 설명합니다.

Source pathDocumentation/driver-api/hsi.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

hsi.rst:1-88

HSI는 application processor와 cellular baseband 사이에서 여러 channel을 full duplex로 운용하는 저지연 MIPI protocol입니다. Linux HSI subsystem은 multi-port controller와 protocol client를 분리하고 각 port에 userspace용 hsi_char device를 제공합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

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

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

HSI 소개와 signal

1-20

문서 제목은 `High Speed Synchronous Serial Interface (HSI)`입니다. HSI는 Application Processor와 Baseband chipset 사이의 die-level interconnect에 최적화된 full-duplex, low-latency protocol입니다. MIPI alliance가 2003년에 규정했고 이후 여러 vendor가 구현했습니다.

HSI interface는 여러 channel, 일반적으로 8개에서 full-duplex communication을 지원하며 최대 200 Mbit/s 속도에 도달할 수 있습니다.

Serial protocol은 DATA와 FLAG 두 signal을 data와 clock의 결합 신호로 사용하고 flow control용 READY signal을 추가합니다. Optional WAKE signal은 standby mode의 chip을 깨울 수 있습니다.

Application die에서 cellular die로 가는 signal에는 보통 `AC` prefix를 붙이고 반대 방향에는 `CA` prefix를 붙입니다.

HSI signal 역할
Signal역할방향 prefix
DATASerial dataACDATA 또는 CADATA
FLAGDATA와 결합한 clock framingACFLAG 또는 CAFLAG
READY반대편 receiver의 flow controlACREADY 또는 CAREADY
WAKEStandby chip wakeupACWAKE 또는 CAWAKE

Data·clock 결합과 flow-control·wakeup signal을 정리했습니다.

Cellular die와 application die 연결

21-39

원문의 ASCII diagram은 cellular die와 application die 사이 양방향 TX/RX signal을 나타냅니다.

::

    +------------+                                 +---------------+
    |  Cellular  |                                 |  Application  |
    |    Die     |                                 |      Die      |
    |            | - - - - - - CAWAKE - - - - - - >|               |
    |           T|------------ CADATA ------------>|R              |
    |           X|------------ CAFLAG ------------>|X              |
    |            |<----------- ACREADY ------------|               |
    |            |                                 |               |
    |            |                                 |               |
    |            |< - - - - -  ACWAKE - - - - - - -|               |
    |           R|<----------- ACDATA -------------|T              |
    |           X|<----------- ACFLAG -------------|X              |
    |            |------------ CAREADY ----------->|               |
    |            |                                 |               |
    |            |                                 |               |
    +------------+                                 +---------------+
HSI full-duplex 방향
송신 측수신 측Data·flagFlow controlWake
Cellular TXApplication RXCADATA·CAFLAG →ACREADY ←CAWAKE →
Application TXCellular RXACDATA·ACFLAG ←CAREADY →ACWAKE ←

원문의 두 die 연결도를 signal 방향으로 구조화했습니다.

HSI channel 전송
Sender가 DATA·FLAG 전송Receiver가 combined data/clock 해석Receiver가 READY로 flow control여러 channel에서 병렬 communication반대 방향도 동시에 같은 구조로 전송

한 방향의 data 전송과 receiver flow control 관계입니다.

Linux HSI subsystem

40-50

Linux kernel의 HSI subsystem은 HSI device에 사용합니다. Multi-port controller 지원을 포함한 HSI controller driver를 담고 HSI port를 사용하는 generic API를 제공합니다.

또한 generic API를 사용해 HSI interface 위의 protocol을 구현하는 HSI client driver를 포함합니다. Client driver는 임의 수의 channel을 사용할 수 있습니다.

Linux HSI driver model
HSI controller hardwareMulti-port controller driverGeneric HSI port APIHSI client protocol driver임의 수 channel 사용

Controller, port API와 protocol client의 관계입니다.

hsi_char userspace device

51-79

각 port는 `hsi_char`라는 generic client driver를 자동 등록합니다. 이 driver는 HSI port를 나타내는 userspace character device를 제공해 userspace에서 HSI로 통신할 수 있게 합니다.

Userspace는 다음 ioctl command로 `hsi_char` device를 구성합니다.

hsi_char ioctl
Command동작
HSC_RESETHSI port flush
HSC_SET_PMClient enable 또는 disable
HSC_SEND_BREAKBreak 전송
HSC_SET_RXRX configuration 설정
HSC_GET_RXRX configuration 조회
HSC_SET_TXTX configuration 설정
HSC_GET_TXTX configuration 조회

Port reset·power·break·RX/TX configuration command입니다.

Kernel HSI API source

80-88

Kernel HSI API의 internal declaration은 `include/linux/hsi/hsi.h`에서 가져옵니다.

.. kernel-doc:: include/linux/hsi/hsi.h
   :internal:

HSI core의 exported implementation API는 `drivers/hsi/hsi_core.c`에서 가져옵니다.

.. kernel-doc:: drivers/hsi/hsi_core.c
   :export:
HSI kernel-doc source
범위Source path
Internal APIinclude/linux/hsi/hsi.h
Exported coredrivers/hsi/hsi_core.c

Internal header와 exported core source입니다.