;***************************************************************************************
;
; Name      : sprdvcom.inf  
;
; Function  : Install UNISOC USB Serial Driver
;
; Copyright (c) UNISOC Communications Inc.  All rights reserved.
;
;***************************************************************************************

[version]
signature   = "$CHICAGO$"
Class       = Ports
ClassGuid   = {4D36E978-E325-11CE-BFC1-08002BE10318}
Provider    = %SPRD%
DriverVer   = 06/18/2020,4.19.38.135
CatalogFile = HMD_vcom.cat

; ================= Device Install section =====================

[ControlFlags]
ExcludeFromSelect=*

[SourceDisksNames]
1 = %DISK_NAME%,,,\i386
2 = %DISK_NAME%,,,\amd64

[SourceDisksFiles.x86]
WdfCoInstaller01009.dll = 1
sprdvcom.sys            = 1

[SourceDisksFiles.amd64]
WdfCoInstaller01009.dll = 2
sprdvcom.sys            = 2

[DestinationDirs]
DefaultDestDir          = 12
CoInstaller_CopyFiles   = 11

[Manufacturer]
%SPRD% = SPRD,NTx86,NTAMD64

[SPRD]
%SPRD.AT%     = Serial_Inst, USB\VID_1782&PID_3D13

%USBCOMM_DL%  = Serial_Inst, USB\VID_1782&PID_4D00

%USBCOMM_DL%  = Serial_Inst, USB\VID_1782&PID_4D02        ; For RDA

;Debug USB Log (at、diag、log、wcn log)
%SPRD.AT%     = Serial_Inst, USB\VID_2E04&PID_0019&MI_00
%SPRD.DIAG%   = Serial_Inst, USB\VID_2E04&PID_0019&MI_01
%SPRD.LOG%    = Serial_Inst, USB\VID_2E04&PID_0019&MI_02
%SPRD.CM4LOG% = Serial_Inst, USB\VID_2E04&PID_0019&MI_03

;Debug PC connecting (at、diag、log、wcn log、rndis)
%SPRD.AT%     = Serial_Inst, USB\VID_2E04&PID_0020&MI_02
%SPRD.DIAG%   = Serial_Inst, USB\VID_2E04&PID_0020&MI_03
%SPRD.LOG%    = Serial_Inst, USB\VID_2E04&PID_0020&MI_04
%SPRD.CM4LOG% = Serial_Inst, USB\VID_2E04&PID_0020&MI_05

;Rel PC connecting (at、diag、rndis)
%SPRD.AT%     = Serial_Inst, USB\VID_2E04&PID_0021&MI_02
%SPRD.DIAG%   = Serial_Inst, USB\VID_2E04&PID_0021&MI_03

;Cali_mode(第一次枚举一个口)
%USBCOMM_DL%  = Serial_Inst, USB\VID_2E04&PID_0045


;Cali_mode(第二次枚举两个口)
%SPRD.DIAG%   = Serial_Inst, USB\VID_2E04&PID_0046&MI_00
%SPRD.LOG%    = Serial_Inst, USB\VID_2E04&PID_0046&MI_01


; For XP and later
[SPRD.NTx86]
%SPRD.AT%     = Serial_Inst, USB\VID_1782&PID_3D13

%USBCOMM_DL%  = Serial_Inst, USB\VID_1782&PID_4D00

%USBCOMM_DL%  = Serial_Inst, USB\VID_1782&PID_4D02        ; For RDA

;Debug USB Log (at、diag、log、wcn log)
%SPRD.AT%     = Serial_Inst, USB\VID_2E04&PID_0019&MI_00
%SPRD.DIAG%   = Serial_Inst, USB\VID_2E04&PID_0019&MI_01
%SPRD.LOG%    = Serial_Inst, USB\VID_2E04&PID_0019&MI_02
%SPRD.CM4LOG% = Serial_Inst, USB\VID_2E04&PID_0019&MI_03

;Debug PC connecting (at、diag、log、wcn log、rndis)
%SPRD.AT%     = Serial_Inst, USB\VID_2E04&PID_0020&MI_02
%SPRD.DIAG%   = Serial_Inst, USB\VID_2E04&PID_0020&MI_03
%SPRD.LOG%    = Serial_Inst, USB\VID_2E04&PID_0020&MI_04
%SPRD.CM4LOG% = Serial_Inst, USB\VID_2E04&PID_0020&MI_05

;Rel PC connecting (at、diag、rndis)
%SPRD.AT%     = Serial_Inst, USB\VID_2E04&PID_0021&MI_02
%SPRD.DIAG%   = Serial_Inst, USB\VID_2E04&PID_0021&MI_03

;Cali_mode(第一次枚举一个口)
%USBCOMM_DL%  = Serial_Inst, USB\VID_2E04&PID_0045

;Cali_mode(第二次枚举两个口)
%SPRD.DIAG%   = Serial_Inst, USB\VID_2E04&PID_0046&MI_00
%SPRD.LOG%    = Serial_Inst, USB\VID_2E04&PID_0046&MI_01



[SPRD.NTAMD64]
%SPRD.AT%     = Serial_Inst, USB\VID_1782&PID_3D13

%USBCOMM_DL%  = Serial_Inst, USB\VID_1782&PID_4D00

%USBCOMM_DL%  = Serial_Inst, USB\VID_1782&PID_4D02        ; For RDA

;Debug USB Log (at、diag、log、wcn log)
%SPRD.AT%     = Serial_Inst, USB\VID_2E04&PID_0019&MI_00
%SPRD.DIAG%   = Serial_Inst, USB\VID_2E04&PID_0019&MI_01
%SPRD.LOG%    = Serial_Inst, USB\VID_2E04&PID_0019&MI_02
%SPRD.CM4LOG% = Serial_Inst, USB\VID_2E04&PID_0019&MI_03

;Debug PC connecting (at、diag、log、wcn log、rndis)
%SPRD.AT%     = Serial_Inst, USB\VID_2E04&PID_0020&MI_02
%SPRD.DIAG%   = Serial_Inst, USB\VID_2E04&PID_0020&MI_03
%SPRD.LOG%    = Serial_Inst, USB\VID_2E04&PID_0020&MI_04
%SPRD.CM4LOG% = Serial_Inst, USB\VID_2E04&PID_0020&MI_05

;Rel PC connecting (at、diag、rndis)
%SPRD.AT%     = Serial_Inst, USB\VID_2E04&PID_0021&MI_02
%SPRD.DIAG%   = Serial_Inst, USB\VID_2E04&PID_0021&MI_03

;Cali_mode(第一次枚举一个口)
%USBCOMM_DL%  = Serial_Inst, USB\VID_2E04&PID_0045

;Cali_mode(第二次枚举两个口)
%SPRD.DIAG%   = Serial_Inst, USB\VID_2E04&PID_0046&MI_00
%SPRD.LOG%    = Serial_Inst, USB\VID_2E04&PID_0046&MI_01


[Serial_Inst]
CopyFiles = Serial.CopyFiles
AddReg    = Serial_Inst.AddReg

[Serial_Inst.AddReg]
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"

[Serial_Inst.HW]
AddReg = Models_HW_AddReg

[Serial.CopyFiles]
sprdvcom.sys

[Serial_Inst.Services]
AddService = sprdvcom,0x00000002,Serial_Service 

[Serial_Service]
ServiceType    = 1                  ; SERVICE_KERNEL_DRIVER
StartType      = 3                  ; SERVICE_DEMAND_START
ErrorControl   = 1                  ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\sprdvcom.sys
AddReg         = Serial_Parameters_AddReg

[Models_HW_AddReg]
HKR,,DeviceCharacteristics,0x10001,0x0100         ; Use same security checks on relative opens
HKR,,Security,,"D:P(A;;GA;;;BA)(A;;GA;;;WD)"      ; Allow generic-all access to Built-in administrators and Local system 
HKR,,"VendorRequestTimeoutValue", %REG_DWORD%,5
HKR,,"SprdVendorRequest",%REG_DWORD%,1            ; If SprdVendorRequest is 1, CdcControlLineState will be ignored
HKR,,"CdcControlLineState",%REG_DWORD%,0          ; Only if SprdVendorRequest is 0, this configure will be worked
HKR,,"UseContinuousRead",%REG_DWORD%,0
HKR,,"RxFifoSize",%REG_DWORD%,128                 ; KByte
HKR,,"BulkInBufSize",%REG_DWORD%,4                ; KByte
HKR,,"UsbEnableZLP",%REG_DWORD%,1

[Serial_Parameters_AddReg]

;-------------- WDF Coinstaller installation

[Serial_Inst.CoInstallers]
AddReg    = CoInstaller_AddReg
CopyFiles = CoInstaller_CopyFiles

[CoInstaller_CopyFiles]
WdfCoInstaller01009.dll

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

[Serial_Inst.Wdf]
KmdfService = sprdvcom, Serial_wdfsect

[Serial_wdfsect]
KmdfLibraryVersion = 1.9

[Strings]
SPRD            = "UNISOC Communications Inc."
USBCOMM_DL      = "SPRD U2S Diag"
SPRD.AT         = "SPRD AT"
SPRD.DIAG       = "SPRD DIAG"
SPRD.LOG        = "SPRD LOG"
SPRD.IQ         = "SPRD IQ"
SPRD.CPLOG      = "SPRD CP LOG"
SPRD.AT2        = "SPRD Common AT"
SPRD.CM4LOG     = "SPRD WCN LOG"
COMDIAG         = "SPRD DIAG(SENSOR HUB)"
SPRDLOG         = "SPRD LOG(AGDSP)"
LTEAT           = "SPRD LTE AT(WIQ)"
LTEDIAG         = "SPRD LTE DIAG"
LTELOG          = "SPRD LTE LOG"
TD.AT           = "SPRD TD AT"
TD.DIAG         = "SPRD TD DIAG"
W.AT            = "SPRD WCDMA AT"
W.DIAG          = "SPRD WCDMA DIAG"
WCN.AT          = "SPRD WCN AT"
WCN.DIAG        = "SPRD WCN DIAG(LOG)"
DISK_NAME       = "UNISOC USB to Serial Install Disk"
REG_EXPAND_SZ   = 0x00020000 
REG_DWORD       = 0x00010001 
