logo资料库

MIPI Camera Serial Interface 2 (CSI-2).pdf

第1页 / 共170页
第2页 / 共170页
第3页 / 共170页
第4页 / 共170页
第5页 / 共170页
第6页 / 共170页
第7页 / 共170页
第8页 / 共170页
资料共170页,剩余部分请下载后查看
1 Overview
1.1 Scope
1.2 Purpose
2 Terminology
2.1 Definitions
2.2 Abbreviations
2.3 Acronyms
3 References
4 Overview of CSI-2
5 CSI-2 Layer Definitions
6 Camera Control Interface (CCI)
6.1 Data Transfer Protocol
6.1.1 Message Type
6.1.2 Read/Write Operations
6.2 CCI Slave Addresses
6.3 CCI Multi-Byte Registers
6.3.1 Overview
6.3.2 The Transmission Byte Order for Multi-byte Register Values
6.3.3 Multi-Byte Register Protocol
6.4 Electrical Specifications and Timing for I/O Stages
7 Physical Layer
8 Multi-Lane Distribution and Merging
8.1 Multi-Lane Interoperability
9 Low Level Protocol
9.1 Low Level Protocol Packet Format
9.1.1 Low Level Protocol Long Packet Format
9.1.2 Low Level Protocol Short Packet Format
9.2 Data Identifier (DI)
9.3 Virtual Channel Identifier
9.4 Data Type (DT)
9.5 Packet Header Error Correction Code
9.5.1 General Hamming Code Applied to Packet Header
9.5.2 Hamming-modified Code
9.5.3 ECC Generation on TX Side
9.5.4 Applying ECC on RX Side
9.6 Checksum Generation
9.7 Packet Spacing
9.8 Synchronization Short Packet Data Type Codes
9.8.1 Frame Synchronization Packets
9.8.2 Line Synchronization Packets
9.9 Generic Short Packet Data Type Codes
9.10 Packet Spacing Examples
9.11 Packet Data Payload Size Rules
9.12 Frame Format Examples
9.13 Data Interleaving
9.13.1 Data Type Interleaving
9.13.2 Virtual Channel Identifier Interleaving
10 Color Spaces
10.1 RGB Color Space Definition
10.2 YUV Color Space Definition
11 Data Formats
11.1 Generic 8-bit Long Packet Data Types
11.1.1 Null and Blanking Data
11.1.2 Embedded Information
11.2 YUV Image Data
11.2.1 Legacy YUV420 8-bit
11.2.2 YUV420 8-bit
11.2.3 YUV420 10-bit
11.2.4 YUV422 8-bit
11.2.5 YUV422 10-bit
11.3 RGB Image Data
11.3.1 RGB888
11.3.2 RGB666
11.3.3 RGB565
11.3.4 RGB555
11.3.5 RGB444
11.4 RAW Image Data
11.4.1 RAW6
11.4.2 RAW7
11.4.3 RAW8
11.4.4 RAW10
11.4.5 RAW12
11.4.6 RAW14
11.5 User Defined Data Formats
12 Recommended Memory Storage
12.1 General/Arbitrary Data Reception
12.2 RGB888 Data Reception
12.3 RGB666 Data Reception
12.4 RGB565 Data Reception
12.5 RGB555 Data Reception
12.6 RGB444 Data Reception
12.7 YUV422 8-bit Data Reception
12.8 YUV422 10-bit Data Reception
12.9 YUV420 8-bit (Legacy) Data Reception
12.10 YUV420 8-bit Data Reception
12.11 YUV420 10-bit Data Reception
12.12 RAW6 Data Reception
12.13 RAW7 Data Reception
12.14 RAW8 Data Reception
12.15 RAW10 Data Reception
12.16 RAW12 Data Reception
12.17 RAW14 Data Reception
Annex A JPEG8 Data Format (informative)
A.1 Introduction
A.2 JPEG Data Definition
A.3 Image Status Information
A.4 Embedded Images
A.5 JPEG8 Non-standard Markers
A.6 JPEG8 Data Reception
Annex B CSI-2 Implementation Example (informative)
B.1 Overview
B.2 CSI-2 Transmitter Detailed Block Diagram
B.3 CSI-2 Receiver Detailed Block Diagram
B.4 Details on the D-PHY implementation
B.4.1 CSI-2 Clock Lane Transmitter
B.4.2 CSI-2 Clock Lane Receiver
B.4.3 CSI-2 Data Lane Transmitter
B.4.4 CSI-2 Data Lane Receiver
Annex C CSI-2 Recommended Receiver Error Behavior (informative)
C.1 Overview
C.2 D-PHY Level Error
C.3 Packet Level Error
C.4 Protocol Decoding Level Error
Annex D CSI-2 Sleep Mode (informative)
D.1 Overview
D.2 SLM Command Phase
D.3 SLM Entry Phase
D.4 SLM Exit Phase
Annex E Data Compression for RAW Data Types (normative)
E.1 Predictors
E.1.1 Predictor1
E.1.2 Predictor2
E.2 Encoders
E.2.1 Coder for 10–8–10 Data Compression
E.2.2 Coder for 10–7–10 Data Compression
E.2.3 Coder for 10–6–10 Data Compression
E.2.4 Coder for 12–8–12 Data Compression
E.2.5 Coder for 12–7–12 Data Compression
E.2.6 Coder for 12–6–12 Data Compression
E.3 Decoders
E.3.1 Decoder for 10–8–10 Data Compression
E.3.2 Decoder for 10–7–10 Data Compression
E.3.3 Decoder for 10–6–10 Data Compression
E.3.4 Decoder for 12–8–12 Data Compression
E.3.5 Decoder for 12–7–12 Data Compression
E.3.6 Decoder for 12–6–12 Data Compression
Annex F JPEG Interleaving (informative)
Version 1.01.00 r0.04 2-Apr-2009 DRAFT MIPI Alliance Specification for CSI-2 DRAFT MIPI Alliance Specification for Camera Serial Interface 2 (CSI-2) Draft Version 1.01.00 Revision 0.04 – 2 April 2009 Further technical changes to this document are expected as work continues in the Camera Working Group Copyright © 2005-2009 MIPI Alliance, Inc. All rights reserved. MIPI Alliance Member Confidential.
Version 1.01.00 r0.04 2-Apr-2009 DRAFT MIPI Alliance Specification for CSI-2 NOTICE OF DISCLAIMER The material contained herein is not a license, either expressly or impliedly, to any IPR owned or controlled by any of the authors or developers of this material or MIPI®. The material contained herein is provided on an “AS IS” basis and to the maximum extent permitted by applicable law, this material is provided AS IS AND WITH ALL FAULTS, and the authors and developers of this material and MIPI hereby disclaim all other warranties and conditions, either express, implied or statutory, including, but not limited to, any (if any) implied warranties, duties or conditions of merchantability, of fitness for a particular purpose, of accuracy or completeness of responses, of results, of workmanlike effort, of lack of viruses, and of lack of negligence. All materials contained herein are protected by copyright laws, and may not be reproduced, republished, distributed, transmitted, displayed, broadcast or otherwise exploited in any manner without the express prior written permission of MIPI Alliance. MIPI, MIPI Alliance and the dotted rainbow arch and all related trademarks, tradenames, and other intellectual property are the exclusive property of MIPI Alliance and cannot be used without its express prior written permission. ALSO, THERE IS NO WARRANTY OF CONDITION OF TITLE, QUIET ENJOYMENT, QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT WITH REGARD TO THIS MATERIAL OR THE CONTENTS OF THIS DOCUMENT. IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THIS MATERIAL OR THE CONTENTS OF THIS DOCUMENT OR MIPI BE LIABLE TO ANY OTHER PARTY FOR THE COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS OF USE, LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT, INDIRECT, OR SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY, OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT, SPECIFICATION OR DOCUMENT RELATING TO THIS MATERIAL, WHETHER OR NOT SUCH PARTY HAD ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. Without limiting the generality of this Disclaimer stated above, the user of the contents of this Document is further notified that MIPI: (a) does not evaluate, test or verify the accuracy, soundness or credibility of the contents of this Document; (b) does not monitor or enforce compliance with the contents of this Document; and (c) does not certify, test, or in any manner investigate products or services or any claims of compliance with the contents of this Document. The use or implementation of the contents of this Document may involve or require the use of intellectual property rights ("IPR") including (but not limited to) patents, patent applications, or copyrights owned by one or more parties, whether or not Members of MIPI. MIPI does not make any search or investigation for IPR, nor does MIPI require or request the disclosure of any IPR or claims of IPR as respects the contents of this Document or otherwise. Questions pertaining to this document, or the terms or conditions of its provision, should be addressed to: MIPI Alliance, Inc. c/o IEEE-ISTO 445 Hoes Lane Piscataway, NJ 08854 Attn: Board Secretary 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 Copyright © 2005-2009 MIPI Alliance, Inc. All rights reserved. MIPI Alliance Member Confidential. ii
Version 1.01.00 r0.04 2-Apr-2009 DRAFT MIPI Alliance Specification for CSI-2 Contents Draft Version 1.01.00 Revision 0.04 – 2 April 2009 ........................................................................................ i  1  Overview ............................................................................................................................................... 16  1.1  1.2  Scope ............................................................................................................................................. 16  Purpose .......................................................................................................................................... 16  2  Terminology .......................................................................................................................................... 17  2.1  2.2  2.3  Definitions ..................................................................................................................................... 17  Abbreviations ................................................................................................................................ 18  Acronyms ...................................................................................................................................... 18  3  References ............................................................................................................................................. 20  4  Overview of CSI-2 ................................................................................................................................ 21  5  CSI-2 Layer Definitions ........................................................................................................................ 22  6  Camera Control Interface (CCI) ............................................................................................................ 24  6.1  Data Transfer Protocol ................................................................................................................... 24  6.1.1  Message Type ........................................................................................................................ 24  6.1.2  Read/Write Operations .......................................................................................................... 25  6.2  6.3  CCI Slave Addresses ..................................................................................................................... 28  CCI Multi-Byte Registers .............................................................................................................. 28  6.3.1  6.3.2  Overview ............................................................................................................................... 28  The Transmission Byte Order for Multi-byte Register Values .............................................. 30  6.3.3  Multi-Byte Register Protocol ................................................................................................. 31  6.4  Electrical Specifications and Timing for I/O Stages ...................................................................... 35  7  Physical Layer ....................................................................................................................................... 38  8  Multi-Lane Distribution and Merging ................................................................................................... 39  8.1  Multi-Lane Interoperability ........................................................................................................... 43  9  Low Level Protocol ............................................................................................................................... 46  9.1  Low Level Protocol Packet Format ............................................................................................... 46  42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 Copyright © 2005-2009 MIPI Alliance, Inc. All rights reserved. MIPI Alliance Member Confidential. iii
Version 1.01.00 r0.04 2-Apr-2009 DRAFT MIPI Alliance Specification for CSI-2 9.1.1  9.1.2  Low Level Protocol Long Packet Format .............................................................................. 46  Low Level Protocol Short Packet Format .............................................................................. 48  9.2  9.3  9.4  9.5  Data Identifier (DI) ........................................................................................................................ 48  Virtual Channel Identifier .............................................................................................................. 48  Data Type (DT) ............................................................................................................................. 49  Packet Header Error Correction Code ........................................................................................... 50  9.5.1  9.5.2  9.5.3  9.5.4  General Hamming Code Applied to Packet Header .............................................................. 51  Hamming-modified Code ...................................................................................................... 51  ECC Generation on TX Side ................................................................................................. 54  Applying ECC on RX Side .................................................................................................... 55  9.6  9.7  9.8  Checksum Generation .................................................................................................................... 56  Packet Spacing ............................................................................................................................... 58  Synchronization Short Packet Data Type Codes ........................................................................... 59  9.8.1  9.8.2  Frame Synchronization Packets ............................................................................................. 59  Line Synchronization Packets ................................................................................................ 60  9.9  Generic Short Packet Data Type Codes ......................................................................................... 60  9.10  Packet Spacing Examples .............................................................................................................. 61  9.11  Packet Data Payload Size Rules .................................................................................................... 63  9.12  Frame Format Examples ................................................................................................................ 64  9.13  Data Interleaving ........................................................................................................................... 66  9.13.1  Data Type Interleaving .......................................................................................................... 66  9.13.2  Virtual Channel Identifier Interleaving .................................................................................. 69  10  Color Spaces ...................................................................................................................................... 71  10.1  RGB Color Space Definition ......................................................................................................... 71  10.2  YUV Color Space Definition......................................................................................................... 71  11  Data Formats ..................................................................................................................................... 72  11.1  Generic 8-bit Long Packet Data Types .......................................................................................... 73  11.1.1  Null and Blanking Data ......................................................................................................... 73  69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 Copyright © 2005-2009 MIPI Alliance, Inc. All rights reserved. MIPI Alliance Member Confidential. iv
Version 1.01.00 r0.04 2-Apr-2009 DRAFT MIPI Alliance Specification for CSI-2 11.1.2  Embedded Information .......................................................................................................... 73  11.2  YUV Image Data ........................................................................................................................... 73  11.2.1  Legacy YUV420 8-bit ........................................................................................................... 74  11.2.2  YUV420 8-bit ........................................................................................................................ 76  11.2.3  YUV420 10-bit ...................................................................................................................... 79  11.2.4  YUV422 8-bit ........................................................................................................................ 81  11.2.5  YUV422 10-bit ...................................................................................................................... 82  11.3  RGB Image Data ........................................................................................................................... 83  11.3.1  RGB888 ................................................................................................................................. 84  11.3.2  RGB666 ................................................................................................................................. 85  11.3.3  RGB565 ................................................................................................................................. 86  11.3.4  RGB555 ................................................................................................................................. 87  11.3.5  RGB444 ................................................................................................................................. 88  11.4  RAW Image Data .......................................................................................................................... 88  11.4.1  RAW6 .................................................................................................................................... 89  11.4.2  RAW7 .................................................................................................................................... 89  11.4.3  RAW8 .................................................................................................................................... 90  11.4.4  RAW10 .................................................................................................................................. 91  11.4.5  RAW12 .................................................................................................................................. 92  11.4.6  RAW14 .................................................................................................................................. 93  11.5  User Defined Data Formats ........................................................................................................... 94  12  Recommended Memory Storage ....................................................................................................... 97  12.1  General/Arbitrary Data Reception ................................................................................................. 97  12.2  RGB888 Data Reception ............................................................................................................... 97  12.3  RGB666 Data Reception ............................................................................................................... 98  12.4  RGB565 Data Reception ............................................................................................................... 99  12.5  RGB555 Data Reception ............................................................................................................... 99  12.6  RGB444 Data Reception ............................................................................................................... 99  97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 Copyright © 2005-2009 MIPI Alliance, Inc. All rights reserved. MIPI Alliance Member Confidential. v
Version 1.01.00 r0.04 2-Apr-2009 DRAFT MIPI Alliance Specification for CSI-2 12.7  YUV422 8-bit Data Reception .................................................................................................... 100  12.8  YUV422 10-bit Data Reception .................................................................................................. 100  12.9  YUV420 8-bit (Legacy) Data Reception ..................................................................................... 101  12.10  YUV420 8-bit Data Reception ................................................................................................ 102  12.11  YUV420 10-bit Data Reception .............................................................................................. 103  12.12  RAW6 Data Reception ............................................................................................................ 105  12.13  RAW7 Data Reception ............................................................................................................ 105  12.14  RAW8 Data Reception ............................................................................................................ 105  12.15  RAW10 Data Reception .......................................................................................................... 106  12.16  RAW12 Data Reception .......................................................................................................... 106  12.17  RAW14 Data Reception .......................................................................................................... 107  Annex A JPEG8 Data Format (informative) ............................................................................................... 108  A.1  A.2  A.3  A.4  A.5  A.6  Introduction ................................................................................................................................. 108  JPEG Data Definition .................................................................................................................. 109  Image Status Information ............................................................................................................ 109  Embedded Images........................................................................................................................ 111  JPEG8 Non-standard Markers ..................................................................................................... 112  JPEG8 Data Reception ................................................................................................................ 112  Annex B CSI-2 Implementation Example (informative) ............................................................................. 113  B.1  Overview ..................................................................................................................................... 113  B.2  CSI-2 Transmitter Detailed Block Diagram ................................................................................ 113  B.3  CSI-2 Receiver Detailed Block Diagram ..................................................................................... 114  B.4  Details on the D-PHY implementation ........................................................................................ 115  B.4.1  CSI-2 Clock Lane Transmitter ............................................................................................. 117  B.4.2  CSI-2 Clock Lane Receiver ................................................................................................. 117  B.4.3  CSI-2 Data Lane Transmitter ............................................................................................... 118  B.4.4  CSI-2 Data Lane Receiver ................................................................................................... 120  Annex C CSI-2 Recommended Receiver Error Behavior (informative) ..................................................... 122  125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 Copyright © 2005-2009 MIPI Alliance, Inc. All rights reserved. MIPI Alliance Member Confidential. vi
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 Version 1.01.00 r0.04 2-Apr-2009 DRAFT MIPI Alliance Specification for CSI-2 C.1  Overview ..................................................................................................................................... 122  C.2  D-PHY Level Error ..................................................................................................................... 123  C.3  C.4  Packet Level Error ....................................................................................................................... 123  Protocol Decoding Level Error .................................................................................................... 124  Annex D CSI-2 Sleep Mode (informative) .................................................................................................. 126  D.1  Overview ..................................................................................................................................... 126  D.2  D.3  D.4  SLM Command Phase ................................................................................................................. 126  SLM Entry Phase ......................................................................................................................... 126  SLM Exit Phase ........................................................................................................................... 127  Annex E Data Compression for RAW Data Types (normative) .................................................................. 128  E.1  Predictors ..................................................................................................................................... 129  E.1.1  Predictor1 ............................................................................................................................ 130  E.1.2  Predictor2 ............................................................................................................................ 130  E.2  Encoders ...................................................................................................................................... 131  E.2.1  Coder for 10–8–10 Data Compression ................................................................................ 131  E.2.2  Coder for 10–7–10 Data Compression ................................................................................ 133  E.2.3  Coder for 10–6–10 Data Compression ................................................................................ 136  E.2.4  Coder for 12–8–12 Data Compression ................................................................................ 138  E.2.5  Coder for 12–7–12 Data Compression ................................................................................ 141  E.2.6  Coder for 12–6–12 Data Compression ................................................................................ 145  E.3  Decoders ...................................................................................................................................... 148  E.3.1  Decoder for 10–8–10 Data Compression ............................................................................. 148  E.3.2  Decoder for 10–7–10 Data Compression ............................................................................. 150  E.3.3  Decoder for 10–6–10 Data Compression ............................................................................. 153  E.3.4  Decoder for 12–8–12 Data Compression ............................................................................. 156  E.3.5  Decoder for 12–7–12 Data Compression ............................................................................. 159  E.3.6  Decoder for 12–6–12 Data Compression ............................................................................. 163  Annex F JPEG Interleaving (informative) ................................................................................................... 168  Copyright © 2005-2009 MIPI Alliance, Inc. All rights reserved. MIPI Alliance Member Confidential. vii
Version 1.01.00 r0.04 2-Apr-2009 Figures Figure 1 CSI-2 and CCI Transmitter and Receiver Interface ....................................................................... 21  DRAFT MIPI Alliance Specification for CSI-2 Figure 2 CSI-2 Layer Definitions ................................................................................................................. 22  Figure 3 CCI Message Types ....................................................................................................................... 25  Figure 4 CCI Single Read from Random Location ...................................................................................... 25  Figure 5 CCI Single Read from Current Location ........................................................................................ 26  Figure 6 CCI Sequential Read Starting from a Random Location ............................................................... 26  Figure 7 CCI Sequential Read Starting from the Current Location .............................................................. 27  Figure 8 CCI Single Write to a Random Location ....................................................................................... 27  Figure 9 CCI Sequential Write Starting from a Random Location ............................................................... 28  Figure 10 Corruption of a 32-bit Wide Register during a Read Message ..................................................... 29  Figure 11 Corruption of a 32-bit Wide Register during a Write Message .................................................... 30  Figure 12 Example 16-bit Register Write ..................................................................................................... 30  Figure 13 Example 32-bit Register Write (address not shown) .................................................................... 31  Figure 14 Example 64-bit Register Write (address not shown) .................................................................... 31  Figure 15 Example 16-bit Register Read ...................................................................................................... 32  Figure 16 Example 32-bit Register Read ...................................................................................................... 33  Figure 17 Example 16-bit Register Write ..................................................................................................... 34  Figure 18 Example 32-bit Register Write ..................................................................................................... 35  Figure 19 CCI Timing .................................................................................................................................. 37  Figure 20 Conceptual Overview of the Lane Distributor Function .............................................................. 39  Figure 21 Conceptual Overview of the Lane Merging Function .................................................................. 40  Figure 22 Two Lane Multi-Lane Example ................................................................................................... 41  Figure 23 Three Lane Multi-Lane Example ................................................................................................. 42  Figure 24 Four Lane Multi-Lane Example ................................................................................................... 43  Figure 25 One Lane Transmitter and Four Lane Receiver Example ............................................................ 44  Figure 26 Two Lane Transmitter and Four Lane Receiver Example ........................................................... 44  182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 Copyright © 2005-2009 MIPI Alliance, Inc. All rights reserved. MIPI Alliance Member Confidential. 8
分享到:
收藏