;
; Copyright (c) 2013 Microsoft Corporation, All rights reserved.
;
; storufs.inf - Install the UFS host driver
;

[Version]
Signature="$Windows NT$"
Class=SCSIAdapter
ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318}
Provider=%Microsoft%
DriverVer = 06/21/2006,10.0.20348.2849

[SourceDisksNames]
1 = %DiskName%,,,

[SourceDisksFiles]
storufs.sys = 1

[DestinationDirs]
DefaultDestDir=12 ;DIRID_DRIVERS

;
; ---------------------------------
; List of Manufacturers and Devices
; ---------------------------------
;

[Manufacturer]
%Generic%=Generic,NTamd64
%Intel%=Intel,NTamd64
%Qualcomm%=Qualcomm,NTamd64
%Toshiba%=Toshiba,NTamd64

[ControlFlags]
BasicDriverOk=*
ExcludeFromSelect=PCI\CC_010901
ExcludeFromSelect=ACPI\CC_010901
ExcludeFromSelect=ACPI\QCOM24A5
ExcludeFromSelect=PCI\VEN_8086&DEV_0ACE&SUBSYS_72708086&REV_01
ExcludeFromSelect=PCI\VEN_8086&DEV_1ACE
ExcludeFromSelect=PCI\VEN_8086&DEV_98FA&SUBSYS_72708086
ExcludeFromSelect=PCI\VEN_8086&DEV_98FA&SUBSYS_72708086&REV_01
ExcludeFromSelect=PCI\VEN_8086&DEV_A0FA&SUBSYS_72708086&REV_00
ExcludeFromSelect=PCI\VEN_8086&DEV_4B43&SUBSYS_72708086
ExcludeFromSelect=PCI\VEN_8086&DEV_4B41&SUBSYS_72708086
ExcludeFromSelect=PCI\VEN_1179&DEV_7012&REV_00

;
; Device Installation Routines
;

[Generic.NTamd64]
%PCI\CC_010901.DeviceDesc%=UfsInstall, PCI\CC_010901
%ACPI\CC_010901.DeviceDesc%=UfsInstall, ACPI\CC_010901

[Intel.NTamd64]
%PCI\VEN_8086&DEV_0ACE&SUBSYS_72708086&REV_01%=UfsIntelBxtA1Install, PCI\VEN_8086&DEV_0ACE&SUBSYS_72708086&REV_01
%PCI\VEN_8086&DEV_1ACE%=UfsIntelBxtB1Install, PCI\VEN_8086&DEV_1ACE
%PCI\VEN_8086&DEV_98FA&SUBSYS_72708086%=UfsIntelLKFInstall, PCI\VEN_8086&DEV_98FA&SUBSYS_72708086
%PCI\VEN_8086&DEV_98FA&SUBSYS_72708086&REV_01%=UfsIntelLKFA1Install, PCI\VEN_8086&DEV_98FA&SUBSYS_72708086&REV_01
%PCI\VEN_8086&DEV_A0FA&SUBSYS_72708086&REV_00%=UfsIntelPreSiliconEHLInstall, PCI\VEN_8086&DEV_A0FA&SUBSYS_72708086&REV_00
%PCI\VEN_8086&DEV_4B43&SUBSYS_72708086%=UfsIntelEHLInstall, PCI\VEN_8086&DEV_4B43&SUBSYS_72708086
%PCI\VEN_8086&DEV_4B41&SUBSYS_72708086%=UfsIntelEHLInstall, PCI\VEN_8086&DEV_4B41&SUBSYS_72708086

[Qualcomm.NTamd64]
%ACPI\QCOM24A5.DeviceDesc%=UfsQualcomm8996Install, ACPI\QCOM24A5

[Toshiba.NTamd64]
%PCI\VEN_1179&DEV_7012&REV_00%=UfsToshibaFPGAInstall, PCI\VEN_1179&DEV_7012&REV_00

;
; -------------------
; UFS Install Section
; -------------------
;

[UfsDriverCopy]
storufs.sys,,,0x100

;
; Standard Host Controller
;

[UfsInstall]
CopyFiles=UfsDriverCopy

[UfsInstall.HW]
AddReg=UfsInstall.HW.AddReg

[UfsInstall.HW.AddReg]


[UfsInstall.Services]
AddService=storufs, 2, UfsServiceInstall

;
; Intel
;

; Intel BXT A1 Host Controller

[UfsIntelBxtA1Install]
CopyFiles=UfsDriverCopy

[UfsIntelBxtA1Install.HW]
AddReg=UfsIntelBxtA1Install.HW.AddReg

[UfsIntelBxtA1Install.HW.AddReg]
HKR,,"FeatureFlags",0x00010001,0x80000010
HKR,,"HighSpeedGearMode",0x00010001,0x2
HKR,,"NumLanes",0x00010001,0x2
HKR,,"HSSeries",0x00010001,0x1

[UfsIntelBxtA1Install.Services]
AddService=storufs, 2, UfsServiceInstall

; Intel BXT B1 Host Controller

[UfsIntelBxtB1Install]
CopyFiles=UfsDriverCopy

[UfsIntelBxtB1Install.HW]
AddReg=UfsIntelBxtB1Install.HW.AddReg

[UfsIntelBxtB1Install.HW.AddReg]
HKR,,"FeatureFlags",0x00010001,0x20000010
HKR,,"HighSpeedGearMode",0x00010001,0x3
HKR,,"NumLanes",0x00010001,0x2
HKR,,"HSSeries",0x00010001,0x1

[UfsIntelBxtB1Install.Services]
AddService=storufs, 2, UfsServiceInstall

; Intel LKF A1 Host Controller

[UfsIntelLKFA1Install]
CopyFiles=UfsDriverCopy

[UfsIntelLKFA1Install.HW]
AddReg=UfsIntelLKFA1Install.HW.AddReg

[UfsIntelLKFA1Install.HW.AddReg]
HKR,,"FeatureFlags",0x00010001,0x08000001
HKR,,"HighSpeedGearMode",0x00010001,0x4
HKR,,"NumLanes",0x00010001,0x2
HKR,,"HSSeries",0x00010001,0x2
HKR,,"D3IdleTimeoutInMS",0x00010001,0x12C

[UfsIntelLKFA1Install.Services]
AddService=storufs, 2, UfsServiceInstall

; Intel LKF Host Controller

[UfsIntelLKFInstall]
CopyFiles=UfsDriverCopy

[UfsIntelLKFInstall.HW]
AddReg=UfsIntelLKFInstall.HW.AddReg

[UfsIntelLKFInstall.HW.AddReg]
HKR,,"FeatureFlags",0x00010001,0x08000000
HKR,,"HighSpeedGearMode",0x00010001,0x4
HKR,,"NumLanes",0x00010001,0x2
HKR,,"HSSeries",0x00010001,0x2
HKR,,"D3IdleTimeoutInMS",0x00010001,0x64
HKR,,"LinkHibern8TimeoutInMS",0x00010001,0x32
HKR,,"LinkHibern8ResidencyIntervalInUS",0x00010001,0x12C
HKR,,"CommandTimeoutInMS",0x00010001,2000

[UfsIntelLKFInstall.Services]
AddService=storufs, 2, UfsServiceInstall

; Pre-Silicon Intel EHL Host Controller

[UfsIntelPreSiliconEHLInstall]
CopyFiles=UfsDriverCopy

[UfsIntelPreSiliconEHLInstall.HW]
AddReg=UfsIntelPreSiliconEHLInstall.HW.AddReg

[UfsIntelPreSiliconEHLInstall.HW.AddReg]
HKR,,"FeatureFlags",0x00010001,0x08000001
HKR,,"HighSpeedGearMode",0x00010001,0x3
HKR,,"NumLanes",0x00010001,0x2
HKR,,"HSSeries",0x00010001,0x2

[UfsIntelPreSiliconEHLInstall.Services]
AddService=storufs, 2, UfsServiceInstall

; Intel EHL Host Controller

[UfsIntelEHLInstall]
CopyFiles=UfsDriverCopy

[UfsIntelEHLInstall.HW]
AddReg=UfsIntelEHLInstall.HW.AddReg

[UfsIntelEHLInstall.HW.AddReg]
HKR,,"FeatureFlags",0x00010001,0x04000010
HKR,,"HighSpeedGearMode",0x00010001,0x3
HKR,,"NumLanes",0x00010001,0x1
HKR,,"HSSeries",0x00010001,0x2
HKR,,"CommandTimeoutInMS",0x00010001,2000

[UfsIntelEHLInstall.Services]
AddService=storufs, 2, UfsServiceInstall

;
; Qualcomm
;

; Qualcomm 8996 Host Controller

[UfsQualcomm8996Install]
CopyFiles=UfsDriverCopy

[UfsQualcomm8996Install.HW]
AddReg=UfsQualcomm8996Install.HW.AddReg

[UfsQualcomm8996Install.HW.AddReg]
HKR,,"FeatureFlags",0x00010001,0x40000000
HKR,,"HSSeries",0x00010001,0x2

[UfsQualcomm8996Install.Services]
AddService=storufs, 2, UfsServiceInstall

;
; Toshiba
;

; Toshiba FPGA Host Controller

[UfsToshibaFPGAInstall]
CopyFiles=UfsDriverCopy

[UfsToshibaFPGAInstall.HW]
AddReg=UfsToshibaFPGAInstall.HW.AddReg

[UfsToshibaFPGAInstall.HW.AddReg]
HKR,,"FeatureFlags",0x00010001,0x10000010

[UfsToshibaFPGAInstall.Services]
AddService=storufs, 2, UfsServiceInstall

;
; ---------------------------
; UFS Service Install Section
; ---------------------------
;

[UfsServiceInstall]
DisplayName    = %UfsServiceDesc%
ServiceType    = 1
StartType      = 0
ErrorControl   = 1
ServiceBinary  = %12%\storufs.sys
AddReg         = UfsServiceReg
AddReg         = UfsStorportReg

[UfsServiceReg]
HKR,,"IntAggThreshold",0x00010001,5
HKR,,"IntAggTimeout",0x00010001,0x1F

[UfsStorportReg]
HKR, "Parameters", "BusType", 0x00010001, 0x00000013
HKR, "Parameters", "IoTimeoutValue", 0x00010001, 0x0000001E

;
; --------------
; String Section
; --------------
;

[Strings]

;
; Device Descriptions
;

; Generic
PCI\CC_010901.DeviceDesc="Universal Flash Storage (UFS) Host Controller"
ACPI\CC_010901.DeviceDesc="Universal Flash Storage (UFS) Host Controller"

; Intel
PCI\VEN_8086&DEV_0ACE&SUBSYS_72708086&REV_01="Intel BXT A1 Universal Flash Storage (UFS) Host Controller"
PCI\VEN_8086&DEV_1ACE="Intel BXT B1 Universal Flash Storage (UFS) Host Controller"
PCI\VEN_8086&DEV_98FA&SUBSYS_72708086="Intel Universal Flash Storage (UFS) Host Controller"
PCI\VEN_8086&DEV_98FA&SUBSYS_72708086&REV_01="Intel Universal Flash Storage (UFS) Host Controller"
PCI\VEN_8086&DEV_A0FA&SUBSYS_72708086&REV_00="Intel Universal Flash Storage (UFS) Host Controller"
PCI\VEN_8086&DEV_4B43&SUBSYS_72708086="Intel Universal Flash Storage (UFS) Host Controller"
PCI\VEN_8086&DEV_4B41&SUBSYS_72708086="Intel Universal Flash Storage (UFS) Host Controller"

; Qualcomm
ACPI\QCOM24A5.DeviceDesc="Qualcomm Universal Flash Storage (UFS) Host Controller"

; Toshiba
PCI\VEN_1179&DEV_7012&REV_00="Toshiba Universal Flash Storage (UFS) FPGA Host Controller"

;
; Other Strings
;

DiskName                  = "Microsoft Universal Flash Storage (UFS) Driver"
UfsServiceDesc            = "Microsoft Universal Flash Storage (UFS) Driver"

;
; Manufacturers
;

Generic                   = "Generic"
Microsoft                 = "Microsoft"
Intel                     = "Intel"
Qualcomm                  = "Qualcomm"
Toshiba                   = "Toshiba"
