;/*++
;
;Copyright (c) Zhaoxin Corporation.  All rights reserved.
;
;   THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
;   KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
;   IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
;   PURPOSE.
;
;Module Name:
;
;    ZhHub3.INF
;
;Abstract:
;    INF file for Zhaoxin eXtensible host controller hub
;
;--*/

[Version]
Signature      = "$WINDOWS NT$"
Class          = USB
ClassGuid      = {36FC9E60-C465-11CF-8056-444553540000}
Provider       = %Zhaoxin%
DriverVer=05/16/2019,6.1.7600.5702
CatalogFile    = ZhHub3.cat

[DestinationDirs]
DefaultDestDir  = 12
CoInstaller_CopyFiles = 11

;-------------------------------------------------------------------------
; Device Install Section
;-------------------------------------------------------------------------
[ControlFlags]
ExcludeFromSelect = *

[Manufacturer]
%Zhaoxin%=Zhaoxin,NTAMD64

[SourceDisksFiles]
ZhHub3.sys     = 1
WdfCoInstaller01009.dll = 1 ; make sure the number matches with SourceDisksNames

[SourceDisksNames]
1=%DISK_NAME%,

; For XP and later
[Zhaoxin.NTAMD64]
; DisplayName      Section      DeviceId
; -----------      -------      --------
%VUSB3\ROOT_HUB30.DeviceDesc% = Zh3Hub, USB\ZH_ROOT_HUB
%VUSB3\CLASS_09.DeviceDesc%   = Zh3Hub, VUSB3\ZH_CLASS_09
%VUSB2\CLASS_09.DeviceDesc%   = Zh3Hub, VUSB2\ZH_CLASS_09
%VUSB1\CLASS_09.DeviceDesc%   = Zh3Hub, VUSB1\ZH_CLASS_09
%VUSB2\CLASS_09&SUBCLASS_00&PROT_02.DeviceDesc%   = Zh3Hub, VUSB2\ZH_CLASS_09&SUBCLASS_00&PROT_02

[Zh3Hub.NT]
CopyFiles     = Zh3Hub.CopyFiles

[Zh3Hub.NT.HW]
AddReg         = DefaultIdleAndWake.AddReg

[Zh3Hub.CopyFiles]
ZhHub3.sys

[Zh3Hub.NT.Services]
AddService     = Zh3Hub,0x00000002,Zh3Hub_Service

[Zh3Hub_Service]
DisplayName    = %Zh3Hub.SVCDESC%
ServiceType    = 1                  ; SERVICE_KERNEL_DRIVER
StartType      = 3                  ; SERVICE_DEMAND_START
ErrorControl   = 1                  ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\ZhHub3.sys
LoadOrderGroup = Base
AddReg         = SpecificParam

[SpecificParam]
HKR, "Parameters", "RPU1Timeout", 0x00010001, 0x40 ; Refer to Table 10-12 of USB3.0 spec
HKR, "Parameters", "RPU2Timeout", 0x00010001, 0x7F ; Refer to Table 10-13 of USB3.0 spec
HKR, "Parameters", "U1Timeout", 0x00010001, 0x40 ; Refer to Table 10-12 of USB3.0 spec
HKR, "Parameters", "U2Timeout", 0x00010001, 0x7F ; Refer to Table 10-13 of USB3.0 spec
HKR, "Parameters", "DisableSelectiveSuspend", 0x00010001, 1
HKR, "Parameters", "EnumRetryTimes", 0x00010001, 3

[DefaultIdleAndWake.AddReg]
HKR, "WDF", "WdfDefaultIdleInWorkingState", 0x00010001, 0   
HKR, "WDF", "WdfDefaultWakeFromSleepState", 0x00010001, 0   

;-------------------------------------------------------------------------
; WDF Coinstaller installation
;-------------------------------------------------------------------------
[Zh3Hub.NT.CoInstallers]
AddReg         = CoInstaller_AddReg
CopyFiles      = CoInstaller_CopyFiles

[CoInstaller_CopyFiles]
WdfCoInstaller01009.dll

[CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000, "WdfCoInstaller01009.dll,WdfCoInstaller"

[Zh3Hub.NT.Wdf]
KmdfService    = Zh3Hub, Zh3Hub_wdfsect

[Zh3Hub_wdfsect]
KmdfLibraryVersion = 1.9

;------------------------------------------------------------------------------
;  String Definitions
;------------------------------------------------------------------------------

[Strings]
Zhaoxin            = "Shanghai Zhaoxin Semiconductor Co., Ltd."
DISK_NAME = "ZX USB3.0 HUB Installation Disk"
VUSB3\ROOT_HUB30.DeviceDesc = "ZX USB 3 Root Hub"
VUSB3\CLASS_09.DeviceDesc   = "ZX USB 3 Hub"
VUSB2\CLASS_09.DeviceDesc   = "ZX USB 2 Hub"
VUSB1\CLASS_09.DeviceDesc   = "ZX USB 1 Hub"
VUSB2\CLASS_09&SUBCLASS_00&PROT_02.DeviceDesc = "ZX USB 2 MTT Hub"
Zh3Hub.SvcDesc            = "ZX USB 3 Root Hub Service"
