11.07.2015 Views

Designing with SMBus 2.0 - SBS-IF Smart Battery System ...

Designing with SMBus 2.0 - SBS-IF Smart Battery System ...

Designing with SMBus 2.0 - SBS-IF Smart Battery System ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Designing</strong> <strong>with</strong> <strong>SMBus</strong> <strong>2.0</strong>Dale StolitzkaAnalog Devices, Inc.January 29, 2001<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


AcknowledgementsMaterials and content for this presentation has beencompiled from a variety of <strong>SMBus</strong> sub-committeemembers. The author wishes to acknowledge andthank contributors: Steve Williams, Cliff Laney andJohn Milios for their efforts on the development of the<strong>SMBus</strong> <strong>2.0</strong> specification<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


Agenda• Problem Statement• <strong>SMBus</strong> on PCI and mini-PCI connector• <strong>SMBus</strong> Addressing Problem & ARP• Physical Layer – AC & DC Changes• Packet Error Checking Review• Impact on <strong>SMBus</strong> 1.0 & 1.1• Summary<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


RProblem Statement• <strong>SMBus</strong> allows signaling between PCcomponents• Pre-boot or when OS is down• When the PCI bus is unavailable• OEMs demand <strong>SMBus</strong> signaling onexpansion cards• Pig-tails are bad• How do we use <strong>SMBus</strong> on PCI?<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


<strong>SMBus</strong> on the PCI and mini-PCI Connector• Specified in the <strong>SMBus</strong> <strong>2.0</strong> spec and inan ECR to the PCI 2.2 specification• <strong>SMBus</strong> uses 2 pins on the connector• More robust electrical specifications• Plug ‘n Play capability to resolve <strong>SMBus</strong>addresses• Address Resolution Protocol (ARP)<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


<strong>SMBus</strong> Addressing Problem• <strong>SMBus</strong> devices require a bus address• Old model used fixed addresses• Expansion cards require dynamicallyassigned addresses• Avoid conflicts <strong>with</strong> addresses used bymotherboard devices• Allow for multiple boards of the same type<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


Address Resolution Protocol (ARP)• Every <strong>SMBus</strong> device has a UniqueDevice ID (UDID)• fixed or random• At start time, the bus is enumerated• Some devices may be fixed onmotherboard• Addresses are assigned to allenumerated devices<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


ARP in the <strong>System</strong>• An ARP Agent may run ARP:• Software running over a host controller• Microcontroller running independently• The bus may be enumerated at anytime<strong>with</strong>out address assignment• Software makes address map availableto apps<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


Unique Device Identifier8 bits 8 bits 16 bits 16 bits 16 bits 16 bits 16 bits 32 bitsDeviceCapabilitiesVersion /RevisionVendor ID Device ID InterfaceSybsystemVendor IDSubsystemDevice IDVendor-Specific IDMsbLsb• Device Capabilities = specific functions, e.g., supports PEC• Version/Revision = silicon revision, <strong>SMBus</strong> UDID version• Vendor ID = device manufacturer’s vendor ID• Device ID = device ID assigned by manufacturer• Interface = <strong>SMBus</strong> version of this device• Subsystem Vendor ID = interface ID for industry group• Subsystem Device ID = device ID for industry group• Vendor-specific ID = 0x00000000 for <strong>SMBus</strong> 1.xensures a unique UDID in <strong>SMBus</strong> <strong>2.0</strong><strong>SBS</strong>-<strong>IF</strong> Winter Workshop


How UDID is Used in Segment/Device InfoSMB_INFO StructureSMB_INFO Struc VerSMB_INFO Struc Ver<strong>SMBus</strong> Spec Version<strong>SMBus</strong> Spec VersionSegment HW CapabilitySegment HW CapabilityReservedReservedDevice CountDevice CountDevice 0 InfoDevice 0 InfoDevice 1 InfoDevice 1 Info…Device n InfoDevice n InfoHC supports PECSMB_Device StructureSlave AddressSlave AddressReservedReservedDevice UDIDDevice UDIDSlave device supports PECSMB_UDID StructureDeviceDeviceHWHWCapabilitiesCapabilitiesVersion/RevisionVersion/RevisionVendorVendorIDIDDeviceDeviceIDIDInterfaceInterfaceSubsystemSubsystemVendorVendorIDIDSubsystemSubsystemDeviceDeviceIDIDReservedReserved<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


Example of an ARP Agent• Performs ARP process• Build assigned address pool• Assigns addresses to <strong>SMBus</strong> <strong>2.0</strong> devices• ARP agent may run when…• <strong>SMBus</strong> driver initializes• Hot insertion / PnP notification received• Resume notification• ‘Notify ARP Master’ from <strong>SMBus</strong> HC (requires HCinterrupt support)<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


Building the Assigned AddressPool_SBI control method in<strong>SMBus</strong> CMI 1.0 Spec+Fixed Slave AddressesReserved Address AssignmentsARP Assigned AddressesAssigned Address PoolAppendix ‘C’ in<strong>SMBus</strong> <strong>2.0</strong> SpecObtained byrunning ARP<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


Selecting ARP Slave AddressesRules:• Retain the same slave address if at all possible• Honor slave address preferences if possible• For new devices assign unused slaveaddresses first• Recycle ‘pre-owned’ slave addresses only as alast resort<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


Physical Layer Features• <strong>SMBus</strong> <strong>2.0</strong> is designed to be backwards1.x <strong>2.0</strong>compatible• Bus rate is the same• Two DC power classes• Low-power class ➯ <strong>SMBus</strong> v1.1 limits• New high-power class ➯ <strong>SMBus</strong> v2(these work on <strong>SMBus</strong> 1.x systems)<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


AC Data Rate≤100µs may be ≥100µsSMBCLKSMBDAT7 6 5 4 3 2 1 0 A/A• Not really, they refer to different issues• Periodic clock stretching: F SMB α data rate of typicaldata bits• Random clock stretching: T LOW:SEXT is the total timea slave device may stall the bus<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


AC Rise/Fall Timing• DC levels for t RISE , t FALL are symmetricrather than dependent on V DD0.9 × V DD5VV IH,MIN + 0.15VV IL,MAX - 0.15VV DD3Vt FALL,<strong>2.0</strong>t RISEt FALL,1.x<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


Recommended host controllerdetection 3σ toleranceAC TimeoutRecommended device driverT TIMEOUT 3σ tolerance25 ms2.5 msspecification window35 ms• T TIMEOUT clarified, not changed• Devices timeout after SMBCLK is low for 25ms• Host controllers must support T TIMEOUT<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


DC New High-power Class• C BUS ≤ 400pF• ~11x larger than low-power class• I PULLUP ≥ 4mAV DD<strong>SMBus</strong>DeviceR SI PULLUPorR PULLUPR DSC BUS<strong>SMBus</strong>HostOptionalESDprotection<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


DC Back-powering• Unpowered devices must not load thebus or power-up devices• I LEAK-PIN ≤ 10µA• relaxed from <strong>SMBus</strong> v1.xPin<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


Packet Error Checking…AMSG ByteAPEC ByteAP• PEC (Packet Error Code) byte appends tomessage• Uses CRC-8 polynomial: C(x) = x 8 + x 2 + x + 1• Required for Address Resolution Protocol<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


PEC implementationWrite Byte/Word/BlockS Slave Address W A Command Code A...Data ByteAPS Slave Address W A Command Code ACRC-8APRead Byte/Word/BlockS Slave Address W ACommand CodeACRC-8 is calculated uponthe whole messageincluding Address and R/W bitS Slave Address R A Data Byte A...Data ByteAData providedby slave receiverData providedby master transmitterCRC-8NAP<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


Error Recovery• Specifies the use of ACK, NAKsignaling for flow control and errorrecovery in bus transactions• Different than I 2 C• I 2 C specifies that you can ACK/NAK thefollowing byte• Works in conjunction <strong>with</strong> CRC-8<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


ACK and NAK usageS Slave Address W A Command Code ACRC-8A…A NAK by the Slave Receiverduring a Write operationbefore the last byte is interpretedas a transaction ABORT (busy, overflow,unknown command, etc.)A NAK by the SlaveReceiver atthe CRC-8 bytemeans RESENDS Slave Address R A Data Byte A CRC-8 NA PThe Master Receiver detecting an error in the Packet Check Code,terminates the transaction and repeats the operation<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


Hardware PEC Generator7 6 54 3 210b• CRC is C(x) = x 8 + x 2 + x + 1• Simple hardware-generated PEC forhardware-based ASIC<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


PEC <strong>with</strong> Intelligent Targets• Intelligent targets (µC) recover errors inother layers• Last ACK ⇒ PEC byte received• Allows µC core to calculate CRC-8 <strong>with</strong>outstalling the SMBCLK• More IC selection to OEMThis devices ishereby permittedto recovererrors inclever ways byvirtue of itsextraordinaryintelligence.<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


PEC & Intelligent Target HardwarePEC A PNAK means PEC is bad in either<strong>SMBus</strong> 1.1 or <strong>SMBus</strong> <strong>2.0</strong>IntelligenttargetACK means PEC is valid in <strong>SMBus</strong> 1.1An ACK by an intelligent <strong>SMBus</strong> 2target means the PEC is received butmay defer error recovery to a higherprotocol layer<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


ExampleSensors and Add-in Targets• Targets on the motherboard• Hardware monitors, EEPROM, etc.• Don’t need a programmable address• May participate in ARP Discovery• Targets on add-in cards• Must ARP & accept address assignments<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


ExampleChipset• Use a STOP bit for message aborts• Host must watch for slave timeouts• Use error checking whenever possible<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


ExampleHost/Master clearing the bus• Host detects timeout• Send Stop condition• Is the bus clear?• if SMBDAT is still low• Clock the bus untilSMBDAT is high 2HostSlaveM/B sensoror EEPROM<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


Impact on <strong>SMBus</strong> 1.0 &1.1• <strong>SMBus</strong> 1.0 & 1.1 are <strong>SMBus</strong> <strong>2.0</strong>compliant• No current part becomes obsolete• May be used in current applications• In <strong>Smart</strong> Batteries and motherboard sensors• <strong>SMBus</strong> 1.0 and 1.1 parts may not beused on PCI expansion cards• ARP and high-power electricals required onPCI and mini-PCI boards<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


Summary• <strong>SMBus</strong> <strong>2.0</strong> is designed to be backwardscompatible• <strong>SMBus</strong> <strong>2.0</strong> can be used on add-in cards anddown on the motherboards• ARP introduced for v<strong>2.0</strong> which requires PEC• Some changes in AC and DC from <strong>SMBus</strong> 1.1• <strong>SMBus</strong> <strong>2.0</strong> is released and available, now<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


Collateral• <strong>SMBus</strong> website: http://www.smbus.org• All <strong>SMBus</strong> specs, 1.0, 1.1, <strong>2.0</strong>, <strong>SMBus</strong>Device Driver External ArchitectureSpecification, <strong>SMBus</strong> Control MethodInterface Specification:http://www.smbus.org/specs/index.html• PCI SIG website: http://www.pcisig.com• <strong>SMBus</strong> ECR to PCI 2.2 Specification• check Members area on PCI SIG website<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


Call to Action• Device vendors:• Implement <strong>SMBus</strong> <strong>2.0</strong>; For legacy devices, planUDIDs• BIOS vendors:• Implement control methods• <strong>System</strong> OEMs:• Build <strong>SMBus</strong> <strong>2.0</strong> into systems now!• wire all PCI slots for <strong>SMBus</strong> <strong>2.0</strong>• Card vendors:• Add <strong>SMBus</strong> <strong>2.0</strong> to cards where it makes sense<strong>SBS</strong>-<strong>IF</strong> Winter Workshop


Example of an <strong>SMBus</strong> <strong>2.0</strong> Driver Architecture †<strong>Smart</strong><strong>Battery</strong>Stack<strong>SMBus</strong> TestApplicationOther<strong>SMBus</strong>ConsumersPnPnotificationRing 3Ring 0<strong>SMBus</strong>Driver<strong>SMBus</strong> Class Driver(SMBCMICL.SYS)<strong>SMBus</strong> CMI Miniport(SMBCMIHC.SYS)AddressResolutionProtocol(ARP) AgentINF File(SMBCMIHC.INF)AssignedAddress PoolRing 0ACPIACPIHardware<strong>SMBus</strong> CMI ObjectName(_HID, "SMBUS01")Name(_UID, 0)_SBI() // Information_SBR() // Read_SBW() // Write_SBT() // Transfer_SBA() // Alerts<strong>SMBus</strong> CMI ObjectName(_HID, "SMBUS01")Name(_UID, 1)_SBI() // Information_SBR() // Read_SBW() // Write_SBT() // Transfer_SBA() // AlertsECPIIX4/ICH<strong>Smart</strong> <strong>Battery</strong><strong>SMBus</strong><strong>SMBus</strong>Alert on LAN PCI:Heceta PCI NIC 2/3/4 Card w/ ARPable <strong>SMBus</strong> device<strong>SBS</strong>-<strong>IF</strong> Winter Workshop

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!