windows 10’s usb-c and power delivery architecture · usb implementers forum © 2016 usb...

25
USB Implementers Forum © 2016 USB Developer Days 2016 Windows 10’s USB-C™ and Power Delivery Architecture October 19 1 Jr-Chiang, Jaw Microsoft Corporation, Senior Software Engineer Developer Days 2016 Hong Kong October 19-20, 2016 ShenZhen Legendary ShenZhen Legendary

Upload: dokhue

Post on 29-Aug-2019

226 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

Windows 10’s USB-C™ and Power Delivery Architecture

October 19 1

Jr-Chiang, JawMicrosoft Corporation, Senior Software Engineer

Developer Days 2016

Hong Kong

October 19-20, 2016

ShenZhen Legendary

ShenZhen Legendary

Page 2: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

Agenda: Windows 10’s USB-C and PD Architecture• Introduction

• Windows 10 roles and responsibilities

• Hardware/firmware roles and responsibilities

• Windows 10 USB-C architecture• UCSI (USB Type-C™ Connector System Software Interface)

• Ucm (USB Connector Manager)

• UcmTcpci (USB Connector Manager TCPCI extension)

• USB-C and USB PD Testing• Testing guidance

• Requirements and tests for Win10 certification

October 19 2

ShenZhen Legendary

ShenZhen Legendary

Page 3: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

Introduction

• Windows 10 roles and responsibilities

• Hardware/firmware roles and responsibilities

October 19 3

ShenZhen Legendary

ShenZhen Legendary

Page 4: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

The goal… “USB-C just works”

When the user connects two USB Type-C devices together, it will always work as intended

In order to achieve this goal, software, firmware, and hardware must all work together

October 19 4

ShenZhen Legendary

ShenZhen Legendary

Page 5: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

Why plug into Windows 10’s USB-C architecture?• Windows will do the following:

• Provide a standard notification framework for users

• Support new features deeply integrated in the OS

• Provide interoperability with USB-C/PD devices

• Roll out regular updates to service the user experience

• Maintain backwards compatibility across Win10 updates

Bottom line: Customers will have a more consistent and overall better experience if the system plugs into Windows 10’s USB Type-C architecture

October 19 5

ShenZhen Legendary

ShenZhen Legendary

Page 6: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

Windows 10’s roles and responsibilities• Provides user experience/interface

• Troubleshooting messages

• Enable advanced users to configure USB-C/PD settings

• Enables new scenarios• Examples:

• Discrete external GPUs

• Continuum for Windows Mobile

• Provides servicing mechanism through Windows Update• Regular driver updates to improve quality/interoperability

• Maintain backwards compatibility while rolling out new features/fixes

October 19 6

ShenZhen Legendary

ShenZhen Legendary

Page 7: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

Hardware/firmware’s roles and responsibilities• Provide accurate state of hardware

• Provide ability for Windows to control the hardware

• Provide a set of default policies for common expected scenarios. Examples:• Mobile devices that can either source or sink power should avoid sourcing

more power than reasonable for a mobile device

• DRP devices that are meant to be used in a certain role should always attempt to get into that role

October 19 7

ShenZhen Legendary

ShenZhen Legendary

Page 8: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

Windows 10 USB-C

Architecture

• Overview of the USB Connector Manager

• UCSI

• Ucm Class Extension

• UcmTcpci Class Extension

October 19 8

ShenZhen Legendary

ShenZhen Legendary

Page 9: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

USB Connector Manager• What is USB Connector Manager (UCM)?

• Windows 10 driver stack that manages USB-C/PD for the system• Gets hardware status and makes policy decisions

• How to plug into UCM?• Option 1: Support UCSI (USB Type-C Connector System Software Interface)

• No driver development required (but EC-development is required)

• Option 2: Write a Ucm client driver

• Option 3: Write a UcmTcpci client driver• Use the UcmTcpci driver sample (coming on Github)

October 19 9

ShenZhen Legendary

ShenZhen Legendary

Page 10: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

Windows 10 USBArchitecture

October 19 10

USB Host Driver Stack

USB Host Controller

USB Function Driver Stack

USB Device Controller

Microsoft component

OEM/IHV component

Interface layer

Hardware

UCSI Custom SW-HW/FW Interface

Ucm Class Extension + Policy Manager

UCSI Driver UcmCx Client Driver

UcmCx Client Interface

USB-C Hardware/Firmware

USB Connector Manager (Ucm)

User Interface

UcmTcpciCx Client Driver

TCPCI-Compatible Interface

UcmTcpci Class Extension

UcmTcpciCx Client Interface

ShenZhen Legendary

ShenZhen Legendary

Page 11: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

Choosing the Right Software Model For Your HW

• Use UCSI if the system has an Embedded Controller

• Use UcmTcpci if your design relies on a software Type-C Port Manager (TCPM)

• Use Ucm if the system cannot use UCSI nor UcmTcpci• Least preferred option as it requires the most

driver work

October 19 11

Embedded Controller?

Software Type-C Port Manager?

No

UCSI UcmTcpci Ucm

Yes

Yes

No

ShenZhen Legendary

ShenZhen Legendary

Page 12: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

UCSI• UCSI provides OS with hardware

state

• UCSI provides OS the ability to control the hardware

• System firmware needs to implement default policies for common expected scenarios. Examples:• Mobile devices that can either source

or sink power should avoid sourcing more power than reasonable for a mobile device

• DRP devices that are meant to be used in a certain role should always attempt to get into that role

October 19 12

UCSI Custom SW-HW/FW Interface

Ucm Class Extension + Policy Manager

UCSI Driver UcmCx Client Driver

UcmCx Client Interface

USB-C Hardware/Firmware

USB Connector Manager (Ucm)

User Interface

Microsoft component

OEM/IHV component

Interface layer

Hardware

UcmTcpciCx Client Driver

TCPCI-Compatible Interface

UcmTcpci Class Extension

UcmTcpciCx Client Interface

ShenZhen Legendary

ShenZhen Legendary

Page 13: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

UCSI Bring-up Example• PD controller tasks:

• Implement PD policy engine, protocol layer, physical layer

• Provide control/query I2C (or other bus) interface hooks for EC

• Embedded controller tasks: • Implement default platform policy for the USB-C ports

on the system• Implement I2C (or other bus) interface to PD controller• Implement UCSI interface to ACPI

• Implement SCI, update EC’s mailbox• Communicate status change, provide role swap hooks, etc

• BIOS ACPI tasks:• Report USB-C connector to the OS• Implement UCSI mailbox paradigm

• Initialization of EC’s mailbox• _DSM method to enable OS to access the mailbox

October 19 13

Display SourceUSB Dual Role

Controller

Vbus, Vconn Control

USB Type-C Connector

PD Controller

SS/DP Mux

SSTx+/-, SSRx+/- D+/D-CC1, CC2 Vbus, Vconn

BC 1.2 Detection

DisplayPort SSTx+/-, SSRx+/-

DP Out SS HS

SoC/CPU

Embedded Controller

Alt Mode Control

I2C

Charge control

Charge control

D+/D-

ACPI

SCI, EC Events

Notify I/O

UCSI

ShenZhen Legendary

ShenZhen Legendary

Page 14: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

Ucm Class Extension

• Ucm is the OS USB-C/PD policy manager

• Requires a Ucm client driver to provide hardware status and control hooks

• Flexible model allows Ucm client driver to be written to work with any hardware design

October 19 14

UCSI Custom SW-HW/FW Interface

Ucm Class Extension + Policy Manager

UCSI Driver UcmCx Client Driver

UcmCx Client Interface

USB-C Hardware/Firmware

USB Connector Manager (Ucm)

User Interface

Microsoft component

OEM/IHV component

Interface layer

Hardware

UcmTcpciCx Client Driver

TCPCI-Compatible Interface

UcmTcpci Class Extension

UcmTcpciCx Client Interface

ShenZhen Legendary

ShenZhen Legendary

Page 15: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

Ucm Bring-up Example• PD controller tasks:

• Implement PD policy engine, protocol layer, physical layer

• Provide interface hooks for the Ucm client driver

• Ucm client driver tasks:• Write an Ucm client driver that implements the

Ucm APIs• Set default platform policy• Implement interface to PD controller• Implement UcmCx framework APIs

• Details on MSDN

• ACPI tasks:• Report USB-C connector’s capabilities in ACPI

October 19 15

Display SourceUSB Dual Role

Controller

Vbus, Vconn Control

USB Type-C Connector

SS/DP Mux

SSTx+/-, SSRx+/- D+/D-CC1, CC2 Vbus, Vconn

BC 1.2 Detection

DisplayPort SSTx+/-, SSRx+/-

DP Out SS HS

SoC/CPU

PD Controller (not TCPC)

Alt Mode Control

Charge control

Charge control

D+/D-

Ucm

SPI, I2C, or other interface

ShenZhen Legendary

ShenZhen Legendary

Page 16: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

UcmTcpci Class Extension• UcmTcpci is an inbox extension to

Ucm

• UcmTcpci is a software-based TCPM implementation• Implements PD policy engine and

protocol layer

• Designed to be used with platforms with a TCPC, but no HW TCPM

• UcmTcpci client driver can be implemented as a simple I2C class driver

• Sample driver coming soon on GitHub

October 19 16

UCSI Custom SW-HW/FW Interface

Ucm Class Extension + Policy Manager

UCSI Driver UcmCx Client Driver

UcmCx Client Interface

USB-C Hardware/Firmware

USB Connector Manager (Ucm)

User Interface

Microsoft component

OEM/IHV component

Interface layer

Hardware

UcmTcpciCx Client Driver

TCPCI-Compatible Interface

UcmTcpci Class Extension

UcmTcpciCx Client Interface

ShenZhen Legendary

ShenZhen Legendary

Page 17: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

UcmTcpci Bring-up Example• Type-C Port Controller tasks:

• Implement I2C TCPC interface• Implement physical layer, CC-logic

• UcmTcpci Client Driver tasks: • Write an I2C class driver that implements the

UcmTcpci APIs• Translate I2C commands to UcmTcpci APIs• Sample driver and walkthrough will be available

• ACPI tasks:• Report USB-C connector’s capabilities in ACPI

• Other tasks:• If PD charging before the OS is required,

separate charging silicon will be required

October 19 17

Display SourceUSB Dual Role

Controller

Vbus, Vconn Control

USB Type-C Connector

SS/DP Mux

SSTx+/-, SSRx+/- D+/D-CC1, CC2 Vbus, Vconn

BC 1.2 Detection

DisplayPort SSTx+/-, SSRx+/-

DP Out SS HS

SoC/CPU

Type-C Port Controller

Alt Mode Control

Charge control

Charge control

D+/D-

UcmTcpci

I2C

ShenZhen Legendary

ShenZhen Legendary

Page 18: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

USB-C and USB PD Testing

• Testing guidance

• Requirements and Tests for Win10 Certification

October 19 18

ShenZhen Legendary

ShenZhen Legendary

Page 19: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

Testing guidance• Reliable and interoperable hardware results in happy customers

• Microsoft’s portal for USB testing resources:• https://aka.ms/usbtesting

• Test tools• Testing procedures• Test documentation

• Troubleshooting bring-up and development issues:• https://aka.ms/usblogs• https://aka.ms/usbfeedback• https://aka.ms/fieldmedicmsdn

• Give us feedback on how we can better enable you to build high-quality, interoperable hardware!

October 19 19

ShenZhen Legendary

ShenZhen Legendary

Page 20: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

Test tools• SuperMUTT

• Simulates USB traffic for USB Host testing• USB 2.0 and USB 3.0

• USB-C connection exerciser• 1:4 switch for automating interop and scenario

validation• Enables automated switching between hosts,

chargers, peripherals• Monitors charging current and direction

• USB-C MUTT (in development)• Extends capabilities of SuperMUTT with USB-C• Tests Power Delivery state machine, Alternate

Modes, role swapping

October 19 20

ShenZhen Legendary

ShenZhen Legendary

Page 21: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

Workshops and Certification Programs• Interop guidance

• Recommend following the manual interop procedure on MSDN:• https://aka.ms/usbtypecmanual

• Attend interop events hosted by the standards bodies (e.g. USB-IF, VESA, etc)

• Industry Compliance• Attend Power Delivery and USB-C compliance workshops hosted by the

standards bodies (e.g. USB-IF, VESA, etc)

• Windows Hardware Compatibility Certification• New USB-C/PD HLK tests are required for Windows hardware compatibility

certification

• Microsoft will publish a list of recommended silicon that is compatible with Windows

October 19 21

ShenZhen Legendary

ShenZhen Legendary

Page 22: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

Requirements and Tests for Win10 Certification• USB-C/PD Requirements:

• All USB-C ports are correctly declared in ACPI in _UPC method• All required UCSI features must be implemented correctly. See UCSI

specification for the list of UCSI features• Win10 also requires several UCSI features that are marked as “Optional” in the UCSI

specification

• Ucm APIs must be implemented correctly. See MSDN for the list of APIs and guidance for how to implement those APIs

• USB-C/PD Tests:• USB-C ACPI Validation Test• UCSI Command Tests• Power, Data Role Swap Tests

• Leverage the USB-C Connection Exerciser

October 19 22

ShenZhen Legendary

ShenZhen Legendary

Page 23: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

Q&A

October 19 23

ShenZhen Legendary

ShenZhen Legendary

Page 24: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

Additional information• General USB Type-C Information:

• Windows support for USB Type-C connectors• https://aka.ms/usbtypec

• UCSI:• UCSI rev1.0 specification

• http://www.intel.com/content/www/us/en/io/universal-serial-bus/usb-type-c-ucsi-spec.html• MSDN UCSI guidance

• https://aka.ms/ucsi• UCSI BIOS enabling guide

• http://www.intel.com/content/www/us/en/io/universal-serial-bus/bios-implementation-of-ucsi.html

• USB Connector Manager (Ucm):• USB Connector Manager Driver bring-up guidance

• https://aka.ms/ucmcx• USB Connector Manager Class Extension API reference

• https://aka.ms/ucmcxapi

October 19 24

ShenZhen Legendary

ShenZhen Legendary

Page 25: Windows 10’s USB-C and Power Delivery Architecture · USB Implementers Forum © 2016 USB Developer Days 2016. Introduction •Windows 10 roles and responsibilities •Hardware/firmware

USB Implementers Forum © 2016

USB Developer Days 2016

Additional information• Win10 Hardware Compatibility Requirements:

• https://aka.ms/usbccontrolcompat• https://aka.ms/usbcsystemcompat

• Win10 Hardware Compatibility Tests:• How to set up and run the Win10 USB-C compatibility tests:

• https://aka.ms/usbctestsetup

• USB testing resources:• https://aka.ms/usbtesting

• Test tools:• Microsoft USB Test Tools

• https://aka.ms/usbtypecmutt

• Test tool questions?• [email protected]

October 19 25

ShenZhen Legendary

ShenZhen Legendary