Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
USB System Architecture (USB 2.0).pdf
Скачиваний:
173
Добавлен:
03.05.2015
Размер:
7.03 Mб
Скачать

Chapter 20: Hub Configuration

Port Power Mask

The offset within the hub class descriptor depends on the size of the DeviceRemovable field. The Port Power Control Mask consists of a bitmap of ports just as the DeviceRemovable field does. Each bit position corresponds to a given port and defines whether the port is powered via ganged power mode or if the port must be powered individually. If ganged power is masked, the bit field is set and power must be applied via the “Set Port Power Feature” request.

High-Speed Capable Hub Descriptors

This section illustrates how 2.0 hubs implement their descriptors in light of the requirement to operate at either full or high speed.

Descriptors When Hub Is Operating at Full Speed

The following descriptors are provided as an example to show how the descriptor information changes between the regular full-speed descriptor and the other speed descriptors.

Table 20-6: Hub’s Device Descriptor When Operating at Full Speed

Offset

Field

Description

 

 

 

0

bLength

Size of descriptor = 12H

 

 

 

1

bDescriptorType

1 = Device Descriptor

 

 

 

2

bcdUSB

USB Spec version number

 

 

(0200 for V2.00)

 

 

 

4

bDeviceClass

Hub Class Code = 09H

 

 

 

5

bDeviceSubClass

SubClass Code = 0

 

 

 

6

bDeviceProtocol

Protocol Code = 0

 

 

 

7

wMaxPacketSize0

64

 

 

 

8 - 16

Manufacturer Info

Other entries: Vendor, Product,

 

 

Release, Manufacturer string, Product

 

 

string, Serial Number.

 

 

 

17

bNumConfigurations

Number of Configurations = 1

 

 

 

391

USB System Architecture

Table 20-7: Hub’s Device Qualifier Descriptor When Operating at Full Speed

Offset

Field

Description

 

 

 

0

bLength

Size of descriptor = 0AH

 

 

 

1

bDescriptorType

Device_Qualifier Type = 6

 

 

 

2

bcdUSB

USB Spec version number

 

 

(0200 for V2.00)

 

 

 

4

bDeviceClass

Hub Class Code = 09H

 

 

 

5

bDeviceSubClass

SubClass Code = 0

 

 

 

6

bDeviceProtocol

1 = single TT

 

 

2 = multiple TTs

 

 

 

7

wMaxPacketSize0

64

 

 

 

9

bNumConfigurations

Number of Configurations = 1

 

 

 

Table 20-8: Hub’s Configuration Descriptor When Operating at Full Speed

Offset

Field

Description

 

 

 

0

bLength

Size of descriptor = 09H

 

 

 

1

bDescriptorType

Configuration Type = 2

 

 

 

2

wTotalLength

Number of Bytes in all descriptors

 

 

 

3

bNumInterfaces

1

 

 

 

4

bConfigurationValue

Value to use to select configuration

 

 

 

5

iConfiguration

Index of string descriptor

 

 

 

6

bmAttributes

Bus powered/self-powered

 

 

 

7

bMaxPower

Maximum bus power the hub will

 

 

consume in this configuration

 

 

 

392

 

 

Chapter 20: Hub Configuration

 

 

 

 

 

 

Table 20-9: Hub’s Other Speed Configuration Descriptor When Operating at Full Speed

 

 

 

 

 

 

Offset

Field

Description

 

 

 

 

 

 

 

0

bLength

Size of descriptor = 09H

 

 

 

 

 

 

 

1

bDescriptorType

Other Speed Configuration Type = 7

 

 

 

 

 

 

 

2

wTotalLength

Total length of data returned

 

 

 

 

 

 

 

4

bNumInterfaces

1 = Single TT

 

 

 

 

2 = Multiple TTs

 

 

 

 

 

 

 

5

bConfigurationValue

Value to use to select configuration

 

 

 

 

 

 

 

6

iConfiguration

Index of string descriptor

 

 

 

 

 

 

 

7

bmAttributes

Bus powered/Self Powered

 

 

 

 

 

 

 

8

bMaxPower

Maximum power hub will consume in

 

 

 

 

HS configuration

 

 

 

 

 

 

Table 20-10: Hub’s Interface Descriptor When Operating at Full Speed

Offset

Field

Description

 

 

 

0

bLength

Size of descriptor = 09H

 

 

 

1

bDescriptorType

Interface Type = 4

 

 

 

2

bInterfaceNumber

0

 

 

 

3

bAlternateSetting

0

 

 

 

4

bNumEndpoints

1

 

 

 

5

bInterfaceClass

Hub Class Code = 09H

 

 

 

6

bInterfaceSubClass

 

 

 

 

7

bInterfaceProtocol

 

 

 

 

8

iInterface

Index for Interface string descriptor

 

 

 

393

USB System Architecture

Table 20-11: Hub’s EndPoint Descriptor When Operating at Full Speed

Offset

Field

Description

 

 

 

0

bLength

Size of descriptor = 07H

 

 

 

1

bDescriptorType

EndPoint Type = 5

 

 

 

2

bEndPointAddress

EndPoint Number + Direction

 

 

 

4

bmAttributes

Transfer Type = Interrupt

 

 

 

5

wMaxPacketSize

Design dependent

 

 

 

6

bInterval

Polling Interval = FFH

 

 

 

The 2.0 Hub’s Class-Specific Descriptor

Table 20-12: 2.0 Hub Class Descriptor

Offset

Field

Size

Description

 

 

 

 

 

 

 

 

0

DescLength

1

Number of bytes in the descriptor, including this byte.

 

 

 

 

1

DescriptorType

1

Descriptor Type = 29h (hub class descriptor)

 

 

 

 

2

NbrPorts

1

Number of downstream ports that this hub supports.

 

 

 

 

394

Chapter 20: Hub Configuration

Table 20-12: 2.0 Hub Class Descriptor

Offset

Field

Size

 

Description

 

 

 

 

 

 

 

 

 

 

3

HubCharacteristics

2

D1:D0

Power Switching Mode:

 

 

 

00

Ganged power switching (all ports are powered

 

 

 

 

at once).

 

 

 

01

Individual port power switching.

 

 

 

1X Reserved for 1.0 compliant hubs that had no

 

 

 

 

power switching.

D2 Identifies a Compound Device:

0Hub is not part of a compound device.

1Hub is part of a compound device.

D4:D3 Over-current Protection Mode:

00 Global Over-current Protection. The hub reports over-current as a summation of all ports’ current draw, without a breakdown of individual port over-current status.

01 Individual Port Over-current Protection. The hub reports over-current on a per port basis. Each port has an over-current indicator.

1X No Over-current Protection. This option is only allowed for bus-powered hubs that don’t implement over-current protection.

D6:D5 TT Think Time:

00 TT requires at most 8 FS bit times of interpacket gap on a full-/low-speed downstream bus.

01 TT requires at most 16 FS bit times.

10TT requires at most 24 FS bit times.

11TT requires at most 32 FS bit times.

D7 Port Indicators Supported:

0 Port Indicators are not supported on its downstream facing ports and the PORT_INDICATOR request has no effect.

1 Port Indicators are supported on its downstream facing ports and the PORT_INDICATOR request controls the indicators.

D15...D8: Reserved

395

USB System Architecture

Table 20-12: 2.0 Hub Class Descriptor

Offset

Field

Size

 

Description

 

 

 

 

 

 

 

 

5

PwrOn2PwrGood

1

Time (in 2ms intervals) from the time power-on sequence

 

 

 

begins on a port until power is good on that port. System

 

 

 

software uses this value to determine how long to wait

 

 

 

before accessing a powered-on port.

 

 

 

 

6

HubContrCurrent

1

Maximum current requirements of the hub controller

 

 

 

electronics, in 2ma increments.

 

 

 

 

7

DeviceRemovable

Depends

Indicates if a port has a removable device attached. If a

 

 

on num

non-removable device is attached to a port, that port will

 

 

of ports

never receive an insertion change notification. This field

 

 

 

is reported on byte-granularity. Within a byte, if no port

 

 

 

exists for a given location, then the field representing the

 

 

 

port characteristics returns to 0.

 

 

 

Bit definition:

 

 

 

0

Device is removable

 

 

 

1 Device is not removable

 

 

 

This is a bitmap corresponding to the individual ports on

 

 

 

the hub:

 

 

 

 

Bit 0

Reserved

 

 

 

Bit 1

Port 1

 

 

 

Bit 2

Port 2

 

 

 

:

 

 

 

 

Bit n Port n (implementation dependent)

 

 

 

 

Vari-

PortPwrCtrlMask

Depends

This field exists to maintain compatibility with software

able

 

on num

written for 1.0 compliant devices. All bits in this field

 

 

of ports

should be set to “1”. This field has one bit for

 

 

 

each port on the hub with additional pad bits, if

 

 

 

necessary, to make the number of bits in the field an

 

 

 

integer multiple of 8.

 

 

 

 

 

396

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]