;***************************************************************************************
;
; Name      : unisoc_iot.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   = 10/11/2019,2.0.0.133
CatalogFile = unisoc_iot.cat

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

[ControlFlags]
ExcludeFromSelect=*

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

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

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

[DestinationDirs]
DefaultDestDir          = 12
CoInstaller_CopyFiles   = 11

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

; For Win2K
[SPRD]
%unisoc.common.Name0% = Serial_Inst, USB\VID_1782&PID_4D10&MI_00
%unisoc.common.Name1% = Serial_Inst, USB\VID_1782&PID_4D10&MI_01
%unisoc.common.Name2% = Serial_Inst, USB\VID_1782&PID_4D10&MI_02
%unisoc.common.Name3% = Serial_Inst, USB\VID_1782&PID_4D10&MI_03
%unisoc.common.Name4% = Serial_Inst, USB\VID_1782&PID_4D10&MI_04
%unisoc.common.Name5% = Serial_Inst, USB\VID_1782&PID_4D10&MI_05
%unisoc.common.Name6% = Serial_Inst, USB\VID_1782&PID_4D10&MI_06
%unisoc.common.Name7% = Serial_Inst, USB\VID_1782&PID_4D10&MI_07

%unisoc.common.Name0% = Serial_Inst, USB\VID_1782&PID_4D11&MI_02
%unisoc.common.Name1% = Serial_Inst, USB\VID_1782&PID_4D11&MI_03
%unisoc.common.Name2% = Serial_Inst, USB\VID_1782&PID_4D11&MI_04
%unisoc.common.Name3% = Serial_Inst, USB\VID_1782&PID_4D11&MI_05
%unisoc.common.Name4% = Serial_Inst, USB\VID_1782&PID_4D11&MI_06
%unisoc.common.Name5% = Serial_Inst, USB\VID_1782&PID_4D11&MI_07
%unisoc.common.Name6% = Serial_Inst, USB\VID_1782&PID_4D11&MI_08
%unisoc.common.Name7% = Serial_Inst, USB\VID_1782&PID_4D11&MI_09

;;NWY ADD
;2020.01.17 for N58
%neoway.29497401.MI2% = Serial_Inst, USB\VID_2949&PID_7401&MI_02
%neoway.29497401.MI3% = Serial_Inst, USB\VID_2949&PID_7401&MI_03
%neoway.29497401.MI4% = Serial_Inst, USB\VID_2949&PID_7401&MI_04
%neoway.29497401.MI5% = Serial_Inst, USB\VID_2949&PID_7401&MI_05
%neoway.29497401.MI6% = Serial_Inst, USB\VID_2949&PID_7401&MI_06
%neoway.29497401.MI7% = Serial_Inst, USB\VID_2949&PID_7401&MI_07
%neoway.29497401.MI8% = Serial_Inst, USB\VID_2949&PID_7401&MI_08

%neoway.29497402.MI2% = Serial_Inst, USB\VID_2949&PID_7402&MI_02
%neoway.29497402.MI3% = Serial_Inst, USB\VID_2949&PID_7402&MI_03
%neoway.29497402.MI4% = Serial_Inst, USB\VID_2949&PID_7402&MI_04
%neoway.29497402.MI5% = Serial_Inst, USB\VID_2949&PID_7402&MI_05
%neoway.29497402.MI6% = Serial_Inst, USB\VID_2949&PID_7402&MI_06
%neoway.29497402.MI7% = Serial_Inst, USB\VID_2949&PID_7402&MI_07
%neoway.29497402.MI8% = Serial_Inst, USB\VID_2949&PID_7402&MI_08

; For XP and later
[SPRD.NTx86]
%unisoc.common.Name0% = Serial_Inst, USB\VID_1782&PID_4D10&MI_00
%unisoc.common.Name1% = Serial_Inst, USB\VID_1782&PID_4D10&MI_01
%unisoc.common.Name2% = Serial_Inst, USB\VID_1782&PID_4D10&MI_02
%unisoc.common.Name3% = Serial_Inst, USB\VID_1782&PID_4D10&MI_03
%unisoc.common.Name4% = Serial_Inst, USB\VID_1782&PID_4D10&MI_04
%unisoc.common.Name5% = Serial_Inst, USB\VID_1782&PID_4D10&MI_05
%unisoc.common.Name6% = Serial_Inst, USB\VID_1782&PID_4D10&MI_06
%unisoc.common.Name7% = Serial_Inst, USB\VID_1782&PID_4D10&MI_07

%unisoc.common.Name0% = Serial_Inst, USB\VID_1782&PID_4D11&MI_02
%unisoc.common.Name1% = Serial_Inst, USB\VID_1782&PID_4D11&MI_03
%unisoc.common.Name2% = Serial_Inst, USB\VID_1782&PID_4D11&MI_04
%unisoc.common.Name3% = Serial_Inst, USB\VID_1782&PID_4D11&MI_05
%unisoc.common.Name4% = Serial_Inst, USB\VID_1782&PID_4D11&MI_06
%unisoc.common.Name5% = Serial_Inst, USB\VID_1782&PID_4D11&MI_07
%unisoc.common.Name6% = Serial_Inst, USB\VID_1782&PID_4D11&MI_08
%unisoc.common.Name7% = Serial_Inst, USB\VID_1782&PID_4D11&MI_09

;;NWY ADD
;2020.01.17 for N58
%neoway.29497401.MI2% = Serial_Inst, USB\VID_2949&PID_7401&MI_02
%neoway.29497401.MI3% = Serial_Inst, USB\VID_2949&PID_7401&MI_03
%neoway.29497401.MI4% = Serial_Inst, USB\VID_2949&PID_7401&MI_04
%neoway.29497401.MI5% = Serial_Inst, USB\VID_2949&PID_7401&MI_05
%neoway.29497401.MI6% = Serial_Inst, USB\VID_2949&PID_7401&MI_06
%neoway.29497401.MI7% = Serial_Inst, USB\VID_2949&PID_7401&MI_07
%neoway.29497401.MI8% = Serial_Inst, USB\VID_2949&PID_7401&MI_08

%neoway.29497402.MI2% = Serial_Inst, USB\VID_2949&PID_7402&MI_02
%neoway.29497402.MI3% = Serial_Inst, USB\VID_2949&PID_7402&MI_03
%neoway.29497402.MI4% = Serial_Inst, USB\VID_2949&PID_7402&MI_04
%neoway.29497402.MI5% = Serial_Inst, USB\VID_2949&PID_7402&MI_05
%neoway.29497402.MI6% = Serial_Inst, USB\VID_2949&PID_7402&MI_06
%neoway.29497402.MI7% = Serial_Inst, USB\VID_2949&PID_7402&MI_07
%neoway.29497402.MI8% = Serial_Inst, USB\VID_2949&PID_7402&MI_08

[SPRD.NTAMD64]
%unisoc.common.Name0% = Serial_Inst, USB\VID_1782&PID_4D10&MI_00
%unisoc.common.Name1% = Serial_Inst, USB\VID_1782&PID_4D10&MI_01
%unisoc.common.Name2% = Serial_Inst, USB\VID_1782&PID_4D10&MI_02
%unisoc.common.Name3% = Serial_Inst, USB\VID_1782&PID_4D10&MI_03
%unisoc.common.Name4% = Serial_Inst, USB\VID_1782&PID_4D10&MI_04
%unisoc.common.Name5% = Serial_Inst, USB\VID_1782&PID_4D10&MI_05
%unisoc.common.Name6% = Serial_Inst, USB\VID_1782&PID_4D10&MI_06
%unisoc.common.Name7% = Serial_Inst, USB\VID_1782&PID_4D10&MI_07

%unisoc.common.Name0% = Serial_Inst, USB\VID_1782&PID_4D11&MI_02
%unisoc.common.Name1% = Serial_Inst, USB\VID_1782&PID_4D11&MI_03
%unisoc.common.Name2% = Serial_Inst, USB\VID_1782&PID_4D11&MI_04
%unisoc.common.Name3% = Serial_Inst, USB\VID_1782&PID_4D11&MI_05
%unisoc.common.Name4% = Serial_Inst, USB\VID_1782&PID_4D11&MI_06
%unisoc.common.Name5% = Serial_Inst, USB\VID_1782&PID_4D11&MI_07
%unisoc.common.Name6% = Serial_Inst, USB\VID_1782&PID_4D11&MI_08
%unisoc.common.Name7% = Serial_Inst, USB\VID_1782&PID_4D11&MI_09

;;NWY ADD
;2020.01.17 for N58
%neoway.29497401.MI2% = Serial_Inst, USB\VID_2949&PID_7401&MI_02
%neoway.29497401.MI3% = Serial_Inst, USB\VID_2949&PID_7401&MI_03
%neoway.29497401.MI4% = Serial_Inst, USB\VID_2949&PID_7401&MI_04
%neoway.29497401.MI5% = Serial_Inst, USB\VID_2949&PID_7401&MI_05
%neoway.29497401.MI6% = Serial_Inst, USB\VID_2949&PID_7401&MI_06
%neoway.29497401.MI7% = Serial_Inst, USB\VID_2949&PID_7401&MI_07
%neoway.29497401.MI8% = Serial_Inst, USB\VID_2949&PID_7401&MI_08

%neoway.29497402.MI2% = Serial_Inst, USB\VID_2949&PID_7402&MI_02
%neoway.29497402.MI3% = Serial_Inst, USB\VID_2949&PID_7402&MI_03
%neoway.29497402.MI4% = Serial_Inst, USB\VID_2949&PID_7402&MI_04
%neoway.29497402.MI5% = Serial_Inst, USB\VID_2949&PID_7402&MI_05
%neoway.29497402.MI6% = Serial_Inst, USB\VID_2949&PID_7402&MI_06
%neoway.29497402.MI7% = Serial_Inst, USB\VID_2949&PID_7402&MI_07
%neoway.29497402.MI8% = Serial_Inst, USB\VID_2949&PID_7402&MI_08

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

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

[Serial_Inst.NT.HW]
AddReg = Models_HW_AddReg

[Serial.CopyFiles]
sprdvcomIOT.sys

[Serial_Inst.NT.Services]
AddService = sprdvcomIOT,0x00000002,Serial_Service 

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

[Models_HW_AddReg]
HKR,,"VendorRequestTimeoutValue", %REG_DWORD%, 5
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,,"SpreadtrumVendorRequest",%REG_DWORD%,0
HKR,,"CdcControlLineState",%REG_DWORD%,1
HKR,,"UseContinuousRead",%REG_DWORD%,0
HKR,,"RxFifoSize",%REG_DWORD%,10240
HKR,,"UsbEnableZLP",%REG_DWORD%,1

[Serial_Parameters_AddReg]

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

[Serial_Inst.NT.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles

[CoInstaller_CopyFiles]
WdfCoInstaller01009.dll

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

[Serial_Inst.NT.Wdf]
KmdfService = sprdvcomIOT, Serial_wdfsect

[Serial_wdfsect]
KmdfLibraryVersion = 1.9

[Strings]
SPRD                = "UNISOC Communications Inc."
DISK_NAME           = "UNISOC USB to Serial Install Disk"
unisoc.common.Name0 = "Unisoc Usb Serial Port 0"
unisoc.common.Name1 = "Unisoc Usb Serial Port 1"
unisoc.common.Name2 = "Unisoc Usb Serial Port 2"
unisoc.common.Name3 = "Unisoc Usb Serial Port 3"
unisoc.common.Name4 = "Unisoc Usb Serial Port 4"
unisoc.common.Name5 = "Unisoc Usb Serial Port 5"
unisoc.common.Name6 = "Unisoc Usb Serial Port 6"
unisoc.common.Name7 = "Unisoc Usb Serial Port 7"

;;NWY ADD
;2020.01.17 for N58
;RNDIS's
neoway.29497401.MI2 = "Neoway USB Modem"
neoway.29497401.MI3 = "Neoway USB NMEA"
neoway.29497401.MI4 = "Neoway USB AT"
neoway.29497401.MI5 = "Neoway USB DIAG"
neoway.29497401.MI6 = "Neoway USB AP_TRACE"
neoway.29497401.MI7 = "Neoway USB CP_TRACE"
neoway.29497401.MI8 = "Neoway USB OPEN_CON"
;ECM's
neoway.29497402.MI2 = "Neoway USB Modem"
neoway.29497402.MI3 = "Neoway USB NMEA"
neoway.29497402.MI4 = "Neoway USB AT"
neoway.29497402.MI5 = "Neoway USB DIAG"
neoway.29497402.MI6 = "Neoway USB AP_TRACE"
neoway.29497402.MI7 = "Neoway USB CP_TRACE"
neoway.29497402.MI8 = "Neoway USB OPEN_CON"

REG_EXPAND_SZ       = 0x00020000
REG_DWORD           = 0x00010001