NXP I3c
NXP I3c
NXP and the NXP logo are trademarks of NXP B.V. All other product or service names are the property
of their respective owners. © 2017 NXP B.V.
PUBLIC
AGENDA
1. Introduction
2. Basic MIPI I3CSM signaling and protocol
3. Bus signals and address arbitration
4. High Data Rate (HDR) modes
5. Error detection and recovery
6. Device Identifier – Provisional-ID
7. Common Command Codes (CCC)
8. NXP’s free MIPI I3CSM slave RTL
9. Summary
10. Public information
PUBLIC 1
01.
Introduction
PUBLIC 2
MIPI I3C
MIPI I3C = Next generation from I2C no logo
yet
• MIPI I3C is a follow on to I2C
− Has major improvements in use and power and performance
− Optional alternative to SPI for mid-speed (equivalent to 30 Mbps)
• Background
− NXP (Philips legacy) is I2C leader and spec owner
− I2C is used predominantly as control and communication interface with a focus in sensors
(>90% according to 2013 MIPI Alliance survey)
− MIPI Alliance Sensor Interface Workgroup initiated an upgrade of requirements in 2013
• Rationale for upgrade
− In-band interrupt to reduce # of GPIO wires on SoC, as # of sensors increase on the mobile devices
− I2C speed has become limiting, as amount of data increases on the bus
− Upgrade Constraints
Maintain backward compatibility, to enable a smooth transition from I2C to MIPI I3C and focus on simple implementation (recall I2C wide adoption is due to its seeming
simplicity)
I2C and SPI devices with side MIPI I3C with in-band interrupt, Common
band channels EN, INT, etc Command Codes for device control
PUBLIC 4
Sensor Interface Block Diagram for MIPI I3C vs. I2C & SPI
Parameter MIPI I3C I2 C SPI
Overview
# of lines 2-wire 2-wire (plus separate wires for each 4-wire (plus separate wires for each
required interrupt signal) required interrupt signal
Effective Data 33.3 Mbps max at 12.5 MHz 3 Mbps max at 3.4 MHz (Hs) Approx. 60 Mbps max at 60 MHz for
Bitrate (Typ.:10.6 Mbps at 12 MHz SDR) 0.8 Mbps max at 1 MHz (Fm+) conventional implementations
0.35 Mbps max at 400 KHz (Fm) (Typically: 10 Mbps at 10 MHz
PUBLIC 5
MIPI I3C versus I2C at-a-glance
I 2C MIPI I3C
Fast mode: 400kb/s
SDR: up to 12.5Mbps raw rate (Actual Data Rate: 8/9th – per 1 byte)
Clock Speed Fast Mode+: 1Mb/s
HDR-DDR: Actual Data Rate 20Mbps – 1 word
& Data Rate High speed: 3.4Mb/s
HDR-TSP: Actual Data Rate to ~30Mbps – 1 word
Actual Data: computed 8/9th – 1 byte
2 – multi-drop (OpenDrain IF) 2 – multi-drop (SCL is push-pull, SDA OpenDrain and push-pull)
# wires SCL: clock – from Master(s), Slaves stretch SCL = clock (except for HDR-TSP) - from current Master only
SDA: data – bidirectional (OpenDrain) SDA = data – bidirectional (OpenDrain and push-pull)
In-Band
None – use a separate wire/pin per slave Integrated, prioritized, and may include a byte (or more) of context
Interrupts
PUBLIC 6
MIPI I3C versus I2C at-a-glance
I 2C MIPI I3C
Error detection No protocol inherent error detection Master and slave side error detection features
Has to be done by master once separate Is an essential part of the MIPI I3C spec – no dedicated INT
Time stamping
INT signal is triggered signal required.
Master / Slave Master-Slave, Multi-master optional Master-Slave; Master handoff (old Master->Slave)
IO pads I2C special pads (e.g. 50ns spike filter) Standard pads 4 mA drive, no spike filter
Clocking Slaves normally use inbound clock Slaves use inbound clock (allows slow/no internal clock)
PUBLIC 7
Advantages in energy and data rate
I2C I2C
I2C I2C
PUBLIC 8
MIPI I3C Devices Roles vs. Responsibilities
Roles
Responsibilities / Comments
Features Main Master Secondary SDR Only Main SDR Only Slave SDR Only
Master Master Secondary Master Slave
For Address Arbitration, In-Band
Manages SDA Arbitration Interrupt, Hot-Join, Dynamic Y Y Y Y N N
Address, as appropriate
1) A Static Address may be used to more quickly assign a Dynamic Address. See Section 5.1.4.
2) All Slaves require an HDR Exit Pattern Detector, even Slaves that are not HDR capable
PUBLIC 9
02.
Basic MIPI I3C signaling and protocol
PUBLIC 10
So, what does an MIPI I3C message look like?
MIPI I3C SDR looks almost the same as I2C:
− E.g. Write data
− 1 bit 8 bits 1 bit 8 bits 1 bit … 1 bit
MIPI S or Sr Addr+W ACK/ 1 Byte T bit = More data Sr or P
I3C NACK data Parity
I2C ACK/
NACK
1 bit 8 bits 1 bit 8 bits 1 bit 1 bit 8 bit 1 bit 8 bit 1 bit … 1 bit
MIPI S or Sr Addr+ ACK / 1 Byte T bit Sr Addr ACK / 1 Byte T bit = ‘1 then Z’ to More Sr or P
I3C W NACK data = +R NACK from continue data Master
Parity Slave ends read
‘0’ Slave ends
transmission
I2C ACK/ ACK/ NACK Master
NACK Slave can’t abort read ends read
PUBLIC 11
Open drain address transmission followed by push-pull data
• Example:
- Master starts communication and allows arbitration (open-drain mode)
- Data is transmitted in push-pull mode
SDR Transfer
SDA
Master A6 A5 A4 A3 A2 A1 A0 RnW ACK D7 D6 D5 D4 D3 D2 D1 D0 T
SCL
Master
200ns
45ns Open-drain 4 MHz Push-pull 12.5 MHz
PUBLIC 12
03.
Bus signals and address arbitration
PUBLIC 13
MIPI I3C Bus signal in SDR mode after dynamic address assignment
SDR Transfer
SDA
Master A6 A5 A4 A3 A2 A1 A0 RnW ACK D7 D6 D5 D4 D3 D2 D1 D0 T
SCL
Master 200ns
200ns
45ns Open-drain 4 MHz 45ns Push-pull 12.5 MHz
80ns
PUBLIC 14
Why is address arbitration important in MIPI I3C
Address arbitration is used for multiple function in the MIPI I3C specification:
• In-Band Interrupt
− slaves
can trigger the master by pulling SDA low during a quiet period and the
master will starting its SCL (start condition)
• Hot-Join
• Bus initialization if not all slave addresses are known
PUBLIC 15
Address Arbitration
• System setup
− MIPI I3C only system
−2 slaves with In-Band Interrupt enabled
− BOTH slaves trigger an interrupt at the same time
MIPI I3C
Slave A6 A5 A4 A3 A2 A1 A0
with interrupt
1 0 1 1 1 1 1
enabled
Host SCL Addr: 7’h 5F
MIPI I3C SDA
master
MIPI I3C
Slave A6 A5 A4 A3 A2 A1 A0
with interrupt
1 1 1 0 1 1 1
enabled
Addr: 7’h 77 PUBLIC 16
Address Arbitration
• Example: Interrupt triggered by slave in a system with 2 IBI capable slaves
A6 A5 A4 A3 A2 A1 A0
1 - - - - - -
1. Master is idle with SCL stopped and SDA
R_pu
being pulled high by resistor
SDR Transfer
SDR Transfer
SDA
2. BOTH Slaves trigger an interrupt by pulling
A6 A5 A4 A3 A2 A1 A0 RnW ACK D7
D7 D6
D6 D5
D5 D4D4 D3 D3 D2D2 D1
D1 D0
D0 TT
Master A2 A1
SDAA0low RnW ACK
SCL
3. Master starts SCL, pulling it low
Master
200ns
4. Slave releases SDA
45ns Open-drain 4 MHz 5. SDA is pulled high by R_puPush-pull
Push-pull 12.5
12.5 MHz
MHz
SDA
6. SCL pulse to latch address bit A6
Slave A6 A5 A4 A3 A2
A2 A1
A1 A0
A0 RnW
RnW ACK
ACK D7 D6
D7 D6 D5
D5 D4
D4 D3
D3 D2
D2 D1
D1 D0
D0 TT
7'77
SDA
Slave A6 A5 A4 A3 A2
A2 A1
A1 A0
A0 RnW
RnW ACK
ACK D7 D6
D7 D6 D5
D5 D4
D4 D3
D3 D2
D2 D1
D1 D0
D0 TT
7'5F
1 2 3,4,5,6
SDA
Master A6 A5 A4 A3 A2 A1 A0 RnW ACK D7 D6 D5 D4 D3 D2 D1 D0 T
SCL
Master
200ns
45ns Open-drain 4 MHz Push-pull 12.5 MHz
SDA
Slave A6 A5 A4 A3 A2 A1 A0 RnW ACK D7 D6 D5 D4 D3 D2 D1 D0 T
7'77
SDA
Slave A6 A5 A4 A3 A2 A1 A0 RnW ACK D7 D6 D5 D4 D3 D2 D1 D0 T
7'5F
PUBLIC 20
Note: How to increase the speed of the arbitration process
When a master has determined the slave’s dynamic address triggering the in-band
interrupt, it can switch from open drain mode to push-pull mode for the next clock
cycle as no other slave shall temper with SDA.
Therefore, dynamic addresses differentiated through their MSBs rather than their
LSBs can be used.
PUBLIC 21
04.
High Data Rate (HDR) modes
PUBLIC 22
HDR modes for higher throughput
High data rate (HDR) modes are optionally available
• No faster clock, but more bits for same frequency
• Optional to support for Master and Slave
− Incapable slaves know how to ignore, so others may use safely
• May have an HDR-DDR format
− About 2x the data rate of SDR (so about 20 Mbps net using 12.5 MHz SCL)
− Also includes CRC
− Uses same SCL clocking, so small adder to Slave logic
• May use HDR-TSP (Ternary Symbols)
− Results
in up to 3x the data rate (so about 30 Mbps at 12.5 MHz) by using
symbols on SCL,SDA rather than separate clock and data
PUBLIC 23
05.
Error detection and recovery
PUBLIC 24
Error Detection and Recovery Methods
The MIPI I3C bus specification details error detection and recovery methods for an SDR
slave, the SDR master and HDR mode(s).
The error detection and recovery methods specified are provided in order to avoid fatal
conditions when errors occur.
A set of 6 mandated methods and 1 optional method are specified for MIPI I3C Slave
Devices, and a separate set of required methods is specified for MIPI I3C Master Devices.
Side note:
Clock stretching by slaves is NOT permitted
( SCL is driven via push-pull by the master)
PUBLIC 25
Device error types
Slave side errors Master side errors
S6 Monitoring Error
(optional)
PUBLIC 26
06.
Device Identifier – Provisional-ID
PUBLIC 27
Device Identifier - MIPI I3C slave addresses
Device Identifier
In order to support the Dynamic Address Assignment procedure, each MIPI I3C Device to be connected to an
MIPI I3C Bus shall be uniquely identifiable in one of two ways, before starting the procedure.
1. The Device may have a Static Address, in which case the Master may use that Static Address
For example, an Address similar to what I2C specifies
2. The Device shall in all cases have a 48-bit Provisional ID.
The Master shall rely on this 48-bit Provisional ID, unless the Device has a Static Address used by the master.
The 48-bit Provisional ID is composed of three parts:
Bits [47:33] Bit [32] Bits [31:00]
[31:16] [15:12] [11:0]
16 bits 4 bits 12 bit
MIPI Provisional ID Type Part ID: The meaning Instance ID: Value to identify the This is left for definition with additional
Manufacturer ID Selector of this 16-bit field is individual example: straps, meaning. For example: deeper Device
(Note: MSB is 1’b1: Random left to the Device fuses, non-volatile memory, or Characteristics, which could optionally
discarded) 1’b0: Fixed vendor to define another appropriate method include Device Characteristic Register
values
If Bit [32] = 1’b1: Random Value:
Bits [31:0]: 32-bit value randomly generated by the Device.
PUBLIC 28
07.
Common Command Codes (CCC)
PUBLIC 29
Command space (CCC – Common Command Codes)
• Built-in Commands (>40) in separate “space” to avoid collision with
normal Master Slave messages
− Controls bus behavior, modes and states, low power state, enquiries, etc.
− Has additional room for new built-in commands to be used by other groups
− Some are required, some are optional
− Some may be direct communication with a single slave or are broadcasts
to all slaves (same commands might be available in either category)
PUBLIC 30
08.
NXP’s free MIPI I3C slave RTL
PUBLIC 31
NXP’s free MIPI I3C slave
• NXP offers a free license for companies that are and are not members of MIPI:
http://www.nxp.com/webapp/software-center/library.jsp#/home/query/MIPI%20MIPI
I3C%20Slave%20IP%20for%20MIPI/~filter~/popularity/0
− Non-members must agree to a confidentiality clause from MIPI (a requirement of MIPI Alliance: http://mipi.org).
This IP is provided with no warranty, as must be agreed to in the click-wrap license.
PUBLIC 32
09.
Summary
PUBLIC 33
Summary
• MIPI I3C simplifies system design to a true two-wire interface
• Backward compatible to existing I2C devices (Supports legacy I2C messaging)
• Very small RTL footprint requiring 2 pins only
• Lower power consumption than I2C
• Supports in-bound error checking and CRC
• Supports peer-to-peer slave communication
• Supports hot-plug capability
• Dynamic addressing while supporting Static Addressing for legacy I2C devices
• Supports I2C-like SDR messaging and optional HDR messaging (up to 30Mbps)
• Supports multi-master and multi-drop capabilities
PUBLIC 34
10.
Public information
PUBLIC 35
Publicly available information:
• White paper: http://resources.mipi.org/MIPI I3C-sensor-whitepaper-from-mipi-alliance
PUBLIC 36
From MIPI I3C white paper 1/3
Parameter MIPI I3C I2C SPI
Overview
# of lines 2-wire 2-wire (plus separate wires for each 4-wire (plus separate wires for
required interrupt signal) eachrequired interrupt signal
Effective Data 33.3 Mbps max at 12.5 MHz 3 Mbps max at 3.4 MHz (Hs) Approx. 60 Mbps max at 60 MHz for
Bitrate (Typ.:10.6 Mbps at 12MHz SDR) 0.8 Mbps max at 1 MHz (Fm+) conventional implementations
0.35 Mbps max at 400 KHz (Fm) (Typically: 10 Mbps at 10 MHz
PUBLIC 37
From MIPI I3C white paper 2/3
Parameter MIPI I3C I2 C SPI
Advantages • Only two signal lines • Only two signal lines • Full duplex communication
• Legacy I²C devices co-exist on the • Flexible data transmission rates • Push-pull drivers
same bus (with some limitations) • Each device on the bus is • Good signal integrity and high speed
• Flexible data transmission rates independently addressable below 20MHz (higher speed are
• Dynamic addressing and supports • Devices have a simple master/slave challenging)
static addressing for legacy I²C devices relationship • Higher throughput than I²C and SMBus
• I²C-like data rate messaging (SDR) • Simple implementation • Not limited to 8-bit words
• Optional high data rate messaging • Widely adopted in sensor applications • Arbitrary choice of message size,
modes (HDR) and beyond content and purpose
• Multi-drop capability and dynamic • Supports multi-master and multidrop • Simple hardware interfacing
addressing avoids collisions capability features • Lower power than I²C
• Multi-master capability • No arbitration or associated failure
• In-band Interrupt support modes
• A clear master ownership and handover • Slaves do not need a unique address
mechanism is defined • Not limited by a standard to any
• In-band integrated commands (CCC) maximum clock speed (can vary between
Support SPI devices)
PUBLIC 38
From MIPI I3C white paper 3/3
Parameter MIPI I3C I2 C SPI
Disadvantages • Only 7-bits are available for device • Only 7-bits (or 10-bits) are available for • Need more pins than I²C/MIPI I3C
addressing static device addressing • Need dedicated pin per slave for slave
• Slower than SPI (i.e. 20Mbps) • Limited communication speed rates and select (SS)
• New standard, adoption needs to be many devices do not support the higher • No in-band addressing
proven speeds
• No slave hardware flow control
• Limited number of devices* on a bus to • Slaves can hang the bus; will require
system restart • No hardware slave acknowledgment
around a dozen devices
• Slower devices can delay the operation • Supports only one master device
of faster speed devices • No error-checking protocol is defined
• Uses more power than SPI • No formal standard, validating
• Limited number of devices on a bus to conformance is not possible
around a dozen devices • SPI does not support hot swapping
• No clear master ownership and • Requires separate support signals for
handover mechanism interrupts
• Requires separate support signals for
Interrupts
PUBLIC 39
11.
Q&A
PUBLIC 40
NXP and the NXP logo are trademarks of NXP B.V. All other product or service names are the property of their respective owners. © 2017 NXP B.V.