mipi devcon 2016: troubleshooting mipi m-phy link and protocol issues

54
Troubleshooting MIPI M-PHY Link and Protocol Issues Gordon Getty Application Engineer Teledyne LeCroy

Upload: mipi-alliance

Post on 13-Jan-2017

201 views

Category:

Mobile


26 download

TRANSCRIPT

Page 1: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Troubleshooting MIPI M-PHY Link

and Protocol Issues

Gordon Getty Application Engineer

Teledyne LeCroy

Page 2: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Objective

2

A major component of the "Internet of Things" is mobile device support. The MIPI M-PHY specification is designed to allow mobile devices to have a low power, high performance interface. Several higher level protocols use the M-PHY physical layer for storage, I/O and memory in mobile devices. This paper will discuss how higher layer protocols such as MIPI UniPro, and UFS use the M-PHY physical layer to allow traditional PC type protocols to be enabled on mobile platforms.

Page 3: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Internet of Things “IoT”

MIPI/Mobile Market Overview

Page 4: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

“Internet of Things”

4

Page 5: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

New Markets Reaching 1 Billion Milestone Quickly

•  Cell phones sold 1 Billion units in 7.5 years, PCs took 21 years.

• Mobile shipped 4 Billion units in 12.5 years, PC market will take over 33 years.

•  Tablets will hit 1 Billion in 6 years.

5

Page 6: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Mobility Driving Growth

6

• Mobile market will be >8 times the size of the PC market

•  Notebook PCs evolving into large tablets

Page 7: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Market Trends

•  Smartphone market driving innovation •  Large volumes, fast design cycles •  Personal, always at hand

• Other markets will leverage smartphone designs •  •   Increasing number of MEMS per system

•   Eroding ASPs

•  Sensor Hub will become more specialized •  32-bit MCU will be challenged

7

Page 8: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

MIPI Technologies

Page 9: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Physical Layer Interconnects

•  Low Speed Interconnects •  MIPI SlimBus

•  Audio •  MIPI SoundWire

•  Audio •  CMOS I/O

•  Chip to Chip

•  High Speed Interconnects •  MIPI D-PHY

•  Camera, Display •  MIPI M-PHY

•  MIPI UniPro/UniPort •  Camera (Unipro), Storage (UniPro), Modem, Interchip

9

Page 10: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

MIPI M-PHY Protocols • MIPI M-PHY protocols are used based on interface

used in each application. • Multiple protocols can be used in a single device.

10

Page 11: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

MIPI M-PHY

Page 12: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Why MIPI M-PHY? From the M-PHY Specification V4.0:

“Mobile devices face increasing bandwidth demands for each of its functions as well as an increase of the number of functions integrated into the system. This requires wide bandwidth, low-pin count (serial) and highly power-efficient (network) interfaces that provides sufficient flexibility to be attractive for multiple applications, but which can also be covered with one physical layer technology. M-PHY is the successor of D-PHY, requiring less pins and providing more bandwidth per pin (pair) with improved power efficiency.”

12

Page 13: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

M-PHY Lane Example - Terminology

13

Page 14: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Line States •  M-PHY technology exploits only differential signaling. a LINE can show the

following states: •  A positive differential voltage, driven by the M-TX, which is denoted by LINE state DIF-P •  A negative differential voltage, driven by the M-TX, which is denoted by LINE state DIF-N •  A weak zero differential voltage, maintained by M-RX, which is denoted by LINE state DIF-Z •  An unknown, floating LINE voltage, or no LINE drive, which is denoted by LINE state DIF-Q

14

Page 15: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Signal Amplitudes •  All communication is based on low-swing, DC-coupled,

differential signaling •  The LINE driver in an M-TX may support two drive

strengths, resulting in different signal amplitudes. •  Large Amplitude (LA) is about 400 mVPK_NT (and roughly 200

mVPK_RT) •  Small Amplitude (SA) is about 240 mVPK_NT (and roughly 120

mVPK_RT)

15

Page 16: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Signaling Schemes •  LS and HS Speed (Optional) • May use a shared clock or different reference clocks •  Uses NRZ signaling

16

Page 17: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Data Rates •  LS-MODE

•  Gears 0-7 •  HS-MODE

•  Gears 1-3 •  All Modules (Host and Device) must support LS

•  Default for PWM is Gear1 3-9Mbs •  Each Gear supports 2x higher speeds •  one GEAR below the default speed range (PWM-G0)

•  HS-Mode is Optional •  HS-MODE includes a default GEAR (HS-G1) •  Two optional GEARs (HS-G2 and HS-G3) at incremental 2x higher rates •  Each GEAR includes two data rates for EMI mitigation reasons •  HS-G1 supports 1.25 Gbps and 1.45 Gbps •  These two data rates are known as A & B

•  Support for a LS or a HS GEAR requires support for all GEARs below

17

Page 18: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

M-PHY Data Rates

18

Low-SpeedGears-Pulse-Width-Modula0on(PWM)-Self-Clocking

High-SpeedGears-Non-Return-to-Zero(NRZ)-Smallandlargeamplitudemodes

Page 19: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Clock Rate Differences

•  Clock Rate A or B

19

Page 20: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

State Machine

20

•  Two operating modes, •  HS-MODE •  LS-MODE

•  A data transmission (BURST) state and a MODE-specific power saving (SAVE) state

•  STALL is the SAVE state of HS-MODE •  SLEEP is the SAVE state of LS-MODE

•  HS-MODE: STALL, HS-BURST •  LS-MODE (Type-I MODULE): SLEEP, PWM-

BURST, LINE-CFG •  LS-MODE (Type-II MODULE): SLEEP, SYS-

BURST

Page 21: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Data Bursts •  Data transmission occurs in

BURSTs with power saving states between BURSTs

•  BURST starts from the SAVE state

•  Transition from DIF-N to DIF-P for period called PREPARE

•  Generate SYNC Pattern •  Send Marker0 followed by mix of

DATA0 - 255, Markers, FILLER •  Marker0 used for receiver

alignment, similar to SKIP ordered sets in PCIe

•  Burst ends with TAIL-OF-Burst Symbol

21

Page 22: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

HIBERN8 •  HIBERN8 state enables ultra-low power consumption, while

maintaining the configuration settings. •  A MODULE shall support HIBERN8.

•  The M-TX shall be high-impedance in HIBERN8, •  M-RX shall hold the LINE at DIF-Z.

•  Under these conditions, the M-RX is considered to be in squelch.

•  When entering HIBERN8 from LS-MODE or HS-MODE, the Protocol Layer shall not request a MODULE exit HIBERN8 before a minimum period in HIBERN8 of THIBERN8,

•  THIBERN8, is the larger of local TX_Hibern8Time_Capability and remote RX_Hibern8Time_Capability. •  Optional calculations of HIBERN8 based on the implementation

•  (see the spec for additional details)

22

Page 23: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

MIPI Universal Protocol (UniPro)

Page 24: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

MIPI UniPro •  MIPI specification to the define protocol

used to transfer data between Devices that implement the UniPro Specification.

•  This includes definitions of data structures, such as Packets and Frames, used to convey information across the Network.

•  Flow control, error handling, power and state management, and connection services are also defined in this specification

•  UniPro version 1.61, the use of M-PHY is mandated for chip-to-chip interconnections

24

Page 25: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Phy Adapter Layer - L1.5 •  PHY Adapter Layer is responsible for

abstracting the details of the PHY technology, thus providing a PHY-independent interface (PA_SAP) to higher protocol layers.

•  The PHY Adapter Layer provides bandwidth scalability by supporting up to four PHY Data Lanes per direction.

•  Supports Asymmetrical Data Lanes •  When multiple Data Lanes are available, they

are assumed to have identical capabilities. •  Lanes are assumed to be in the same state,

and L1.5 handles all details of how the Lanes are used autonomously.

25

Page 26: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

L1.5 Protocol

•  The L1.5 for M-PHY automates a significant part of the required steps used for Power Modes control, utilizing an L1.5-to-L1.5 communication protocol known as PACP (PHY Adapter Control Protocol).

•  PDUs (“PACP frames”) generated by L1.5 are multiplexed with the symbol stream received from L2 and can be recognized by a unique header pattern.

26

Page 27: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

L1.5 Power States and Power Modes

•  The difference between Power States and Power Modes are as follows:

•  An Application can set only a Power Mode, but cannot set a Power State

•  An Application can get a Power Mode and get a Power State •  the gettable value of a Power Mode simply reflects the value

that was set •  the gettable value of a Power State may change

spontaneously when in FastAuto_Mode or SlowAuto_Mode

27

Page 28: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

PACP Capability Exchange

28

Page 29: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Layer 1.5 Example – PACP_PWR_REQ

29

Usedforpowermodechanges

Page 30: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Data Link Layer – L2 •  The Data Link Layer provides reliable Links between a transmitter

and a directly attached receiver •  Multiplexes and arbitrates multiple types of data traffic (priorities) •  Data Link Layer clusters the 17-bit PA_PDU symbols into Data

Frames •  Every Data Frame consists of a 1-symbol header, a payload of up

to 144 symbols and a 2-symbol trailer including a 16-bit CRC.

30

Page 31: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

•  Network Layer is to allow data to be routed to the proper destination in a networked environment.

•  Network Layer introduces a new PDU known as a Packet •  When a Packet is passed down to L2, the Packet is

encapsulated between an L2 header and an L2 trailer to form a single L2 Frame

•  UniPro supports Networks of up to 128 Devices

31

Network Layer – L3

Page 32: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Transport Layer L4 •  Transport Layer is the highest UniPro protocol layer •  Transport Layer mechanisms allow a single physical Packet stream

between two Devices to support multiple, independent, logical Packet streams or “Connections”.

•  Transport Layer supports multiple bidirectional Connections •  Connections can span a single hop or multiple hops using Switches

•  Switches not yet defined by the UniPro spec •  UniPro guarantees that data sent over a single Connection arrives

in the order in which it was sent

32

Page 33: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Preemption (UniPro) •  In order to reduce delays in the transmission of high

priority Frames and to improve QoS in conjunction with upper layers, the DL Layer can insert high priority Frames within a low-priority Data Frame if the latter one is already in transmission.

•  This functionality is known as preemption of a Frame. Support of preemption functionality is optional for the transmitter, whereas the receiver shall always be able to receive preempted and non-preempted Frames.

33

Page 34: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Preemption (UniPro) •  Uses COF – Continuation of Frame header

34

ThisFrameconsistsof2fragments,thesecondfragmentstar0ngwithCOF

Page 35: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Universal Flash Storage (UFS)

JEDEC

Page 36: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

UFS – Universal Flash Storage •  Universal Flash Storage – JEDEC Standard JESD220C •  Universal Flash Storage (UFS) is a simple, high performance,

mass storage device with a serial interface. •  It is primarily used in mobile systems, between host

processing and mass storage memory devices. •  M-PHY and UniPro make up the interconnect for UFS •  UFS is architected on SCSI SAM •  UFS uses the command layers from SCSI SPC and SBC

36

Page 37: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Why UFS? 1.Be5erUserExperience:

•  Higherperformance,efficiency&responsiveness-LeadingtoInstantON,Mul0-Tasking,Fastapploadingandswapping

•  LowPower–LongerBaQerylifeevenwithlargerscreensandmul0-tasking•  SecurityandReliability–Enterpriseapplica0onsupportandSecureMobileshopping

•  SmallandScalable–Thinnerandlighterdevices

2.Easiertechnologicalintegra>on:•  SoTwarecompa0bilitywiththewidespreadSCSIframework-UFS2.0Specifica0onfollowstheSCSI

programmingmodelenablingsoTwarereuse

•  SimplerHostdesignduetothewell-definedUFSHostcontrollerinterface(UFSHCI)specifica0on•  ApartfromtheseUFS2.0requiresonlysingleUniProTransportlayerCPortanddoesnotusethebuiltin

end-to-endflowcontrolcapabili0esofUniPro.ItdoesnotrequirethelowlatencyTC1supportorPre-emp0on.Thisleadstosimplifica0onoftheMIPIUniProcontrollerdesignaswell.

3.Be5eru>liza>onofbandwidth:•  JEDECUFSisabletofullyu0lizetheduplexbandwidthprovidedbytheMIPIUniProtransport.

37

Page 38: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

UFS Architecture

38

Page 39: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Physical Layer •  UFS interface can support multiple lanes. •  Each lane consists of a differential pair. •  Basic configuration is based on one transmit lane and

one receive lane. • Optionally, a UFS device may support two downstream

lanes and two upstream lanes. An equal number of downstream and upstream lanes shall be provided in each link. •  Links must be symmetrical

39

Page 40: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Application Layer •  The application layer consists of the UFS Command

Set layer (UCS), the device manager and the Task Manager

•  The UCS will handle the normal commands like read, write, and so on.

•  UFS may support multiple command sets. •  UFS is designed to be protocol agnostic. This version

UFS standard uses SCSI as the baseline protocol layer.

•  A simplified SCSI command set was selected for UFS. •  UFS Native command set can be supported when it is

needed to extend the UFS functionalities. •  The Task Manager handles commands meant for

command queue control. •  The Device Manager will provide device level control

like Query Request and lower level link-layer control.

40

Page 41: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

SCSI Read Command

41

SCSILevel

UTPLevel

Page 42: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

SCSI Write Command

42

SCSILevel

UTPLevel

Page 43: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Debugging M-PHY Problems

Page 44: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Debug process for Serial Protocols

44

Analyzeandfindrootcause

Pickthecorrecttool

Iden0fytheLayer

Page 45: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Debugging M-PHY problems

•  Typically M-PHY production systems are chip to chip, no connector

•  Development systems may have SMA connections between devices

•  First challenge is to access link •  Probing Type:

•  SMA •  Multi Lead •  Midbus

•  Check electrical first before debugging protocol problem

45

Page 46: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Probing Options

•  Identify the appropriate probing solution •  SMA •  Multi-Lead – Solder Down

46

Mul0-LeadSolderDown SMA

Page 47: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Using the correct tool

•  Is problem related to Signal Integrity? •  Are devices physically connected? •  Are both devices providing M-PHY compliant

signaling? •  Use an Oscilloscope to verify

•  Is problem related to Connectivity •  Is a link established between the 2 devices? •  Is the data rate as expected? •  Can software see the devices –

•  for UFS, can the storage be seen? •  Use a Protocol analyzer to verify

47

Page 48: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Which Layer is causing the problem?

•  Same principle applies regardless of MIPI M-PHY upper layer protocol

•  Identify the layer •  Performance? •  Reliability? •  Errors?

48

Page 49: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Protocol Analyzer sees nothing? •  Is there a signal present?

•  Connect the analyzer probe output to an Oscilloscope to verify.

49

Page 50: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

•  Is there a signal present? •  Connect the analyzer probe output to an Oscilloscope to verify.

Protocol Analyzer sees nothing?

50

DUT

Page 51: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

•  Is there a signal present? •  Connect the analyzer probe output to an Oscilloscope to verify.

Protocol Analyzer sees nothing?

51

DUT

Page 52: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Set Up Trigger • What to trigger on?

•  Depending on layer, trigger condition may vary •  Look for PACP on Boot to see initialization •  Higher level SCSI trigger for looking at software problem

52

SCSIOpCode

Page 53: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

Protocol Issues – Look at upper layers

53

Page 54: MIPI DevCon 2016: Troubleshooting MIPI M-PHY Link and Protocol Issues

References • M-PHY Specification v4.0 • MIPI UniPro Specification v1.61 •  JEDEC Spec JESD220C (UFS) rev 2.1

56