20
October 10, 2000 1

October 10, 20001. 2 USB Power Management Brad Hosler USB Engineering Manager Intel Corporation

Embed Size (px)

Citation preview

October 10, 2000 1

October 10, 2000 2

USB Power Management

USB Power Management

Brad HoslerBrad Hosler

USB Engineering ManagerUSB Engineering ManagerIntel CorporationIntel Corporation

October 10, 2000 3

AgendaAgenda

Platform Power for USBPlatform Power for USB

Mobile platforms and USBMobile platforms and USB

Power states for USB devicesPower states for USB devices

SummarySummary

October 10, 2000 4

Instantly Available PCInstantly Available PC

PC that acts like an appliancePC that acts like an appliance– Appears off, but can respond to external eventsAppears off, but can respond to external events– Very low power consumption (less than 5 Watts)Very low power consumption (less than 5 Watts)

Huge cost savings in corporate environmentsHuge cost savings in corporate environments Greater impact in consumer applicationsGreater impact in consumer applications

USB Is Very Important in These PCs,USB Is Very Important in These PCs,Especially As PCs Become ‘Legacy Free’Especially As PCs Become ‘Legacy Free’

October 10, 2000 5

System Power StatesSystem Power States

S0 - Fully ONS0 - Fully ON USB operationalUSB operational

S1 - SleepingS1 - Sleeping USB suspendedUSB suspended

S3 - Suspend to RamS3 - Suspend to Ram USB suspendedUSB suspended

S4 - Suspend to DiskS4 - Suspend to Disk USB suspendedUSB suspended

S5 - OffS5 - Off USB offUSB off

October 10, 2000 6

S3 CharacteristicsS3 Characteristics

Much of system HW is not poweredMuch of system HW is not powered– Enough alive to detect wake up eventsEnough alive to detect wake up events

Limited power availableLimited power available– Aux power supply typically provides 720ma at 5VAux power supply typically provides 720ma at 5V– shared between platform, PCI, and USBshared between platform, PCI, and USB

S3 Is the ‘OFF’ State for IAPCsS3 Is the ‘OFF’ State for IAPCs

October 10, 2000 7

S3 Power ConsumersS3 Power Consumers

Base BoardBase Board

Memory SubsystemMemory Subsystem

PCIPCIRemote Wakeup SlotsRemote Wakeup SlotsOther SlotsOther Slots

USBUSB

~100ma~100ma

~100ma~100ma

375ma 375ma

20ma20ma

10ma/port10ma/port

October 10, 2000 8

USB Dynamic PowerUSB Dynamic Power

Suspend to Remote Wakeup transitionSuspend to Remote Wakeup transition– Device can go to full power immediatelyDevice can go to full power immediately– Could be as high as 500maCould be as high as 500ma

Insertion of new device into empty portInsertion of new device into empty port– Device can draw up to 100maDevice can draw up to 100ma

Remote wakeup does NOT wake all USB devicesRemote wakeup does NOT wake all USB devices– Selective suspend is done at all portsSelective suspend is done at all ports

October 10, 2000 9

Platform DynamicsPlatform Dynamics

Switch from Vaux to Main supply takes ~250msecSwitch from Vaux to Main supply takes ~250msec– HW controlled starting with any power eventHW controlled starting with any power event

USB remote wakeup, PCI PME#, USB device insertionUSB remote wakeup, PCI PME#, USB device insertion

Power supply Vaux has dynamic characteristicsPower supply Vaux has dynamic characteristics– Testing shows >3A for 500msecTesting shows >3A for 500msec

October 10, 2000 10

USB S3 Power USB S3 Power

Use 10ma/port rule for static power calculationUse 10ma/port rule for static power calculation Assume only one power event from USBAssume only one power event from USB

– Multiples within 1/4 second are unlikelyMultiples within 1/4 second are unlikely– Max for that one event is 500maMax for that one event is 500ma

Dynamics of Vaux supply easily handle 500maDynamics of Vaux supply easily handle 500ma

Use USB Static Power for Vaux SizingUse USB Static Power for Vaux SizingVaux Supply’s Easily Handle USB Dynamic PowerVaux Supply’s Easily Handle USB Dynamic Power

October 10, 2000 11

Mobile Platforms and USB

Mobile Platforms and USB

October 10, 2000 12

C3 Processor StateC3 Processor State

Low power state for processorsLow power state for processors Extends battery life by ~10%Extends battery life by ~10% Entered when system is idle (including IO traffic)Entered when system is idle (including IO traffic) Can be entered in milliseconds (10 to 50)Can be entered in milliseconds (10 to 50) Any bus master activities keep processor aliveAny bus master activities keep processor alive

– USB host controllers poll memory every millisecondUSB host controllers poll memory every millisecond

USB Device Drivers must take special action to USB Device Drivers must take special action to allow host controller to stop polling memoryallow host controller to stop polling memory

October 10, 2000 13

Use Selective SuspendUse Selective Suspend

New feature in “Whistler” will stop HC polling if all New feature in “Whistler” will stop HC polling if all ports are suspendedports are suspended– This will allow process to go to C3 stateThis will allow process to go to C3 state

Device drivers should ‘suspend’ their device Device drivers should ‘suspend’ their device whenever it is idlewhenever it is idle– Camera not open, disk drive not being accessedCamera not open, disk drive not being accessed– Use defined PM IOCTLs to manipulate device state and Use defined PM IOCTLs to manipulate device state and

let the device do wakeuplet the device do wakeup

October 10, 2000 14

Power States for USB Devices

Power States for USB Devices

October 10, 2000 15

USB Feature SpecificationUSB Feature Specification

Interface Power Management Specification Interface Power Management Specification defines some additional PM states for devicesdefines some additional PM states for devices– D0 - Fully onD0 - Fully on– D1, D2, D3 - Less than fully onD1, D2, D3 - Less than fully on

Relationship between Dx states and USB PM Relationship between Dx states and USB PM states (active/suspended) is orthogonalstates (active/suspended) is orthogonal– Device required to suspend/resume no matterDevice required to suspend/resume no matter

what Dx statewhat Dx state– Suspend/resume doesn’t effect device Dx state Suspend/resume doesn’t effect device Dx state

October 10, 2000 16

New Power ValuesNew Power Values

If device is in D1, D2, or D3 and enabled for If device is in D1, D2, or D3 and enabled for remote wakeup, then 100ma is current limit for remote wakeup, then 100ma is current limit for suspendsuspend

If device is in D1, D2, or D3 and signaling a remote If device is in D1, D2, or D3 and signaling a remote wakeup, then device is limited to 100mawakeup, then device is limited to 100ma

October 10, 2000 17

Budgeting USB PowerBudgeting USB Power

New 100ma ‘suspend’ current can exceedNew 100ma ‘suspend’ current can exceedVaux capacityVaux capacity

If OS does power budgeting, OS will manageIf OS does power budgeting, OS will manageUSB Dx states to stay within Vaux capacityUSB Dx states to stay within Vaux capacity– OS has to know Vaux capacityOS has to know Vaux capacity

If OS doesn’t power budget, OS will make sure If OS doesn’t power budget, OS will make sure devices are in D0 before suspendingdevices are in D0 before suspending– Devices can’t count on more power while suspendedDevices can’t count on more power while suspended

October 10, 2000 18

USB Driver BehaviorUSB Driver Behavior

OS will ask USB driver if system ‘sleep’ is OKOS will ask USB driver if system ‘sleep’ is OK– IRP_MN_QUERY_POWERIRP_MN_QUERY_POWER

Driver can ‘fail’ the request in certain casesDriver can ‘fail’ the request in certain cases– When doing ‘critical’ IO (like modem connection)When doing ‘critical’ IO (like modem connection)

If able to suspend, driver should finish pending If able to suspend, driver should finish pending IOs and pass IRP down the stackIOs and pass IRP down the stack– Passing IRP without completing IOs can result in Passing IRP without completing IOs can result in

system hangsystem hang

Device Drivers Must Be PM AwareDevice Drivers Must Be PM Aware

October 10, 2000 19

SummarySummary

USB is an important feature of IAPCsUSB is an important feature of IAPCs USB power characteristics are easilyUSB power characteristics are easily

handled by IAPCshandled by IAPCs Mobile platforms have power savings when USB Mobile platforms have power savings when USB

device drivers suspend their devicedevice drivers suspend their device New USB power states don’t guaranteeNew USB power states don’t guarantee

higher suspend powerhigher suspend power Drivers need to be PM awareDrivers need to be PM aware

October 10, 2000 20

Call to ActionCall to Action

OEMs: Use power budgeting to fully enable USB OEMs: Use power budgeting to fully enable USB devices while in S3 state devices while in S3 state

IHVs: Suspend your device when not in useIHVs: Suspend your device when not in use– Make your device ‘mobile friendly’Make your device ‘mobile friendly’

IHVs: See if your peripheral can benefit from the IHVs: See if your peripheral can benefit from the USB PM feature specificationUSB PM feature specification– Limit device power on remote wakeupLimit device power on remote wakeup– More power to detect eventsMore power to detect events

Make Sure Your Device Driver Is PM AwareMake Sure Your Device Driver Is PM Aware