gotgctl

         OTG Control and Status Register
      
Module Instance Base Address Register Address
i_usbotg_0_globgrp 0xFFB00000 0xFFB00000
i_usbotg_1_globgrp 0xFFB40000 0xFFB40000

Offset: 0x0

Access: RW

Important: The value of a reserved bit must be maintained in software. When you modify registers containing reserved bit fields, you must use a read-modify-write operation to preserve state and prevent indeterminate system behavior.
Bit Fields
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16

Reserved

curmod

RO 0x0

otgver

RW 0x0

bsesvld

RO 0x0

asesvld

RO 0x0

dbnctime

RO 0x0

conidsts

RO 0x1

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Reserved

ehen

RW 0x0

Reserved

devhnpen

RW 0x0

hstsethnpen

RW 0x0

hnpreq

RW 0x0

hstnegscs

RO 0x0

bvalidovval

RW 0x0

bvalidoven

RW 0x0

avalidovval

RW 0x0

avalidoven

RW 0x0

vbvalidovval

RW 0x0

vbvalidoven

RW 0x0

sesreq

RW 0x0

sesreqscs

RO 0x0

gotgctl Fields

Bit Name Description Access Reset
21 curmod
Mode: Host and Device
Current Mode of Operation (CurMod)
Indicates the current mode.
 1'b0: Device mode
 1'b1: Host mode
RO 0x0
20 otgver
OTG Version (OTGVer)
Indicates the OTG revision.
 1'b0: OTG Version 1.3. In this version the core supports Data line
       pulsing and VBus pulsing for SRP.
 1'b1: OTG Version 2.0. In this version the core supports only Data
       line pulsing for SRP.
Value Description
0x0 VER13
0x1 VER20
RW 0x0
19 bsesvld
Mode: Device only
B-Session Valid (BSesVld)
Indicates the Device mode transceiver status.
 1'b0: B-session is not valid.
 1'b1: B-session is valid.
In OTG mode, you can use this bit to determine IF the device is
connected or disconnected.
Note: If you do not enabled OTG features (such as SRP and HNP), the
read reset value will be 1.The vbus assigns the values internally for non-
SRP or non-HNP configurations.
Value Description
0x0 NOTVALID
0x1 VALID
RO 0x0
18 asesvld
Mode: Host only
A-Session Valid (ASesVld)
Indicates the Host mode transceiver status.
 1'b0: A-session is not valid
 1'b1: A-session is valid
Note: If you do not enabled OTG features (such as SRP and HNP), the
read reset value will be 1.The vbus assigns the values internally for non-
SRP or non-HNP configurations.
Value Description
0x0 VALID
0x1 NOTVALID
RO 0x0
17 dbnctime
Mode: Host only
Long/Short Debounce Time (DbncTime)
Indicates the debounce time of a detected connection.
 1'b0: Long debounce time, used FOR physical connections
(100 ms + 2.5 micro-sec)
 1'b1: Short debounce time, used FOR soft connections (2.5 micro-sec)
Value Description
0x0 LONG
0x1 SHORT
RO 0x0
16 conidsts
Mode: Host and Device
Connector ID Status (ConIDSts)
Indicates the connector ID status on a connect event.
 1'b0: The DWC_otg core is in A-Device mode
 1'b1: The DWC_otg core is in B-Device mode
Value Description
0x0 MODEA
0x1 MODEB
RO 0x1
14 ehen
Mode: SRP Capable Host
Embedded Host Enable (EHEn)
1’b1 : Enable Embedded Host Mode.
1’b0: Disable Embedded Host Mode.
RW 0x0
11 devhnpen
Mode: Device only
Device HNP Enabled (DevHNPEn)
The application sets this bit when it successfully receives a
SetFeature.SetHNPEnable command from the connected USB
host.
 1'b0: HNP is not enabled in the application
 1'b1: HNP is enabled in the application
Value Description
0x0 DISABLED
0x1 ENABLED
RW 0x0
10 hstsethnpen
Mode: Host only
Host Set HNP Enable (HstSetHNPEn)
The application sets this bit when it has successfully enabled
HNP (using the SetFeature.SetHNPEnable command) on the
connected device.
 1'b0: Host Set HNP is not enabled
 1'b1: Host Set HNP is enabled
Value Description
0x0 DISABLED
0x1 ENABLED
RW 0x0
9 hnpreq
Mode: Device only
HNP Request (HNPReq)
The application sets this bit to initiate an HNP request to the
connected USB host. The application can clear this bit by writing
a 0 when the Host Negotiation Success Status Change bit in the
OTG Interrupt register (GOTGINT.HstNegSucStsChng) is SET.
The core clears this bit when the HstNegSucStsChng bit is
cleared.
 1'b0: No HNP request
 1'b1: HNP request
Value Description
0x0 DISABLED
0x1 ENABLED
RW 0x0
8 hstnegscs
Mode: Device only
Host Negotiation Success (HstNegScs)
The core sets this bit when host negotiation is successful. The
core clears this bit when the HNP Request (HNPReq) bit in this
register is SET.
 1'b0: Host negotiation failure
 1'b1: Host negotiation success
Value Description
0x0 FAIL
0x1 SUCCESS
RO 0x0
7 bvalidovval
B-Peripheral Session Valid OverrideValue (BvalidOvVal)
This bit is used to set Override value for Bvalid 
signal when GOTGCTL.BvalidOvEn is set.
1'b0 : Bvalid value is 1'b0 when GOTGCTL.BvalidOvEn =1
1'b1 : Bvalid value is 1'b1 when GOTGCTL.BvalidOvEn =1
Value Description
0x0 VALUE0
0x1 VALUE1
RW 0x0
6 bvalidoven
B-Peripheral Session Valid Override Enable (BvalidOvEn)
This bit is used to enable/disable the software to 
override the Bvalid signal using the GOTGCTL.BvalidOvVal.
1'b1 : Internally Bvalid received from the PHY is overridden with GOTGCTL.BvalidOvVal.
1'b0 : Override is disabled and bvalid signal from the respective PHY selected is used
internally by the force
Value Description
0x0 DISABLED
0x1 ENABLED
RW 0x0
5 avalidovval
A-Peripheral Session Valid OverrideValue (AvalidOvVal)
This bit is used to set Override value for Avalid signal
when GOTGCTL.AvalidOvEn is set.
1'b0 : Avalid value is 1'b0 when GOTGCTL.AvalidOvEn =1
1'b1 : Avalid value is 1'b1 when GOTGCTL.AvalidOvEn =1
Value Description
0x0 VALUE0
0x1 VALUE1
RW 0x0
4 avalidoven
A-Peripheral Session Valid Override Enable (AvalidOvEn)
This bit is used to enable/disable the software to  
override the Avalid signal using the GOTGCTL.AvalidOvVal.
1'b1 : Internally Avalid received from the PHY is overridden with GOTGCTL.AvalidOvVal.
1'b0 : Override is disabled and avalid signal from the respective PHY selected is used
internally by the core
Value Description
0x0 DISABLED
0x1 ENABLED
RW 0x0
3 vbvalidovval
VBUS Valid OverrideValue (VbvalidOvVal)
This bit is used to set Override value for vbusvalid
signal when GOTGCTL.VbvalidOvEn is set.
1'b0 : vbusvalid value is 1'b0 when GOTGCTL.VbvalidOvEn =1
1'b1 : vbusvalid value is 1'b1 when GOTGCTL.VbvalidOvEn =1
Value Description
0x0 SET0
0x1 SET1
RW 0x0
2 vbvalidoven
VBUS Valid Override Enable (VbvalidOvEn)  
This bit is used to enable/disable the software to
override the Bvalid signal using the GOTGCTL.VbvalidOvVal.
1'b1 : Internally Bvalid received from the PHY is overridden with GOTGCTL.VbvalidOvVal.
1'b0 : Override is disabled and bvalid signal from the respective PHY selected is used
internally by the core
Value Description
0x0 DISABLED
0x1 ENABLED
RW 0x0
1 sesreq
Mode: Device only
Session Request (SesReq)
The application sets this bit to initiate a session request on the
USB. The application can clear this bit by writing a 0 when the
Host Negotiation Success Status Change bit in the OTG
Interrupt register (GOTGINT.HstNegSucStsChng) is SET. The
core clears this bit when the HstNegSucStsChng bit is cleared.
If you use the USB 1.1 Full-Speed Serial Transceiver interface to
initiate the session request, the application must wait until the
VBUS discharges to 0.2 V, after the B-Session Valid bit in this
register (GOTGCTL.BSesVld) is cleared. This discharge time
varies between different PHYs and can be obtained from the
PHY vendor.
 1'b0: No session request
 1'b1: Session request
Value Description
0x0 NOREQUEST
0x1 REQUEST
RW 0x0
0 sesreqscs
Mode: Device only
Session Request Success (SesReqScs)
The core sets this bit when a session request initiation is
successful.
 1'b0: Session request failure
 1'b1: Session request success
Value Description
0x0 FAIL
0x1 SUCCESS
RO 0x0