JESD220B
JESD220B
JESD220B
STANDARD
Version 2.0
JESD220B
(Revision of JESD220A, June 2012)
SEPTEMBER 2013
JEDEC standards and publications contain material that has been prepared, reviewed, and
approved through the JEDEC Board of Directors level and subsequently reviewed and approved
by the JEDEC legal counsel.
JEDEC standards and publications are designed to serve the public interest through eliminating
misunderstandings between manufacturers and purchasers, facilitating interchangeability and
improvement of products, and assisting the purchaser in selecting and obtaining with minimum
delay the proper product for use by those other than JEDEC members, whether the standard is to
be used either domestically or internationally.
JEDEC standards and publications are adopted without regard to whether or not their adoption
may involve patents or articles, materials, or processes. By such action JEDEC does not assume
any liability to any patent owner, nor does it assume any obligation whatever to parties adopting
the JEDEC standards or publications.
The information included in JEDEC standards and publications represents a sound approach to
product specification and application, principally from the solid state device manufacturer
viewpoint. Within the JEDEC organization there are procedures whereby a JEDEC standard or
publication may be further processed and ultimately become an ANSI standard.
No claims to be in conformance with this standard may be made unless all requirements stated in
the standard are met.
Inquiries, comments, and suggestions relative to the content of this JEDEC standard or
publication should be addressed to JEDEC at the address below, or refer to www.jedec.org under
Standards and Documents for alternative contact information.
Published by
©JEDEC Solid State Technology Association 2013
3103 North 10th Street
Suite 240 South
Arlington, VA 22201-2107
This document may be downloaded free of charge; however JEDEC retains the
copyright on this material. By downloading this file the individual agrees not to
charge for or resell the resulting material.
DON’T VIOLATE
THE
LAW!
CONTENTS
Page
1 Scope 1
2 Normative Reference 1
3 Terms and Definitions 2
4 Introduction 7
4.1 General Features 7
4.2 Interface Features 8
4.3 Functional Features 8
5 UFS Architecture Overview 9
5.1 UFS Top level Architecture 9
5.2 UFS System Model 12
5.3 System Boot and Enumeration 12
5.4 UFS Interconnect (UIC) Layer 13
5.4.1 UFS Physical Layer Signals 13
5.4.2 MIPI UniPro 13
5.4.3 MIPI UniPro Related Attributes 14
5.5 UFS Transport Protocol (UTP) Layer 14
5.5.1 Architectural Model 15
5.6 UFS Application and Command Layer 19
6 UFS Electrical: Clock, Reset, Signals and Supplies 20
6.1 Embedded UFS Signals 20
6.2 UFS Memory Card Signals 21
6.3 Reset Signal 22
6.4 Power Supplies 22
6.5 Reference Clock 23
6.5.1 HS Gear Rates 24
6.5.2 Host Controller requirements for reference clock generation 25
6.6 External Charge Pump Capacitors (Optional) 26
6.7 Absolute Maximum DC Ratings 27
7 Reset, Power-up and Power-down 28
7.1 Reset 28
7.1.1 Power-on Reset 28
7.1.2 Hardware Reset 29
7.1.3 EndPointReset 30
7.1.4 Logical Unit Reset 31
7.1.5 Other Resets 31
7.1.6 Summary of Resets and Device Behavior 32
7.2 Power up ramp 33
-i-
JEDEC Standard No. 220B
-ii-
JEDEC Standard No. 220B
-iii-
JEDEC Standard No. 220B
-iv-
JEDEC Standard No. 220B
-v-
JEDEC Standard No. 220B
FIGURES
Figure 5.1: UFS Top Level Architecture ...................................................................................................... 9
Figure 5.2: Usage of UDM_SAP ................................................................................................................ 10
Figure 5.3: Usage of UIO_SAP .................................................................................................................. 10
Figure 5.4: UFS System Model .................................................................................................................. 12
Figure 5.5: SCSI Domain Class Diagram ................................................................................................... 16
Figure 5.6: UFS Domain Class Diagram .................................................................................................... 17
Figure 6.1: UFS Device Block Diagram ..................................................................................................... 20
Figure 6.2: Clock input levels, rise time, and fall time ............................................................................... 24
Figure 6.4: Output driver and Input receiver levels .................................................................................... 25
Figure 6.5: Clock output levels, rise time and fall time .............................................................................. 26
Figure 7.1: Power-on Reset........................................................................................................................ 28
Figure 7.2: Hardware Reset ........................................................................................................................ 29
Figure 7.3: Reset AC timings...................................................................................................................... 29
Figure 7.4: EndPointReset .......................................................................................................................... 30
Figure 7.5: Logical Unit Reset .................................................................................................................... 31
Figure 7.6: Power up ramps ........................................................................................................................ 33
Figure 7.7: Power off ramps ....................................................................................................................... 34
Figure 7.8: Power Mode State Machine...................................................................................................... 39
Figure 8.1: Simplified example for I/O termination ................................................................................... 48
Figure 9.1: UniPro internal layering view (left) and UniPro Black Box view (right) ................................ 53
Figure 10.1: UFS SCSI domain ................................................................................................................ 122
Figure 10.2: Logical Unit Addressing....................................................................................................... 123
Figure 10.3: SCSI Write ........................................................................................................................... 126
Figure 10.4: SCSI Read ............................................................................................................................ 127
Figure 10.5: Command w/o Data Phase.................................................................................................... 129
Figure 10.6: Command + Read Data Phase 1/2 ........................................................................................ 135
Figure 10.7: Command + Read Data Phase 2/2 ........................................................................................ 136
Figure 10.8: Command + Write Data Phase 1/2 ....................................................................................... 138
Figure 10.9: Command + Write Data Phase 2/2 ....................................................................................... 139
Figure 10.10: Task Management Function ............................................................................................... 143
Figure 10.11: UFS Query Function........................................................................................................... 146
Figure 11.1: UFS Command Layer ........................................................................................................... 149
Figure 12.1: Purge operation state machine .............................................................................................. 232
Figure 12.2: Authentication Key Programming Flow............................................................................... 255
Figure 12.3: Read Counter Value Flow .................................................................................................... 256
Figure 12.4: Authenticated Data Write Flow ............................................................................................ 258
Figure 12.5: Authenticated Read Flow ..................................................................................................... 260
Figure 13.1: UFS System Diagram ........................................................................................................... 261
Figure 13.2: Example of UFS Device Memory Organization for Boot ................................................... 263
Figure 13.3: Device Initialization and Boot Procedure Sequence Diagram ............................................. 266
Figure 13.4: Example of UFS Device Memory Organization .................................................................. 270
Figure 13.5: Physical Memory Resource State Machine .......................................................................... 283
-vi-
JEDEC Standard No. 220B
Figure 13.6: Example of data status after a power failure during reliable write operation ....................... 284
Figure 13.7: Host-Device interaction example for Rule-1 ........................................................................ 292
Figure 13.8: Host-Device interaction example for Data Out Mismatch Error case .................................. 293
Figure 13.9: Host-Device interaction example for Rule-2 ........................................................................ 293
Figure 13.10: Host-Device interaction example for Rule-3 ...................................................................... 294
Figure 13.11: Host-Device interaction for LU with same the priority ...................................................... 295
Figure 13.12: Host-Device interaction for LU with different priorities .................................................... 295
Figure 14.1: Descriptor Organization ....................................................................................................... 300
Figure 14.2: Read Request Descriptor ...................................................................................................... 301
Figure 14.3: Write Request Descriptor ..................................................................................................... 302
TABLES
-vii-
JEDEC Standard No. 220B
-viii-
JEDEC Standard No. 220B
-ix-
JEDEC Standard No. 220B
-x-
JEDEC Standard No. 220B
-xi-
JEDEC Standard No. 220B
-xii-
JEDEC Standard No. 220B
Foreword
This standard has been prepared by JEDEC. The purpose of this standard is definition of an UFS
Universal Flash Storage electrical interface and an UFS memory device. This standard defines a
unique UFS feature set and includes the feature set of eMMC Specification as a subset. This
standard references several other standard specifications by MIPI (M-PHY and UniPro
Specifications) and INCITS T10 (SBC, SPC and SAM draft standards) organizations.
Introduction
The UFS electrical interface is a universal serial communication bus which can be utilized for
different type of applications. It’s based on MIPI M-PHY standard as physical layer for
optimized performance and power. Architectural model references the INCITS T10 SAM model
for ease of adoption.
The UFS device is a universal data storage and communication media. It is designed to cover a
wide area of applications as smart phones, cameras, organizers, PDAs, digital recorders, MP3
players, internet tablets, electronic toys, etc.
-xiii-
JEDEC Standard No. 220B
-xiv-
JEDEC Standard No. 220B
Page 1
41
42 3.2 Terms and Definitions
43 Address Nexus: An address nexus is a combination of parameters that identify a connection between one
44 bus device to another. For the UFS bus and address nexus consists of a bus device ID for the source, a bus
45 device ID for the destination and a logical unit number for the destination.
46 Byte: An 8‐bit data value with most significant bit labeled as bit 7 and least significant bit as bit 0.
47 Command Descriptor Block: The structure used to communicate commands from an application client
48 to a device server. A CDB may have a fixed length of up to 16 bytes or a variable length of between 12
49 and 260 bytes.
50 Command Request Block: The bytes the make up a SCSI command that are encapsulated within a SCSI
51 Request Block
52 Device: An addressable device on the UFS bus usually a target that contains at least one LUN
53 Device ID: The bus address of a UFS device
54 Doubleword: A 32‐bit data value with most significant bit labeled as bit 31 and least significant bit as bit
55 0.
56 Dword: A 32‐bit data value, a Doubleword.
57 Gigabyte: 1,073,741,824 or 230 Bytes.
58 Host: An addressable device on the UFS bus which is usually the main CPU that hosts the UFS bus.
JEDEC Standard No. 220x
Page 4
94 3.3 Keywords
95 Several keywords are used to differentiate levels of requirements and options, as follow:
96 Can - A keyword used for statements of possibility and capability, whether material, physical, or causal
97 (can equals is able to).
98 Expected - A keyword used to describe the behavior of the hardware or software in the design models
99 assumed by this standard. Other hardware and software design models may also be implemented.
100 Ignored - A keyword that describes bits, bytes, quadlets, or fields whose values are not checked by the
101 recipient.
102 Mandatory - A keyword that indicates items required to be implemented as defined by this standard.
103 May - A keyword that indicates a course of action permissible within the limits of the standard (may
104 equals is permitted).
105 Must - The use of the word must is deprecated and shall not be used when stating mandatory
106 requirements; must is used only to describe unavoidable situations.
107 Optional - A keyword that describes features which are not required to be implemented by this standard.
108 However, if any optional feature defined by the standard is implemented, it shall be implemented as
109 defined by the standard.
110 Reserved - A keyword used to describe objects—bits, bytes, and fields—or the code values assigned to
111 these objects in cases where either the object or the code value is set aside for future standardization.
112 Usage and interpretation may be specified by future extensions to this or other standards. A reserved
113 object shall be zeroed or, upon development of a future standard, set to a value specified by such a
114 standard. The recipient of a reserved object shall not check its value. The recipient of a defined object
115 shall check its value and reject reserved code values.
116 Shall - A keyword that indicates a mandatory requirement strictly to be followed in order to conform to
117 the standard and from which no deviation is permitted (shall equals is required to). Designers are required
118 to implement all such mandatory requirements to assure interoperability with other products conforming
119 to this standard.
120 Should - A keyword used to indicate that among several possibilities one is recommended as particularly
121 suitable, without mentioning or excluding others; or that a certain course of action is preferred but not
122 necessarily required; or that (in the negative form) a certain course of action is deprecated but not
123 prohibited (should equals is recommended that).
124 Will - The use of the word will is deprecated and shall not be used when stating mandatory requirements;
125 will is only used in statements of fact.
126
127 3.4 Abbreviations
128 etc. - And so forth (Latin: et cetera)
129 e.g. - For example (Latin: exempli gratia)
130 i.e. - That is (Latin: id est)
131
132
JEDEC Standard No. 220x
Page 6
157 4 INTRODUCTION
158 Universal Flash Storage (UFS) is a simple, high performance, mass storage device with a serial interface.
159 It is primarily for use in mobile systems, between host processing and mass storage memory devices. The
160 following is the summary of the UFS features.
161 4.1 General Features
162 Target performance
163 o High speed GEARs (1)
164 Support for GEAR1 is mandatory
165 Support for GEAR2 is mandatory
166 Support for GEAR3 is optional
167 Target host applications
168 o Mobile phone, UMPC, DSC, PMP, MP3 and any other applications that require mass storage,
169 bootable mass storage, and external card
170 Target device types
171 o External card
172 Micro size for mobile and portable devices
173 Full size or adaptor for DSC and large devices
174 o Embedded packages
175 Mass storage and bootable mass storage
176 o Future expansion of device class types
177 I/O devices, camera, wireless, … , etc.
178 Topology
179 o One device per UFS port. A topology to support multiple devices on a single interface is
180 planned for future revision
181 UFS Layering
182 o UFS Command Set Layer (UCS)
183 Simplified SCSI command set based on SBC and SPC. UFS will not modify these SBC and
184 SPC Compliant commands. Option for defining UFS Native command and future extension
185 exist.
186 o UFS Transport Protocol Layer (UTP)
187 JEDEC to define the supported protocol layer, i.e., UTP for SCSI. This does not exclude the
188 support of other protocol in UFS Transport Protocol Layer.
189 o UFS Interconnect Layer (UIC)
190 MIPI UniProSM [MIPI-UniPro] is adopted for data link layer
191 MIPI M-PHY SM [MIPI-M-PHY ] is adopted for physical layer
192 NOTE 1 See 6.5.1 for details.
JEDEC Standard No. 220x
Page 8
Application Layer
227
228 Figure 5.1 — UFS Top Level Architecture
229 UFS communication is a layered communication architecture. It is based on SCSI SAM architectural
230 model [SAM].
231 Application Layer
232 The application layer consists of the UFS command set layer (UCS), the device manager and the Task
233 Manager. The UCS will handle the normal commands like read, write, and so on. UFS may support
234 multiple command sets. UFS is designed to be protocol agnostic. This version UFS standard uses SCSI
235 as the baseline protocol layer. A simplified SCSI command set was selected for UFS. UFS Native
236 command set can be supported when it is needed to extend the UFS functionalities.
237 The Task Manager handles commands meant for command queue control. The Device Manager will
238 provide device level control like Query Request and lower level link-layer control.
239 UFS Device Manager
240 The device manager has the following two responsibilities:
241 Handling device level operations.
242 Managing device level configurations.
243 Device level operations include functions such as device sleep, device power down, power management
244 and other device specific operations. These mainly involve power management of the device.
245 Device level configuration is managed by the device manager by maintaining and storing a set of
246 descriptors. The device manager would handle commands like query request which is meant for
247 modifying and retrieving configuration information of the device.
248
JEDEC Standard No. 220x
Page 10
Device Manager
De Q
vi c u e
e ry R
Co e
nt qu
ro e s
l , e t,
tc.
UIO_SAP UDM_SAP
Device Manager
t, tc.
se e
r e se t ,
C
U I e re
vi c
De
UIO_SAP UDM_SAP
265
266 Figure 5.3 — Usage of UIO_SAP
JEDEC Standard No. 220B
Page 11
Application
Device
Level Descriptors
RESET_n Managing
MIPI M-PHYSM
MIPI UniProSM
MIPI UniProSM
UFS DOUT_c
UFS
Host
Driver DIN_t
Reg
LU-N Storage
DIN_c
307
308 Figure 5.4 — UFS System Model
309 The UFS host consists of the application which wishes to communicate with the UFS device. It
310 communicates with the device using the UFS driver. The UFS driver is meant for managing the UFS host
311 controller through the UFS-HCI (UFS Host Controller Interface). The UFS-HCI is basically a set of
312 registers exposed by the host controller.
313 Figure 5-4 also indicates the UFS interface between the UFS host and the UFS device. The UFS
314 Interconnect (UIC) Layer consists of MIPI UniPro and MIPI M-PHY. The physical layer M‐PHY is
315 differential, dual simplex PHY that includes TX and RX pairs.
316 Potential UFS devices can be memory card (full size and micro size), embedded bootable mass storage
317 devices, IO devices etc. An UFS device comprises of multiple logical units, device manager and
318 descriptors. The device manager performs device level functions like power management while the
319 logical unit performs functions like read, write etc. The descriptors are meant for storage of configuration
320 related information.
321
322 5.3 System Boot and Enumeration
323 The system boot from a bootable UFS device will initiate after power up when the UFS InterConnect
324 Layer (MIPI M-PHY and UniPro) has completed its boot sequence. The boot code can be read from the
325 appropriate boot logical unit, or as desired, boot ROM code can re-configure MIPI M-PHY and UniPro
326 to appropriate setting before reading code from boot partition.
327 Multiple boot logical units may be available in an UFS device. However, only one logical unit will be
328 active at power-up. Appropriate descriptors are available to configure the boot process.
329 During boot, accesses to boot logical unit are supported via SCSI commands.
JEDEC Standard No. 220B
Page 13
Reference clock
REF_CLK Input Relatively low speed clock common to all UFS devices in the chain,
used as a reference for the PLL in each device.
Reset
RST_n Input
UFS Device hardware reset signal
NOTE 1 Reference MIPI Alliance Specification for Device Descriptor Block [MIPI-DDB]
364
365 5.5 UFS Transport Protocol (UTP) Layer
366 As mentioned previously, the Transport Layer is responsible for encapsulating the protocol into the
367 appropriate frame structure for the interconnect layer. UFS is protocol agnostic and thus any protocol will
368 need the appropriate translation layer. For this version of UFS standard, this is UTP (UFS Transport
369 Protocol) layer.
370 In this version of the standard, all accesses are supported only through SCSI, however additional
371 API/service/extension may be added in future versions to introduce new features or address specific
372 requirements.
373 A design feature of UTP is to provide a flexible packet architecture that will assist the UFS controller in
374 directing the encapsulated command, data and status packets into and out of system memory. The
375 intention is to allow the rapid transmittal of data between the host system memory and the UFS device
376 with minimal host processor intervention. Once the data structures are set up in host memory and the
377 target device is notified, the entire commanded transaction can take place between the UFS device and the
378 host memory. The means by which the UFS controller transfers data into and out of host memory is via a
379 hardware and/or firmware mechanism that is beyond the scope of this document. See the UFS controller
380 standard for further information.
381 A second feature of the UTP design is that once a device receives a command request notification from
382 the host, the device will control the pacing and state transitions needed to satisfy the data transfers and
383 status completion of the request. The idea here is that the device knows its internal condition and state and
384 when and how to best transfer the data that makes up the request. It is not necessary for the host system or
385 controller to continuously poll the device for “ready” status or for the host to estimate when to start a
386 packet transfer. The device will start the bus transactions when it determines its conditions and status are
387 optimal. This approach cuts down on the firmware and logic needed within the host to communicate with
388 a device. It also affords the maximum possible throughput with the minimum number of bus transactions
389 needed to complete the operation.
JEDEC Standard No. 220B
Page 15
426
427 Figure 5.5 — SCSI Domain Class Diagram
J EDEC Standard No. 220B
Page 17
1 1 1 1 1 1 1
1 1 1 1 1..*
Device
1 UFS Target Port UFS Initiator Port Application Client
Manager
1 routes to 1 1 1..*
routes to
1..*
1
1..* 1 1
1 1
routes to
1 1
Device Server Task Manager
430
431 Figure 5.6 — UFS Domain Class Diagram
432
JEDEC Standard No. 220B
Page 18
510
511 Figure 6.1 represents a conceptual drawing of UFS memory device. Utilization of internal regulators and
512 connection of those to different parts of the sub-system may differ per implementation.
CCP-IN
VDDi
CVDDi
VCC VCCQ VCCQ2
Regulator Regulator Regulator
C+ VDDiQ
CVDDiQ
CCP C-
CPOUT1 VDDiQ2
CCP-OUT Charge
Pump CVDDiQ2
CPOUT2
RST_n
Control Memory
REF_CLK Memory
Nand IO
UFS IO
Block
Block
DIN_t/c
Core Logic Data
Block
DOUT_t/c
VSS VSS
513
514
515 NOTE 1 The memory core power supply may be connected to VCC power supply ball , or the VCC regulator
516 output, while it shall be connected to the charge pump output if VCC =1.8V and the memory requires 3.3V core
517 power supply.
518 NOTE 2 The memory IO power supply may be connected to VCCQ2 power supply ball, or the VCCQ2 regulator
519 output.
520 NOTE 3 CCP-IN, CCP and CCP-OUT may be required only when internal charge pump is used.
521
522 Figure 6.1 — UFS Device Block Diagram
523
JEDEC Standard No. 220B
Page 21
NOTE 1 If there is no internal regulator requiring output capacitor then VDDi pins should be internally connected
as follows: VDDi to VCC, VDDiQ to VCCQ, and VDDiQ2 to VCCQ2.
NOTE 2 DIN0_t/_c and DIN1_t/_c apply if the device has two downstream lanes.
NOTE 3 DOUT0_t/_c and DOUT1_t/_c apply if the device has two upstream lanes.
Supply Voltage (secondary for controller and IO) VCCQ2 1.70 1.95 V
534 UFS device must support at least one of the valid voltage configurations, and can optionally support all
535 valid voltage configurations highlighted within the table below.
536 Table 6.4 — Voltage configurations for Embedded UFS
VCCQ VCCQ2
Embedded UFS
1.1V-1.3V 1.65V-1.95V
2.7V-3.6V Valid
VCC
1.7V-1.95V Valid
537
538 Table 6.5 — Voltage configurations for UFS Card
VCCQ
UFS Card
1.1V-1.3V
2.7V-3.6V Valid
VCC
546
547
JEDEC Standard No. 220B
Page 24
VCCQ
VIH,MIN
80%
tIRISE
VMID
tIFALL
20%
VIL,MAX
VSS
550
551 Figure 6.2 — Clock input levels, rise time, and fall time
552 6.5.1 HS Gear Rates
553 Table 6.7 defines the data rate values for the two rate series with respect REF_CLK frequency value
554 (fref).
555 Table 6.7 — HS-BURST Rates
(3)
Rate A-series Rate B-series
HS-GEAR Rate A-series Rate B-series (from (from Unit
[MIPI-M-PHY]) [MIPI-M-PHY])
fref fref fref fref
19.2 / 38.4 / 26 /
19.2 / 38.4 26 / 52 19.2 / 38.4 / 26 / 52 MHz
52
(1)
HS-GEAR1 1248 1459.2 1456.0 1248 1457.6 Mbps
NOTE 1 1248Mbs with fref = 38.4MHz may be obtained using a prescaler. fref * M /P, M = 65 (PLL multiplier) , P = 2
(Prescaler).
NOTE 2 Support for HS-GEAR3 is optional.
NOTE 3 The B-series rates shown are not integer multiples of common reference frequencies 19.2 MHz or 26 MHz,
but are within the tolerance range of 2000 ppm.
JEDEC Standard No. 220B
Page 25
REF_CLK
TX
20pF
VRefClk 100KΩ
VSS
VCCQ MAX
RX
Threshold
Region
VIL, MAX
VOL, MAX
TX Output Low RX Input Low
VSS
Transmitter Receiver
Figure 6.4 — Output driver and Input receiver levels
JEDEC Standard No. 220B
Page 26
559 6.5.2 Host Controller requirements for reference clock generation (cont’d)
Table 6.8 — Host controller reference clock parameters (cont’d)
NOTE 3 Clock rise time and clock fall time shall be measured from 20% to 80% of the window defined by
VOL,MAX and VOH,MIN.
VCCQ
VOH,MIN
80%
tORISE
tOFALL
20%
VOL,MAX
VSS
Figure 6.5 — Clock output levels, rise time and fall time
NOTE 4 Including transmitter output, Tx package, interconnect, Rx package and Rx input impedance
NOTE 5 The Test Load Impedance is placed at the output of the driver, with the shortest interconnect.
560
561 6.6 External Charge Pump Capacitors (Optional)
562 In order to produce memory devices that can accommodate a low voltage core supply (Vcc=1.8v) an
563 internal charge pump circuit may be required.
564 Charge pump circuit requires extra-sized passive components. An optional usage of external Charge
565 pump capacitors is provided.
566 Figure 6.1 shows the electrical connections required in case of charge pump implementation that uses
567 external capacitors.
568 Table 6.8 provides description of the capacitors to be used.
569 Table 6.9 — Charge pump capacitors description
Capacitor Name Min Typ Max Description
When charge pump is used, this capacitor is used as
the charge pump input bypass capacitor.
CCP-IN TBD 4.7uF TBD
When charge pump is not used this capacitor is used
as a bypass capacitor for the memory.
CCP-OUT TBD 4.7uF TBD Charge pump output bypass capacitor
CCP TBD 0.22uF TBD Charge pump flying capacitor
570 The charge pump capacitors are optional for embedded UFS devices. Even though all defined embedded
571 UFS packages shall include ball placement for the given optional capacitors. The ball names and
572 description are given in Table 6.10.
JEDEC Standard No. 220B
Page 27
NOTE 1 Two CPOUT balls are required to reduce inductance, improve ripple and transient response
NOTE 2 The given capacitors shall be placed close to the memory device to minimize the inductance. As a
guideline for package design, it is recommended to place the CP related balls close to each other and close to the
edge of the package.
575
576 6.7 Absolute Maximum DC Ratings
577 Stresses greater than those listed in Table 6.11 may cause permanent damage to the device. This is a stress
578 rating only, and functional operation of the device at these or any other conditions above those indicated
579 in the operational sections of this specification is not implied. Exposure to absolute maximum rating
580 conditions for extended periods may affect reliability.
581 Table 6.11 — Absolute maximum DC ratings
Parameter Symbol Min Max Unit Notes
582
583
584
JEDEC Standard No. 220B
Page 28
Host Device
LU 1 Logical Unit LU n Logical Unit
Reset ... Reset
Application Power on
Events
Client
Power on
Events Hard
Reset
Hard
Reset
Device Manager
1. DME_RESET.req 1. DME_RESET.req
2. DME_RESET.cnf_L 2. DME_RESET.cnf_L
DME DME
SAP SAP
Transport Transport
T_LM
T_LM
SAP
SAP
Device Management Entity (DME)
Network Network
N_LM
N_LM
SAP
SAP
Legend
DL_LM
DL_LM
SAP
Action
PA_LM
PA_LM
SAP
592
593 Figure 7.1 — Power-on Reset
594
JEDEC Standard No. 220B
Page 29
Host Device
LU 1 Logical Unit LU n Logical Unit
Reset ... Reset
Application HW Reset
Event
Client
HW Reset
Event Hard
Reset
Hard
Reset
Device Manager
1. DME_RESET.req 1. DME_RESET.req
2. DME_RESET.cnf_L 2. DME_RESET.cnf_L
DME DME
SAP SAP
Transport Transport
T_LM
T_LM
SAP
SAP
Device Management Entity (DME)
Network Network
N_LM
N_LM
SAP
SAP
Layer (L3) Layer (L3)
Legend
DL_LM
DL_LM
SAP
Action
PA_LM
PA_LM
SAP
598
599 Figure 7.2 — Hardware Reset
600 Figure 7.3 shows the hardware reset AC timings.
RST_n
tRSTW tRSTH
601
602 Figure 7.3 — Reset AC timings
603 Table 7.1 — Reset timing parameters
Symbol Comment Min Max Unit
tRSTW RST_n Pulse Width 1 µs
tRSTH RST_n High Period (Interval) 1 µs
1
tRSTF RST_n filter 100 ns
604 The UFS device must not detect 100ns or less of positive or negative RST_n pulse. The UFS device must
605 detect more than or equal to 1us of positive or negative RST_n pulse width.
606
JEDEC Standard No. 220B
Page 30
Host Device
LU 1 Logical Unit LU n Logical Unit
Reset ... Reset
Application Hard
Device Manager
Client Reset
Endpoint Reset
1. DME_ENDPOINTRESET.req 5. DME_ENDPOINTRESET.ind
DME DME
SAP SAP
Transport Transport
T_LM
T_LM
SAP
SAP
Device Management Entity (DME)
Network Network
N_LM
N_LM
SAP
SAP
Legend
DL_LM
DL_LM
SAP
3. TRG_EPR Action
PA_LM
PA_LM
SAP
2. PA_LM_ENDPOINTRESET.req 4. PA_LM_ENDPOINTRESET.ind
619
620 Figure 7.4 — EndPointReset
621
JEDEC Standard No. 220B
Page 31
Host Device
LU 1 Logical Unit LU n Logical Unit
Reset ... Reset
Application
Client
Processing a LOGICAL
Task Mgmt UNIT RESET Task
Request Mgmt Req.
Device Manager
(LOGICAL
UNIT RESET
LU n)
T_SAP T_SAP
Transport Transport
T_LM
T_LM
SAP
SAP
Device Management Entity (DME)
Network Network
N_LM
N_LM
SAP
SAP
Legend
DL_LM
DL_LM
SAP
Action
PA_LM
PA_LM
SAP
632
633 Figure 7.5 — Logical Unit Reset
634 7.1.5 Other Resets
635 In addition to the direct ways to initiate UFS device reset there are some indirect methods existing also.
636 For example, an UniPro Warm Reset (see [MIPI-UniPro]) is an indirect cause for an UFS device reset.
637 Host System resets its own UniPro stack: UniPro Stack reset activity in host system side also UniPro
638 Stack reset in the UFS Device side via the DME_LINKLOST.ind message. In case UFS device will
639 receive such DME_LINKLOST.ind message from host system it shall start process of re-initializing its
640 own UniPro stack. In addition also all UFS device level activity has been aborted, task queue lists in all
641 logical units shall be cleared and UFS power mode shall return to Sleep mode or Active mode depending
642 on bInitPowerMode.
JEDEC Standard No. 220B
Page 32
NOTE 1 At the end of the device initialization, the power mode transitions from Active to Pre-Sleep and then
Sleep (after an implementation specific time).
NOTE 2 The column “Boot process” shows after which type of reset the system can execute the boot process as
described in 13.1 “UFS Boot”. The boot process is enabled if the reset event restores the UFS device to the default
state: all parameters are set to the default value, queue are empty, etc.
647
648 Table 7.3 — UniPro Attributes and Descriptor Reset
Volatile and
UniPro Stack Power on reset
Set Only
Reset Type and Attributes Logical Unit Queue
Attributes (1)
Attributes (1) and Flags
and Flags
Reset
Power-on Reset Reset Reset
(all logical units)
Reset
HW Reset Reset Reset Reset
(all logical units)
Reset
EndPointReset Reset Reset Not affected
(all logical units)
Reset
LU Reset Not affected Not affected Not affected
(addressed logical unit)
Host UniPro Reset
Reset Reset No affected
Warm Reset (all logical units)
NOTE 1 See Table 14.18 and Table 14.20 for the definition of Flags and Attributes write access properties.
NOTE 2 Values of Attributes and Flags with “Write once” or “Persistent” access property are kept after power
cycle or any type of reset event.
649
JEDEC Standard No. 220B
Page 33
Ta t Ta t Ta Tb t
VCCQ2 is too low
between Ta and Tb
660
661 NOTE 1 The green band represents the voltage range between VCCQ-200mV and VCCQ.
Tx Tz t Tx Tz t Tx Tb Tz t
VCCQ2 is too low
676 between Tb and Tz
677 NOTE 1 The green band represents the voltage range between VCCQ-200mV and VCCQ.
Powered On
Sleep Pre-Sleep
SSU,
SSU,
PC=2
PC=1 (1)
bInitPowerMode
= 00h (3)
SSU,
PC=1
Pre-Active Active Idle
SSU,
PC=1
SSU,
PC=1 (2) SSU
PC=3
PowerDown
SSU,
PC=3 Pre-PowerDown
(1) This transition may occur only if the SSU command that caused the transition to Pre-Sleep had
IMMED set to one.
(2) This transition may occur only if the SSU command that caused the transition to Pre-PowerDown had
IMMED set to one.
(3) This automatic transition shall occur at the end of device initialization if bInitPowerMode = 00h.
832
833 Figure 7.8 — Power Mode State Machine
834
835 7.4.1.8.1 Transitions from Powered On Power Mode
836 The device shall enter in Powered On when: the power supplies are applied, after hardware reset,
837 EndPointReset or Host System UniPro Reset.
838 Transition from Powered_On to Active
839 This transition shall occur when the device is ready to begin power on initialization.
840 7.4.1.8.2 Transitions from Pre‐Active Power Mode
841 Transition from Pre-Active to Active
842 This transition shall occur when the device meets the requirements for being in Active power mode.
843
JEDEC Standard No. 220B
Page 40
898 7.4.1.9 Device Well Know Logical Unit Responses to SCSI commands
899 Table 7.5 defines the Device well known logical unit response to a START STOP UNIT command with
900 IMMED bit set to zero for various device power modes.
901 Table 7.5 — Device Well Known Logical Unit Responses to SSU command
Power Mode PC STATUS SENSE KEY ASC, ASCQ
(1)
1h GOOD - -
Pre-Active CHECK LOGICAL UNIT NOT READY, START
Others NOT READY
CONDITION STOP UNIT COMMAND IN PROGRESS
(1)
1h, 2h, 3h GOOD - -
Active CHECK ILLEGAL
Others INVALID FIELD IN CDB
CONDITION REQUEST
(1)
2h GOOD - -
Pre-Sleep CHECK LOGICAL UNIT NOT READY, START
Others NOT READY
CONDITION STOP UNIT COMMAND IN PROGRESS
(1)
1h, 2h, 3h GOOD - -
UFS-Sleep CHECK ILLEGAL
Others INVALID FIELD IN CDB
CONDITION REQUEST
(1)
3h GOOD - -
Pre-PowerDown CHECK LOGICAL UNIT NOT READY, START
Others NOT READY
CONDITION STOP UNIT COMMAND IN PROGRESS
(1)
1h, 3h GOOD - -
UFS-PowerDown CHECK ILLEGAL
Others INVALID FIELD IN CDB
CONDITION REQUEST
NOTE 1 The START STOP UNIT command may not terminate with GOOD status for condition not due to
CDB content.
902 Table 7.6 summarizes the response that the Device well known logical unit may provide to a command
903 other than START STOP UNIT for various device power modes.
904
JEDEC Standard No. 220B
Page 43
905 7.4.1.9 Device Well Know Logical Unit Responses to SCSI commands (cont’d)
906 Table 7.6 — Device Well Known Logical Unit Responses to commands other than SSU
Power Mode Command STATUS SENSE KEY ASC, ASCQ
REQUEST
GOOD (1) - -
SENSE
Pre-Active
CHECK LOGICAL UNIT IS IN PROCESS OF
Others (1) NOT READY
CONDITION BECOMING READY
REQUEST
GOOD (1) - -
SENSE
Pre-Sleep,
Pre-PowerDown. CHECK ILLEGAL
Others (1) -
CONDITION REQUEST
REQUEST
GOOD (1) - -
UFS-Sleep, SENSE
UFS-PowerDown CHECK LOGICAL UNIT NOT READY,
Others (1) NOT READY
CONDITION INITIALIZING COMMAND REQUIRED
NOTE 1 Rows identified with “Others” define Device well known logical unit response to command other than START STOP
UNIT command and REQUEST SENSE command.
907 Table 7.7 defines the pollable sense data for various device power modes.
908 Table 7.7 — Pollable Sense Data for each Power Modes
Power Mode SENSE KEY ASC, ASCQ
Pre-Active,
LOGICAL UNIT TRANSITIONING TO
Pre-Sleep, NO SENSE
ANOTHER POWER CONDITION
Pre-PowerDown
UFS-PowerDown, LOGICAL UNIT NOT READY,
NOT READY
UFS-Sleep INITIALIZING COMMAND REQUIRED
0h to 7h
- - 0h 0 Stop the designated LU.
0h to 7h
0h to 7h
- - 0h 1 Start the designated LU.
0h to 7h
50h
- - 1h 0 Cause a transition to the Active power mode
D0h
50h Cause a transition to the UFS-Sleep power
- - 2h 0
D0h mode
920
921
JEDEC Standard No. 220B
Page 45
925 Table 7.11 shows the Device Descriptor parameters that allow to define the power mode and the Active
926 ICC level after power on or reset. These parameters shall be configured during system integration.
927 Table 7.11 — Device Descriptor parameters
Parameter Name Size Description
934
935 Table 7.13 — Format for Power Parameter element
Field Name Bit Range Description
00b:nA
01b:uA
Unit bit [15:14]
10b:mA
11b: A
936
937
JEDEC Standard No. 220B
Page 47
Pre-Active,
Pre-Sleep,
CHECK NOT
UFS-Sleep Any -
CONDITION READY
Pre-PowerDown
UFS-PowerDown
954
955 If the logical unit is in the stopped power condition, then the device server shall
956 provide pollable sense data with sense key set to NOT READY and the additional sense code set
957 to LOGICAL UNIT NOT READY, INITIALIZING COMMAND REQUIRED;
958 terminate each media access command or TEST UNIT READY command with CHECK
959 CONDITION status with the sense key set to NOT READY and the additional sense code set to
960 LOGICAL UNIT NOT READY, INITIALIZING COMMAND REQUIRED.
JEDEC Standard No. 220B
Page 48
RSE_TX RDIFF_RX/2
LINE amplifier
VLD
RSE_TX RDIFF_RX/2
971
972 Figure 8.1 — Simplified example for I/O termination
973 M‐RX of a SUBLINK in a LINK may have different termination settings.
974 The supported termination settings are defined in the Capability Attributes in Table 8.1 and Table 8.2.
975 The termination is controlled via the Configuration Attributes. The receiver termination resistance is
976 defined in the M‐PHY Specification.
977 Timings of the termination enable and disable are defined in the M‐PHY Specification.
978 8.2 Drive Levels
979 The M-PHY Specification defines two different drive amplitudes: the large amplitude (LA) and the small
980 amplitude (SA). The UFS IF utilizes both of these drive amplitudes as defined in the M-PHY
981 Specification.
982 Every M-TX in every LINK will start communication with LA after power up or reset. Option to switch
983 to SA mode shall be supported via a Configuration Attribute.
984 SUBLINKS in a LINK shall communicate with same amplitude.
985 8.3 PHY State machine
986 The UFS IF shall implement the Type I state machine.
987 The M‐PHY Specification defines two different signaling schemes for low‐speed (LS) mode: Non‐
988 Return-to‐Zero (NRZ) and Pulse‐Width‐Modulation (PWM). The UFS IF shall utilize the PWM signaling
989 scheme in the LS mode as defined by the M‐PHY specification for the State Machine Type I [MIPI M-
990 PHY ].
991 The UFS IF shall implement both Mode‐LCC and Configuration‐LCC line control commands as defined
992 in the M‐PHY Specification for the state machine Type I.
JEDEC Standard No. 220B
Page 49
1031
1032 8.7 Operation Timings
1033 8.7.1 Reference Clock Timings
1034 The reference clock shall be turned ON before initiation of the state transition to STALL. The clock may
1035 be turned OFF again after both links has reached either HIBERNATE or SLEEP states.
1036
1037 8.8 Electrical characteristics
1038 8.8.1 Transmitter Characteristics
1039 As defined in the M-PHY Specification.
1040 8.8.2 Receiver Characteristics
1041 As defined in the M-PHY Specification.
1042
JEDEC Standard No. 220B
Page 53
LM Transport (L4)
LM Network (L3)
DME
PHY Tx PHY Rx
(a) (b)
1058
1059 Figure 9.1 — UniPro internal layering view (a) and UniPro Black Box view (b)
1060
JEDEC Standard No. 220B
Page 54
NOTE 1 A UFS Device shall only use DME Service Primitives if their usage is explicitly defined by this standard. In
such a case, UFS specifically defines the allowed parameter range and the sequence of actions.
JEDEC Standard No. 220B
Page 59
N_DeviceID 0 1
T_PeerDeviceID 1 0
T_PeerCPortID 0 0
6 6
T_CPortFlags (E2E_FC off, CSD off, (E2E_FC off, CSD off,
CSV off) CSV off)
T_TrafficClass 0 0
PA_MaxDataLanes 2 2
PA_AvailTxDataLanes 1, 2 1, 2
PA_AvailRxDataLanes 1, 2 1, 2
NOTE A UFS device will support either: one TX lane and one RX lane or two TX lanes
and two RX lanes
1232 .
JEDEC Standard No. 220B
Page 60
16 19
24 27
28 31
1367 HD
1368 The HD bit when set to ‘1’ specifies that an end-to-end CRC of all Header Segments is included within
1369 the UPIU. The CRC fields include all fields within the header area. The CRC is placed at the 32-bit word
1370 location following the header.
1371 End-to-end CRC is not supported in this version of the standard, therefore HD shall be ‘0’.
1372
JEDEC Standard No. 220B
Page 66
1385
1386 Table 10.7 — Task Attribute definition
Task Attribute Bit 1 Bit 0
Simple 0 0
Ordered 0 1
Head of Queue 1 0
ACA (Not Used) 1 1
1387
JEDEC Standard No. 220B
Page 67
1393 Status
1394 This field contains the SCSI status (as defined in [SAM]) if the transaction is a RESPONSE UPIU for a
1395 COMMAND UPIU with Command Set Type = 0x00 (SCSI Command). Otherwise it contains an opcode
1396 specific status or it is reserved.
1397 Reserved
1398 All fields marked as reserved shall contain a value of zero.
1399 LUN
1400 This field contains the Logical Unit Number to which a request is targeted. Target devices will contain at
1401 a minimum one logical unit numbered unit 0. This field is generated by the Initiator and maintained by
1402 the Target and Initiator for all UPIU transactions relating to a single request or task.
1403 Task Tag
1404 The Task Tag is generated by the Initiator when creating a task request. This field will be maintained by
1405 the Initiator and Target for all UPIU transactions relating to a single task. The Initiator will contain a
1406 register or variable that represents the Task Tag value. The Initiator will generate unique Task Tag by
1407 incrementing the internal variable when creating a new task request. When a task request is made up or
1408 generate a series of UPIU transactions, all UPIU will contain the same value in the Task Tag field.
1409 In particular, the same Task Tag value shall be maintained for the UPIU grouped in each row of Table
1410 10.9.
1411 Table 10.9 — UPIU associated to a single task
Initiator UPIU Target UPIU
NOP Out NOP In
Command, Data Out Ready to Transfer, Response
Command Data In, Response
Task Management Request Task Management Response
Query Request Query Response
1412
1413
JEDEC Standard No. 220B
Page 68
1421
1422 Query Function, Task Manag. Function
1423 This field is used in QUERY REQUEST and QUERY RESPONSE UPIU’s to define the Query function,
1424 and in TASK MANAGEMENT REQUEST UPIU to define the task management function.
1425 Device Information
1426 This field provides device level information required by specific UFS functionality in all RESPONSE
1427 UPIU.
1428 Total Extra Header Segment Length
1429 This field represents the size in 32‐bit units (DWORDS) of all Extra Header Segments contained within
1430 the UPIU. This field is used if additional header segments are needed. The length of each Extra Header
1431 Segment shall be a multiple of four. The value in this field is the number of total number of bytes in all
1432 EHS divided by four.
1433
( )
1434
1435 The maximum size of all EHS fields combined is 1024 bytes. A value of zero in this field indicates that
1436 there are no EHS contained within the UPIU.
1437 Extra Header Segments are not used in this standard, therefore the value of this field shall be set zero.
1438
JEDEC Standard No. 220B
Page 69
( )
1446
1447 Since the Data Segment Length field size is two bytes, the data segment can contain a maximum of 65535
1448 valid bytes. A value of zero in this field indicates that there is no Data Segment within the UPIU.
1449 Transaction Specific Fields
1450 Additional fields as required by certain Transaction Codes are located within this area. For UTP, this area
1451 starts at byte address 12 within the UPIU and terminates on a 32 byte boundary at byte address 31. Since
1452 all UPIU contain a 12 byte Basic Header this leaves 20 bytes remaining for this area.
1453 Extra Header Segments
1454 The Extra Header Segments exist if the Total EHS Length field contains a non‐zero value. For UTP, this
1455 area will start at byte address 32 within the UPIU. The UPIU may contain zero or more EHS. The length
1456 of each Extra Header Segment shall be a multiple of four. This standard does not use EHS.
1457 Data Segment
1458 The Data Segment field starts on the next 32‐bit (DWORD) boundary after the EHS area within the
1459 UPIU. For UTP, there are no EHS areas used meaning that the Data Segment will begin at byte address
1460 32 (byte address 36 if E2ECRC is enabled) within the UPIU. The Data Segment will be a multiple of 32‐
1461 bits, thereby making the UPIU packet size a multiple of 4 bytes. The Data Segment Length field can
1462 contain a value that is not a multiple of 4 bytes but the Data Segment area will be padded with zeros to fill
1463 to the next nearest 32‐bit (DWORD) boundary. The Data Segment Length field indicates the number of
1464 valid bytes within the Data Segment.
1465
1466
JEDEC Standard No. 220B
Page 70
1473
1474
JEDEC Standard No. 220B
Page 71
A value of ‘1’ in the .R flag indicates that the command requires that a data read operation
(incoming data) from Target to Initiator is required. If .R is set to ‘1’ then .W must be set to
Flags.R
‘0’. If .R and .W are set to ‘0’ then no data transfer is required for this command and the
Expected Data Transfer Length field is ignored.
A value of ‘1’ in the .W flag indicates that the command requires a data write operation
(outgoing data) from Initiator to Target. If .W is set to ‘1’ then .R must be set to ‘0’. If .W and
Flags.W
.R are set to ‘0’ then no data transfer is required for this command and the Expected Data
Transfer Length field is ignored.
The .ATTR field contains the task attribute value as defined by [SAM].
ATTR Definition
Simple 0 0
Flags.ATTR
Ordered 0 1
Head of Queue 1 0
The relative order of execution between Head of Queue commands is left for implementation.
0 1 2 3
xx10 0001b Flags LUN Task Tag
4 5 6 7
Command
Reserved Reserved Response Status
Set Type
8 9 10 (MSB) 11 (LSB)
Total EHS Length (00h) Device Information Data Segment Length
12 (MSB) 13 14 15 (LSB)
Residual Transfer Count
16 17 18 19
Reserved
20 21 22 23
Reserved
24 25 26 27
Reserved
28 29 30 31
Reserved
Header E2ECRC (omit if HD=0)
k (MSB) k+1 (LSB) k+2 k+3
Sense Data Length Sense Data[0] Sense Data[1]
… … … …
k+16 k+17 k+18 k+19
Sense Data[14] Sense Data[15] Sense Data[16] Sense Data[17]
Data E2ECRC (omit if DD=0)
NOTE 1 k = 32 if HD = 0.
1526
JEDEC Standard No. 220B
Page 74
The Flags.O flag will be set to ‘1’ to indicate that a data overflow occurred during the task
execution: the Target has more data bytes to transfer than the Initiator requested.
The Residual Transfer Count field will indicate the number of available bytes not transferred
Flags.O from the Target to the Initiator or vice versa.
The Residual Transfer Count will be set to the value difference of the total number of bytes
available to be transferred and the Expected Data Transfer Length value received in the
COMMAND UPIU. See below for further explanation.
The Flags.U flag will be set to ‘1’ to indicate that a data underflow occurred during the task
execution: the Target has less data bytes to transfer than the Initiator requested.
The Residual Transfer Count field will indicate the number of bytes that were not transferred
Flags.U from the Target to the Initiator or vice versa.
The Residual Transfer Count will be set to the value difference of the Expected Data
Transfer Length value received in the COMMAND UPIU and the actual number of bytes
transferred. See below for further explanation.
The .D flag will be set to ‘1’ to indicate that a UTP Data Out Mismatch error occurred during
the task execution: the data buffer offset and/or the data transfer count parameter in the
Flags.D
Data Out UPIU doesn’t match the corresponding parameters in the RTT request. See
13.4.12 for further explanation.
1534
1535 Command Set Type
1536 The Command Set Type field will specify an enumerated value that indicates which particular command
1537 set is used to define the command bytes in the CDB fields. See 10.5.2 “Basic Header Format” for details.
1538 Response
1539 The Response field will contain the UFS response that indicates the UFS defined overall success or
1540 failure of the series of Command, Data and RESPONSE UPIU’s that make up the execution of a task. See
1541 10.5.2 “Basic Header Format” for details.
1542
JEDEC Standard No. 220B
Page 75
6:0 Response Code Value of 70h for standard sense data response M
Not used
1 7:0 Obsolete M
Default value = 00h
File mark found
7:7 FILEMARK M
Default value = 0b
End of media detected
6:6 EOM M
Default value = 0b
2 Incorrect length detected
5:5 ILI M
Default value = 0b
4:4 Reserved Default value = 0b M
Sense Key code is the general SCSI error code for
3:0 Sense Key M
previous command (see Table 10.17, SENSE KEY)
3:6 7:0 Information Sense Information O
Length in bytes of additional sense information
Additional Sense
7 7:0 Value = 10 (0Ah) indicating 10 additional bytes (bytes M
Length
8 through 17)
Command Specific Command Specific Information
8:11 7:0 M
Information Default value = “0”
Additional Sense Code is an additional, more specific
12 7:0 ASC M
error code (see [SPC] and [SBC])
Additional Sense Code Qualifier qualifies the
13 7:0 ASCQ M
Additional Sense Code (see [SPC] and [SBC])
Field replaceable unit code
14 7:0 FRUC M
Default value = 00h
Sense key specific information
15:17 7:0 Sense Key Specific M
Default value = 0000 0000h
1650
1651
JEDEC Standard No. 220B
Page 80
1668
1669
JEDEC Standard No. 220B
Page 82
1757
1758
JEDEC Standard No. 220B
Page 86
1786
1787
JEDEC Standard No. 220B
Page 88
1799 Input Parameter 1 and LUN field in the basic header should be set to the same value.
1800
JEDEC Standard No. 220B
Page 89
1807
1808
JEDEC Standard No. 220B
Page 90
1820
1821 Task Management Service Response
1822 Table 10.26 — Task Management Service Response
Service Response Value
1891 OPCODE
1892 The opcode indicates the operation to perform. Possible opcode values are listed in Table 10.30.
1893 Table 10.30 — Query Function opcode values
OPCODE
00h NOP
01h READ DESCRIPTOR
WRITE
02h
DESCRIPTOR
03h READ ATTRIBUTE
04h WRITE ATTRIBUTE
05h READ FLAG
06h SET FLAG
07h CLEAR FLAG
08h TOGGLE FLAG
09h-EFh Reserved
F0h-FFh Vendor Specific
1894 OSF
1895 The OSF field is an Opcode Specific Field. The OSF fields will be defined for each specific OPCODE.
1896
JEDEC Standard No. 220B
Page 95
1904
1905 DESCRIPTOR IDN
1906 The Descriptor IDN field contains a value that indicates the particular type of descriptor to retrieve. For
1907 example, it could indicate a Device Descriptor or Unit Descriptor or String Descriptor. Some descriptor
1908 types are unique and can be fully identified by the Descriptor Type value. Other descriptors can exist in
1909 multiple forms, such as String Descriptors, and must be furthered identified with subsequent fields.
1910 INDEX
1911 The Index value is used to further identify a particular descriptor. For example, there may be multiple
1912 String Descriptors defined. In the case of multiple descriptors the INDEX field is used to select a
1913 particular one. Multiple descriptors are indexed starting from 0 through 255. The actual index value for a
1914 particular descriptor will be provided by other means, usually contained within a field of some other
1915 related descriptor.
1916 SELECTOR
1917 The SELECTOR field may be needed to further identify a particular descriptor. In most cases this value is
1918 0.
1919 LENGTH
1920 The LENGTH field is used to indicate the number of bytes to read of the descriptor. These bytes will be
1921 returned in a QUERY RESPONSE UPIU packet. This is the requested length to read, which may be less
1922 than, or equal to, or greater than the number of bytes within the actual descriptor. If less than, or equal to
1923 the actual descriptor size, the number of bytes specified will be returned. If the LENGTH is greater than
1924 the descriptor size, the response will provide the exact descriptor size in the LENGTH field of the
1925 QUERY RESPONSE UPIU .
1926
JEDEC Standard No. 220B
Page 96
12 13 14 15
16 17 18 (MSB) 19 (LSB)
20 21 22 23
Reserved
24 25 26 27
Reserved
1933
1934 DESCRIPTOR IDN
1935 The Descriptor IDN field contains a value that identifies a particular of descriptor to write. For example,
1936 it could indicate a Device Descriptor or Unit Descriptor or String Descriptor. Some descriptor types are
1937 unique and can be fully identified by the Descriptor IDN value. Other descriptors can exist in multiple
1938 forms, such as STRING DESCRIPTORS, and must be furthered identified with subsequent fields.
1939 INDEX
1940 The Index value is used to further identify a particular descriptor. For example, there may be multiple
1941 String Descriptors defined. In the case of multiple descriptors the INDEX field is used to select a
1942 particular one. Multiple descriptors are indexed starting from 0 through 255. The actual index value for a
1943 particular descriptor will be provided by other means, usually contained within a field of some other
1944 related descriptor.
1945 SELECTOR
1946 The SELECTOR field may be needed to further identify a particular descriptor. In most cases this value is
1947 0.
1948 LENGTH
1949 The LENGTH field is used to indicate the number of descriptor bytes to write. The entire descriptor must
1950 be written; there is no partial write or update possible. These bytes will be contained within the DATA
1951 SEGMENT area of the QUERY REQUEST UPIU packet. The DATA SEGMENT LENGTH field of the
1952 UPIU shall also be set to this same value. If LENGTH is not equal to the descriptor size the operation will
1953 fail: the descriptor is not updated and the Query Response field of the QUERY RESPONSE UPIU is set
1954 FAILURE.
JEDEC Standard No. 220B
Page 97
12 13 14 15
16 17 18 19
20 21 22 23
Reserved
24 25 26 27
Reserved
1961
1962 ATTRIBUTE IDN
1963 The ATTRIBUTE IDN contains a value that identifies a particular Attribute to retrieve from the Target
1964 device.
1965 INDEX
1966 For attributes that are organized in array, the index value is used to identify the particular element. For
1967 example, the LUN is used as index to select the particular element of attributes that have logical unit
1968 specific values.
1969 The range for the index is defined for each attribute, and it can be from 0 through 255. Index shall be set
1970 to zero for attributes composed by single element.
1971 SELECTOR
1972 The SELECTOR field may be needed to further identify a particular element of an attribute. Selector field
1973 shall be set to zero for attributes that do not require it.
1974
JEDEC Standard No. 220B
Page 98
2019
2020 FLAG IDN
2021 The FLAG IDN field contains a value that identifies a particular Flag to set in the Target device.
2022 Operation
2023 The Boolean value of the addressed flag is set to TRUE or one.
2024 INDEX
2025 The index field may be needed to identify a particular element of a flag. Index field is not used in this
2026 version of the standard and its value shall be zero.
2027 SELECTOR
2028 The selector field may be needed to further identify a particular element of a flag. Selector field is not
2029 used in this version of the standard and its value shall be zero.
2030
JEDEC Standard No. 220B
Page 101
12 13 14 15
24 25 26 27
Reserved
2071 The QUERY RESPONSE UPIU follows the general UPIU format a field defined for query function.
2072 The transaction specific fields are defined specifically for each type of operations.
2073 The Data Segment Area is optional depending upon the Query Function value. The Data Segment Length
2074 field will be set to zero if there is no data segment in the packet.
2075
JEDEC Standard No. 220B
Page 105
00h Success
01h-F5h Reserved
2100 OPCODE
2101 The opcode indicates the operation to perform. Possible opcode values are listed in Table 10.43.
2102 Table 10.43 — Query Function opcode values
OPCODE
00h NOP
01h READ DESCRIPTOR
02h WRITE DESCRIPTOR
03h READ ATTRIBUTE
04h WRITE ATTRIBUTE
05h READ FLAG
06h SET FLAG
07h CLEAR FLAG
08h TOGGLE FLAG
09h-EFh Reserved
F0h-FFh Vendor Specific
2103 If in a QUERY REQUEST UPIU, the Query Function field is set to STANDARD READ REQUEST and the
2104 OPCODE field is set to WRITE DESCRIPTOR, WRITE ATTRIBUTE, SET FLAG, CLEAR FLAG, or TOGGLE
2105 FLAG; then the query request shall fail and the Query Response field shall be set to either “Invalid OPCODE” or
2106 “General failure”.
2107 If in a QUERY REQUEST UPIU, the Query Function field is set to STANDARD WRITE REQUEST and the
2108 OPCODE field is set to READ DESCRIPTOR, READ ATTRIBUTE, or READ FLAG; then the query request shall
2109 fail and the Query Response field shall be set to either “Invalid OPCODE” or “General failure”.
2110 If in a QUERY REQUEST UPIU, the Query Function opcode field is set to a reserved value, the same value shall be
2111 returned in the QUERY RESPONSE UPIU.
2112 OSF
2113 The OSF field is an Opcode Specific Field. The OSF fields will be defined for each specific OPCODE.
JEDEC Standard No. 220B
Page 107
12 13 14 15
16 17 18 (MSB) 19 (LSB)
20 21 22 23
Reserved
24 25 26 27
Reserved
12 13 14 15
16 17 18 (MSB) 19 (LSB)
20 21 22 23
Reserved
24 25 26 27
Reserved
2142
2143 DESCRIPTOR IDN
2144 The Descriptor IDN field contains the same DESCRIPTOR IDN value sent from the corresponding
2145 QUERY REQUEST UPIU.
2146 INDEX
2147 The Index field value returned is the same INDEX value of the corresponding QUERY REQUEST UPIU.
2148 SELECTOR
2149 The SELECTOR field returned is the same SELECTOR value of the corresponding QUERY REQUEST
2150 UPIU.
2151 LENGTH
2152 The LENGTH field is used to indicate the number of descriptor bytes written. The entire descriptor must
2153 be written; there is no partial write or update possible.
2154
2155
JEDEC Standard No. 220B
Page 109
12 13 14 15
16 17 18 19
20 (MSB) 21 22 23 (LSB)
24 25 26 27
Reserved
12 13 14 15
16 17 18 19
20 (MSB) 21 22 23 (LSB)
24 25 26 27
Reserved
12 13 14 15
16 17 18 19
20 21 22 23
24 25 26 27
Reserved
12 13 14 15
16 17 18 19
20 21 22 23
24 25 26 27
Reserved
12 13 14 15
16 17 18 19
20 21 22 23
24 25 26 27
Reserved
12 13 14 15
16 17 18 19
20 21 22 23
24 25 26 27
Reserved
12 13 14 15
16 17 18 19
20 21 22 23
Reserved
24 25 26 27
Reserved
2268
JEDEC Standard No. 220B
Page 116
0 1 2 3
4 5 6 7
8 9 10 (MSB) 11 (LSB)
12 13 14 15
Reserved
16 17 18 19
Reserved
20 21 22 23
Reserved
24 25 26 27
Reserved
28 29 30 31
Reserved
32 (MSB) 33 34 35 (LSB)
2324
2325
JEDEC Standard No. 220B
Page 119
0 1 2 3
4 5 6 7
8 9 10 (MSB) 11 (LSB)
12 13 14 15
Reserved
16 17 18 19
Reserved
20 21 22 23
Reserved
24 25 26 27
Reserved
28 29 30 31
Reserved
32 (MSB) 33 34 35 (LSB)
2343
2344
JEDEC Standard No. 220B
Page 121
Logical Unit
Application Client Device
Server LUN
Task Resources under the
Task control of Logical Unit
Manager (memory area, etc.)
1 … M Application Clients
per Host
1 … N Logical Units
per Device
UniPro Port UniPro Port
2365
2366 Figure 10.1 — UFS SCSI domain
2367 10.6.3 UFS Logical Unit Definition
2368 A Logical Unit (LU) is an externally addressable, independent, processing entity that processes SCSI
2369 tasks (commands) and performs task management functions.
2370 A UFS device contains 1 or more logical units
2371 Each logical unit is independent of other logical units in a device
2372 UFS shall support up to eight logical units for boot code, application code and mass storage data
2373 applications, in addition to the well-known logical units as defined in 10.6.6 of this specification.
2374 Commands addressed to logical unit ‘i’ are handled by logical unit ‘i’ exclusively, not visible, handled or
2375 processed by logical unit ‘j’ (or any other LU)
2376 A logical unit contains the followings:
2377 DEVICE SERVER: A conceptual object within a logical unit that processes SCSI commands.
2378 TASK MANAGER: A conceptual object within a logical unit that controls the sequencing of
2379 commands and performs task management functions.
2380 TASK SET: A conceptual group of 1 or more commands (a list, queue, etc.)
2381
JEDEC Standard No. 220B
Page 123
2405
2406
2407 Figure 10.2 — Logical Unit Addressing
2408 Therefore, the encoding of the LUN field in UPIU supports up to 128 LUN’s and up to 128 W-LUN’s
2409 (0 <= UNIT_NUMBER_ID <= 127) .
2410
JEDEC Standard No. 220B
Page 124
INQUIRY,REQUEST SENSE,
RPMB 44h C4h TEST UNIT READY,
SECURITY IN, SECURITY OUT
2425 NOTE If bBootEnable field in the Device Descriptor is set to zero, the Boot well known logical unit may
2426 terminate TEST UNIT READY, READ (6), READ (10), and READ (16) commands with CHECK CONDITION
2427 status.
JEDEC Standard No. 220B
Page 125
2428 10.6.7 Translation of 8-bit UFS LUN to 64-bit SCSI LUN Address
2429 The SCSI Architecture Model describes a 64-bit LUN addressing scheme. The value of C1h in the first 8
2430 bits of the 64-bit address indicates a well known LUN address in the SAM SCSI format. Examples of
2431 translation of the 8-bit LUN field value in UPIU to 64-bit SCSI address are shown in Table 10.59.
2432
2433 Table 10.59 — Examples of logical unit representation format
Logical unit
2434
2435
JEDEC Standard No. 220B
Page 126
COMMAND UPIU
(WRITE CDB)
RTT UPIU
(DMA CONTEXT)
...
TIME
RTT UPIU
(DMA CONTEXT)
RESPONSE UPIU
(STATUS INFO)
2445
2446 Figure 10.3 — SCSI Write
JEDEC Standard No. 220B
Page 127
COMMAND UPIU
(READ CDB)
DATA IN UPIU
(READ DATA)
...
TIME
DATA IN UPIU
(READ DATA)
RESPONSE UPIU
(STATUS INFO)
2453
2454 Figure 10.4 — SCSI Read
2455
JEDEC Standard No. 220B
Page 128
2456 10.7 Application Layer and Device Manager Transport Protocol Services
2457 10.7.1 UFS Initiator Port and Target Port Attributes
2458
2459 Table 10.60 — UFS Initiator Port and Target Port Attributes
Attribute Value
Maximum CDB Length 16 bytes
Command Identifier Size 16 bits
Simple, Head of Queue, Ordered, ACA (not
Task Attributes Supported
supported)
Maximum Data-In Buffer Size FFFFh
Maximum Data-Out Buffer Size FFFFh
Maximum CRN Not Applicable
Command Priority Supported No
Maximum Sense Data Length FFFFh
Status Qualifier Supported No
Additional Response Information Supported Yes
Bidirectional Commands Supported No
Abort Task, Abort Task Set, Clear Task Set,
Task Management Functions Supported
Logical Unit Reset, Query Task, Query Task Set
2460
2461 10.7.2 Execute Command procedure call transport protocol services
2462 All SCSI transport protocol standards shall define the SCSI transport protocol specific requirements for
2463 implementing the Send SCSI Command request, the SCSI Command Received indication, the Send
2464 Command Complete response, and the Command Complete Received confirmation SCSI transport
2465 protocol services.
2466 All SCSI initiator devices shall implement the Send SCSI Command request and the Command Complete
2467 Received confirmation SCSI transport protocol services as defined in the applicable SCSI transport
2468 protocol standards. All SCSI target devices shall implement the SCSI Command Received indication and
2469 the Send Command Complete response SCSI transport protocol services as defined in the applicable
2470 SCSI transport protocol standards.
2471
Initiator Target
2474
2475
2476 Figure 10-5: Command w/o Data Phase
JEDEC Standard No. 220B
Page 130
Task Attribute Specifies the Flags.ATTR of the Flag field in the COMMAND UPIU
[CRN] Reserved
2484
2485
JEDEC Standard No. 220B
Page 131
I_T_L_Q Nexus T indicates the target port which receives the COMMAND UPIU
L indicates the LUN field in the COMMAND UPIU
Q indicates the Task Tag field in the COMMAND UPIU
Task Attribute Specifies the Flags.ATTR of the Flag field in the COMMAND UPIU
[CRN] Reserved
[Sense Data] Specifies the Sense Data field in the RESPONSE UPIU
[Send Data Length] Specifies the Sense Data Length field in the RESPONSE UPIU
2507
2508
JEDEC Standard No. 220B
Page 133
[Sense Data] Specifies the Sense Data field in the RESPONSE UPIU
[Send Data Length] Specifies the Sense Data Length field in the RESPONSE UPIU
2515
2516 10.7.7 Data transfer SCSI transport protocol services
2517 The data transfer services provide mechanisms for moving data to and from the SCSI initiator port while
2518 processing commands. All SCSI transport protocol standards shall define the protocols required to
2519 implement these services.
2520 The application client's Data-In Buffer and/or Data-Out Buffer each appears to the device server as a
2521 single, logically contiguous block of memory large enough to hold all the data required by the command.
2522
JEDEC Standard No. 220B
Page 134
2534
2535 10.7.7.2 Data-In Delivered transport protocol service
2536 This confirmation notifies the device server that the specified data was successfully delivered to the
2537 application client buffer, or that a UniPro delivery subsystem error occurred while attempting to deliver
2538 the data.
2539 Data-In Delivered (IN (I_T_L_Q Nexus, Delivery Result))
2540 Table 10.66 — Data-In Delivered transport protocol service
Argument Implementation
I_T_L_Q Nexus I_T_L_Q of the corresponding COMMAND UPIU
DELIVERY SUCCESSFUL: The data was delivered successfully.
Delivery Result DELIVERY FAILURE: A UTP service delivery error occurred while
attempting to deliver the data.
2541
JEDEC Standard No. 220B
Page 135
2542
2543 Figure 10.6 — Command + Read Data Phase 1/2
2544
JEDEC Standard No. 220B
Page 136
2545
2546
2547 Figure 10.7 — Command + Read Data Phase 2/2
JEDEC Standard No. 220B
Page 137
2564
2565 Figure 10.8 — Command + Write Data Phase 1/2
2566
2567
2568
JEDEC Standard No. 220B
Page 139
2569
2570 Figure 10.9 — Command + Write Data Phase 2/2
2571
JEDEC Standard No. 220B
Page 140
2577 One of the following SCSI transport protocol specific service responses shall be returned:
2578 Table 10.70 — SCSI transport protocol service responses
A task manager response indicating that the requested function is
complete.
FUNCTION COMPLETE Unless another response is required, the task manager shall return
this response upon completion of a task management request
supported by the logical unit or SCSI target device to which the
request was directed.
A task manager response indicating that the requested function is
supported and completed successfully. This task manager response
FUNCTION SUCCEEDED
shall only be used by functions that require notification of success
(e.g., QUERY TASK, QUERY TASK SET)
A task manager response indicating that the requested function is not
FUNCTION REJECTED supported by the logical unit or SCSI target device to which the
function was directed.
INCORRECT LOGICAL UNIT A task router response indicating that the function requested
NUMBER processing for an incorrect logical unit number.
The request was terminated due to a service delivery failure
SERVICE DELIVERY OR
TARGET FAILURE SCSI target device malfunction. The task manager may or may not
have successfully performed the specified function.
2579
2580
JEDEC Standard No. 220B
Page 141
2647
2648 Figure 10.10 — Task Management Function
JEDEC Standard No. 220B
Page 144
2649 10.7.8.8 Send Task Management Request SCSI transport protocol service request
2650 An application client uses the Send Task Management Request SCSI transport protocol service request to
2651 request that a SCSI initiator port send a task management function.
2652 Send Task Management Request SCSI transport protocol service request:
2653 Send Task Management Request (IN ( Nexus, Function Identifier ))
2654 Table 10.71 — Send Task Management Request SCSI transport protocol service request
Argument Implementation
Nexus I_T nexus, I_T_L nexus, or I_T_L_Q nexus
Function Identifier: Argument encoding the task management function to be performed.
2655 10.7.8.9 Task Management Request Received SCSI transport protocol service indication
2656 A task router uses the Task Management Request Received SCSI transport protocol service indication to
2657 notify a task manager that it has received a task management function.
2658 Task Management Request Received SCSI transport protocol service indication:
2659 Task Management Request Received (IN ( Nexus, Function Identifier ))
2660 Table 10.72 — Task Management Request Received SCSI transport protocol service indication
Argument Implementation
Nexus I_T nexus, I_T_L nexus, or I_T_L_Q nexus
Function Identifier: Argument encoding the task management function to be performed.
2661 10.7.8.10 Task Management Function Executed SCSI transport protocol service response
2662 A task manager uses the Task Management Function Executed SCSI transport protocol service response
2663 to request that a SCSI target port transmit task management function executed information.
2664 Task Management Function Executed SCSI transport protocol service response:
2665 Task Management Function Executed (IN ( Nexus, Service Response, [Additional Response Information]
2666 ))
2667 Table 10.73 — Task Management Function Executed SCSI transport protocol service response
Argument Implementation
Nexus I_T nexus, I_T_L nexus, or I_T_L_Q nexus
FUNCTION COMPLETE
FUNCTION SUCCEEDED:
Service Response FUNCTION REJECTED
INCORRECT LOGICAL UNIT NUMBER
SERVICE DELIVERY OR TARGET FAILURE
Additional Response The Additional Response Information output argument for the task
Information management procedure call
JEDEC Standard No. 220B
Page 145
2668 10.7.8.11 Received Task Management Function Executed SCSI transport protocol service
2669 confirmation
2670 A SCSI initiator port uses the Received Task Management Function Executed SCSI transport protocol
2671 service confirmation to notify an application client that it has received task management function
2672 executed information.
2673 Received Task Management Function Executed SCSI transport protocol service confirmation:
2674 Received Task Management Function Executed (IN ( Nexus, Service Response, [Additional Response
2675 Information] ))
2676 Table 10.74 — Received Task Management Function Executed SCSI transport protocol service
2677 confirmation
Argument Implementation
Nexus I_T nexus, I_T_L nexus, or I_T_L_Q nexus
FUNCTION COMPLETE
FUNCTION SUCCEEDED:
Service Response FUNCTION REJECTED
INCORRECT LOGICAL UNIT NUMBER
SERVICE DELIVERY OR TARGET FAILURE
Additional Response The Additional Response Information output argument for the task management
Information procedure call
2688
2689 Figure 10.11 — UFS Query Function
JEDEC Standard No. 220B
Page 147
2690 10.7.9.2 Query Request Received UFS transport protocol service indication
2691 A UFS target port uses the Query Request Received UFS transport protocol service indication to notify a
2692 UFS device manager that it has received a query function.
2693 Query Request Received UFS transport protocol service indication:
2694 Query Request Received(I_T Nexus, Operation: Read|Write, Type: UFS|Vendor,
2695 Identifier:Descriptor|Attribute|Flag,Length:n, [Index], [Selector], [WriteData])
2696 Table 10.76 — Query Request Received UFS transport protocol service indication
Argument Implementation
Selector Reserved
2697 10.7.9.3 Query Function Executed UFS transport protocol service response
2698 A device manager uses the Query Function Executed UFS transport protocol service response to request
2699 that a UFS target port transmit query function executed information.
2700 Query Function Executed UFS transport protocol service response:
2701 Query Executed(I_T Nexus, Service Response,[ReadData])
2702
2703 Table 10.77 — Query Function Executed UFS transport protocol service response
Argument Implementation
FUNCTION SUCCEEDED
Service Response
FUNCTION FAILED
2704
2705
JEDEC Standard No. 220B
Page 148
2706 10.7.9.4 Received Query Function Executed UFS transport protocol service confirmation
2707 A UFS initiator port uses the Received Query Function Executed UFS transport protocol service
2708 confirmation to notify an application client that it has received task management function executed
2709 information.
2710 Received Query Function Executed UFS transport protocol service confirmation:
2711 Received Query Executed(I_T Nexus, Service Response,[ReadData])
2712
2713 Table 10.78 — Received Query Function Executed UFS transport protocol service confirmation
Argument Implementation
FUNCTION SUCCEEDED
Service Response
FUNCTION FAILED
2714
2715
JEDEC Standard No. 220B
Page 149
2815 The 4-byte PRODUCT REVISION LEVEL in the Inquiry Response Data shall identify the firmware
2816 version of the UFS device and shall be uniquely encoded for any firmware modification implemented by
2817 the UFS device vendor.
2818
JEDEC Standard No. 220B
Page 154
6
7
PARAMETER LIST LENGTH
8
9 CONTROL = 00h
JEDEC Standard No. 220B
Page 155
PF: PAGE FORMAT. A page format bit set to zero specifies that all parameters after the
block descriptors are vendor specific. A PF bit set to one specifies that the MODE SELECT
1 4:4
parameters following the header and block descriptor(s) are structured as pages of related
parameters as defined in the SCSI standard.
SP: SAVE PAGES. A save pages (SP) bit set to zero specifies that the device server shall
perform the specified MODE SELECT operation, and shall not save any mode pages. If
the logical unit implements no distinction between current and saved mode pages and the
SP bit is set to zero, the command shall be terminated with CHECK CONDITION status,
with the sense key set to ILLEGAL REQUEST. An SP bit set to one specifies that the
device server shall perform the specified MODE SELECT operation, and shall save to a
nonvolatile vendor specific location all the saveable mode pages including any sent in the
1 0:0
Data-Out Buffer. Individual Mode pages that are saved are specified by the saveable
parameter bit (PS) that is returned in the first byte of each mode page when read via the
MODE SENSE command. If the PS bit is set to one in the MODE SENSE data, then the
mode page shall be saveable when issuing a MODE SELECT command with the SP bit
set to one. If the logical unit does not implement saved pages and the SP bit is set to one,
the command shall terminate with a CHECK CONDITION status and a sense key set to
ILLEGAL REQUEST.
PARAMETER LIST LENGTH: Specifies length in bytes of the mode parameter list that the
Application Client buffer will transfer to the Device Server. A PARAMETER LIST LENGTH
7:8 7:0
of zero specifies that no data shall be transferred, this shall not be considered an error and
in this case the device shall not send RTT UPIU.
LLBAA DBD
1 Reserved =000b Reserved = 000b
=0b = 1b
2 PC PAGE CODE
3 SUBPAGE CODE
5 Reserved
7 (MSB)
ALLOCATION LENGTH
8 (LSB)
9 CONTROL = 00h
2894
2895 11.3.4.1 Mode Sense Command Parameters
2896
2897 Table 11.8 — Mode Sense Command Parameters
Byte Bit Description
PC: The page control (PC) field specifies the type of mode parameter values to be
2 7:6
returned in the mode pages. See table below for definition.
PAGE CODE: Specifies which mode page to return. The Page and Subpage code specify
2 5:0
the page to return.
ALLOCATION LENGTH: Specifies the maximum number of bytes the Device Server will
7:8 7:0
transfer to the Application Client
2898
2899
JEDEC Standard No. 220B
Page 158
11b Saved Values Return the saved values of the mode parameters.
1 Reserved (MSB)
2
LOGICAL BLOCK ADDRESS
3 (LSB)
4 TRANSFER LENGTH
5 CONTROL = 00h
RDPROTECT
1 DPO FUA Reserved FUA_NV Obsolete
= 000b
2 (MSB)
3
LOGICAL BLOCK ADDRESS
4
5 (LSB)
7 (MSB)
TRANSFER LENGTH
8 (LSB)
9 CONTROL = 00h
2963
2964 The RDPROTECT field is set to ‘0’ for UFS.
2965
JEDEC Standard No. 220B
Page 161
2985 In case the GROUP NUMBER is set to a value which is not supported the operation shall fail and
2986 a STATUS response of CHECK CONDITION will be returned along with an ILLEGAL
2987 REQUEST SENSE KEY.
2988 11.3.6.2 Read (10) Command Data Transfer
2989 The Device Server will read the specified logical block(s) from the medium and transfer them to
2990 the Application Client in a series of DATA IN UPIU’s
2991 Zero or an incomplete number of DATA IN UPIU’s could be transferred if a read error occurs
2992 before the entire data transfer is complete
2993 11.3.6.3 Read (10) Command Status Response
2994 Status response will be sent in a single RESPONSE UPIU
2995 If all requested data is successfully read and transferred, the READ command will terminate with
2996 a STATUS response of GOOD
2997 If the unit is not ready to accept a new command (e.g., still processing previous command) a
2998 STATUS response of BUSY will be returned
2999 Failure can occur for numerous reasons. When the READ command fails a STATUS response of
3000 CHECK CONDITION will be returned along with an appropriate SENSE KEY, such as
3001 o ILLEGAL REQUEST (range or CDB errors)
3002 o MEDIUM ERROR (medium failure, ECC, etc.)
3003 o HARDWARE ERROR (hardware failure)
3004 o UNIT ATTENTION (reset, power-on, etc)
3005 o Etc.
JEDEC Standard No. 220B
Page 162
RDPROTECT
1 DPO FUA Reserved FUA_NV Reserved
= 000b
2 (MSB)
9 (LSB)
10 (MSB)
…. TRANSFER LENGTH
13 (LSB)
15 CONTROL = 00h
1 Reserved Obsolete
2 (MSB)
LOGICAL BLOCK ADDRESS
5 (LSB)
6 Reserved
7 Reserved
PMI
8 Reserved
= 0b
9 CONTROL = 00h
0 (MSB)
1
RETURNED LOGICAL BLOCK ADDRESS
2
3 (LSB)
4 (MSB)
5
LOGICAL BLOCK LENGTH
6
7 (LSB)
3070 Returned Logical Block Address = Last addressable block on medium under control of logical
3071 unit (LU)
3072 o If the number of logical blocks exceeds the maximum value that is able to be specified in the
3073 RETURNED LOGICAL BLOCK ADDRESS field, then the device server shall set the
3074 RETURNED LOGICAL BLOCK ADDRESS field to FFFF FFFFh. The application client
3075 should then issue a READ CAPACITY (16) command to request that the device server
3076 transfer the READ CAPACITY (16) parameter data to the data-in buffer.
3077 Logical Block Length = size of block in bytes
3078 o For UFS minimum size shall be 4096 bytes
3079
JEDEC Standard No. 220B
Page 166
0 (MSB)
7 (LSB)
8 (MSB)
11 (LSB)
16
…. Reserved
31
3116 Returned Logical Block Address = Last addressable block on medium under control of logical
3117 unit (LU)
3118 Logical Block Length = size of block in bytes
3119 o For UFS minimum size shall be 4096 bytes
3120 P_TYPE, PROT_EN are set to ‘0’ for UFS
3121 The P_I_EXPONENT field can be ignored for PROT_EN = ‘0’
3122 Logical Blocks per Physical Block Exponent (vendor-specific information)
3123 o 0: one or more physical blocks per logical block
3124 o n>0: 2n logical blocks per physical block
3125 TPE is set to ‘0’ if bProvisioningType parameter in UFS Configuration Descriptor is set to 00h.
3126 TPE is set to ‘1’ if bProvisioningType is set to 02h or 03h.
3127 TPRZ value is set by bProvisioningType parameter in UFS Configuration Descriptor. If the thin
3128 provisioning read zeros (TPRZ) bit is set to one, then, for an unmapped LBA specified by a read
3129 operation, the device server shall send user data with all bits set to zero to the data in buffer. If the
3130 TPRZ bit is set to zero, then, for an unmapped LBA specified by a read operation, the device
3131 server shall send user data with all bits set to any value to the data in buffer. Lowest Aligned
3132 Logical Block Address indicates the LBA of the first logical block that is located at the beginning
3133 of a physical block (vendor-specific information)
JEDEC Standard No. 220B
Page 169
1 Reserved IMMED
2 Reserved
LOEJ
4 POWER CONDITIONS Reserved NO_FLUSH START
= 0b
5 CONTROL = 00h
1 Reserved
2 Reserved
3 Reserved
4 Reserved
5 CONTROL = 00h
1 Reserved
2 SELECT REPORT
3 (MSB)
Reserved
5 (LSB)
6 (MSB)
ALLOCATION LENGTH
9 (LSB)
10 Reserved
11 CONTROL = 00h
3215
3216
JEDEC Standard No. 220B
Page 173
SELECT REPORT: Specifies the type of logical unit addresses that shall be
2 7:0 reported. The report types available are listed in the table below. UFS will support
all report types.
3219
3220 11.3.12.2 Report LUNS Command Select Report Field Values
3221 Table 11.21 — Report LUNS Command Select Report Field Values
REPORT
DESCRIPTION
CODE
The list shall contain all accessible logical units using the single level LUN
00h structure using the peripheral device addressing method, if any. If there are
no logical units, the LUN LIST LENGTH field shall be zero.
The list shall contain all accessible well known logical units, if any using the
01h well known logical unit extended addressing format. If there are no well
known logical units, the LUN LIST LENGTH field shall be zero.
The list shall contain all accessible logical units using their respective
02h
addressing format.
03h-FFh Reserved
Byte 7 6 5 4 3 2 1 0
0 00b 000000b
1 LUN
2
NULL (0000h)
3
4
NULL (0000h)
5
6
NULL (0000h)
7
Byte 7 6 5 4 3 2 1 0
1 W-LUN
2
NULL (0000h)
3
4
NULL (0000h)
5
6
NULL (0000h)
7
WLUN_ID UNIT_NUMBER_ID
3266
3267 The UFS 8-bit LUN field in UPIU supports two types of LUN addressing:
3268 If WLUN_ID bit = ‘0’ then the UNIT_NUMBER_ID field addresses a standard logical unit
3269 (LUN)
3270 If WLUN_ID bit = ‘1’ then the UNIT_NUMBER_ID field addresses a well known logical unit
3271 (W-LUN)
3272 Up to 128 LUN’s and up to 128 W-LUN’s
3273 0 <= UNIT_NUMBER_ID <= 127
3274 0 <= UNIT_NUMBER_ID <= 127
3275 The following table defines the logical unit number for UFS well known logical units (WLUN_ID bit set
3276 to ‘1’)
3277 Table 11.26 — Well known logical unit numbers
Well known logical unit WLUN_ID UNIT_NUMBER_ID LUN Field in UPIU
BYTCH Obsolet
VRPROTECT DPO
1 Reserved K e
= 000b =0
=0 =0
2 (MSB)
3
LOGICAL BLOCK ADDRESS
4
5 (LSB)
GROUP NUMBER
6 Reserved
= 0h
7 (MSB)
VERIFICATION LENGTH
8 (LSB)
9 CONTROL = 00h
3287
3288 UFS device is required to support only the value zero for the byte check (BYTCHK) bit. Therefore the
3289 BYTCHK bit should be set to zero, and the device shall perform a medium verification with no data
3290 comparison and not transfer any data from the data-out buffer for any mapped LBA specified by the
3291 command.
3292
JEDEC Standard No. 220B
Page 178
1 Reserved (MSB)
2
LOGICAL BLOCK ADDRESS
3 (LSB)
4 TRANSFER LENGTH
5 CONTROL = 00h
3317
3318 11.3.14.1 Write (6) Command Parameters
3319 LOGICAL BLOCK ADDRESS: Address of first block
3320 TRANSFER LENGTH: Number of contiguous logical blocks of data that shall be transferred and
3321 written. A transfer length of zero specifies that 256 logical blocks shall be written. Any other
3322 value specifies the number of logical blocks that shall be written.
3323
3324 11.3.14.2 Write (6) Command Data Transfer
3325 The Device Server will transfer the specified logical block(s) from the Application Client by issuing a
3326 series of READY TO TRANSFER UPIU’s (RTT) followed by a DATA OUT UPIU per RTT and will
3327 subsequently write them.
3328 Zero or an incomplete number of RTT’s and DATA OUT UPIU’s could be requested if a write error
3329 occurs before the entire data transfer is complete
3330
JEDEC Standard No. 220B
Page 180
(MSB
2
)
3
LOGICAL BLOCK ADDRESS
4
5 (LSB)
(MSB
7
)
TRANSFER LENGTH
8 (LSB)
9 CONTROL = 00h
3353
3354 The WRPROTECT field is set to ‘0’ for UFS.
3355
3356
JEDEC Standard No. 220B
Page 182
3378
3379 In case the GROUP NUMBER is set to a value which is not supported the operation shall fail and
3380 a STATUS response of CHECK CONDITION will be returned along with an ILLEGAL
3381 REQUEST SENSE KEY.
3382 11.3.15.2 Write(10) Command Data Transfer
3383 The Device Server will transfer the specified logical block(s) from the Application Client by issuing a
3384 series of READY TO TRANSFER UPIU’s (RTT) followed by a DATA OUT UPIU per RTT and will
3385 subsequently write them.
3386 Zero or an incomplete number of RTT’s and DATA OUT UPIU’s could be requested if a write error
3387 occurs before the entire data transfer is complete.
JEDEC Standard No. 220B
Page 183
2 (MSB)
9 (LSB)
10 (MSB)
…. TRANSFER LENGTH
13 (LSB)
15 CONTROL = 00h
3409
3410 The WDPROTECT field is set to zero for UFS.
3411
JEDEC Standard No. 220B
Page 185
DESC
1 Reserved
= 0b
2 (MSB)
Reserved
3 (LSB)
4 ALLOCATION LENGTH
5 CONTROL = 00h
3469 UFS devices are not required to support descriptor format sense data.
3470 11.3.17.1 Request Sense Data Response
3471 Data returned from a REQUEST SENSE command will be transferred to the Application Client
3472 in a single DATA IN UPIU.
3473 The Device Server will transfer up to 18 Bytes of Response Data in the Data Segment area of a
3474 DATA IN UPIU.
3475 o Return 18 bytes if Allocation Length in CDB >= 18.
3476 o Return Allocation Length bytes if Allocation Length in CDB < 18.
3477 o An Allocation Length of zero specifies that no data shall be transferred. This condition
3478 shall not be considered as an error, and DATA IN UPIU shall not be generated.
3479 Data will be returned in the indicated Sense Data Format described below.
JEDEC Standard No. 220B
Page 188
Ch Obsolete -
Dh VOLUME OVERFLOW Failure to write all data because end of range or partition
Eh MISCOMPARE Indicates source data did not match data read from medium
Fh RESERVED Reserved
3485
3486
JEDEC Standard No. 220B
Page 190
LONGLI FMTDAT
1 FMTPINFO CMPLST DEFECT LIST FORMAT
ST A
2 Vendor Specific
3 (MSB)
Reserved
4 (LSB)
5 CONTROL = 00h
LONGLIST: If set to ‘0’ then the parameter list, if any, will use the SHORT parameter
1 5 list header as defined in [SBC]. If set to ‘1’ then the parameter list uses the LONG
format.
FMTDATA: If set to ‘1’ specifies that parameter list data shall be transferred during the
1 4
DATA OUT phase.
CMPLST: Complete List. ‘0’ indicates that the parameter list contains a partial growing
1 3
list of defects. A ‘1’ indicates the list is complete. See [SBC].
DEFECT LIST FORMAT: If the FMTDATA bit is set to one, then the DEFECT LIST
1 2:0 FORMAT field specifies the format of the address descriptors in the defect list. See
[SBC].
2 (MSB)
3
LOGICAL BLOCK ADDRESS
4
5 (LSB)
7 (MSB)
PRE-FETCH LENGTH
8 (LSB)
9 CONTROL= 00h
3549
3550
JEDEC Standard No. 220B
Page 194
IMMED: An immediate (IMMED) bit set to zero specifies that the device server shall
not return status until the operation has been completed. An IMMED bit set to one
specifies that the device server shall return status as soon as the CDB has been
1 1 validated. If the IMMED bit is set to one, and the device server does not support the
IMMED bit, then the device server shall terminate the command with CHECK
CONDITION status with the sense key set to ILLEGAL REQUEST and the additional
sense code set to INVALID FIELD IN CDB.
LOGICAL BLOCK ADDRESS: The LOGICAL BLOCK ADDRESS field specifies the
LBA of the first logical block accessed by this command. If the specified LBA
exceeds the capacity of the medium, then the device server shall terminate the
2:5 7:0
command with CHECK CONDITION status with the sense key set to ILLEGAL
REQUEST and the additional sense code set to LOGICAL BLOCK ADDRESS OUT
OF RANGE.
GROUP NUMBER: The GROUP NUMBER field specifies the group into which
attributes associated with the command should be collected. A GROUP NUMBER
6 4:0 field set to zero specifies that any attributes associated with the command shall not
be collected into any group. The use of GROUP NUMBER field for PRE-FETCH
command is not defined in this specification therefore this field should be set to zero.
3553
3554
JEDEC Standard No. 220B
Page 195
2 (MSB)
9 (LSB)
10 (MSB)
13 (LSB)
15 CONTROL= 00h
3577
3578
JEDEC Standard No. 220B
Page 197
1 SECURITY PROTOCOL
2
SECURITY PROTOCOL SPECIFIC
3
4 INC_512 Reserved
5 Reserved
6 (MSB)
ALLOCATION LENGTH
9 (LSB)
10 Reserved
11 CONTROL = 00h
1 SECURITY PROTOCOL
2
SECURITY PROTOCOL SPECIFIC
3
4 INC_512 Reserved
5 Reserved
6 (MSB)
TRANSFER LENGTH
9 (LSB)
10 Reserved
11 CONTROL = 00h
2 Reserved
3 (MSB)
Parameter List Length
4 (LSB)
5 CONTROL = 00h
2 (MSB)
3
LOGICAL BLOCK ADDRESS
4
5 (LSB)
7 (MSB)
NUMBER OF LOGICAL BLOCKS
8 (LSB)
9 CONTROL = 00h
3667
3668
JEDEC Standard No. 220B
Page 204
SYNC_NV: SYNC_NV is defined per SBC. Since non-volatile cache support is not
1 2 currently defined in this standard, the SYNC_NV parameter value in the CDB is
ignored by the UFS Device Server.
IMMED: An immediate (IMMED) bit set to zero specifies that the device server shall
not return status until the operation has been completed. An IMMED bit set to one
specifies that the device server shall return status as soon as the CDB has been
1 1 validated. If the IMMED bit is set to one, and the device server does not support the
IMMED bit, then the device server shall terminate the command with CHECK
CONDITION status with the sense key set to ILLEGAL REQUEST and the additional
sense code set to INVALID FIELD IN CDB.
LOGICAL BLOCK ADDRESS: The LOGICAL BLOCK ADDRESS field specifies the
LBA of the first logical block accessed by this command. If the specified LBA
exceeds the capacity of the medium, then the device server shall terminate the
2:5 7:0
command with CHECK CONDITION status with the sense key set to ILLEGAL
REQUEST and the additional sense code set to LOGICAL BLOCK ADDRESS OUT
OF RANGE.
GROUP NUMBER: The GROUP NUMBER field specifies the group into which
attributes associated with the command should be collected. A GROUP NUMBER
field set to zero specifies that any attributes associated with the command shall not
6 4:0
be collected into any group. The use of GROUP NUMBER field for SYNCHRONIZE
CACHE command is not defined in this specification therefore this field should be set
to zero.
CONTROL: The CONTROL byte is not used in this specification: the CONTROL
9 7:0
byte should be set to zero and it shall be ignored by UFS device.
3671
3672 11.3.24.2 Synchronize Cache Command Data Transfer
3673 The SYNCHRONIZE CACHE command does not have a data transfer phase.
3674 No DATA IN or DATA OUT UPIU’s are transferred.
JEDEC Standard No. 220B
Page 205
2 (MSB)
9 (LSB)
10 (MSB)
13 (LSB)
15 CONTROL = 00h
3693
3694
JEDEC Standard No. 220B
Page 207
1 Reserved ANCHOR
2 (MSB)
3
Reserved
4
5 (LSB)
7 (MSB)
PARAMETER LIST LENGTH
8 (LSB)
9 CONTROL = 00h
0 (MSB)
UNMAP DATA LENGTH (n-1)
1 (LSB)
2 (MSB)
UNMAP BLOCK DESCRIPTOR DATA LENGTH (n-7)
3 (LSB)
4 (MSB)
…. Reserved
7 (LSB)
8 (MSB)
23 (LSB)
n-15 (MSB)
n (LSB)
3717 The UNMAP DATA LENGTH field specifies the length in bytes of the following data that is
3718 available to be transferred from the data-out buffer. The unmap data length does not include the
3719 number of bytes in the UNMAP DATA LENGTH field.
3720 The UNMAP BLOCK DESCRIPTOR DATA LENGTH field specifies the length in bytes of the
3721 UNMAP block descriptors that are available to be transferred from the data-out buffer. The unmap
3722 block descriptor data length should be a multiple of 16. If the unmap block descriptor data length is
3723 not a multiple of 16, then the last unmap block descriptor is incomplete and shall be ignored. If the
3724 UNMAP BLOCK DESCRIPTOR DATA LENGTH is set to zero, then no unmap block descriptors
3725 are included in the UNMAP parameter data. This condition shall not be considered an error.
JEDEC Standard No. 220B
Page 209
0 (MSB)
7 (LSB)
8 (MSB)
11 (LSB)
12
…. Reserved
15
3728 The UNMAP LOGICAL BLOCK ADDRESS field contains the first LBA of the UNMAP block
3729 descriptor to be unmapped.
3730 The NUMBER OF LOGICAL BLOCKS field contains the number of LBAs to be unmapped
3731 beginning with the LBA specified by the UNMAP LOGICAL BLOCK ADDRESS field.
3732 To minimize performance degradation, the entire LBA region to be unmapped should be aligned with
3733 the bOptimalWriteBlockSize value in the Unit Descriptor where possible (but not required).
3734 If the NUMBER OF LOGICAL BLOCKS is set to zero, then no LBAs shall be unmapped for this
3735 UNMAP block descriptor. This condition shall not be considered an error.
3736 If the LBA specified by the UNMAP LOGICAL BLOCK ADDRESS field plus the number of logical
3737 blocks exceeds the capacity of the medium, then the device server shall terminate the command with
3738 CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense
3739 code set to LOGICAL BLOCK ADDRESS OUT OF RANGE.
3740 In UFS, if Vital Product Data Page is not supported by the UFS device, default values of MAXIMUM
3741 UNMAP LBA COUNT and MAXIMUM UNMAP BLOCK DESCRIPTOR COUNT are set as
3742 follows.
3743 o MAXIMUM UNMAP LBA COUNT = LBA count reported in READ CAPACITY
3744 o MAXIMUM UNMAP BLOCK DESCRIPTOR COUNT = 1
3745 If Vital Product Data Page is supported by the device, the MAXIMUM UNMAP LBA COUNT and
3746 MAXIMUM UNMAP BLOCK DESCRIPTOR COUNT are set by the device manufacturer in the
3747 Block Limits VPD page. If the total number of logical blocks specified in the UNMAP block
3748 descriptor data exceeds the value indicated in the MAXIMUM UNMAP LBA COUNT field in the
3749 Block Limits VPD page or if the number of UNMAP block descriptors exceeds the value of the
3750 MAXIMUM UNMAP BLOCK DESCRIPTOR COUNT field in the Block Limits VPD page, then the
3751 device server shall terminate the command with CHECK CONDITION status with the sense key set
3752 to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN PARAMETER
3753 LIST.
JEDEC Standard No. 220B
Page 210
1 Reserved MODE
2 BUFFER ID
3 (MSB)
4 BUFFER OFFSET
5 (LSB)
6 (MSB)
7 ALLOCATION LENGTH
8 (LSB)
9 CONTROL = 00h
3765
3766
JEDEC Standard No. 220B
Page 211
3769
3770 11.3.27.2 Read Buffer Command Mode Field Values
3771 Table 11.52 — Read Buffer Command Mode Field Values
MODE DESCRIPTION
00h Not used in UFS
01h Vendor Specific
02h Data
03h-1Ch Not used in UFS
1Dh-1Fh Reserved
3772 For this version of UFS standard, the device shall support the MODE value of 02h, indicating
3773 Data Mode. Data Mode will transfer from the Device Server up to Allocation Length bytes,
3774 starting at Buffer Offset, of non-descript data from the buffer specified by Buffer ID.
3775 The definition and structure of the data being transferred in Data Mode will be described in other
3776 UFS documents that specify the functional description of the UFS specific extension operation
3777 that uses the READ BUFFER command.
3778 11.3.27.3 Read Buffer Command Data Transfer
3779 The Device Server will read up to Allocation Length number of data bytes from the specified
3780 Buffer Offset within a buffer specified by the Buffer ID in the Device Server and transfer them to
3781 a buffer in the Application Client
3782 o Less than Allocation Length will be transferred if Device Server contains less bytes
3783 Data will be transferred from the Device Server to the Application Client via a series of DATA
3784 IN UPIU’s
3785 o The data transferred from the Device Server will be contained within the Data Segment of the
3786 DATA IN UPIU
3787 Zero or an incomplete number of DATA IN UPIU’s will be transferred if an error occurs before
3788 the entire data transfer is complete
JEDEC Standard No. 220B
Page 212
1 Reserved MODE
2 BUFFER ID
3 (MSB)
4 BUFFER OFFSET
5 (LSB)
6 (MSB)
8 (LSB)
9 CONTROL = 00h
3815
3816
JEDEC Standard No. 220B
Page 214
3821 For this version of UFS standard, the device shall support the MODE value of 02h, indicating
3822 Data Mode. Data Mode will transfer from the Application Client Parameter List Length bytes of
3823 non-descript data destined for the Device Server for the buffer specified by Buffer ID at the offset
3824 specified by Buffer Offset.
3825 The definition and structure of the data being transferred in Data Mode will be described in other
3826 UFS documents that specify the functional description of the UFS specific extension operation
3827 that uses the WRITE BUFFER command.
3828 UFS device may support a MODE value of 04h-07h or 0Eh-0Fh for microcode download.
JEDEC Standard No. 220B
Page 215
3862
3863
JEDEC Standard No. 220B
Page 217
Block Descriptor(s)
0 (MSB)
MODE DATA LENGTH
1 (LSB)
4 Reserved = 00h
5 Reserved = 00h
6 (MSB)
BLOCK DESCRIPTOR LENGTH
= 00h
7 (LSB)
3872 When using the MODE SENSE command, the MODE DATA LENGTH field indicates the length in
3873 bytes of the following data that is available to be transferred. The mode data length does not include the
3874 number of bytes in the MODE DATA LENGTH field. When using the MODE SELECT command, this
3875 field is reserved.
3876
JEDEC Standard No. 220B
Page 218
MODE DATA LENGTH: Indicates the length in bytes of data following this field that is
0:1 7:0 available to transfer. This value does not include the size of this field (2 bytes). For MODE
SENSE 10-byte CDB, this value will be calculated as 6 + page data bytes.
MEDIUM TYPE: Indicates the medium type of the device. For UFS this value shall be set
2 7:0
to 00h, indicating Data Medium.
BLOCK DESCRIPTOR LENGTH: Length of block descriptor in parameter list. For UFS
6:7 7:0 this value shall be 00h indicating that there is no block descriptor(s) used in the parameter
list.
3879 NOTE 1 The WP bit shall be set to one when the logical unit is write-protected by any method, including any one of
3880 the followings:
3881 the software write protect (SWP) bit in the Control mode page is set to one
3882 the logical unit is configured as permanent write protected and fPermanentWPEn = 1
3883 the logical unit is configured as power on write protected and fPowerOnWPEn = 1
3884 the device is write-protected by vendor-specific electrical or mechanical mechanism.
3885
JEDEC Standard No. 220B
Page 219
SPF
0 PS PAGE CODE
(0b)
1 PAGE LENGTH (n – 1)
2
Mode Parameters
n
3888
3889 Table 11.61 — Page 0 Format parameters
Byte Bit Description
PS: Indicates the page parameters can be saved. When using the MODE SENSE
command, the PS bit set to one indicates that the mode page may be saved by the logical
0 7:7 unit in a nonvolatile, vendor specific location. A PS bit set to zero indicates that the device
server is not able to save the supported parameters. When using the MODE SELECT
command, the PS bit is reserved.
SPF: Indicates SUBPAGE format. When set to zero indicates that the PAGE 0 format is
0 6:6
being used. When set to one, indicates the SUBPAGE mode page format is being used.
0 5:0 PAGE CODE: Indicates the format and parameters for particular mode page.
1 7:0 PAGE LENGTH: Indicates the size in bytes of the following mode page parameters.
2:N 7:0 MODE PARAMETERS: The contents of the indicated mode page.
3890
3891
JEDEC Standard No. 220B
Page 220
1 SUBPAGE CODE
2 (MSB)
PAGE LENGTH (n – 3)
3 (LSB)
4
Mode Parameters
n
3894
3895 Table 11.63 — Subpage Format parameters
Byte Bit Description
PS: Indicates the page parameters can be saved. When using the MODE SENSE command,
the PS bit set to one indicates that the mode page may be saved by the logical unit in a
0 7:7 nonvolatile, vendor specific location. A PS bit set to zero indicates that the device server is
not able to save the supported parameters. When using the MODE SELECT command, the
PS bit is reserved.
SPF: Indicates SUBPAGE format. When set to zero indicates that the PAGE 0 format is
0 6:6
being used. When set to one, indicates the SUBPAGE mode page format is being used.
PAGE CODE: Page and Subpage code indicates the format and parameters for particular
0 5:0
mode page.
SUBPAGE CODE: Page and subpage code indicates the format and parameters for
1 7:0
particular mode page.
2:3 7:0 PAGE LENGTH: Indicates the size in bytes of the following mode page parameters.
4:N 7:0 MODE PARAMETERS: The contents of the indicated mode page.
3896
JEDEC Standard No. 220B
Page 221
READ-WRITE
ERROR 01h 00h Return READ-WRITE ERROR RECOVERY mode page
RECOVERY
ALL PAGES 3Fh 00h Return all mode pages (not including subpages)
ALL SUBPAGES 3Fh FFh Return all mode pages and subpages
3901
3902 If the device has more than one logical unit, host should read Mode Page Policy VPD in order to know
3903 whether the logical unit maintains its own copy of the mode page and subpage or all logical units share
3904 the mode page and subpage.
JEDEC Standard No. 220B
Page 222
SPF
0 PS PAGE CODE = 0Ah
=0
TMF_ONL D_SENS
DPICZ GLTSD RLEC
2 TST = 000b Y E
= 0b = 0b = 0b
= 0b = 0b
Reserve
ATO TAS ATMPE RWWP AUTOLOAD MODE
5 d
= 0b = 0b = 0b = 0b = 000b
= 0b
6
Obsolete
= 0000h
7
8 (MSB)
BUSY TIMEOUT PERIOD
9 (LSB)
10 (MSB)
EXTENDED SELF-TEST COMPLETION TIME
= 0000h
11 (LSB)
3910 NOTE 1 Default values for PS field and BUSY TIMEOUT PERIOD field are device specific.
3911
3912 The following Control mode page fields shall be changeable: SWP and BUSY TIMEOUT PERIOD.
3913 Other fields may or may not be changeable, refer to the vendor datasheet for details.
3914
JEDEC Standard No. 220B
Page 223
SWP: A software write protect (SWP) bit set to one specifies that the logical unit shall
inhibit writing to the medium after writing all cached or buffered write data, if any. When
4 3:3
SWP is one, all commands requiring writes to the medium shall be terminated with CHECK
CONDITION status, with the sense key set to DATA PROTECT
BUSY TIMEOUT PERIOD: The BUSY TIMEOUT PERIOD field specifies the maximum
time, in 100 milliseconds increments, that the application client allows for the device server
8:9 7:0
to return BUSY status for commands from the application client. A 0000h value in this field
is undefined. An FFFFh value in this field is defined as an unlimited period.
3917 NOTE 1 In addition to the software write protection, the logical unit may be configured as permanent write protected
3918 or power on write protected. The logical unit is writeable if all types of write protection are disabled. The logical unit is
3919 write protected if SWP = 1b, or if it is configured as permanent write protected and fPermanentWPEn =1, or if it is
3920 configured as power on write protected and fPowerOnWPEn =1.
3921
3922
JEDEC Standard No. 220B
Page 224
SPF
0 PS PAGE CODE = 01h
=0b
4 Obsolete = 00h
5 Obsolete = 00h
6 Obsolete = 00h
9 Reserved = 00h
10 (MSB)
RECOVERY TIME LIMIT
11 (LSB)
3929 NOTE 1 Default values for PS field, READ RETRY COUNT field, WRITE RETRY COUNT field and RECOVERY
3930 TIME LIMIT are device specific.
3931 This standard does not define which Read-Write Error Recovery mode page fields are changeable, refer to
3932 vendor datasheet for details.
3933
JEDEC Standard No. 220B
Page 225
READ RETRY COUNT: The READ RETRY COUNT field specifies the number of times
3 7:0
that the device server shall attempt its recovery algorithm during read operations.
WRITE RETRY COUNT: The WRITE RETRY COUNT field specifies the number of times
8 7:0
that the device server shall attempt its recovery algorithm during write operations.
RECOVERY TIME LIMIT: The RECOVERY TIME LIMIT field specifies in milliseconds the
maximum time duration that the device server shall use for data error recovery
10:11 7:0
procedures. When both a retry count and a recovery time limit are specified, the field that
specifies the recovery action of least duration shall have priority.
3936
3937
JEDEC Standard No. 220B
Page 226
3943 The following Caching mode page fields shall be changeable: WCE and RCD. Other fields mayor may
3944 not be changeable, refer to the vendor datasheet for details.
3945
JEDEC Standard No. 220B
Page 227
WCE: WRITE BACK CACHE ENABLE. A writeback cache enable bit set to zero specifies
that the device server shall complete a WRITE command with GOOD status only after
2 2:2 writing all of the data to the medium without error. A WCE bit set to one specifies that the
device server may complete a WRITE command with GOOD status after receiving the
data without error and prior to having written the data to the medium.
RCD: READ CACHE DISABLE. A read cache disable bit set to zero specifies that the
device server may return data requested by a READ command by accessing either the
2 0:0 cache or medium. A RCD bit set to one specifies that the device server shall transfer all of
the data requested by a READ command from the medium (i.e., data shall not be
transferred from the cache).
3948 NOTE 1 Fields that are not supported by UFS should be set to zero, and are documented assigning a value of zero
3949 to them (e.g., PS=0b). The device may ignore values in fields that are not supported by UFS.
3950
3951
JEDEC Standard No. 220B
Page 228
3953 This section summarizes UFS device security features and the implementation details. These features
3954 include: Secure mode operation, data and register protection, RPMB and reset.
3955 12.1 UFS Security Feature Support Requirements
3956 The security features outlined in this specification are mandatory for all devices.
3957 The following security features are defined: replay protected memory block (RPMB), secure mode and
3958 different types of logical unit write protection.
3959 12.2 Secure Mode
3960 12.2.1 Description
3961 UFS devices will be used to store user’s personal and/or corporate data information. The UFS device
3962 provides a way to remove the data permanently from the device when requested, ensuring that it cannot
3963 be retrieved using reverse engineering on the memory device.
3964 The UFS device shall support a secure and insecure mode of operation. In the secure mode all operations
3965 that result in the removal or retiring of information on the device will purge this information in a secure
3966 manner, as outlined in 12.2.2.1 “Secure Removal”.
3967 The secure mode is applied at the logical unit level, so different logical unit may have different secure
3968 modes.
3969
JEDEC Standard No. 220B
Page 229
State bPurgeStatus
Power-on
Idle 00h, 02h, 03h, 04h, 05h
Set fPurgeEnable / Purge op.
Fail 01h
in progress
(1)
Transition Description
Idle
Set fPurgeEnable and LU
1
command queues not empty
Set fPurgeEnable and LU
2
command queues empty
Set fPurgeEnable / 3 Clear fPurgeEnable
(4) (2)
Success
Automatic transition when the
4 purge operation completes
(3)
successfully or with failure
Purge op.
Purge op. completed / in progress Clear fPurgeEnable /
Success or Fail Success Input / Output
State
4094
4095 Figure 12.1 — Purge operation state machine
4096 NOTE 1 On each transition the input event (triggering the state transition) and the output of the transition itself are
4097 mentioned
4098 The host may interrupt an ongoing purge operation clearing the fPurgeEnable flag, when the operation
4099 has been interrupted the state will transition to “Idle” and bPurgeStatus will be set to 02h.
JEDEC Standard No. 220B
Page 233
4235
4236
JEDEC Standard No. 220B
Page 239
0002h (0082h) Authentication failure (MAC comparison not matching, MAC calculation failure)
0003h (0083h) Counter failure (counters not matching in comparison, counter incrementing failure)
0004h (0084h) Address failure (address out of range, wrong address alignment)
Authentication Key not yet programmed. This value is the only valid Result value
0007h until the Authentication Key has been programmed. Once the key is programmed,
this Result value will no longer be used.
4286
JEDEC Standard No. 220B
Page 242
0 (MSB)
Stuff Bytes
195 (LSB)
196 (MSB)
Key / MAC
227 (LSB)
484 (MSB)
Nonce
499 (LSB)
500 (MSB)
Write Counter
503 (LSB)
504 (MSB)
Address
505 (LSB)
506 (MSB)
Block Count
507 (LSB)
508 (MSB)
Result
509 (LSB)
510 (MSB)
Request / Response
511 (LSB)
4291
JEDEC Standard No. 220B
Page 243
1 SECURITY PROTOCOL
2
SECURITY PROTOCOL SPECIFIC
3
INC_512
4 Reserved
= 0b
5 Reserved
6 (MSB)
(2)
ALLOCATION / TRANSFER LENGTH
9 (LSB)
10 Reserved
11 CONTROL = 00h
4319 NOTE 1 OPERATION CODE = A2h for SECURITY PROTOCOL IN command, OPERATION CODE = B5h for
4320 SECURITY PROTOCOL OUT command.
4321 NOTE 2 ALLOCATION LENGTH for SECURITY PROTOCOL IN command, TRANSFER LENGTH for SECURITY
4322 PROTOCOL OUT command.
4323
4324 Security Protocol In/Out commands shall consider the unique Security Protocol ID assigned to JEDEC
4325 UFS application as the only valid Security Protocol ID.
4326 INC_512 bit shall be set to zero to specify that the ALLOCATION / TRANSFER LENGTH field
4327 expresses the number of bytes to be transferred.
4328
4329
JEDEC Standard No. 220B
Page 245
4339
4340
JEDEC Standard No. 220B
Page 246
0
Reserved
5
6 (MSB)
SUPPORTED SECURITY PROTOCOL LIST LENGTH (m-7)
7 (LSB)
.
.
m+1
Pad Bytes (optional)
n
4346 Security Protocol 00h and the UFS Security Protocol ID = ECh are the only valid security protocol ID’s
4347 supported in this version of the standard, therefore Table 12.9 shall be implemented as defined in Table
4348 12.10.
4349 Table 12.10 — UFS Supported security protocols SECURITY PROTOCOL IN parameter data
Bit
7 6 5 4 3 2 1 0
Byte
0
Reserved
5
6 (MSB)
0002h (SUPPORTED SECURITY PROTOCOL LIST LENGTH)
7 (LSB)
10
Pad Bytes (optional)
n
4350
4351
JEDEC Standard No. 220B
Page 247
0
Reserved
1
2 (MSB)
CERTIFICATE LENGTH (m-3)
3 (LSB)
4
CERTIFICATE
m
m+1
Pad Bytes (optional)
n
4356 The Device Server does not have a certificate to transfer, the CERTIFICATE LENGTH field shall be set
4357 to 0000h. therefore Table 12.11 shall be implemented as defined in Table 12.12.
4358 Table 12.12 — UFS certificate data SECURITY PROTOCOL IN parameter data
Bit
7 6 5 4 3 2 1 0
Byte
0
Reserved
1
2 (MSB)
0000h (CERTIFICATE LENGTH)
3 (LSB)
4
Pad Bytes (optional)
n
4359
JEDEC Standard No. 220B
Page 248
Flags.W = 1
xx00 0001b LUN Task Tag
Flags.R = 0
Command Set
Reserved Reserved Reserved Reserved
Type (0h)
4370 The Expected Data Transfer Length shall be set the values defined in Table 12.14.
4371
4372 Table 12.14 — Expected Data Transfer Length value for Request Type Messages
RPMB Data Frame Value
4373
4374 The device indicates to the host that it is ready for the operation by returning a READY TO
4375 TRANSFER UPIU.
JEDEC Standard No. 220B
Page 249
Reserved
Reserved
Reserved
4378 The entire RPMB message data frame is then delivered to the device by a DATA OUT UPIU in
4379 the Data Phase.
4380 Table 12.16 — RPMB message data frame
DATA OUT UPIU
Reserved
Reserved
Reserved
Command Set
Reserved Reserved Response Status
Type (0h)
Reserved
Reserved
Reserved
Reserved
… … … …
Flags.W = 0
xx00 0001b LUN Task Tag
Flags.R = 1
Command Set
Reserved Reserved Reserved Reserved
Type (0h)
4396 The Expected Data Transfer Length shall be set the value shows in Table 12.19.
4397
4398 Table 12.19 — Expected Data Transfer Length value for Response Type Messages
RPMB Data Frame Value
4399
4400
JEDEC Standard No. 220B
Page 252
Reserved
Reserved
Reserved
4405
4406 To complete the operation, the device sends a RESPONSE UPIU with the status of the operation
4407 in the Status Phase.
4408
JEDEC Standard No. 220B
Page 253
Command Set
Reserved Reserved Response Status
Type (0h)
Reserved
Reserved
Reserved
Reserved
… … … …
RESPONSE
4437
4438 Figure 12.2 — Authentication Key Programming Flow
4439
JEDEC Standard No. 220B
Page 256
RESPONSE
Response for Write Counter Read Request
Offset Field Name Value
0 :195 Stuff bytes 0...00h
COMMAND(Security Protocol In)
MAC generated by
196:227 MAC / Key
the device
228:483 Data 0...00h
Copy of the Nonce
484:499 Nonce
generated by the host
DATA IN (RPMB Message) Current Write Counter
500:503 Write counter
value
504:505 Address 0000h
506:507 Block Count 0000h
RESPONSE
508:509 Result Result code
510:511 Request/Response 0200h (Response)
4452
4453 Figure 12.3 — Read Counter Value Flow
JEDEC Standard No. 220B
Page 257
RESPONSE
RESPONSE
Response for Result Register Read Request
Offset Field Name Value
0 :195 Stuff bytes 0...00h
COMMAND (Security Protocol In)
MAC generated by the
196:227 MAC / Key
device
228:483 Data 0...00h
484:499 Nonce 0...00h
Incremented Write
DATA IN (RPMB Message) 500:503 Write counter
counter value
504:505 Address Address in RPMB LU
506:507 Block Count 0000h
RESPONSE 508:509 Result Result code
510:511 Request/Response 0300h (Response)
4496
4497 Figure 12.4 — Authenticated Data Write Flow
JEDEC Standard No. 220B
Page 259
4520
4521 Figure 12.4 — Authenticated Read Flow
4522
4523 12.5 Malware Protection
4524 The UFS device will also have the option to protect boot, bus configuration settings and other important
4525 device configuration settings so that once they are set they cannot be modified. The implementation of
4526 the protection of these parameters is defined within the spec where the parameter is defined.
4527 12.6 Mechanical
4528 Packaging and requirements for UFS embedded device should adhere to the following guidelines if
4529 possible
4530 Reset and data transfer pins should be located in the second (PoP) or third row (MCP) in from the
4531 side of the package to prevent access.
4532
JEDEC Standard No. 220B
Page 261
Host SOC
DRAM DRAM
Host Controller
CPU
Downstream communication
Upstream communication
4549
4550 Two logical units (Boot LU A, Boot LU B) can be used to store the boot code, but only one of them will
4551 be active during the boot process. Any logical unit can be configured as “Boot LU A” or “Boot LU B”.
4552 No more than one logical unit may be configured as “Boot LU A”, and no more than one logical unit may
4553 be configured as “Boot LU B”. The logical unit that is active during boot is mapped onto the Boot well
4554 known logical unit (W-LUN = 30h) for read access. In this way it is maintained a fix logical unit number
4555 when the active logical unit is swapped from A to B or vice versa, when the host updates the boot code.
4556
JEDEC Standard No. 220B
Page 262
Boot LU A = disabled
00h
Boot LU B = disabled
Boot LU A = enabled
01h
Boot LU B = disable
Boot LU A = disable
02h
Boot LU B = enabled
Others Reserved
4569 The host should not attempt to set bBootLunEn to ‘Reserved’ values, and UFS device shall generate an
4570 error in case of an attempt to set ‘Reserved’ values and not execute the request.
4571 When bBootLunEn attribute is 00h the boot feature is disabled, the device behaves as if bBootEnable
4572 would be equal to zero.
4573 The active boot logical unit will be mapped onto the Boot well known boot logical unit (W-LUN = 30h)
4574 once the bBootLunEn has been properly configured.
4575 Figure 13.2 shows an example of an UFS device having eight logical units: LU 1 and LU 4 are
4576 configured, respectively, as “Boot LU A” and “Boot LU B”. In particular, LU 1 is the active one
4577 (bBootLunEn = 01h).
4578
JEDEC Standard No. 220B
Page 263
UFS Device
LU0
bBootLunEn = 01h.
”Boot LU A” is the active LU1 Boot LU A LU1 bBootLunId = 01h
logical unit for boot.
It is mapped onto the Boot
LU2
well known logical unit
(W-LUN=30h, LUN field in
UPIU = B0h). LU3
LU5
LU6
LU7
NOP IN
DATA Host reads the boot code from the Boot well
known logical unit by issuing one or more
Status SCSI READ commands
4637
4638 Figure 13.3 — Device Initialization and Boot Procedure Sequence Diagram
4639
JEDEC Standard No. 220B
Page 267
Device
initialization Any supported SCSI
Any normal operation Any supported UPIU
completed commands
Phase
4642 NOTE1 Device Descriptor may be read only if bDescrAccessEn is set to ‘01h’.
4643 NOTE2 Boot well-known logical unit may be read if bBootEnable is set to ‘01h’, at least one logical unit is
4644 configured for boot (bBootLunEn) and bBootLunID selects the desired boot logical unit.
4645 NOTE3 READ (16) command support is optional.
4646
4647 13.1.4 Initialization process without boot code download
4648 If the boot process is not enabled on the UFS device, or it is not supported by the device class, or the host
4649 does not need to transfer the boot code, the host executes the initialization process as described in 13.1.3,
4650 omitting the boot transfer phase.
JEDEC Standard No. 220B
Page 268
4718
4719 Figure 13.4 — Example of UFS Device Memory Organization
4720 NOTE 1 The figure above shows an example of device configuration in which LU 0 and LU 1 are used as boot
4721 logical units, and the logical units 3, 4 and 7 for code and data storage. LU 1 is the boot active logical unit and it
4722 may be accessed in read using the W-LUN = 30h (LUN field in UPIU = B0h).
4723 Each logical unit will have a physical implementation on the non-volatile storage media.
4724 In particular, the UFS device shall support:
4725 Up to eight logical units (LUN = 0, …, 7).
4726 Each of them configurable as boot logical units with a maximum of two.
4727 One RPMB well known logical unit (W-LUN = 44h, LUN field in UPIU = C4h)
4728 Two logical units can be configured as boot logical unit, with only one of them active and readable
4729 through the Boot well known logical unit (W-LUN = 30h) for the execution of the system boot (see 13.1
4730 “UFS Boot”). The RPMB well known logical unit is accessed by authenticated operations by a well
4731 defined security algorithm (see 12.4 “RPMB”). The other logical units will be used to fulfill other use
4732 cases.
4733
JEDEC Standard No. 220B
Page 271
( )
4818 where:
4819 o CapacityAdjFactor = Capacity Adjustment Factor of the particular memory type
4820 The Capacity Adjustment Factor value for Normal memory type is one.
4821 The logical unit capacity can be retrieved by either reading the qLogicalBlockCount parameter in
4822 the Unit Descriptor or issuing the READ CAPACITY command.
4823 In particular, the relations between the parameters returned by READ CAPACITY (RETURNED
4824 LOGICAL BLOCK ADDRESS and LOGICAL BLOCK LENGTH IN BYTES), and
4825 bLogicalBlockSize and qLogicalBlockCount parameters in Unit Descriptors are:
4826 o RETURNED LOGICAL BLOCK ADDRESS = qLogicalBlockCount – 1,
4827 o LOGICAL BLOCK LENGTH IN BYTES = 2bLogicalBlockSize
4828 bBootLunID
4829 bBootLunID shall be set as described in the following:
4830 o 00h: if the logical unit is not a boot logical unit,
4831 o 01h: to configure the logical unit as “Boot LU A”,
4832 o 02h: to configure the logical unit as “Boot LU B”,
4833 NOTE The 01h value and 02h value shall be assigned to no more than one logical unit.
4834 bLUWriteProtect
4835 bLUWriteProtect shall be set as described in the following:
4836 o 00h: if the logical unit is not write protected,
4837 o 01h: to configure power on write protection,
4838 o 02h: to configure permanent write protection.
4839 bDataReliability
4840 bDataReliability shall be set to configure the device behavior when a power failure occurs during
4841 a write operation to the logical unit:
4842 o 00h: logical unit is not protected. Logical unit's entire data might be lost as a result of a power
4843 failure during a write operation,
4844 o 01h: logical unit is protected. Logical unit's data is protected against power failure.
4845 bProvisioningType
4846 bProvisioningType shall be set to configure the logical unit provisioning type:
4847 o 00h: to disable thin provisioning,
4848 o 02h: to enable thin provisioning with TPRZ = 0,
4849 o 03h: to enable thin provisioning with TPRZ = 1.
JEDEC Standard No. 220B
Page 275
4927 NOTE 1 The column “Default” defines the parameter value set by the device manufacturer.
Mapped UNMAP
(2)
(1)
Removed from
Deallocated
resource pool WRITE
(3)
UFS definition Initial state for UFS
outside SCSI
Device initialization with
fPhyResourceRemoval = ‘1’
5165
5166 Figure 13.5 — Physical Memory Resource State Machine
5167 1. Write operation: physical memory resource from the resource pool is mapped to LBA containing
5168 valid data.
5169 2. UNMAP operation for erase/discard:
5170 a. Physical memory resource is unmapped (deallocated) from LBA and returned to the resource
5171 pool.
5172 b. Residual data in unmapped physical memory resource are not valid.
5173 3. Device re-initialization with fPhyResourceRemoval flag previously set to one causes some
5174 physical memory resources to be removed from the resource pool servicing the logical address
5175 space. After conversion the qPhyMemResourceCount is updated by UFS device to indicate the
5176 amount of physical memory resource remaining in the resource pool of each logical unit.
5177
JEDEC Standard No. 220B
Page 284
32 Kbyte
5198
5199 Figure 13.6 — Example of data status after a power failure during reliable write operation
5200 The second component, also known as Data Reliability, allows the host to define the level of protection
5201 that must be applied to existing data on the device. In some technologies that will be used to implement
5202 UFS devices, the device has the option to potentially sacrifice some of the existing data on a device
5203 during a power failure in order to provide better write performance. Depending on the application for the
5204 end device the host can select per logical unit whether the data in that logical unit shall be protected
5205 during power failure, which may have a performance impact, or to select device performance with the risk
5206 of losing data during a power failure.
5207 Data Reliability feature for each logical unit can be set when the device is configured during system
5208 integration.
5209 In particular, if Data Reliability is enabled, the logical unit will execute Reliable Write operation and the
5210 data already stored in the medium will not be corrupted by a power failure occurred during the execution
5211 of a write operation to the medium.
5212 The data reliability feature will be configurable only for logical units and not for well known logical units.
5213 The RPMB well known logical unit will automatically select data reliability.
JEDEC Standard No. 220B
Page 285
Host Device
Write (4MB)
RTT1 (48KB)
Data1 (48KB)
RTT2 (32KB)
Data2 (32KB)
RTT3 (16KB)
Data3 (16KB)
5460
5461 Figure 13.7 — Host-Device interaction example for Rule-1
5462
5463 o If the Data Buffer Offset and/or the Data Transfer Count parameter in the Data Out UPIU
5464 doesn’t match the corresponding parameters in the RTT request, the device shall terminate
5465 the command by sending Response UPIU with UTP Data Out Mismatch Error flag (Flags.D)
5466 set and Status = CHECK CONDITION with SENSE KEY = ABORTED COMMAND. The
5467 following example describes a scenario, where the Data Transfer Count is not matching.
5468
JEDEC Standard No. 220B
Page 293
5469 13.4.12 Data transfer rules related with RTT (Ready-to-Transfer) (cont’d)
Host Device
Write (4MB)
RTT (32KB)
Data (25KB)
Response (Flags.D)
5470
5471 Figure 13.8 — Host-Device interaction example for Data Out Mismatch Error case
5472 Rule 2 – Device shall not have outstanding RTTs more than specified by host
5473 o bDeviceRTTCap read-only parameter in device descriptor defines the maximum number of
5474 outstanding RTTs which can be supported by device. bMaxNumOfRTT read-write attribute
5475 limits the number of outstanding RTTs generated by the device. bMaxNumOfRTT is equal to
5476 two after device manufacturing, and it may be changed by the host according to its capability
5477 to increase performance. In particular, bMaxNumOfRTT value shall not be set to a value
5478 greater than bDeviceRTTCap value, and it may be set only when the command queues of all
5479 logical units are empty. If host try to write a value higher than specified in bDeviceRTTCap,
5480 the value shall not be changed and the Query Response UPIU shall have Query Response
5481 field set to “Invalid VALUE”. If the host attempts to write bMaxNumOfRTT when there is at
5482 least one logical unit with command queue not empty, the operation shall fail, and Query
5483 Response field in the QUERY RESPONSE UPIU shall be set to FFh (“General failure”).
Host Device
Write (4MB)
RTT1 (48KB)
Data1 (48KB)
RTT3 (16KB)
Data2 (32KB)
Data3 (16KB)
5484
5485 Figure 13.9 — Host-Device interaction example for Rule-2
JEDEC Standard No. 220B
Page 294
5486 13.4.12 Data transfer rules related with RTT (Ready-to-Transfer) (cont’d)
5487 Rule 3 –Across all LUs Data-N for RTT-N shall be transferred before Data-N+1 for RTT-N+1 is
5488 transferred.
5489 o For example, if the host first receives RTT1 and then RTT2 from LUs, it shall send Data1
5490 prior to Data2.
Host Device
Write1 (4MB)
Write2 (8MB)
RTT1 (48KB)
RTT2 (32KB)
Data1 (48KB)
Data2 (32KB)
5491
5492 Figure 13.10 — Host-Device interaction example for Rule-3
5493 It is recommended for device to decide the sequence of RTTs based on LU priority, internal
5494 optimization, etc.
5495 o For example, if the write commands belong to the same priority LUs, the device can
5496 determine the order of RTT i.e., device can select optimum sequences to receive the data.
5497
JEDEC Standard No. 220B
Page 295
5498 13.4.12 Data transfer rules related with RTT (Ready-to-Transfer) (cont’d)
5499
5500 Figure 13.11 — Host-Device interaction for LU with the same priority
5501 o For example, if write command-2 has higher priority than write command-1, then the device
5502 should send RTT for the write command-2 before write command-1.
Host Device
Write1 (32MB)
Write2 (4MB)
Response2
RTT1 (48KB)
Data1 (48KB)
5503
5504 Figure 13.12 — Host-Device interaction for LU with different priorities
JEDEC Standard No. 220B
Page 296
5505 13.4.12 Data transfer rules related with RTT (Ready-to-Transfer) (cont’d)
5506 13.4.12.1 Implementation
5507 The following parameters will be defined to implement RTT rules.
5508 Table 13.5 — Parameters for implementing RTT Rules
Defines the current maximum number of outstanding RTTs that is allowed.
bMaxNumOfRTT
This value can be set by the host.
UTP Data Out The D flag shall be set to ‘1’ to indicate that a Data Out mismatch error
Mismatch Error Flag(D) occurred during the command transaction
5509
5510
JEDEC Standard No. 220B
Page 297
00h DEVICE
01h CONFIGURATION
02h UNIT
03h RFU
04h INTERCONNECT
05h STRING
06h RFU
07h GEOMETRY
08h POWER
DEVICE
STRING-UX STRING-UY
5590
5591 Figure 14.1 — Descriptor Organization
5592
5593 All descriptors are read-only, except the Configuration Descriptor and the OEM_ID String Descriptor
5594 which are: readable, writeable if bConfigDescrLock attribute value is equal to 00h.
5595 Configuration Descriptor is used to configure the UFS device during system integration. Parameter
5596 settings in the Configuration Descriptor are used to calculate and populate the parameter fields in the
5597 Device Descriptor and the Unit Descriptors – an internal operation by the device.
5598 The host may write multiple times the Configuration Descriptor if bConfigDescrLock attribute is equal to
5599 zero. Once the Configuration Descriptor is set to the final value, the host sets bConfigDescrLock to one,
5600 and execute a power cycle to complete the device configuration.
5601 NOTE The device behavior may not reflect the Configuration Descriptor setting after power cycle with
5602 bConfigDescrLock equal to zero, the device behavior in this case is device specific.
5603
JEDEC Standard No. 220B
Page 301
Initiator Target
5620
5621 Figure 14.2 — Read Request Descriptor
5622
5623
JEDEC Standard No. 220B
Page 302
Initiator Target
5643
5644 Figure 14-3 — Write Request Descriptor
5645
5646
JEDEC Standard No. 220B
Page 303
5653
5654 For unit descriptors, the format is changed to add an indication for the unit being address.
5655
5656 Table 14.3 — Logical Unit Descriptor Format
UNIT DESCRIPTOR
User
Offset Size Name MDV (1) Description
Conf.
DEVICE DESCRIPTOR
User
Offset Size Name MDV (1) Description
Conf.
DEVICE DESCRIPTOR
User
Offset Size Name MDV (1) Description
Conf.
DEVICE DESCRIPTOR
User
Offset Size Name MDV (1) Description
Conf.
Manufacturing Date
Device
12h 2 wManufactureDate No BCD version of the device manufacturing date, i.e.
specific
August 2010 = 0810h
Device OEM ID
17h 1 iOemID No
specific Index to the string which contains the OEM ID.
Manufacturer ID
Device
18h 2 wManufacturerID
specific
No Manufacturer ID as defined in JEDEC standard JEP106 “Standard Manufacturer’s
Identification Code”.
Unit Descriptor 0 Base Offset
1Ah 1 bUD0BaseOffset 10h No Offset of the Unit Descriptor 0 configurable parameters within the Configuration
Descriptor.
Unit Descr. Config. Param. Length
1Bh 1 bUDConfigPLength 10h No
Total size of the configurable Unit Descriptor parameters.
RTT Capability of device
Device
1Ch 1 bDeviceRTTCap No Maximum number of outstanding RTTs supported by device. The minimum value is
specific
2.
JEDEC Standard No. 220B
Page 308
DEVICE DESCRIPTOR
User
Offset Size Name MDV (1) Description
Conf.
5663 NOTE 1 The column “MDV” (Manufacturer Default Value) specifies parameter values after device manufacturing. Some parameters may be configured by the
5664 user writing the Configuration Descriptor.
5665 NOTE 2 “User Conf.” column specifies which fields can be configured by the user writing the Configuration Descriptor: “Yes” means that the field can be
5666 configured, “No” means that the field is a capability of the device and cannot be changed by the user. The desired value shall be set in the equivalent parameter of
5667 the Configuration Descriptor.
5668 NOTE 3 bNumberLU field value is calculated by the device based on bLUEnable field value in the Unit Descriptors.
5669
JEDEC Standard No. 220B
Page 309
5670 wManufacturerID
5671 This parameter contains manufacturer identification information for the device manufacturer. The Manufacturer ID is defined by JEDEC in
5672 Standard Manufacturer’s identification code [JEDEC-JEP106]. The wManufacturerID consists of two fields: Manufacturer ID Code and Bank
5673 Index.
5674 Table 14.5 — wManufacturerID definition
Bit
7 6 5 4 3 2 1 0
Byte
0 Bank Index
1 Manufacturer ID Code
(B)h
… Unit Descriptor 0 configurable parameters
(B+L-1)h
(B+L)h
… Unit Descriptor 1 configurable parameters
(B+2*L-1)h
… …
(B+7*L)h
… Unit Descriptor 7 configurable parameters
(B+8*L-1)h
5698 NOTE 1 B is offset of the Unit Descriptor 0 configurable parameters within the Configuration Descriptor, L is the total size of the configurable Unit Descriptor
5699 parameters.
5700
JEDEC Standard No. 220B
Page 311
5705 NOTE 1 The column “MDV” (Manufacturer Default Value) specifies parameter values after device manufacturing.
5706 NOTE 2 See Table 14.4 “Device Descriptor” for the default parameters value set by the device manufacturer.
JEDEC Standard No. 220B
Page 312
0Dh:0Fh 3 Reserved
5711
JEDEC Standard No. 220B
Page 313
GEOMETRY DESCRIPTOR
Offset Size Name Value Description
Max. data-in buffer size
Device
15h 1 bMaxInBufferSize Value expressed in unit of 512 Bytes.
specific
Its minimum value is 08h, which corresponds to 4 KByte
Max. data-out buffer size
Device
16h 1 bMaxOutBufferSize Value expressed in unit of 512 Bytes.
specific
Its minimum value is 08h, which corresponds to 4 KByte
Maximum number of RPMB frames (256Byte of data) allowed in Security
Protocol In and Security Protocol Out (i.e., associated with a single command
Device UPIU)
17h 1 bRPMB_ReadWriteSize
specific
If the data to be transferred is larger than bRPMB_ReadWriteSize x 256 bytes,
the host will transfer it using multiple Security Protocol In/Out commands
18h 1 Reserved
GEOMETRY DESCRIPTOR
Offset Size Name Value Description
This field is defined to inform the host about the maximum storage area size in
bytes allocated by the device to handle system data by the tagging mechanism:
Device
1Ch 1 bSysDataTagResSize specific ( )
GEOMETRY DESCRIPTOR
Offset Size Name Value Description
Supported Memory Types
Bit map which represents the supported memory types.
bit 0: Normal memory type
bit 1: System code memory type
bit 2: Non-Persistent memory type
bit 3: Enhanced memory type 1
bit 4: Enhanced memory type 2
Device bit 5: Enhanced memory type 3
1Eh 2 wSupportedMemoryTypes
specific bit 6: Enhanced memory type 4
bit 7: Reserved
…
bit 14: Reserved
bit 15: RPMB memory type
A value one means that the corresponding memory type is supported. Bit 0 and
bit 15 shall be one for all UFS device.
Max Number of Allocation Units for the System Code memory type
Device
20h 4 dSystemCodeMaxNAllocU Maximum available quantity of System Code memory type for the entire device.
specific
Value expressed in number of Allocation Unit
GEOMETRY DESCRIPTOR
Offset Size Name Value Description
GEOMETRY DESCRIPTOR
Offset Size Name Value Description
5716 NOTE 1 The Capacity Adjustment Factor value for Normal memory type is one.
JEDEC Standard No. 220B
Page 319
UNIT DESCRIPTOR
(1) User
Offset Size Name MDV (2) Description
Conf.
Memory Type
bMemoryType defines logical unit memory type.
00h: Normal Memory
01h: System code memory type
08h 1 bMemoryType 00h Yes 02h: Non-Persistent memory type
03h: Enhanced memory type 1
04h: Enhanced memory type 2
05h: Enhanced memory type 3
06h: Enhanced memory type 4
Others: Reserved
Data Reliability
bDataReliability defines the device behavior when a power failure
occurs during a write operation to the logical unit
00h: the logical unit is not protected. Logical unit's entire data
09h 1 bDataReliability 00h Yes might be lost as a result of a power failure during a write
operation
01h: logical unit is protected. Logical unit's data is protected
against power failure.
Others: Reserved
Logical Block Size
The size of addressable logical blocks is equal the result of
0Ah 1 bLogicalBlockSize 0Ch Yes exponentiation with as base the number two and as exponent the
bLogicalBlockSize
bLogicalBlockSize value: 2 (i.e., bLogicalBlockSize =
0Ch corresponds to 4 KByte Logical Block Size).
Its minimum value is 0Ch, which corresponds to 4 KByte
Logical Block Count
(3)
0Bh 8 qLogicalBlockCount 00h Yes Total number of addressable Logical Blocks in the LU in Logical
Block Size unit
UNIT DESCRIPTOR
(1) User
Offset Size Name MDV (2) Description
Conf.
Provisioning Type
00h:Thin Provisioning is disabled (default)
17h 1 bProvisioningType 00h Yes 02h:Thin Provisioning is enabled and TPRZ = 0
03h:Thin Provisioning is enabled and TPRZ = 1
Others: Reserved
Physical Memory Resource Count
18h: Device
8 qPhyMemResourceCount No Total physical memory resource available in the logical unit.
1Fh specific
Value expressed in units of Logical Block Size.
5733
5734
JEDEC Standard No. 220B
Page 324
Device 2 byte maximum VCC current value for each of the 16 active
02h 32 wActiveICCLevelsVCC(15:0)
specific current consumption levels starting with level 0
Device 2byte maximum VCCQ current value for each of the 16 active
22h 32 wActiveICCLevelsVCCQ(15:0)
specific current consumption levels starting with level 0
Device 2byte maximum VCCQ2 current value for each of the active
42h 32 wActiveICCLevelsVCCQ2(15:0)
specific current consumption levels starting with level 0
JEDEC Standard No. 220B
Page 325
5745
5746 14.1.6.9 Manufacturer Name String Descriptor
5747 This descriptor contains the UNICODE manufacturer name string that may consist of up to 126
5748 UNICODE characters. Number of UNICODE characters is calculated by .
5749 In a QUERY REQUEST UPIU, the Manufacturer Name String Descriptor is addressed setting:
5750 DESCRIPTOR IDN = 05h, INDEX = iManufacturerName (Device Descriptor parameter), and
5751 SELECTOR = 00h.
5752 Table 14.14 — Manufacturer Name String
MANUFACTURER NAME STRING
04h - - -
5753
5754
JEDEC Standard No. 220B
Page 326
04h - - -
5762
5763 14.1.6.11 OEM ID String Descriptor
5764 This descriptor contains the UNICODE OEM ID string that may consist of up to 126 UNICODE
5765 characters. Number of UNICODE characters is calculated by .
5766 In a QUERY REQUEST UPIU, the OEM ID String Descriptor is addressed setting: DESCRIPTOR
5767 IDN = 05h, INDEX = iOemID (Device Descriptor parameter), and SELECTOR = 00h.
5768 OEM_ID String descriptor is: readable, writeable if bConfigDescrLock attribute value is equal to 00h.
5769 Table 14.16 — OEM_ID String
OEM ID STRING DESCRIPTOR
04h - - -
04h - - -
5778
5779
JEDEC Standard No. 220B
Page 328
The flag can be written only one time during the device lifetime, the value
Write once
is kept after power cycle or any type of reset event.
The flag can be written multiple times, the value is kept after power cycle
Persistent
or any type reset event.
Write The flag can be written multiple times. The flag is set to the default value
Volatile
after power cycle or any type of reset event.
The flag can be only be set to one (or zero) by the host and cleared to
Set only zero (or one) by the device. The flag is cleared after power cycle or any
type of reset event
Power on The flag can be written only one time. The flag is set to the default value
reset after power cycle or hardware reset event
5787
JEDEC Standard No. 220B
Page 329
00h Reserved
Device Initialization
Host set fDeviceInit flag to initiate device initialization after boot
Read / process is completed. Device resets flag when device initialization
01h fDeviceInit D 0 is completed.
Set only
0b: Device initialization completed or not started yet.
1b: Device initialization in progress.
FLAGS
(1)
Type
(2)
IDN Name Type # Ind. Default Description
(3)
# Sel.
FLAGS
(1)
Type
(2)
IDN Name Type # Ind. Default Description
(3)
# Sel.
Purge Enable
0b: Purge operation is disabled.
1b: Purge operation is enabled.
Write only / This flag shall only be set when the command queue of all logical
06h fPurgeEnable D 0
units are empty and the bPurgeStatus is 00h (Idle).
Volatile
fPurgeEnable is automatically cleared by the UFS device when the
operation completes or an error condition occurs.
fPurgeEnable can be cleared by the host to interrupt an ongoing
purge operation.
FLAGS
(1)
Type
(2)
IDN Name Type # Ind. Default Description
(3)
# Sel.
5790 NOTE 1 The type “D” identifies a device level flag, while the type “A” identifies an array of flags. If Type = “D”, the flag is addressed setting INDEX = 00h and
5791 SELECTOR = 00h.
5792 NOTE 2 For array of flags, ““# Ind.” specifies the amount of valid values for the INDEX field in QUERY REQUEST/RESPONSE UPIU. If # Ind = 0, the flag is
5793 addressed setting INDEX = 00h.
5794 NOTE 3 For array of flags, ““# Sel.” specifies the amount of valid values for the SELECTOR field in QUERY REQUEST/RESPONSE UPIU. If # Sel = 0, the flag is
5795 addressed setting SELECTOR = 00h.
5796
JEDEC Standard No. 220B
Page 333
The attribute can be written only one time during the device lifetime, the value is
Write once
kept after power cycle or any type of reset.
The attribute can be written multiple times, the value is kept after power cycle or
Persistent
Write any type of reset event.
The attribute can be written multiple times. The attribute is set to the default
Volatile
value after power cycle or any type of reset event.
Power on The attribute can be written only one time. The attribute is set to the default
reset value after power cycle or hardware reset event.
5806
JEDEC Standard No. 220B
Page 334
01h Reserved
ATTRIBUTES
(1)
Type
Access (2) (4)
IDN Name Size # Ind. MDV Description Notes
Property
(3)
# Sel.
ATTRIBUTES
(1)
Type
Access (2) (4)
IDN Name Size # Ind. MDV Description Notes
Property
(3)
# Sel.
ATTRIBUTES
(1)
Type
Access (2) (4)
IDN Name Size # Ind. MDV Description Notes
Property
(3)
# Sel.
ATTRIBUTES
(1)
Type
Access (2) (4)
IDN Name Size # Ind. MDV Description Notes
Property
(3)
# Sel.
ATTRIBUTES
(1)
Type
Access (2) (4)
IDN Name Size # Ind. MDV Description Notes
Property
(3)
# Sel.
ATTRIBUTES
(1)
Type
Access (2) (4)
IDN Name Size # Ind. MDV Description Notes
Property
(3)
# Sel.
ATTRIBUTES
(1)
Type
Access (2) (4)
IDN Name Size # Ind. MDV Description Notes
Property
(3)
# Sel.
A
0000 Amount of logical blocks which were successfully
11h dCorrPrgBlkNum Read Only 4 Bytes 8 (LUN)
0000h programmed by the last write command.
0
5808
5809 NOTE 1 The type “D” identifies a device level attribute, while the type “A” identifies an array of attributes. If Type = “D”, the attribute is addressed setting INDEX =
5810 00h and SELECTOR = 00h.
5811 NOTE 2 For array of attributes, “# Ind.” specifies the amount of valid values for the INDEX field in QUERY REQUEST/RESPONSE UPIU. If # Ind = 0, the
5812 attribute is addressed setting INDEX = 00h.
5813 NOTE 3 For array of attributes, “# Sel.” specifies the amount of valid values for the SELECTOR field in QUERY REQUEST/RESPONSE UPIU. If # Sel = 0, the
5814 attribute is addressed setting SELECTOR = 00h.
5815 NOTE 4 The column “MDV” (Manufacturer Default Value) specifies attribute values after device manufacturing.
5816 NOTE 5 bCurrentPowerMode value after device initialization may be: 20h (Pre-Sleep mode) or 22h (UFS-Sleep mode) if bInitPowerMode = 00h, or 11h (Active
5817 Mode) if bInitPowerMode = 01h.
5818 NOTE 6 bActiveICCLevel after power on or reset is equal bInitActiveICCLevel parameter value included in the Device Descriptor. bInitActiveICCLevel is equal to
5819 00h after device manufacturing and can be configured during system integration.
5820 NOTE 7 bMaxDataInSize = bMaxInBufferSize when the UFS device is shipped.
5821 NOTE 8 If the host attempts to write this Attribute when there is at least one logical unit with command queue not empty, the operation shall fail, and Response
5822 field in the QUERY RESPONSE UPIU shall be set to FFh (“General failure”).
5823 NOTE 9 dDynCapNeeded is composed by eight elements, one for each logical unit. The desired element shall be selected assigning the LUN to INDEX field of
5824 QUERY REQUEST UPIU.
5825
JEDEC Standard No. 220B
Page 342
The purpose of this form is to provide the Technical Committees of JEDEC with input from the industry
regarding usage of the subject standard. Individuals or companies are invited to submit comments to
JEDEC. All comments will be collected and dispersed to the appropriate committee(s).
If you can provide input, please complete this form and return to:
Other
Submitted by
Name: Phone:
Company:
E-mail:
Address:
City/State/Zip: Date: