162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Octeon HCD hardware register definitions. 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 662306a36Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 762306a36Sopenharmony_ci * for more details. 862306a36Sopenharmony_ci * 962306a36Sopenharmony_ci * Some parts of the code were originally released under BSD license: 1062306a36Sopenharmony_ci * 1162306a36Sopenharmony_ci * Copyright (c) 2003-2010 Cavium Networks (support@cavium.com). All rights 1262306a36Sopenharmony_ci * reserved. 1362306a36Sopenharmony_ci * 1462306a36Sopenharmony_ci * Redistribution and use in source and binary forms, with or without 1562306a36Sopenharmony_ci * modification, are permitted provided that the following conditions are 1662306a36Sopenharmony_ci * met: 1762306a36Sopenharmony_ci * 1862306a36Sopenharmony_ci * * Redistributions of source code must retain the above copyright 1962306a36Sopenharmony_ci * notice, this list of conditions and the following disclaimer. 2062306a36Sopenharmony_ci * 2162306a36Sopenharmony_ci * * Redistributions in binary form must reproduce the above 2262306a36Sopenharmony_ci * copyright notice, this list of conditions and the following 2362306a36Sopenharmony_ci * disclaimer in the documentation and/or other materials provided 2462306a36Sopenharmony_ci * with the distribution. 2562306a36Sopenharmony_ci * 2662306a36Sopenharmony_ci * * Neither the name of Cavium Networks nor the names of 2762306a36Sopenharmony_ci * its contributors may be used to endorse or promote products 2862306a36Sopenharmony_ci * derived from this software without specific prior written 2962306a36Sopenharmony_ci * permission. 3062306a36Sopenharmony_ci * 3162306a36Sopenharmony_ci * This Software, including technical data, may be subject to U.S. export 3262306a36Sopenharmony_ci * control laws, including the U.S. Export Administration Act and its associated 3362306a36Sopenharmony_ci * regulations, and may be subject to export or import regulations in other 3462306a36Sopenharmony_ci * countries. 3562306a36Sopenharmony_ci * 3662306a36Sopenharmony_ci * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" 3762306a36Sopenharmony_ci * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR 3862306a36Sopenharmony_ci * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO 3962306a36Sopenharmony_ci * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION 4062306a36Sopenharmony_ci * OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM 4162306a36Sopenharmony_ci * SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF TITLE, 4262306a36Sopenharmony_ci * MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF 4362306a36Sopenharmony_ci * VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR 4462306a36Sopenharmony_ci * CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT OF USE OR 4562306a36Sopenharmony_ci * PERFORMANCE OF THE SOFTWARE LIES WITH YOU. 4662306a36Sopenharmony_ci */ 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci#ifndef __OCTEON_HCD_H__ 4962306a36Sopenharmony_ci#define __OCTEON_HCD_H__ 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci#include <asm/bitfield.h> 5262306a36Sopenharmony_ci 5362306a36Sopenharmony_ci#define CVMX_USBCXBASE 0x00016F0010000000ull 5462306a36Sopenharmony_ci#define CVMX_USBCXREG1(reg, bid) \ 5562306a36Sopenharmony_ci (CVMX_ADD_IO_SEG(CVMX_USBCXBASE | reg) + \ 5662306a36Sopenharmony_ci ((bid) & 1) * 0x100000000000ull) 5762306a36Sopenharmony_ci#define CVMX_USBCXREG2(reg, bid, off) \ 5862306a36Sopenharmony_ci (CVMX_ADD_IO_SEG(CVMX_USBCXBASE | reg) + \ 5962306a36Sopenharmony_ci (((off) & 7) + ((bid) & 1) * 0x8000000000ull) * 32) 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_ci#define CVMX_USBCX_GAHBCFG(bid) CVMX_USBCXREG1(0x008, bid) 6262306a36Sopenharmony_ci#define CVMX_USBCX_GHWCFG3(bid) CVMX_USBCXREG1(0x04c, bid) 6362306a36Sopenharmony_ci#define CVMX_USBCX_GINTMSK(bid) CVMX_USBCXREG1(0x018, bid) 6462306a36Sopenharmony_ci#define CVMX_USBCX_GINTSTS(bid) CVMX_USBCXREG1(0x014, bid) 6562306a36Sopenharmony_ci#define CVMX_USBCX_GNPTXFSIZ(bid) CVMX_USBCXREG1(0x028, bid) 6662306a36Sopenharmony_ci#define CVMX_USBCX_GNPTXSTS(bid) CVMX_USBCXREG1(0x02c, bid) 6762306a36Sopenharmony_ci#define CVMX_USBCX_GOTGCTL(bid) CVMX_USBCXREG1(0x000, bid) 6862306a36Sopenharmony_ci#define CVMX_USBCX_GRSTCTL(bid) CVMX_USBCXREG1(0x010, bid) 6962306a36Sopenharmony_ci#define CVMX_USBCX_GRXFSIZ(bid) CVMX_USBCXREG1(0x024, bid) 7062306a36Sopenharmony_ci#define CVMX_USBCX_GRXSTSPH(bid) CVMX_USBCXREG1(0x020, bid) 7162306a36Sopenharmony_ci#define CVMX_USBCX_GUSBCFG(bid) CVMX_USBCXREG1(0x00c, bid) 7262306a36Sopenharmony_ci#define CVMX_USBCX_HAINT(bid) CVMX_USBCXREG1(0x414, bid) 7362306a36Sopenharmony_ci#define CVMX_USBCX_HAINTMSK(bid) CVMX_USBCXREG1(0x418, bid) 7462306a36Sopenharmony_ci#define CVMX_USBCX_HCCHARX(off, bid) CVMX_USBCXREG2(0x500, bid, off) 7562306a36Sopenharmony_ci#define CVMX_USBCX_HCFG(bid) CVMX_USBCXREG1(0x400, bid) 7662306a36Sopenharmony_ci#define CVMX_USBCX_HCINTMSKX(off, bid) CVMX_USBCXREG2(0x50c, bid, off) 7762306a36Sopenharmony_ci#define CVMX_USBCX_HCINTX(off, bid) CVMX_USBCXREG2(0x508, bid, off) 7862306a36Sopenharmony_ci#define CVMX_USBCX_HCSPLTX(off, bid) CVMX_USBCXREG2(0x504, bid, off) 7962306a36Sopenharmony_ci#define CVMX_USBCX_HCTSIZX(off, bid) CVMX_USBCXREG2(0x510, bid, off) 8062306a36Sopenharmony_ci#define CVMX_USBCX_HFIR(bid) CVMX_USBCXREG1(0x404, bid) 8162306a36Sopenharmony_ci#define CVMX_USBCX_HFNUM(bid) CVMX_USBCXREG1(0x408, bid) 8262306a36Sopenharmony_ci#define CVMX_USBCX_HPRT(bid) CVMX_USBCXREG1(0x440, bid) 8362306a36Sopenharmony_ci#define CVMX_USBCX_HPTXFSIZ(bid) CVMX_USBCXREG1(0x100, bid) 8462306a36Sopenharmony_ci#define CVMX_USBCX_HPTXSTS(bid) CVMX_USBCXREG1(0x410, bid) 8562306a36Sopenharmony_ci 8662306a36Sopenharmony_ci#define CVMX_USBNXBID1(bid) (((bid) & 1) * 0x10000000ull) 8762306a36Sopenharmony_ci#define CVMX_USBNXBID2(bid) (((bid) & 1) * 0x100000000000ull) 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_ci#define CVMX_USBNXREG1(reg, bid) \ 9062306a36Sopenharmony_ci (CVMX_ADD_IO_SEG(0x0001180068000000ull | reg) + CVMX_USBNXBID1(bid)) 9162306a36Sopenharmony_ci#define CVMX_USBNXREG2(reg, bid) \ 9262306a36Sopenharmony_ci (CVMX_ADD_IO_SEG(0x00016F0000000000ull | reg) + CVMX_USBNXBID2(bid)) 9362306a36Sopenharmony_ci 9462306a36Sopenharmony_ci#define CVMX_USBNX_CLK_CTL(bid) CVMX_USBNXREG1(0x10, bid) 9562306a36Sopenharmony_ci#define CVMX_USBNX_DMA0_INB_CHN0(bid) CVMX_USBNXREG2(0x818, bid) 9662306a36Sopenharmony_ci#define CVMX_USBNX_DMA0_OUTB_CHN0(bid) CVMX_USBNXREG2(0x858, bid) 9762306a36Sopenharmony_ci#define CVMX_USBNX_USBP_CTL_STATUS(bid) CVMX_USBNXREG1(0x18, bid) 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_ci/** 10062306a36Sopenharmony_ci * cvmx_usbc#_gahbcfg 10162306a36Sopenharmony_ci * 10262306a36Sopenharmony_ci * Core AHB Configuration Register (GAHBCFG) 10362306a36Sopenharmony_ci * 10462306a36Sopenharmony_ci * This register can be used to configure the core after power-on or a change in 10562306a36Sopenharmony_ci * mode of operation. This register mainly contains AHB system-related 10662306a36Sopenharmony_ci * configuration parameters. The AHB is the processor interface to the O2P USB 10762306a36Sopenharmony_ci * core. In general, software need not know about this interface except to 10862306a36Sopenharmony_ci * program the values as specified. 10962306a36Sopenharmony_ci * 11062306a36Sopenharmony_ci * The application must program this register as part of the O2P USB core 11162306a36Sopenharmony_ci * initialization. Do not change this register after the initial programming. 11262306a36Sopenharmony_ci */ 11362306a36Sopenharmony_ciunion cvmx_usbcx_gahbcfg { 11462306a36Sopenharmony_ci u32 u32; 11562306a36Sopenharmony_ci /** 11662306a36Sopenharmony_ci * struct cvmx_usbcx_gahbcfg_s 11762306a36Sopenharmony_ci * @ptxfemplvl: Periodic TxFIFO Empty Level (PTxFEmpLvl) 11862306a36Sopenharmony_ci * Software should set this bit to 0x1. 11962306a36Sopenharmony_ci * Indicates when the Periodic TxFIFO Empty Interrupt bit in the 12062306a36Sopenharmony_ci * Core Interrupt register (GINTSTS.PTxFEmp) is triggered. This 12162306a36Sopenharmony_ci * bit is used only in Slave mode. 12262306a36Sopenharmony_ci * * 1'b0: GINTSTS.PTxFEmp interrupt indicates that the Periodic 12362306a36Sopenharmony_ci * TxFIFO is half empty 12462306a36Sopenharmony_ci * * 1'b1: GINTSTS.PTxFEmp interrupt indicates that the Periodic 12562306a36Sopenharmony_ci * TxFIFO is completely empty 12662306a36Sopenharmony_ci * @nptxfemplvl: Non-Periodic TxFIFO Empty Level (NPTxFEmpLvl) 12762306a36Sopenharmony_ci * Software should set this bit to 0x1. 12862306a36Sopenharmony_ci * Indicates when the Non-Periodic TxFIFO Empty Interrupt bit in 12962306a36Sopenharmony_ci * the Core Interrupt register (GINTSTS.NPTxFEmp) is triggered. 13062306a36Sopenharmony_ci * This bit is used only in Slave mode. 13162306a36Sopenharmony_ci * * 1'b0: GINTSTS.NPTxFEmp interrupt indicates that the Non- 13262306a36Sopenharmony_ci * Periodic TxFIFO is half empty 13362306a36Sopenharmony_ci * * 1'b1: GINTSTS.NPTxFEmp interrupt indicates that the Non- 13462306a36Sopenharmony_ci * Periodic TxFIFO is completely empty 13562306a36Sopenharmony_ci * @dmaen: DMA Enable (DMAEn) 13662306a36Sopenharmony_ci * * 1'b0: Core operates in Slave mode 13762306a36Sopenharmony_ci * * 1'b1: Core operates in a DMA mode 13862306a36Sopenharmony_ci * @hbstlen: Burst Length/Type (HBstLen) 13962306a36Sopenharmony_ci * This field has not effect and should be left as 0x0. 14062306a36Sopenharmony_ci * @glblintrmsk: Global Interrupt Mask (GlblIntrMsk) 14162306a36Sopenharmony_ci * Software should set this field to 0x1. 14262306a36Sopenharmony_ci * The application uses this bit to mask or unmask the interrupt 14362306a36Sopenharmony_ci * line assertion to itself. Irrespective of this bit's setting, 14462306a36Sopenharmony_ci * the interrupt status registers are updated by the core. 14562306a36Sopenharmony_ci * * 1'b0: Mask the interrupt assertion to the application. 14662306a36Sopenharmony_ci * * 1'b1: Unmask the interrupt assertion to the application. 14762306a36Sopenharmony_ci */ 14862306a36Sopenharmony_ci struct cvmx_usbcx_gahbcfg_s { 14962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_9_31 : 23, 15062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ptxfemplvl : 1, 15162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 nptxfemplvl : 1, 15262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_6_6 : 1, 15362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 dmaen : 1, 15462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 hbstlen : 4, 15562306a36Sopenharmony_ci __BITFIELD_FIELD(u32 glblintrmsk : 1, 15662306a36Sopenharmony_ci ;))))))) 15762306a36Sopenharmony_ci } s; 15862306a36Sopenharmony_ci}; 15962306a36Sopenharmony_ci 16062306a36Sopenharmony_ci/** 16162306a36Sopenharmony_ci * cvmx_usbc#_ghwcfg3 16262306a36Sopenharmony_ci * 16362306a36Sopenharmony_ci * User HW Config3 Register (GHWCFG3) 16462306a36Sopenharmony_ci * 16562306a36Sopenharmony_ci * This register contains the configuration options of the O2P USB core. 16662306a36Sopenharmony_ci */ 16762306a36Sopenharmony_ciunion cvmx_usbcx_ghwcfg3 { 16862306a36Sopenharmony_ci u32 u32; 16962306a36Sopenharmony_ci /** 17062306a36Sopenharmony_ci * struct cvmx_usbcx_ghwcfg3_s 17162306a36Sopenharmony_ci * @dfifodepth: DFIFO Depth (DfifoDepth) 17262306a36Sopenharmony_ci * This value is in terms of 32-bit words. 17362306a36Sopenharmony_ci * * Minimum value is 32 17462306a36Sopenharmony_ci * * Maximum value is 32768 17562306a36Sopenharmony_ci * @ahbphysync: AHB and PHY Synchronous (AhbPhySync) 17662306a36Sopenharmony_ci * Indicates whether AHB and PHY clocks are synchronous to 17762306a36Sopenharmony_ci * each other. 17862306a36Sopenharmony_ci * * 1'b0: No 17962306a36Sopenharmony_ci * * 1'b1: Yes 18062306a36Sopenharmony_ci * This bit is tied to 1. 18162306a36Sopenharmony_ci * @rsttype: Reset Style for Clocked always Blocks in RTL (RstType) 18262306a36Sopenharmony_ci * * 1'b0: Asynchronous reset is used in the core 18362306a36Sopenharmony_ci * * 1'b1: Synchronous reset is used in the core 18462306a36Sopenharmony_ci * @optfeature: Optional Features Removed (OptFeature) 18562306a36Sopenharmony_ci * Indicates whether the User ID register, GPIO interface ports, 18662306a36Sopenharmony_ci * and SOF toggle and counter ports were removed for gate count 18762306a36Sopenharmony_ci * optimization. 18862306a36Sopenharmony_ci * @vendor_control_interface_support: Vendor Control Interface Support 18962306a36Sopenharmony_ci * * 1'b0: Vendor Control Interface is not available on the core. 19062306a36Sopenharmony_ci * * 1'b1: Vendor Control Interface is available. 19162306a36Sopenharmony_ci * @i2c_selection: I2C Selection 19262306a36Sopenharmony_ci * * 1'b0: I2C Interface is not available on the core. 19362306a36Sopenharmony_ci * * 1'b1: I2C Interface is available on the core. 19462306a36Sopenharmony_ci * @otgen: OTG Function Enabled (OtgEn) 19562306a36Sopenharmony_ci * The application uses this bit to indicate the O2P USB core's 19662306a36Sopenharmony_ci * OTG capabilities. 19762306a36Sopenharmony_ci * * 1'b0: Not OTG capable 19862306a36Sopenharmony_ci * * 1'b1: OTG Capable 19962306a36Sopenharmony_ci * @pktsizewidth: Width of Packet Size Counters (PktSizeWidth) 20062306a36Sopenharmony_ci * * 3'b000: 4 bits 20162306a36Sopenharmony_ci * * 3'b001: 5 bits 20262306a36Sopenharmony_ci * * 3'b010: 6 bits 20362306a36Sopenharmony_ci * * 3'b011: 7 bits 20462306a36Sopenharmony_ci * * 3'b100: 8 bits 20562306a36Sopenharmony_ci * * 3'b101: 9 bits 20662306a36Sopenharmony_ci * * 3'b110: 10 bits 20762306a36Sopenharmony_ci * * Others: Reserved 20862306a36Sopenharmony_ci * @xfersizewidth: Width of Transfer Size Counters (XferSizeWidth) 20962306a36Sopenharmony_ci * * 4'b0000: 11 bits 21062306a36Sopenharmony_ci * * 4'b0001: 12 bits 21162306a36Sopenharmony_ci * - ... 21262306a36Sopenharmony_ci * * 4'b1000: 19 bits 21362306a36Sopenharmony_ci * * Others: Reserved 21462306a36Sopenharmony_ci */ 21562306a36Sopenharmony_ci struct cvmx_usbcx_ghwcfg3_s { 21662306a36Sopenharmony_ci __BITFIELD_FIELD(u32 dfifodepth : 16, 21762306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_13_15 : 3, 21862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ahbphysync : 1, 21962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 rsttype : 1, 22062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 optfeature : 1, 22162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 vendor_control_interface_support : 1, 22262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 i2c_selection : 1, 22362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 otgen : 1, 22462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 pktsizewidth : 3, 22562306a36Sopenharmony_ci __BITFIELD_FIELD(u32 xfersizewidth : 4, 22662306a36Sopenharmony_ci ;)))))))))) 22762306a36Sopenharmony_ci } s; 22862306a36Sopenharmony_ci}; 22962306a36Sopenharmony_ci 23062306a36Sopenharmony_ci/** 23162306a36Sopenharmony_ci * cvmx_usbc#_gintmsk 23262306a36Sopenharmony_ci * 23362306a36Sopenharmony_ci * Core Interrupt Mask Register (GINTMSK) 23462306a36Sopenharmony_ci * 23562306a36Sopenharmony_ci * This register works with the Core Interrupt register to interrupt the 23662306a36Sopenharmony_ci * application. When an interrupt bit is masked, the interrupt associated with 23762306a36Sopenharmony_ci * that bit will not be generated. However, the Core Interrupt (GINTSTS) 23862306a36Sopenharmony_ci * register bit corresponding to that interrupt will still be set. 23962306a36Sopenharmony_ci * Mask interrupt: 1'b0, Unmask interrupt: 1'b1 24062306a36Sopenharmony_ci */ 24162306a36Sopenharmony_ciunion cvmx_usbcx_gintmsk { 24262306a36Sopenharmony_ci u32 u32; 24362306a36Sopenharmony_ci /** 24462306a36Sopenharmony_ci * struct cvmx_usbcx_gintmsk_s 24562306a36Sopenharmony_ci * @wkupintmsk: Resume/Remote Wakeup Detected Interrupt Mask 24662306a36Sopenharmony_ci * (WkUpIntMsk) 24762306a36Sopenharmony_ci * @sessreqintmsk: Session Request/New Session Detected Interrupt Mask 24862306a36Sopenharmony_ci * (SessReqIntMsk) 24962306a36Sopenharmony_ci * @disconnintmsk: Disconnect Detected Interrupt Mask (DisconnIntMsk) 25062306a36Sopenharmony_ci * @conidstschngmsk: Connector ID Status Change Mask (ConIDStsChngMsk) 25162306a36Sopenharmony_ci * @ptxfempmsk: Periodic TxFIFO Empty Mask (PTxFEmpMsk) 25262306a36Sopenharmony_ci * @hchintmsk: Host Channels Interrupt Mask (HChIntMsk) 25362306a36Sopenharmony_ci * @prtintmsk: Host Port Interrupt Mask (PrtIntMsk) 25462306a36Sopenharmony_ci * @fetsuspmsk: Data Fetch Suspended Mask (FetSuspMsk) 25562306a36Sopenharmony_ci * @incomplpmsk: Incomplete Periodic Transfer Mask (incomplPMsk) 25662306a36Sopenharmony_ci * Incomplete Isochronous OUT Transfer Mask 25762306a36Sopenharmony_ci * (incompISOOUTMsk) 25862306a36Sopenharmony_ci * @incompisoinmsk: Incomplete Isochronous IN Transfer Mask 25962306a36Sopenharmony_ci * (incompISOINMsk) 26062306a36Sopenharmony_ci * @oepintmsk: OUT Endpoints Interrupt Mask (OEPIntMsk) 26162306a36Sopenharmony_ci * @inepintmsk: IN Endpoints Interrupt Mask (INEPIntMsk) 26262306a36Sopenharmony_ci * @epmismsk: Endpoint Mismatch Interrupt Mask (EPMisMsk) 26362306a36Sopenharmony_ci * @eopfmsk: End of Periodic Frame Interrupt Mask (EOPFMsk) 26462306a36Sopenharmony_ci * @isooutdropmsk: Isochronous OUT Packet Dropped Interrupt Mask 26562306a36Sopenharmony_ci * (ISOOutDropMsk) 26662306a36Sopenharmony_ci * @enumdonemsk: Enumeration Done Mask (EnumDoneMsk) 26762306a36Sopenharmony_ci * @usbrstmsk: USB Reset Mask (USBRstMsk) 26862306a36Sopenharmony_ci * @usbsuspmsk: USB Suspend Mask (USBSuspMsk) 26962306a36Sopenharmony_ci * @erlysuspmsk: Early Suspend Mask (ErlySuspMsk) 27062306a36Sopenharmony_ci * @i2cint: I2C Interrupt Mask (I2CINT) 27162306a36Sopenharmony_ci * @ulpickintmsk: ULPI Carkit Interrupt Mask (ULPICKINTMsk) 27262306a36Sopenharmony_ci * I2C Carkit Interrupt Mask (I2CCKINTMsk) 27362306a36Sopenharmony_ci * @goutnakeffmsk: Global OUT NAK Effective Mask (GOUTNakEffMsk) 27462306a36Sopenharmony_ci * @ginnakeffmsk: Global Non-Periodic IN NAK Effective Mask 27562306a36Sopenharmony_ci * (GINNakEffMsk) 27662306a36Sopenharmony_ci * @nptxfempmsk: Non-Periodic TxFIFO Empty Mask (NPTxFEmpMsk) 27762306a36Sopenharmony_ci * @rxflvlmsk: Receive FIFO Non-Empty Mask (RxFLvlMsk) 27862306a36Sopenharmony_ci * @sofmsk: Start of (micro)Frame Mask (SofMsk) 27962306a36Sopenharmony_ci * @otgintmsk: OTG Interrupt Mask (OTGIntMsk) 28062306a36Sopenharmony_ci * @modemismsk: Mode Mismatch Interrupt Mask (ModeMisMsk) 28162306a36Sopenharmony_ci */ 28262306a36Sopenharmony_ci struct cvmx_usbcx_gintmsk_s { 28362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 wkupintmsk : 1, 28462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 sessreqintmsk : 1, 28562306a36Sopenharmony_ci __BITFIELD_FIELD(u32 disconnintmsk : 1, 28662306a36Sopenharmony_ci __BITFIELD_FIELD(u32 conidstschngmsk : 1, 28762306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_27_27 : 1, 28862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ptxfempmsk : 1, 28962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 hchintmsk : 1, 29062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 prtintmsk : 1, 29162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_23_23 : 1, 29262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 fetsuspmsk : 1, 29362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 incomplpmsk : 1, 29462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 incompisoinmsk : 1, 29562306a36Sopenharmony_ci __BITFIELD_FIELD(u32 oepintmsk : 1, 29662306a36Sopenharmony_ci __BITFIELD_FIELD(u32 inepintmsk : 1, 29762306a36Sopenharmony_ci __BITFIELD_FIELD(u32 epmismsk : 1, 29862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_16_16 : 1, 29962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 eopfmsk : 1, 30062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 isooutdropmsk : 1, 30162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 enumdonemsk : 1, 30262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 usbrstmsk : 1, 30362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 usbsuspmsk : 1, 30462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 erlysuspmsk : 1, 30562306a36Sopenharmony_ci __BITFIELD_FIELD(u32 i2cint : 1, 30662306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ulpickintmsk : 1, 30762306a36Sopenharmony_ci __BITFIELD_FIELD(u32 goutnakeffmsk : 1, 30862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ginnakeffmsk : 1, 30962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 nptxfempmsk : 1, 31062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 rxflvlmsk : 1, 31162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 sofmsk : 1, 31262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 otgintmsk : 1, 31362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 modemismsk : 1, 31462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_0_0 : 1, 31562306a36Sopenharmony_ci ;)))))))))))))))))))))))))))))))) 31662306a36Sopenharmony_ci } s; 31762306a36Sopenharmony_ci}; 31862306a36Sopenharmony_ci 31962306a36Sopenharmony_ci/** 32062306a36Sopenharmony_ci * cvmx_usbc#_gintsts 32162306a36Sopenharmony_ci * 32262306a36Sopenharmony_ci * Core Interrupt Register (GINTSTS) 32362306a36Sopenharmony_ci * 32462306a36Sopenharmony_ci * This register interrupts the application for system-level events in the 32562306a36Sopenharmony_ci * current mode of operation (Device mode or Host mode). It is shown in 32662306a36Sopenharmony_ci * Interrupt. Some of the bits in this register are valid only in Host mode, 32762306a36Sopenharmony_ci * while others are valid in Device mode only. This register also indicates the 32862306a36Sopenharmony_ci * current mode of operation. In order to clear the interrupt status bits of 32962306a36Sopenharmony_ci * type R_SS_WC, the application must write 1'b1 into the bit. The FIFO status 33062306a36Sopenharmony_ci * interrupts are read only; once software reads from or writes to the FIFO 33162306a36Sopenharmony_ci * while servicing these interrupts, FIFO interrupt conditions are cleared 33262306a36Sopenharmony_ci * automatically. 33362306a36Sopenharmony_ci */ 33462306a36Sopenharmony_ciunion cvmx_usbcx_gintsts { 33562306a36Sopenharmony_ci u32 u32; 33662306a36Sopenharmony_ci /** 33762306a36Sopenharmony_ci * struct cvmx_usbcx_gintsts_s 33862306a36Sopenharmony_ci * @wkupint: Resume/Remote Wakeup Detected Interrupt (WkUpInt) 33962306a36Sopenharmony_ci * In Device mode, this interrupt is asserted when a resume is 34062306a36Sopenharmony_ci * detected on the USB. In Host mode, this interrupt is asserted 34162306a36Sopenharmony_ci * when a remote wakeup is detected on the USB. 34262306a36Sopenharmony_ci * For more information on how to use this interrupt, see "Partial 34362306a36Sopenharmony_ci * Power-Down and Clock Gating Programming Model" on 34462306a36Sopenharmony_ci * page 353. 34562306a36Sopenharmony_ci * @sessreqint: Session Request/New Session Detected Interrupt 34662306a36Sopenharmony_ci * (SessReqInt) 34762306a36Sopenharmony_ci * In Host mode, this interrupt is asserted when a session request 34862306a36Sopenharmony_ci * is detected from the device. In Device mode, this interrupt is 34962306a36Sopenharmony_ci * asserted when the utmiotg_bvalid signal goes high. 35062306a36Sopenharmony_ci * For more information on how to use this interrupt, see "Partial 35162306a36Sopenharmony_ci * Power-Down and Clock Gating Programming Model" on 35262306a36Sopenharmony_ci * page 353. 35362306a36Sopenharmony_ci * @disconnint: Disconnect Detected Interrupt (DisconnInt) 35462306a36Sopenharmony_ci * Asserted when a device disconnect is detected. 35562306a36Sopenharmony_ci * @conidstschng: Connector ID Status Change (ConIDStsChng) 35662306a36Sopenharmony_ci * The core sets this bit when there is a change in connector ID 35762306a36Sopenharmony_ci * status. 35862306a36Sopenharmony_ci * @ptxfemp: Periodic TxFIFO Empty (PTxFEmp) 35962306a36Sopenharmony_ci * Asserted when the Periodic Transmit FIFO is either half or 36062306a36Sopenharmony_ci * completely empty and there is space for at least one entry to be 36162306a36Sopenharmony_ci * written in the Periodic Request Queue. The half or completely 36262306a36Sopenharmony_ci * empty status is determined by the Periodic TxFIFO Empty Level 36362306a36Sopenharmony_ci * bit in the Core AHB Configuration register 36462306a36Sopenharmony_ci * (GAHBCFG.PTxFEmpLvl). 36562306a36Sopenharmony_ci * @hchint: Host Channels Interrupt (HChInt) 36662306a36Sopenharmony_ci * The core sets this bit to indicate that an interrupt is pending 36762306a36Sopenharmony_ci * on one of the channels of the core (in Host mode). The 36862306a36Sopenharmony_ci * application must read the Host All Channels Interrupt (HAINT) 36962306a36Sopenharmony_ci * register to determine the exact number of the channel on which 37062306a36Sopenharmony_ci * the interrupt occurred, and then read the corresponding Host 37162306a36Sopenharmony_ci * Channel-n Interrupt (HCINTn) register to determine the exact 37262306a36Sopenharmony_ci * cause of the interrupt. The application must clear the 37362306a36Sopenharmony_ci * appropriate status bit in the HCINTn register to clear this bit. 37462306a36Sopenharmony_ci * @prtint: Host Port Interrupt (PrtInt) 37562306a36Sopenharmony_ci * The core sets this bit to indicate a change in port status of 37662306a36Sopenharmony_ci * one of the O2P USB core ports in Host mode. The application must 37762306a36Sopenharmony_ci * read the Host Port Control and Status (HPRT) register to 37862306a36Sopenharmony_ci * determine the exact event that caused this interrupt. The 37962306a36Sopenharmony_ci * application must clear the appropriate status bit in the Host 38062306a36Sopenharmony_ci * Port Control and Status register to clear this bit. 38162306a36Sopenharmony_ci * @fetsusp: Data Fetch Suspended (FetSusp) 38262306a36Sopenharmony_ci * This interrupt is valid only in DMA mode. This interrupt 38362306a36Sopenharmony_ci * indicates that the core has stopped fetching data for IN 38462306a36Sopenharmony_ci * endpoints due to the unavailability of TxFIFO space or Request 38562306a36Sopenharmony_ci * Queue space. This interrupt is used by the application for an 38662306a36Sopenharmony_ci * endpoint mismatch algorithm. 38762306a36Sopenharmony_ci * @incomplp: Incomplete Periodic Transfer (incomplP) 38862306a36Sopenharmony_ci * In Host mode, the core sets this interrupt bit when there are 38962306a36Sopenharmony_ci * incomplete periodic transactions still pending which are 39062306a36Sopenharmony_ci * scheduled for the current microframe. 39162306a36Sopenharmony_ci * Incomplete Isochronous OUT Transfer (incompISOOUT) 39262306a36Sopenharmony_ci * The Device mode, the core sets this interrupt to indicate that 39362306a36Sopenharmony_ci * there is at least one isochronous OUT endpoint on which the 39462306a36Sopenharmony_ci * transfer is not completed in the current microframe. This 39562306a36Sopenharmony_ci * interrupt is asserted along with the End of Periodic Frame 39662306a36Sopenharmony_ci * Interrupt (EOPF) bit in this register. 39762306a36Sopenharmony_ci * @incompisoin: Incomplete Isochronous IN Transfer (incompISOIN) 39862306a36Sopenharmony_ci * The core sets this interrupt to indicate that there is at least 39962306a36Sopenharmony_ci * one isochronous IN endpoint on which the transfer is not 40062306a36Sopenharmony_ci * completed in the current microframe. This interrupt is asserted 40162306a36Sopenharmony_ci * along with the End of Periodic Frame Interrupt (EOPF) bit in 40262306a36Sopenharmony_ci * this register. 40362306a36Sopenharmony_ci * @oepint: OUT Endpoints Interrupt (OEPInt) 40462306a36Sopenharmony_ci * The core sets this bit to indicate that an interrupt is pending 40562306a36Sopenharmony_ci * on one of the OUT endpoints of the core (in Device mode). The 40662306a36Sopenharmony_ci * application must read the Device All Endpoints Interrupt 40762306a36Sopenharmony_ci * (DAINT) register to determine the exact number of the OUT 40862306a36Sopenharmony_ci * endpoint on which the interrupt occurred, and then read the 40962306a36Sopenharmony_ci * corresponding Device OUT Endpoint-n Interrupt (DOEPINTn) 41062306a36Sopenharmony_ci * register to determine the exact cause of the interrupt. The 41162306a36Sopenharmony_ci * application must clear the appropriate status bit in the 41262306a36Sopenharmony_ci * corresponding DOEPINTn register to clear this bit. 41362306a36Sopenharmony_ci * @iepint: IN Endpoints Interrupt (IEPInt) 41462306a36Sopenharmony_ci * The core sets this bit to indicate that an interrupt is pending 41562306a36Sopenharmony_ci * on one of the IN endpoints of the core (in Device mode). The 41662306a36Sopenharmony_ci * application must read the Device All Endpoints Interrupt 41762306a36Sopenharmony_ci * (DAINT) register to determine the exact number of the IN 41862306a36Sopenharmony_ci * endpoint on which the interrupt occurred, and then read the 41962306a36Sopenharmony_ci * corresponding Device IN Endpoint-n Interrupt (DIEPINTn) 42062306a36Sopenharmony_ci * register to determine the exact cause of the interrupt. The 42162306a36Sopenharmony_ci * application must clear the appropriate status bit in the 42262306a36Sopenharmony_ci * corresponding DIEPINTn register to clear this bit. 42362306a36Sopenharmony_ci * @epmis: Endpoint Mismatch Interrupt (EPMis) 42462306a36Sopenharmony_ci * Indicates that an IN token has been received for a non-periodic 42562306a36Sopenharmony_ci * endpoint, but the data for another endpoint is present in the 42662306a36Sopenharmony_ci * top of the Non-Periodic Transmit FIFO and the IN endpoint 42762306a36Sopenharmony_ci * mismatch count programmed by the application has expired. 42862306a36Sopenharmony_ci * @eopf: End of Periodic Frame Interrupt (EOPF) 42962306a36Sopenharmony_ci * Indicates that the period specified in the Periodic Frame 43062306a36Sopenharmony_ci * Interval field of the Device Configuration register 43162306a36Sopenharmony_ci * (DCFG.PerFrInt) has been reached in the current microframe. 43262306a36Sopenharmony_ci * @isooutdrop: Isochronous OUT Packet Dropped Interrupt (ISOOutDrop) 43362306a36Sopenharmony_ci * The core sets this bit when it fails to write an isochronous OUT 43462306a36Sopenharmony_ci * packet into the RxFIFO because the RxFIFO doesn't have 43562306a36Sopenharmony_ci * enough space to accommodate a maximum packet size packet 43662306a36Sopenharmony_ci * for the isochronous OUT endpoint. 43762306a36Sopenharmony_ci * @enumdone: Enumeration Done (EnumDone) 43862306a36Sopenharmony_ci * The core sets this bit to indicate that speed enumeration is 43962306a36Sopenharmony_ci * complete. The application must read the Device Status (DSTS) 44062306a36Sopenharmony_ci * register to obtain the enumerated speed. 44162306a36Sopenharmony_ci * @usbrst: USB Reset (USBRst) 44262306a36Sopenharmony_ci * The core sets this bit to indicate that a reset is detected on 44362306a36Sopenharmony_ci * the USB. 44462306a36Sopenharmony_ci * @usbsusp: USB Suspend (USBSusp) 44562306a36Sopenharmony_ci * The core sets this bit to indicate that a suspend was detected 44662306a36Sopenharmony_ci * on the USB. The core enters the Suspended state when there 44762306a36Sopenharmony_ci * is no activity on the phy_line_state_i signal for an extended 44862306a36Sopenharmony_ci * period of time. 44962306a36Sopenharmony_ci * @erlysusp: Early Suspend (ErlySusp) 45062306a36Sopenharmony_ci * The core sets this bit to indicate that an Idle state has been 45162306a36Sopenharmony_ci * detected on the USB for 3 ms. 45262306a36Sopenharmony_ci * @i2cint: I2C Interrupt (I2CINT) 45362306a36Sopenharmony_ci * This bit is always 0x0. 45462306a36Sopenharmony_ci * @ulpickint: ULPI Carkit Interrupt (ULPICKINT) 45562306a36Sopenharmony_ci * This bit is always 0x0. 45662306a36Sopenharmony_ci * @goutnakeff: Global OUT NAK Effective (GOUTNakEff) 45762306a36Sopenharmony_ci * Indicates that the Set Global OUT NAK bit in the Device Control 45862306a36Sopenharmony_ci * register (DCTL.SGOUTNak), set by the application, has taken 45962306a36Sopenharmony_ci * effect in the core. This bit can be cleared by writing the Clear 46062306a36Sopenharmony_ci * Global OUT NAK bit in the Device Control register 46162306a36Sopenharmony_ci * (DCTL.CGOUTNak). 46262306a36Sopenharmony_ci * @ginnakeff: Global IN Non-Periodic NAK Effective (GINNakEff) 46362306a36Sopenharmony_ci * Indicates that the Set Global Non-Periodic IN NAK bit in the 46462306a36Sopenharmony_ci * Device Control register (DCTL.SGNPInNak), set by the 46562306a36Sopenharmony_ci * application, has taken effect in the core. That is, the core has 46662306a36Sopenharmony_ci * sampled the Global IN NAK bit set by the application. This bit 46762306a36Sopenharmony_ci * can be cleared by clearing the Clear Global Non-Periodic IN 46862306a36Sopenharmony_ci * NAK bit in the Device Control register (DCTL.CGNPInNak). 46962306a36Sopenharmony_ci * This interrupt does not necessarily mean that a NAK handshake 47062306a36Sopenharmony_ci * is sent out on the USB. The STALL bit takes precedence over 47162306a36Sopenharmony_ci * the NAK bit. 47262306a36Sopenharmony_ci * @nptxfemp: Non-Periodic TxFIFO Empty (NPTxFEmp) 47362306a36Sopenharmony_ci * This interrupt is asserted when the Non-Periodic TxFIFO is 47462306a36Sopenharmony_ci * either half or completely empty, and there is space for at least 47562306a36Sopenharmony_ci * one entry to be written to the Non-Periodic Transmit Request 47662306a36Sopenharmony_ci * Queue. The half or completely empty status is determined by 47762306a36Sopenharmony_ci * the Non-Periodic TxFIFO Empty Level bit in the Core AHB 47862306a36Sopenharmony_ci * Configuration register (GAHBCFG.NPTxFEmpLvl). 47962306a36Sopenharmony_ci * @rxflvl: RxFIFO Non-Empty (RxFLvl) 48062306a36Sopenharmony_ci * Indicates that there is at least one packet pending to be read 48162306a36Sopenharmony_ci * from the RxFIFO. 48262306a36Sopenharmony_ci * @sof: Start of (micro)Frame (Sof) 48362306a36Sopenharmony_ci * In Host mode, the core sets this bit to indicate that an SOF 48462306a36Sopenharmony_ci * (FS), micro-SOF (HS), or Keep-Alive (LS) is transmitted on the 48562306a36Sopenharmony_ci * USB. The application must write a 1 to this bit to clear the 48662306a36Sopenharmony_ci * interrupt. 48762306a36Sopenharmony_ci * In Device mode, in the core sets this bit to indicate that an 48862306a36Sopenharmony_ci * SOF token has been received on the USB. The application can read 48962306a36Sopenharmony_ci * the Device Status register to get the current (micro)frame 49062306a36Sopenharmony_ci * number. This interrupt is seen only when the core is operating 49162306a36Sopenharmony_ci * at either HS or FS. 49262306a36Sopenharmony_ci * @otgint: OTG Interrupt (OTGInt) 49362306a36Sopenharmony_ci * The core sets this bit to indicate an OTG protocol event. The 49462306a36Sopenharmony_ci * application must read the OTG Interrupt Status (GOTGINT) 49562306a36Sopenharmony_ci * register to determine the exact event that caused this 49662306a36Sopenharmony_ci * interrupt. The application must clear the appropriate status bit 49762306a36Sopenharmony_ci * in the GOTGINT register to clear this bit. 49862306a36Sopenharmony_ci * @modemis: Mode Mismatch Interrupt (ModeMis) 49962306a36Sopenharmony_ci * The core sets this bit when the application is trying to access: 50062306a36Sopenharmony_ci * * A Host mode register, when the core is operating in Device 50162306a36Sopenharmony_ci * mode 50262306a36Sopenharmony_ci * * A Device mode register, when the core is operating in Host 50362306a36Sopenharmony_ci * mode 50462306a36Sopenharmony_ci * The register access is completed on the AHB with an OKAY 50562306a36Sopenharmony_ci * response, but is ignored by the core internally and doesn't 50662306a36Sopenharmony_ci * affect the operation of the core. 50762306a36Sopenharmony_ci * @curmod: Current Mode of Operation (CurMod) 50862306a36Sopenharmony_ci * Indicates the current mode of operation. 50962306a36Sopenharmony_ci * * 1'b0: Device mode 51062306a36Sopenharmony_ci * * 1'b1: Host mode 51162306a36Sopenharmony_ci */ 51262306a36Sopenharmony_ci struct cvmx_usbcx_gintsts_s { 51362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 wkupint : 1, 51462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 sessreqint : 1, 51562306a36Sopenharmony_ci __BITFIELD_FIELD(u32 disconnint : 1, 51662306a36Sopenharmony_ci __BITFIELD_FIELD(u32 conidstschng : 1, 51762306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_27_27 : 1, 51862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ptxfemp : 1, 51962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 hchint : 1, 52062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 prtint : 1, 52162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_23_23 : 1, 52262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 fetsusp : 1, 52362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 incomplp : 1, 52462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 incompisoin : 1, 52562306a36Sopenharmony_ci __BITFIELD_FIELD(u32 oepint : 1, 52662306a36Sopenharmony_ci __BITFIELD_FIELD(u32 iepint : 1, 52762306a36Sopenharmony_ci __BITFIELD_FIELD(u32 epmis : 1, 52862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_16_16 : 1, 52962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 eopf : 1, 53062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 isooutdrop : 1, 53162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 enumdone : 1, 53262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 usbrst : 1, 53362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 usbsusp : 1, 53462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 erlysusp : 1, 53562306a36Sopenharmony_ci __BITFIELD_FIELD(u32 i2cint : 1, 53662306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ulpickint : 1, 53762306a36Sopenharmony_ci __BITFIELD_FIELD(u32 goutnakeff : 1, 53862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ginnakeff : 1, 53962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 nptxfemp : 1, 54062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 rxflvl : 1, 54162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 sof : 1, 54262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 otgint : 1, 54362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 modemis : 1, 54462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 curmod : 1, 54562306a36Sopenharmony_ci ;)))))))))))))))))))))))))))))))) 54662306a36Sopenharmony_ci } s; 54762306a36Sopenharmony_ci}; 54862306a36Sopenharmony_ci 54962306a36Sopenharmony_ci/** 55062306a36Sopenharmony_ci * cvmx_usbc#_gnptxfsiz 55162306a36Sopenharmony_ci * 55262306a36Sopenharmony_ci * Non-Periodic Transmit FIFO Size Register (GNPTXFSIZ) 55362306a36Sopenharmony_ci * 55462306a36Sopenharmony_ci * The application can program the RAM size and the memory start address for the 55562306a36Sopenharmony_ci * Non-Periodic TxFIFO. 55662306a36Sopenharmony_ci */ 55762306a36Sopenharmony_ciunion cvmx_usbcx_gnptxfsiz { 55862306a36Sopenharmony_ci u32 u32; 55962306a36Sopenharmony_ci /** 56062306a36Sopenharmony_ci * struct cvmx_usbcx_gnptxfsiz_s 56162306a36Sopenharmony_ci * @nptxfdep: Non-Periodic TxFIFO Depth (NPTxFDep) 56262306a36Sopenharmony_ci * This value is in terms of 32-bit words. 56362306a36Sopenharmony_ci * Minimum value is 16 56462306a36Sopenharmony_ci * Maximum value is 32768 56562306a36Sopenharmony_ci * @nptxfstaddr: Non-Periodic Transmit RAM Start Address (NPTxFStAddr) 56662306a36Sopenharmony_ci * This field contains the memory start address for Non-Periodic 56762306a36Sopenharmony_ci * Transmit FIFO RAM. 56862306a36Sopenharmony_ci */ 56962306a36Sopenharmony_ci struct cvmx_usbcx_gnptxfsiz_s { 57062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 nptxfdep : 16, 57162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 nptxfstaddr : 16, 57262306a36Sopenharmony_ci ;)) 57362306a36Sopenharmony_ci } s; 57462306a36Sopenharmony_ci}; 57562306a36Sopenharmony_ci 57662306a36Sopenharmony_ci/** 57762306a36Sopenharmony_ci * cvmx_usbc#_gnptxsts 57862306a36Sopenharmony_ci * 57962306a36Sopenharmony_ci * Non-Periodic Transmit FIFO/Queue Status Register (GNPTXSTS) 58062306a36Sopenharmony_ci * 58162306a36Sopenharmony_ci * This read-only register contains the free space information for the 58262306a36Sopenharmony_ci * Non-Periodic TxFIFO and the Non-Periodic Transmit Request Queue. 58362306a36Sopenharmony_ci */ 58462306a36Sopenharmony_ciunion cvmx_usbcx_gnptxsts { 58562306a36Sopenharmony_ci u32 u32; 58662306a36Sopenharmony_ci /** 58762306a36Sopenharmony_ci * struct cvmx_usbcx_gnptxsts_s 58862306a36Sopenharmony_ci * @nptxqtop: Top of the Non-Periodic Transmit Request Queue (NPTxQTop) 58962306a36Sopenharmony_ci * Entry in the Non-Periodic Tx Request Queue that is currently 59062306a36Sopenharmony_ci * being processed by the MAC. 59162306a36Sopenharmony_ci * * Bits [30:27]: Channel/endpoint number 59262306a36Sopenharmony_ci * * Bits [26:25]: 59362306a36Sopenharmony_ci * - 2'b00: IN/OUT token 59462306a36Sopenharmony_ci * - 2'b01: Zero-length transmit packet (device IN/host OUT) 59562306a36Sopenharmony_ci * - 2'b10: PING/CSPLIT token 59662306a36Sopenharmony_ci * - 2'b11: Channel halt command 59762306a36Sopenharmony_ci * * Bit [24]: Terminate (last entry for selected channel/endpoint) 59862306a36Sopenharmony_ci * @nptxqspcavail: Non-Periodic Transmit Request Queue Space Available 59962306a36Sopenharmony_ci * (NPTxQSpcAvail) 60062306a36Sopenharmony_ci * Indicates the amount of free space available in the Non- 60162306a36Sopenharmony_ci * Periodic Transmit Request Queue. This queue holds both IN 60262306a36Sopenharmony_ci * and OUT requests in Host mode. Device mode has only IN 60362306a36Sopenharmony_ci * requests. 60462306a36Sopenharmony_ci * * 8'h0: Non-Periodic Transmit Request Queue is full 60562306a36Sopenharmony_ci * * 8'h1: 1 location available 60662306a36Sopenharmony_ci * * 8'h2: 2 locations available 60762306a36Sopenharmony_ci * * n: n locations available (0..8) 60862306a36Sopenharmony_ci * * Others: Reserved 60962306a36Sopenharmony_ci * @nptxfspcavail: Non-Periodic TxFIFO Space Avail (NPTxFSpcAvail) 61062306a36Sopenharmony_ci * Indicates the amount of free space available in the Non- 61162306a36Sopenharmony_ci * Periodic TxFIFO. 61262306a36Sopenharmony_ci * Values are in terms of 32-bit words. 61362306a36Sopenharmony_ci * * 16'h0: Non-Periodic TxFIFO is full 61462306a36Sopenharmony_ci * * 16'h1: 1 word available 61562306a36Sopenharmony_ci * * 16'h2: 2 words available 61662306a36Sopenharmony_ci * * 16'hn: n words available (where 0..32768) 61762306a36Sopenharmony_ci * * 16'h8000: 32768 words available 61862306a36Sopenharmony_ci * * Others: Reserved 61962306a36Sopenharmony_ci */ 62062306a36Sopenharmony_ci struct cvmx_usbcx_gnptxsts_s { 62162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_31_31 : 1, 62262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 nptxqtop : 7, 62362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 nptxqspcavail : 8, 62462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 nptxfspcavail : 16, 62562306a36Sopenharmony_ci ;)))) 62662306a36Sopenharmony_ci } s; 62762306a36Sopenharmony_ci}; 62862306a36Sopenharmony_ci 62962306a36Sopenharmony_ci/** 63062306a36Sopenharmony_ci * cvmx_usbc#_grstctl 63162306a36Sopenharmony_ci * 63262306a36Sopenharmony_ci * Core Reset Register (GRSTCTL) 63362306a36Sopenharmony_ci * 63462306a36Sopenharmony_ci * The application uses this register to reset various hardware features inside 63562306a36Sopenharmony_ci * the core. 63662306a36Sopenharmony_ci */ 63762306a36Sopenharmony_ciunion cvmx_usbcx_grstctl { 63862306a36Sopenharmony_ci u32 u32; 63962306a36Sopenharmony_ci /** 64062306a36Sopenharmony_ci * struct cvmx_usbcx_grstctl_s 64162306a36Sopenharmony_ci * @ahbidle: AHB Master Idle (AHBIdle) 64262306a36Sopenharmony_ci * Indicates that the AHB Master State Machine is in the IDLE 64362306a36Sopenharmony_ci * condition. 64462306a36Sopenharmony_ci * @dmareq: DMA Request Signal (DMAReq) 64562306a36Sopenharmony_ci * Indicates that the DMA request is in progress. Used for debug. 64662306a36Sopenharmony_ci * @txfnum: TxFIFO Number (TxFNum) 64762306a36Sopenharmony_ci * This is the FIFO number that must be flushed using the TxFIFO 64862306a36Sopenharmony_ci * Flush bit. This field must not be changed until the core clears 64962306a36Sopenharmony_ci * the TxFIFO Flush bit. 65062306a36Sopenharmony_ci * * 5'h0: Non-Periodic TxFIFO flush 65162306a36Sopenharmony_ci * * 5'h1: Periodic TxFIFO 1 flush in Device mode or Periodic 65262306a36Sopenharmony_ci * TxFIFO flush in Host mode 65362306a36Sopenharmony_ci * * 5'h2: Periodic TxFIFO 2 flush in Device mode 65462306a36Sopenharmony_ci * - ... 65562306a36Sopenharmony_ci * * 5'hF: Periodic TxFIFO 15 flush in Device mode 65662306a36Sopenharmony_ci * * 5'h10: Flush all the Periodic and Non-Periodic TxFIFOs in the 65762306a36Sopenharmony_ci * core 65862306a36Sopenharmony_ci * @txfflsh: TxFIFO Flush (TxFFlsh) 65962306a36Sopenharmony_ci * This bit selectively flushes a single or all transmit FIFOs, but 66062306a36Sopenharmony_ci * cannot do so if the core is in the midst of a transaction. 66162306a36Sopenharmony_ci * The application must only write this bit after checking that the 66262306a36Sopenharmony_ci * core is neither writing to the TxFIFO nor reading from the 66362306a36Sopenharmony_ci * TxFIFO. 66462306a36Sopenharmony_ci * The application must wait until the core clears this bit before 66562306a36Sopenharmony_ci * performing any operations. This bit takes 8 clocks (of phy_clk 66662306a36Sopenharmony_ci * or hclk, whichever is slower) to clear. 66762306a36Sopenharmony_ci * @rxfflsh: RxFIFO Flush (RxFFlsh) 66862306a36Sopenharmony_ci * The application can flush the entire RxFIFO using this bit, but 66962306a36Sopenharmony_ci * must first ensure that the core is not in the middle of a 67062306a36Sopenharmony_ci * transaction. 67162306a36Sopenharmony_ci * The application must only write to this bit after checking that 67262306a36Sopenharmony_ci * the core is neither reading from the RxFIFO nor writing to the 67362306a36Sopenharmony_ci * RxFIFO. 67462306a36Sopenharmony_ci * The application must wait until the bit is cleared before 67562306a36Sopenharmony_ci * performing any other operations. This bit will take 8 clocks 67662306a36Sopenharmony_ci * (slowest of PHY or AHB clock) to clear. 67762306a36Sopenharmony_ci * @intknqflsh: IN Token Sequence Learning Queue Flush (INTknQFlsh) 67862306a36Sopenharmony_ci * The application writes this bit to flush the IN Token Sequence 67962306a36Sopenharmony_ci * Learning Queue. 68062306a36Sopenharmony_ci * @frmcntrrst: Host Frame Counter Reset (FrmCntrRst) 68162306a36Sopenharmony_ci * The application writes this bit to reset the (micro)frame number 68262306a36Sopenharmony_ci * counter inside the core. When the (micro)frame counter is reset, 68362306a36Sopenharmony_ci * the subsequent SOF sent out by the core will have a 68462306a36Sopenharmony_ci * (micro)frame number of 0. 68562306a36Sopenharmony_ci * @hsftrst: HClk Soft Reset (HSftRst) 68662306a36Sopenharmony_ci * The application uses this bit to flush the control logic in the 68762306a36Sopenharmony_ci * AHB Clock domain. Only AHB Clock Domain pipelines are reset. 68862306a36Sopenharmony_ci * * FIFOs are not flushed with this bit. 68962306a36Sopenharmony_ci * * All state machines in the AHB clock domain are reset to the 69062306a36Sopenharmony_ci * Idle state after terminating the transactions on the AHB, 69162306a36Sopenharmony_ci * following the protocol. 69262306a36Sopenharmony_ci * * CSR control bits used by the AHB clock domain state 69362306a36Sopenharmony_ci * machines are cleared. 69462306a36Sopenharmony_ci * * To clear this interrupt, status mask bits that control the 69562306a36Sopenharmony_ci * interrupt status and are generated by the AHB clock domain 69662306a36Sopenharmony_ci * state machine are cleared. 69762306a36Sopenharmony_ci * * Because interrupt status bits are not cleared, the application 69862306a36Sopenharmony_ci * can get the status of any core events that occurred after it set 69962306a36Sopenharmony_ci * this bit. 70062306a36Sopenharmony_ci * This is a self-clearing bit that the core clears after all 70162306a36Sopenharmony_ci * necessary logic is reset in the core. This may take several 70262306a36Sopenharmony_ci * clocks, depending on the core's current state. 70362306a36Sopenharmony_ci * @csftrst: Core Soft Reset (CSftRst) 70462306a36Sopenharmony_ci * Resets the hclk and phy_clock domains as follows: 70562306a36Sopenharmony_ci * * Clears the interrupts and all the CSR registers except the 70662306a36Sopenharmony_ci * following register bits: 70762306a36Sopenharmony_ci * - PCGCCTL.RstPdwnModule 70862306a36Sopenharmony_ci * - PCGCCTL.GateHclk 70962306a36Sopenharmony_ci * - PCGCCTL.PwrClmp 71062306a36Sopenharmony_ci * - PCGCCTL.StopPPhyLPwrClkSelclk 71162306a36Sopenharmony_ci * - GUSBCFG.PhyLPwrClkSel 71262306a36Sopenharmony_ci * - GUSBCFG.DDRSel 71362306a36Sopenharmony_ci * - GUSBCFG.PHYSel 71462306a36Sopenharmony_ci * - GUSBCFG.FSIntf 71562306a36Sopenharmony_ci * - GUSBCFG.ULPI_UTMI_Sel 71662306a36Sopenharmony_ci * - GUSBCFG.PHYIf 71762306a36Sopenharmony_ci * - HCFG.FSLSPclkSel 71862306a36Sopenharmony_ci * - DCFG.DevSpd 71962306a36Sopenharmony_ci * * All module state machines (except the AHB Slave Unit) are 72062306a36Sopenharmony_ci * reset to the IDLE state, and all the transmit FIFOs and the 72162306a36Sopenharmony_ci * receive FIFO are flushed. 72262306a36Sopenharmony_ci * * Any transactions on the AHB Master are terminated as soon 72362306a36Sopenharmony_ci * as possible, after gracefully completing the last data phase of 72462306a36Sopenharmony_ci * an AHB transfer. Any transactions on the USB are terminated 72562306a36Sopenharmony_ci * immediately. 72662306a36Sopenharmony_ci * The application can write to this bit any time it wants to reset 72762306a36Sopenharmony_ci * the core. This is a self-clearing bit and the core clears this 72862306a36Sopenharmony_ci * bit after all the necessary logic is reset in the core, which 72962306a36Sopenharmony_ci * may take several clocks, depending on the current state of the 73062306a36Sopenharmony_ci * core. Once this bit is cleared software should wait at least 3 73162306a36Sopenharmony_ci * PHY clocks before doing any access to the PHY domain 73262306a36Sopenharmony_ci * (synchronization delay). Software should also should check that 73362306a36Sopenharmony_ci * bit 31 of this register is 1 (AHB Master is IDLE) before 73462306a36Sopenharmony_ci * starting any operation. 73562306a36Sopenharmony_ci * Typically software reset is used during software development 73662306a36Sopenharmony_ci * and also when you dynamically change the PHY selection bits 73762306a36Sopenharmony_ci * in the USB configuration registers listed above. When you 73862306a36Sopenharmony_ci * change the PHY, the corresponding clock for the PHY is 73962306a36Sopenharmony_ci * selected and used in the PHY domain. Once a new clock is 74062306a36Sopenharmony_ci * selected, the PHY domain has to be reset for proper operation. 74162306a36Sopenharmony_ci */ 74262306a36Sopenharmony_ci struct cvmx_usbcx_grstctl_s { 74362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ahbidle : 1, 74462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 dmareq : 1, 74562306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_11_29 : 19, 74662306a36Sopenharmony_ci __BITFIELD_FIELD(u32 txfnum : 5, 74762306a36Sopenharmony_ci __BITFIELD_FIELD(u32 txfflsh : 1, 74862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 rxfflsh : 1, 74962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 intknqflsh : 1, 75062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 frmcntrrst : 1, 75162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 hsftrst : 1, 75262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 csftrst : 1, 75362306a36Sopenharmony_ci ;)))))))))) 75462306a36Sopenharmony_ci } s; 75562306a36Sopenharmony_ci}; 75662306a36Sopenharmony_ci 75762306a36Sopenharmony_ci/** 75862306a36Sopenharmony_ci * cvmx_usbc#_grxfsiz 75962306a36Sopenharmony_ci * 76062306a36Sopenharmony_ci * Receive FIFO Size Register (GRXFSIZ) 76162306a36Sopenharmony_ci * 76262306a36Sopenharmony_ci * The application can program the RAM size that must be allocated to the 76362306a36Sopenharmony_ci * RxFIFO. 76462306a36Sopenharmony_ci */ 76562306a36Sopenharmony_ciunion cvmx_usbcx_grxfsiz { 76662306a36Sopenharmony_ci u32 u32; 76762306a36Sopenharmony_ci /** 76862306a36Sopenharmony_ci * struct cvmx_usbcx_grxfsiz_s 76962306a36Sopenharmony_ci * @rxfdep: RxFIFO Depth (RxFDep) 77062306a36Sopenharmony_ci * This value is in terms of 32-bit words. 77162306a36Sopenharmony_ci * * Minimum value is 16 77262306a36Sopenharmony_ci * * Maximum value is 32768 77362306a36Sopenharmony_ci */ 77462306a36Sopenharmony_ci struct cvmx_usbcx_grxfsiz_s { 77562306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_16_31 : 16, 77662306a36Sopenharmony_ci __BITFIELD_FIELD(u32 rxfdep : 16, 77762306a36Sopenharmony_ci ;)) 77862306a36Sopenharmony_ci } s; 77962306a36Sopenharmony_ci}; 78062306a36Sopenharmony_ci 78162306a36Sopenharmony_ci/** 78262306a36Sopenharmony_ci * cvmx_usbc#_grxstsph 78362306a36Sopenharmony_ci * 78462306a36Sopenharmony_ci * Receive Status Read and Pop Register, Host Mode (GRXSTSPH) 78562306a36Sopenharmony_ci * 78662306a36Sopenharmony_ci * A read to the Receive Status Read and Pop register returns and additionally 78762306a36Sopenharmony_ci * pops the top data entry out of the RxFIFO. 78862306a36Sopenharmony_ci * This Description is only valid when the core is in Host Mode. For Device Mode 78962306a36Sopenharmony_ci * use USBC_GRXSTSPD instead. 79062306a36Sopenharmony_ci * NOTE: GRXSTSPH and GRXSTSPD are physically the same register and share the 79162306a36Sopenharmony_ci * same offset in the O2P USB core. The offset difference shown in this 79262306a36Sopenharmony_ci * document is for software clarity and is actually ignored by the 79362306a36Sopenharmony_ci * hardware. 79462306a36Sopenharmony_ci */ 79562306a36Sopenharmony_ciunion cvmx_usbcx_grxstsph { 79662306a36Sopenharmony_ci u32 u32; 79762306a36Sopenharmony_ci /** 79862306a36Sopenharmony_ci * struct cvmx_usbcx_grxstsph_s 79962306a36Sopenharmony_ci * @pktsts: Packet Status (PktSts) 80062306a36Sopenharmony_ci * Indicates the status of the received packet 80162306a36Sopenharmony_ci * * 4'b0010: IN data packet received 80262306a36Sopenharmony_ci * * 4'b0011: IN transfer completed (triggers an interrupt) 80362306a36Sopenharmony_ci * * 4'b0101: Data toggle error (triggers an interrupt) 80462306a36Sopenharmony_ci * * 4'b0111: Channel halted (triggers an interrupt) 80562306a36Sopenharmony_ci * * Others: Reserved 80662306a36Sopenharmony_ci * @dpid: Data PID (DPID) 80762306a36Sopenharmony_ci * * 2'b00: DATA0 80862306a36Sopenharmony_ci * * 2'b10: DATA1 80962306a36Sopenharmony_ci * * 2'b01: DATA2 81062306a36Sopenharmony_ci * * 2'b11: MDATA 81162306a36Sopenharmony_ci * @bcnt: Byte Count (BCnt) 81262306a36Sopenharmony_ci * Indicates the byte count of the received IN data packet 81362306a36Sopenharmony_ci * @chnum: Channel Number (ChNum) 81462306a36Sopenharmony_ci * Indicates the channel number to which the current received 81562306a36Sopenharmony_ci * packet belongs. 81662306a36Sopenharmony_ci */ 81762306a36Sopenharmony_ci struct cvmx_usbcx_grxstsph_s { 81862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_21_31 : 11, 81962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 pktsts : 4, 82062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 dpid : 2, 82162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 bcnt : 11, 82262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 chnum : 4, 82362306a36Sopenharmony_ci ;))))) 82462306a36Sopenharmony_ci } s; 82562306a36Sopenharmony_ci}; 82662306a36Sopenharmony_ci 82762306a36Sopenharmony_ci/** 82862306a36Sopenharmony_ci * cvmx_usbc#_gusbcfg 82962306a36Sopenharmony_ci * 83062306a36Sopenharmony_ci * Core USB Configuration Register (GUSBCFG) 83162306a36Sopenharmony_ci * 83262306a36Sopenharmony_ci * This register can be used to configure the core after power-on or a changing 83362306a36Sopenharmony_ci * to Host mode or Device mode. It contains USB and USB-PHY related 83462306a36Sopenharmony_ci * configuration parameters. The application must program this register before 83562306a36Sopenharmony_ci * starting any transactions on either the AHB or the USB. Do not make changes 83662306a36Sopenharmony_ci * to this register after the initial programming. 83762306a36Sopenharmony_ci */ 83862306a36Sopenharmony_ciunion cvmx_usbcx_gusbcfg { 83962306a36Sopenharmony_ci u32 u32; 84062306a36Sopenharmony_ci /** 84162306a36Sopenharmony_ci * struct cvmx_usbcx_gusbcfg_s 84262306a36Sopenharmony_ci * @otgi2csel: UTMIFS or I2C Interface Select (OtgI2CSel) 84362306a36Sopenharmony_ci * This bit is always 0x0. 84462306a36Sopenharmony_ci * @phylpwrclksel: PHY Low-Power Clock Select (PhyLPwrClkSel) 84562306a36Sopenharmony_ci * Software should set this bit to 0x0. 84662306a36Sopenharmony_ci * Selects either 480-MHz or 48-MHz (low-power) PHY mode. In 84762306a36Sopenharmony_ci * FS and LS modes, the PHY can usually operate on a 48-MHz 84862306a36Sopenharmony_ci * clock to save power. 84962306a36Sopenharmony_ci * * 1'b0: 480-MHz Internal PLL clock 85062306a36Sopenharmony_ci * * 1'b1: 48-MHz External Clock 85162306a36Sopenharmony_ci * In 480 MHz mode, the UTMI interface operates at either 60 or 85262306a36Sopenharmony_ci * 30-MHz, depending upon whether 8- or 16-bit data width is 85362306a36Sopenharmony_ci * selected. In 48-MHz mode, the UTMI interface operates at 48 85462306a36Sopenharmony_ci * MHz in FS mode and at either 48 or 6 MHz in LS mode 85562306a36Sopenharmony_ci * (depending on the PHY vendor). 85662306a36Sopenharmony_ci * This bit drives the utmi_fsls_low_power core output signal, and 85762306a36Sopenharmony_ci * is valid only for UTMI+ PHYs. 85862306a36Sopenharmony_ci * @usbtrdtim: USB Turnaround Time (USBTrdTim) 85962306a36Sopenharmony_ci * Sets the turnaround time in PHY clocks. 86062306a36Sopenharmony_ci * Specifies the response time for a MAC request to the Packet 86162306a36Sopenharmony_ci * FIFO Controller (PFC) to fetch data from the DFIFO (SPRAM). 86262306a36Sopenharmony_ci * This must be programmed to 0x5. 86362306a36Sopenharmony_ci * @hnpcap: HNP-Capable (HNPCap) 86462306a36Sopenharmony_ci * This bit is always 0x0. 86562306a36Sopenharmony_ci * @srpcap: SRP-Capable (SRPCap) 86662306a36Sopenharmony_ci * This bit is always 0x0. 86762306a36Sopenharmony_ci * @ddrsel: ULPI DDR Select (DDRSel) 86862306a36Sopenharmony_ci * Software should set this bit to 0x0. 86962306a36Sopenharmony_ci * @physel: USB 2.0 High-Speed PHY or USB 1.1 Full-Speed Serial 87062306a36Sopenharmony_ci * Software should set this bit to 0x0. 87162306a36Sopenharmony_ci * @fsintf: Full-Speed Serial Interface Select (FSIntf) 87262306a36Sopenharmony_ci * Software should set this bit to 0x0. 87362306a36Sopenharmony_ci * @ulpi_utmi_sel: ULPI or UTMI+ Select (ULPI_UTMI_Sel) 87462306a36Sopenharmony_ci * This bit is always 0x0. 87562306a36Sopenharmony_ci * @phyif: PHY Interface (PHYIf) 87662306a36Sopenharmony_ci * This bit is always 0x1. 87762306a36Sopenharmony_ci * @toutcal: HS/FS Timeout Calibration (TOutCal) 87862306a36Sopenharmony_ci * The number of PHY clocks that the application programs in this 87962306a36Sopenharmony_ci * field is added to the high-speed/full-speed interpacket timeout 88062306a36Sopenharmony_ci * duration in the core to account for any additional delays 88162306a36Sopenharmony_ci * introduced by the PHY. This may be required, since the delay 88262306a36Sopenharmony_ci * introduced by the PHY in generating the linestate condition may 88362306a36Sopenharmony_ci * vary from one PHY to another. 88462306a36Sopenharmony_ci * The USB standard timeout value for high-speed operation is 88562306a36Sopenharmony_ci * 736 to 816 (inclusive) bit times. The USB standard timeout 88662306a36Sopenharmony_ci * value for full-speed operation is 16 to 18 (inclusive) bit 88762306a36Sopenharmony_ci * times. The application must program this field based on the 88862306a36Sopenharmony_ci * speed of enumeration. The number of bit times added per PHY 88962306a36Sopenharmony_ci * clock are: 89062306a36Sopenharmony_ci * High-speed operation: 89162306a36Sopenharmony_ci * * One 30-MHz PHY clock = 16 bit times 89262306a36Sopenharmony_ci * * One 60-MHz PHY clock = 8 bit times 89362306a36Sopenharmony_ci * Full-speed operation: 89462306a36Sopenharmony_ci * * One 30-MHz PHY clock = 0.4 bit times 89562306a36Sopenharmony_ci * * One 60-MHz PHY clock = 0.2 bit times 89662306a36Sopenharmony_ci * * One 48-MHz PHY clock = 0.25 bit times 89762306a36Sopenharmony_ci */ 89862306a36Sopenharmony_ci struct cvmx_usbcx_gusbcfg_s { 89962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_17_31 : 15, 90062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 otgi2csel : 1, 90162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 phylpwrclksel : 1, 90262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_14_14 : 1, 90362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 usbtrdtim : 4, 90462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 hnpcap : 1, 90562306a36Sopenharmony_ci __BITFIELD_FIELD(u32 srpcap : 1, 90662306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ddrsel : 1, 90762306a36Sopenharmony_ci __BITFIELD_FIELD(u32 physel : 1, 90862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 fsintf : 1, 90962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ulpi_utmi_sel : 1, 91062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 phyif : 1, 91162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 toutcal : 3, 91262306a36Sopenharmony_ci ;))))))))))))) 91362306a36Sopenharmony_ci } s; 91462306a36Sopenharmony_ci}; 91562306a36Sopenharmony_ci 91662306a36Sopenharmony_ci/** 91762306a36Sopenharmony_ci * cvmx_usbc#_haint 91862306a36Sopenharmony_ci * 91962306a36Sopenharmony_ci * Host All Channels Interrupt Register (HAINT) 92062306a36Sopenharmony_ci * 92162306a36Sopenharmony_ci * When a significant event occurs on a channel, the Host All Channels Interrupt 92262306a36Sopenharmony_ci * register interrupts the application using the Host Channels Interrupt bit of 92362306a36Sopenharmony_ci * the Core Interrupt register (GINTSTS.HChInt). This is shown in Interrupt. 92462306a36Sopenharmony_ci * There is one interrupt bit per channel, up to a maximum of 16 bits. Bits in 92562306a36Sopenharmony_ci * this register are set and cleared when the application sets and clears bits 92662306a36Sopenharmony_ci * in the corresponding Host Channel-n Interrupt register. 92762306a36Sopenharmony_ci */ 92862306a36Sopenharmony_ciunion cvmx_usbcx_haint { 92962306a36Sopenharmony_ci u32 u32; 93062306a36Sopenharmony_ci /** 93162306a36Sopenharmony_ci * struct cvmx_usbcx_haint_s 93262306a36Sopenharmony_ci * @haint: Channel Interrupts (HAINT) 93362306a36Sopenharmony_ci * One bit per channel: Bit 0 for Channel 0, bit 15 for Channel 15 93462306a36Sopenharmony_ci */ 93562306a36Sopenharmony_ci struct cvmx_usbcx_haint_s { 93662306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_16_31 : 16, 93762306a36Sopenharmony_ci __BITFIELD_FIELD(u32 haint : 16, 93862306a36Sopenharmony_ci ;)) 93962306a36Sopenharmony_ci } s; 94062306a36Sopenharmony_ci}; 94162306a36Sopenharmony_ci 94262306a36Sopenharmony_ci/** 94362306a36Sopenharmony_ci * cvmx_usbc#_haintmsk 94462306a36Sopenharmony_ci * 94562306a36Sopenharmony_ci * Host All Channels Interrupt Mask Register (HAINTMSK) 94662306a36Sopenharmony_ci * 94762306a36Sopenharmony_ci * The Host All Channel Interrupt Mask register works with the Host All Channel 94862306a36Sopenharmony_ci * Interrupt register to interrupt the application when an event occurs on a 94962306a36Sopenharmony_ci * channel. There is one interrupt mask bit per channel, up to a maximum of 16 95062306a36Sopenharmony_ci * bits. 95162306a36Sopenharmony_ci * Mask interrupt: 1'b0 Unmask interrupt: 1'b1 95262306a36Sopenharmony_ci */ 95362306a36Sopenharmony_ciunion cvmx_usbcx_haintmsk { 95462306a36Sopenharmony_ci u32 u32; 95562306a36Sopenharmony_ci /** 95662306a36Sopenharmony_ci * struct cvmx_usbcx_haintmsk_s 95762306a36Sopenharmony_ci * @haintmsk: Channel Interrupt Mask (HAINTMsk) 95862306a36Sopenharmony_ci * One bit per channel: Bit 0 for channel 0, bit 15 for channel 15 95962306a36Sopenharmony_ci */ 96062306a36Sopenharmony_ci struct cvmx_usbcx_haintmsk_s { 96162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_16_31 : 16, 96262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 haintmsk : 16, 96362306a36Sopenharmony_ci ;)) 96462306a36Sopenharmony_ci } s; 96562306a36Sopenharmony_ci}; 96662306a36Sopenharmony_ci 96762306a36Sopenharmony_ci/** 96862306a36Sopenharmony_ci * cvmx_usbc#_hcchar# 96962306a36Sopenharmony_ci * 97062306a36Sopenharmony_ci * Host Channel-n Characteristics Register (HCCHAR) 97162306a36Sopenharmony_ci * 97262306a36Sopenharmony_ci */ 97362306a36Sopenharmony_ciunion cvmx_usbcx_hccharx { 97462306a36Sopenharmony_ci u32 u32; 97562306a36Sopenharmony_ci /** 97662306a36Sopenharmony_ci * struct cvmx_usbcx_hccharx_s 97762306a36Sopenharmony_ci * @chena: Channel Enable (ChEna) 97862306a36Sopenharmony_ci * This field is set by the application and cleared by the OTG 97962306a36Sopenharmony_ci * host. 98062306a36Sopenharmony_ci * * 1'b0: Channel disabled 98162306a36Sopenharmony_ci * * 1'b1: Channel enabled 98262306a36Sopenharmony_ci * @chdis: Channel Disable (ChDis) 98362306a36Sopenharmony_ci * The application sets this bit to stop transmitting/receiving 98462306a36Sopenharmony_ci * data on a channel, even before the transfer for that channel is 98562306a36Sopenharmony_ci * complete. The application must wait for the Channel Disabled 98662306a36Sopenharmony_ci * interrupt before treating the channel as disabled. 98762306a36Sopenharmony_ci * @oddfrm: Odd Frame (OddFrm) 98862306a36Sopenharmony_ci * This field is set (reset) by the application to indicate that 98962306a36Sopenharmony_ci * the OTG host must perform a transfer in an odd (micro)frame. 99062306a36Sopenharmony_ci * This field is applicable for only periodic (isochronous and 99162306a36Sopenharmony_ci * interrupt) transactions. 99262306a36Sopenharmony_ci * * 1'b0: Even (micro)frame 99362306a36Sopenharmony_ci * * 1'b1: Odd (micro)frame 99462306a36Sopenharmony_ci * @devaddr: Device Address (DevAddr) 99562306a36Sopenharmony_ci * This field selects the specific device serving as the data 99662306a36Sopenharmony_ci * source or sink. 99762306a36Sopenharmony_ci * @ec: Multi Count (MC) / Error Count (EC) 99862306a36Sopenharmony_ci * When the Split Enable bit of the Host Channel-n Split Control 99962306a36Sopenharmony_ci * register (HCSPLTn.SpltEna) is reset (1'b0), this field indicates 100062306a36Sopenharmony_ci * to the host the number of transactions that should be executed 100162306a36Sopenharmony_ci * per microframe for this endpoint. 100262306a36Sopenharmony_ci * * 2'b00: Reserved. This field yields undefined results. 100362306a36Sopenharmony_ci * * 2'b01: 1 transaction 100462306a36Sopenharmony_ci * * 2'b10: 2 transactions to be issued for this endpoint per 100562306a36Sopenharmony_ci * microframe 100662306a36Sopenharmony_ci * * 2'b11: 3 transactions to be issued for this endpoint per 100762306a36Sopenharmony_ci * microframe 100862306a36Sopenharmony_ci * When HCSPLTn.SpltEna is set (1'b1), this field indicates the 100962306a36Sopenharmony_ci * number of immediate retries to be performed for a periodic split 101062306a36Sopenharmony_ci * transactions on transaction errors. This field must be set to at 101162306a36Sopenharmony_ci * least 2'b01. 101262306a36Sopenharmony_ci * @eptype: Endpoint Type (EPType) 101362306a36Sopenharmony_ci * Indicates the transfer type selected. 101462306a36Sopenharmony_ci * * 2'b00: Control 101562306a36Sopenharmony_ci * * 2'b01: Isochronous 101662306a36Sopenharmony_ci * * 2'b10: Bulk 101762306a36Sopenharmony_ci * * 2'b11: Interrupt 101862306a36Sopenharmony_ci * @lspddev: Low-Speed Device (LSpdDev) 101962306a36Sopenharmony_ci * This field is set by the application to indicate that this 102062306a36Sopenharmony_ci * channel is communicating to a low-speed device. 102162306a36Sopenharmony_ci * @epdir: Endpoint Direction (EPDir) 102262306a36Sopenharmony_ci * Indicates whether the transaction is IN or OUT. 102362306a36Sopenharmony_ci * * 1'b0: OUT 102462306a36Sopenharmony_ci * * 1'b1: IN 102562306a36Sopenharmony_ci * @epnum: Endpoint Number (EPNum) 102662306a36Sopenharmony_ci * Indicates the endpoint number on the device serving as the 102762306a36Sopenharmony_ci * data source or sink. 102862306a36Sopenharmony_ci * @mps: Maximum Packet Size (MPS) 102962306a36Sopenharmony_ci * Indicates the maximum packet size of the associated endpoint. 103062306a36Sopenharmony_ci */ 103162306a36Sopenharmony_ci struct cvmx_usbcx_hccharx_s { 103262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 chena : 1, 103362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 chdis : 1, 103462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 oddfrm : 1, 103562306a36Sopenharmony_ci __BITFIELD_FIELD(u32 devaddr : 7, 103662306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ec : 2, 103762306a36Sopenharmony_ci __BITFIELD_FIELD(u32 eptype : 2, 103862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 lspddev : 1, 103962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_16_16 : 1, 104062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 epdir : 1, 104162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 epnum : 4, 104262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 mps : 11, 104362306a36Sopenharmony_ci ;))))))))))) 104462306a36Sopenharmony_ci } s; 104562306a36Sopenharmony_ci}; 104662306a36Sopenharmony_ci 104762306a36Sopenharmony_ci/** 104862306a36Sopenharmony_ci * cvmx_usbc#_hcfg 104962306a36Sopenharmony_ci * 105062306a36Sopenharmony_ci * Host Configuration Register (HCFG) 105162306a36Sopenharmony_ci * 105262306a36Sopenharmony_ci * This register configures the core after power-on. Do not make changes to this 105362306a36Sopenharmony_ci * register after initializing the host. 105462306a36Sopenharmony_ci */ 105562306a36Sopenharmony_ciunion cvmx_usbcx_hcfg { 105662306a36Sopenharmony_ci u32 u32; 105762306a36Sopenharmony_ci /** 105862306a36Sopenharmony_ci * struct cvmx_usbcx_hcfg_s 105962306a36Sopenharmony_ci * @fslssupp: FS- and LS-Only Support (FSLSSupp) 106062306a36Sopenharmony_ci * The application uses this bit to control the core's enumeration 106162306a36Sopenharmony_ci * speed. Using this bit, the application can make the core 106262306a36Sopenharmony_ci * enumerate as a FS host, even if the connected device supports 106362306a36Sopenharmony_ci * HS traffic. Do not make changes to this field after initial 106462306a36Sopenharmony_ci * programming. 106562306a36Sopenharmony_ci * * 1'b0: HS/FS/LS, based on the maximum speed supported by 106662306a36Sopenharmony_ci * the connected device 106762306a36Sopenharmony_ci * * 1'b1: FS/LS-only, even if the connected device can support HS 106862306a36Sopenharmony_ci * @fslspclksel: FS/LS PHY Clock Select (FSLSPclkSel) 106962306a36Sopenharmony_ci * When the core is in FS Host mode 107062306a36Sopenharmony_ci * * 2'b00: PHY clock is running at 30/60 MHz 107162306a36Sopenharmony_ci * * 2'b01: PHY clock is running at 48 MHz 107262306a36Sopenharmony_ci * * Others: Reserved 107362306a36Sopenharmony_ci * When the core is in LS Host mode 107462306a36Sopenharmony_ci * * 2'b00: PHY clock is running at 30/60 MHz. When the 107562306a36Sopenharmony_ci * UTMI+/ULPI PHY Low Power mode is not selected, use 107662306a36Sopenharmony_ci * 30/60 MHz. 107762306a36Sopenharmony_ci * * 2'b01: PHY clock is running at 48 MHz. When the UTMI+ 107862306a36Sopenharmony_ci * PHY Low Power mode is selected, use 48MHz if the PHY 107962306a36Sopenharmony_ci * supplies a 48 MHz clock during LS mode. 108062306a36Sopenharmony_ci * * 2'b10: PHY clock is running at 6 MHz. In USB 1.1 FS mode, 108162306a36Sopenharmony_ci * use 6 MHz when the UTMI+ PHY Low Power mode is 108262306a36Sopenharmony_ci * selected and the PHY supplies a 6 MHz clock during LS 108362306a36Sopenharmony_ci * mode. If you select a 6 MHz clock during LS mode, you must 108462306a36Sopenharmony_ci * do a soft reset. 108562306a36Sopenharmony_ci * * 2'b11: Reserved 108662306a36Sopenharmony_ci */ 108762306a36Sopenharmony_ci struct cvmx_usbcx_hcfg_s { 108862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_3_31 : 29, 108962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 fslssupp : 1, 109062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 fslspclksel : 2, 109162306a36Sopenharmony_ci ;))) 109262306a36Sopenharmony_ci } s; 109362306a36Sopenharmony_ci}; 109462306a36Sopenharmony_ci 109562306a36Sopenharmony_ci/** 109662306a36Sopenharmony_ci * cvmx_usbc#_hcint# 109762306a36Sopenharmony_ci * 109862306a36Sopenharmony_ci * Host Channel-n Interrupt Register (HCINT) 109962306a36Sopenharmony_ci * 110062306a36Sopenharmony_ci * This register indicates the status of a channel with respect to USB- and 110162306a36Sopenharmony_ci * AHB-related events. The application must read this register when the Host 110262306a36Sopenharmony_ci * Channels Interrupt bit of the Core Interrupt register (GINTSTS.HChInt) is 110362306a36Sopenharmony_ci * set. Before the application can read this register, it must first read 110462306a36Sopenharmony_ci * the Host All Channels Interrupt (HAINT) register to get the exact channel 110562306a36Sopenharmony_ci * number for the Host Channel-n Interrupt register. The application must clear 110662306a36Sopenharmony_ci * the appropriate bit in this register to clear the corresponding bits in the 110762306a36Sopenharmony_ci * HAINT and GINTSTS registers. 110862306a36Sopenharmony_ci */ 110962306a36Sopenharmony_ciunion cvmx_usbcx_hcintx { 111062306a36Sopenharmony_ci u32 u32; 111162306a36Sopenharmony_ci /** 111262306a36Sopenharmony_ci * struct cvmx_usbcx_hcintx_s 111362306a36Sopenharmony_ci * @datatglerr: Data Toggle Error (DataTglErr) 111462306a36Sopenharmony_ci * @frmovrun: Frame Overrun (FrmOvrun) 111562306a36Sopenharmony_ci * @bblerr: Babble Error (BblErr) 111662306a36Sopenharmony_ci * @xacterr: Transaction Error (XactErr) 111762306a36Sopenharmony_ci * @nyet: NYET Response Received Interrupt (NYET) 111862306a36Sopenharmony_ci * @ack: ACK Response Received Interrupt (ACK) 111962306a36Sopenharmony_ci * @nak: NAK Response Received Interrupt (NAK) 112062306a36Sopenharmony_ci * @stall: STALL Response Received Interrupt (STALL) 112162306a36Sopenharmony_ci * @ahberr: This bit is always 0x0. 112262306a36Sopenharmony_ci * @chhltd: Channel Halted (ChHltd) 112362306a36Sopenharmony_ci * Indicates the transfer completed abnormally either because of 112462306a36Sopenharmony_ci * any USB transaction error or in response to disable request by 112562306a36Sopenharmony_ci * the application. 112662306a36Sopenharmony_ci * @xfercompl: Transfer Completed (XferCompl) 112762306a36Sopenharmony_ci * Transfer completed normally without any errors. 112862306a36Sopenharmony_ci */ 112962306a36Sopenharmony_ci struct cvmx_usbcx_hcintx_s { 113062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_11_31 : 21, 113162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 datatglerr : 1, 113262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 frmovrun : 1, 113362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 bblerr : 1, 113462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 xacterr : 1, 113562306a36Sopenharmony_ci __BITFIELD_FIELD(u32 nyet : 1, 113662306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ack : 1, 113762306a36Sopenharmony_ci __BITFIELD_FIELD(u32 nak : 1, 113862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 stall : 1, 113962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ahberr : 1, 114062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 chhltd : 1, 114162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 xfercompl : 1, 114262306a36Sopenharmony_ci ;)))))))))))) 114362306a36Sopenharmony_ci } s; 114462306a36Sopenharmony_ci}; 114562306a36Sopenharmony_ci 114662306a36Sopenharmony_ci/** 114762306a36Sopenharmony_ci * cvmx_usbc#_hcintmsk# 114862306a36Sopenharmony_ci * 114962306a36Sopenharmony_ci * Host Channel-n Interrupt Mask Register (HCINTMSKn) 115062306a36Sopenharmony_ci * 115162306a36Sopenharmony_ci * This register reflects the mask for each channel status described in the 115262306a36Sopenharmony_ci * previous section. 115362306a36Sopenharmony_ci * Mask interrupt: 1'b0 Unmask interrupt: 1'b1 115462306a36Sopenharmony_ci */ 115562306a36Sopenharmony_ciunion cvmx_usbcx_hcintmskx { 115662306a36Sopenharmony_ci u32 u32; 115762306a36Sopenharmony_ci /** 115862306a36Sopenharmony_ci * struct cvmx_usbcx_hcintmskx_s 115962306a36Sopenharmony_ci * @datatglerrmsk: Data Toggle Error Mask (DataTglErrMsk) 116062306a36Sopenharmony_ci * @frmovrunmsk: Frame Overrun Mask (FrmOvrunMsk) 116162306a36Sopenharmony_ci * @bblerrmsk: Babble Error Mask (BblErrMsk) 116262306a36Sopenharmony_ci * @xacterrmsk: Transaction Error Mask (XactErrMsk) 116362306a36Sopenharmony_ci * @nyetmsk: NYET Response Received Interrupt Mask (NyetMsk) 116462306a36Sopenharmony_ci * @ackmsk: ACK Response Received Interrupt Mask (AckMsk) 116562306a36Sopenharmony_ci * @nakmsk: NAK Response Received Interrupt Mask (NakMsk) 116662306a36Sopenharmony_ci * @stallmsk: STALL Response Received Interrupt Mask (StallMsk) 116762306a36Sopenharmony_ci * @ahberrmsk: AHB Error Mask (AHBErrMsk) 116862306a36Sopenharmony_ci * @chhltdmsk: Channel Halted Mask (ChHltdMsk) 116962306a36Sopenharmony_ci * @xfercomplmsk: Transfer Completed Mask (XferComplMsk) 117062306a36Sopenharmony_ci */ 117162306a36Sopenharmony_ci struct cvmx_usbcx_hcintmskx_s { 117262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_11_31 : 21, 117362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 datatglerrmsk : 1, 117462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 frmovrunmsk : 1, 117562306a36Sopenharmony_ci __BITFIELD_FIELD(u32 bblerrmsk : 1, 117662306a36Sopenharmony_ci __BITFIELD_FIELD(u32 xacterrmsk : 1, 117762306a36Sopenharmony_ci __BITFIELD_FIELD(u32 nyetmsk : 1, 117862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ackmsk : 1, 117962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 nakmsk : 1, 118062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 stallmsk : 1, 118162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ahberrmsk : 1, 118262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 chhltdmsk : 1, 118362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 xfercomplmsk : 1, 118462306a36Sopenharmony_ci ;)))))))))))) 118562306a36Sopenharmony_ci } s; 118662306a36Sopenharmony_ci}; 118762306a36Sopenharmony_ci 118862306a36Sopenharmony_ci/** 118962306a36Sopenharmony_ci * cvmx_usbc#_hcsplt# 119062306a36Sopenharmony_ci * 119162306a36Sopenharmony_ci * Host Channel-n Split Control Register (HCSPLT) 119262306a36Sopenharmony_ci * 119362306a36Sopenharmony_ci */ 119462306a36Sopenharmony_ciunion cvmx_usbcx_hcspltx { 119562306a36Sopenharmony_ci u32 u32; 119662306a36Sopenharmony_ci /** 119762306a36Sopenharmony_ci * struct cvmx_usbcx_hcspltx_s 119862306a36Sopenharmony_ci * @spltena: Split Enable (SpltEna) 119962306a36Sopenharmony_ci * The application sets this field to indicate that this channel is 120062306a36Sopenharmony_ci * enabled to perform split transactions. 120162306a36Sopenharmony_ci * @compsplt: Do Complete Split (CompSplt) 120262306a36Sopenharmony_ci * The application sets this field to request the OTG host to 120362306a36Sopenharmony_ci * perform a complete split transaction. 120462306a36Sopenharmony_ci * @xactpos: Transaction Position (XactPos) 120562306a36Sopenharmony_ci * This field is used to determine whether to send all, first, 120662306a36Sopenharmony_ci * middle, or last payloads with each OUT transaction. 120762306a36Sopenharmony_ci * * 2'b11: All. This is the entire data payload is of this 120862306a36Sopenharmony_ci * transaction (which is less than or equal to 188 bytes). 120962306a36Sopenharmony_ci * * 2'b10: Begin. This is the first data payload of this 121062306a36Sopenharmony_ci * transaction (which is larger than 188 bytes). 121162306a36Sopenharmony_ci * * 2'b00: Mid. This is the middle payload of this transaction 121262306a36Sopenharmony_ci * (which is larger than 188 bytes). 121362306a36Sopenharmony_ci * * 2'b01: End. This is the last payload of this transaction 121462306a36Sopenharmony_ci * (which is larger than 188 bytes). 121562306a36Sopenharmony_ci * @hubaddr: Hub Address (HubAddr) 121662306a36Sopenharmony_ci * This field holds the device address of the transaction 121762306a36Sopenharmony_ci * translator's hub. 121862306a36Sopenharmony_ci * @prtaddr: Port Address (PrtAddr) 121962306a36Sopenharmony_ci * This field is the port number of the recipient transaction 122062306a36Sopenharmony_ci * translator. 122162306a36Sopenharmony_ci */ 122262306a36Sopenharmony_ci struct cvmx_usbcx_hcspltx_s { 122362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 spltena : 1, 122462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_17_30 : 14, 122562306a36Sopenharmony_ci __BITFIELD_FIELD(u32 compsplt : 1, 122662306a36Sopenharmony_ci __BITFIELD_FIELD(u32 xactpos : 2, 122762306a36Sopenharmony_ci __BITFIELD_FIELD(u32 hubaddr : 7, 122862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 prtaddr : 7, 122962306a36Sopenharmony_ci ;)))))) 123062306a36Sopenharmony_ci } s; 123162306a36Sopenharmony_ci}; 123262306a36Sopenharmony_ci 123362306a36Sopenharmony_ci/** 123462306a36Sopenharmony_ci * cvmx_usbc#_hctsiz# 123562306a36Sopenharmony_ci * 123662306a36Sopenharmony_ci * Host Channel-n Transfer Size Register (HCTSIZ) 123762306a36Sopenharmony_ci * 123862306a36Sopenharmony_ci */ 123962306a36Sopenharmony_ciunion cvmx_usbcx_hctsizx { 124062306a36Sopenharmony_ci u32 u32; 124162306a36Sopenharmony_ci /** 124262306a36Sopenharmony_ci * struct cvmx_usbcx_hctsizx_s 124362306a36Sopenharmony_ci * @dopng: Do Ping (DoPng) 124462306a36Sopenharmony_ci * Setting this field to 1 directs the host to do PING protocol. 124562306a36Sopenharmony_ci * @pid: PID (Pid) 124662306a36Sopenharmony_ci * The application programs this field with the type of PID to use 124762306a36Sopenharmony_ci * for the initial transaction. The host will maintain this field 124862306a36Sopenharmony_ci * for the rest of the transfer. 124962306a36Sopenharmony_ci * * 2'b00: DATA0 125062306a36Sopenharmony_ci * * 2'b01: DATA2 125162306a36Sopenharmony_ci * * 2'b10: DATA1 125262306a36Sopenharmony_ci * * 2'b11: MDATA (non-control)/SETUP (control) 125362306a36Sopenharmony_ci * @pktcnt: Packet Count (PktCnt) 125462306a36Sopenharmony_ci * This field is programmed by the application with the expected 125562306a36Sopenharmony_ci * number of packets to be transmitted (OUT) or received (IN). 125662306a36Sopenharmony_ci * The host decrements this count on every successful 125762306a36Sopenharmony_ci * transmission or reception of an OUT/IN packet. Once this count 125862306a36Sopenharmony_ci * reaches zero, the application is interrupted to indicate normal 125962306a36Sopenharmony_ci * completion. 126062306a36Sopenharmony_ci * @xfersize: Transfer Size (XferSize) 126162306a36Sopenharmony_ci * For an OUT, this field is the number of data bytes the host will 126262306a36Sopenharmony_ci * send during the transfer. 126362306a36Sopenharmony_ci * For an IN, this field is the buffer size that the application 126462306a36Sopenharmony_ci * has reserved for the transfer. The application is expected to 126562306a36Sopenharmony_ci * program this field as an integer multiple of the maximum packet 126662306a36Sopenharmony_ci * size for IN transactions (periodic and non-periodic). 126762306a36Sopenharmony_ci */ 126862306a36Sopenharmony_ci struct cvmx_usbcx_hctsizx_s { 126962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 dopng : 1, 127062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 pid : 2, 127162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 pktcnt : 10, 127262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 xfersize : 19, 127362306a36Sopenharmony_ci ;)))) 127462306a36Sopenharmony_ci } s; 127562306a36Sopenharmony_ci}; 127662306a36Sopenharmony_ci 127762306a36Sopenharmony_ci/** 127862306a36Sopenharmony_ci * cvmx_usbc#_hfir 127962306a36Sopenharmony_ci * 128062306a36Sopenharmony_ci * Host Frame Interval Register (HFIR) 128162306a36Sopenharmony_ci * 128262306a36Sopenharmony_ci * This register stores the frame interval information for the current speed to 128362306a36Sopenharmony_ci * which the O2P USB core has enumerated. 128462306a36Sopenharmony_ci */ 128562306a36Sopenharmony_ciunion cvmx_usbcx_hfir { 128662306a36Sopenharmony_ci u32 u32; 128762306a36Sopenharmony_ci /** 128862306a36Sopenharmony_ci * struct cvmx_usbcx_hfir_s 128962306a36Sopenharmony_ci * @frint: Frame Interval (FrInt) 129062306a36Sopenharmony_ci * The value that the application programs to this field specifies 129162306a36Sopenharmony_ci * the interval between two consecutive SOFs (FS) or micro- 129262306a36Sopenharmony_ci * SOFs (HS) or Keep-Alive tokens (HS). This field contains the 129362306a36Sopenharmony_ci * number of PHY clocks that constitute the required frame 129462306a36Sopenharmony_ci * interval. The default value set in this field for a FS operation 129562306a36Sopenharmony_ci * when the PHY clock frequency is 60 MHz. The application can 129662306a36Sopenharmony_ci * write a value to this register only after the Port Enable bit of 129762306a36Sopenharmony_ci * the Host Port Control and Status register (HPRT.PrtEnaPort) 129862306a36Sopenharmony_ci * has been set. If no value is programmed, the core calculates 129962306a36Sopenharmony_ci * the value based on the PHY clock specified in the FS/LS PHY 130062306a36Sopenharmony_ci * Clock Select field of the Host Configuration register 130162306a36Sopenharmony_ci * (HCFG.FSLSPclkSel). Do not change the value of this field 130262306a36Sopenharmony_ci * after the initial configuration. 130362306a36Sopenharmony_ci * * 125 us (PHY clock frequency for HS) 130462306a36Sopenharmony_ci * * 1 ms (PHY clock frequency for FS/LS) 130562306a36Sopenharmony_ci */ 130662306a36Sopenharmony_ci struct cvmx_usbcx_hfir_s { 130762306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_16_31 : 16, 130862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 frint : 16, 130962306a36Sopenharmony_ci ;)) 131062306a36Sopenharmony_ci } s; 131162306a36Sopenharmony_ci}; 131262306a36Sopenharmony_ci 131362306a36Sopenharmony_ci/** 131462306a36Sopenharmony_ci * cvmx_usbc#_hfnum 131562306a36Sopenharmony_ci * 131662306a36Sopenharmony_ci * Host Frame Number/Frame Time Remaining Register (HFNUM) 131762306a36Sopenharmony_ci * 131862306a36Sopenharmony_ci * This register indicates the current frame number. 131962306a36Sopenharmony_ci * It also indicates the time remaining (in terms of the number of PHY clocks) 132062306a36Sopenharmony_ci * in the current (micro)frame. 132162306a36Sopenharmony_ci */ 132262306a36Sopenharmony_ciunion cvmx_usbcx_hfnum { 132362306a36Sopenharmony_ci u32 u32; 132462306a36Sopenharmony_ci /** 132562306a36Sopenharmony_ci * struct cvmx_usbcx_hfnum_s 132662306a36Sopenharmony_ci * @frrem: Frame Time Remaining (FrRem) 132762306a36Sopenharmony_ci * Indicates the amount of time remaining in the current 132862306a36Sopenharmony_ci * microframe (HS) or frame (FS/LS), in terms of PHY clocks. 132962306a36Sopenharmony_ci * This field decrements on each PHY clock. When it reaches 133062306a36Sopenharmony_ci * zero, this field is reloaded with the value in the Frame 133162306a36Sopenharmony_ci * Interval register and a new SOF is transmitted on the USB. 133262306a36Sopenharmony_ci * @frnum: Frame Number (FrNum) 133362306a36Sopenharmony_ci * This field increments when a new SOF is transmitted on the 133462306a36Sopenharmony_ci * USB, and is reset to 0 when it reaches 16'h3FFF. 133562306a36Sopenharmony_ci */ 133662306a36Sopenharmony_ci struct cvmx_usbcx_hfnum_s { 133762306a36Sopenharmony_ci __BITFIELD_FIELD(u32 frrem : 16, 133862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 frnum : 16, 133962306a36Sopenharmony_ci ;)) 134062306a36Sopenharmony_ci } s; 134162306a36Sopenharmony_ci}; 134262306a36Sopenharmony_ci 134362306a36Sopenharmony_ci/** 134462306a36Sopenharmony_ci * cvmx_usbc#_hprt 134562306a36Sopenharmony_ci * 134662306a36Sopenharmony_ci * Host Port Control and Status Register (HPRT) 134762306a36Sopenharmony_ci * 134862306a36Sopenharmony_ci * This register is available in both Host and Device modes. 134962306a36Sopenharmony_ci * Currently, the OTG Host supports only one port. 135062306a36Sopenharmony_ci * A single register holds USB port-related information such as USB reset, 135162306a36Sopenharmony_ci * enable, suspend, resume, connect status, and test mode for each port. The 135262306a36Sopenharmony_ci * R_SS_WC bits in this register can trigger an interrupt to the application 135362306a36Sopenharmony_ci * through the Host Port Interrupt bit of the Core Interrupt register 135462306a36Sopenharmony_ci * (GINTSTS.PrtInt). On a Port Interrupt, the application must read this 135562306a36Sopenharmony_ci * register and clear the bit that caused the interrupt. For the R_SS_WC bits, 135662306a36Sopenharmony_ci * the application must write a 1 to the bit to clear the interrupt. 135762306a36Sopenharmony_ci */ 135862306a36Sopenharmony_ciunion cvmx_usbcx_hprt { 135962306a36Sopenharmony_ci u32 u32; 136062306a36Sopenharmony_ci /** 136162306a36Sopenharmony_ci * struct cvmx_usbcx_hprt_s 136262306a36Sopenharmony_ci * @prtspd: Port Speed (PrtSpd) 136362306a36Sopenharmony_ci * Indicates the speed of the device attached to this port. 136462306a36Sopenharmony_ci * * 2'b00: High speed 136562306a36Sopenharmony_ci * * 2'b01: Full speed 136662306a36Sopenharmony_ci * * 2'b10: Low speed 136762306a36Sopenharmony_ci * * 2'b11: Reserved 136862306a36Sopenharmony_ci * @prttstctl: Port Test Control (PrtTstCtl) 136962306a36Sopenharmony_ci * The application writes a nonzero value to this field to put 137062306a36Sopenharmony_ci * the port into a Test mode, and the corresponding pattern is 137162306a36Sopenharmony_ci * signaled on the port. 137262306a36Sopenharmony_ci * * 4'b0000: Test mode disabled 137362306a36Sopenharmony_ci * * 4'b0001: Test_J mode 137462306a36Sopenharmony_ci * * 4'b0010: Test_K mode 137562306a36Sopenharmony_ci * * 4'b0011: Test_SE0_NAK mode 137662306a36Sopenharmony_ci * * 4'b0100: Test_Packet mode 137762306a36Sopenharmony_ci * * 4'b0101: Test_Force_Enable 137862306a36Sopenharmony_ci * * Others: Reserved 137962306a36Sopenharmony_ci * PrtSpd must be zero (i.e. the interface must be in high-speed 138062306a36Sopenharmony_ci * mode) to use the PrtTstCtl test modes. 138162306a36Sopenharmony_ci * @prtpwr: Port Power (PrtPwr) 138262306a36Sopenharmony_ci * The application uses this field to control power to this port, 138362306a36Sopenharmony_ci * and the core clears this bit on an overcurrent condition. 138462306a36Sopenharmony_ci * * 1'b0: Power off 138562306a36Sopenharmony_ci * * 1'b1: Power on 138662306a36Sopenharmony_ci * @prtlnsts: Port Line Status (PrtLnSts) 138762306a36Sopenharmony_ci * Indicates the current logic level USB data lines 138862306a36Sopenharmony_ci * * Bit [10]: Logic level of D- 138962306a36Sopenharmony_ci * * Bit [11]: Logic level of D+ 139062306a36Sopenharmony_ci * @prtrst: Port Reset (PrtRst) 139162306a36Sopenharmony_ci * When the application sets this bit, a reset sequence is 139262306a36Sopenharmony_ci * started on this port. The application must time the reset 139362306a36Sopenharmony_ci * period and clear this bit after the reset sequence is 139462306a36Sopenharmony_ci * complete. 139562306a36Sopenharmony_ci * * 1'b0: Port not in reset 139662306a36Sopenharmony_ci * * 1'b1: Port in reset 139762306a36Sopenharmony_ci * The application must leave this bit set for at least a 139862306a36Sopenharmony_ci * minimum duration mentioned below to start a reset on the 139962306a36Sopenharmony_ci * port. The application can leave it set for another 10 ms in 140062306a36Sopenharmony_ci * addition to the required minimum duration, before clearing 140162306a36Sopenharmony_ci * the bit, even though there is no maximum limit set by the 140262306a36Sopenharmony_ci * USB standard. 140362306a36Sopenharmony_ci * * High speed: 50 ms 140462306a36Sopenharmony_ci * * Full speed/Low speed: 10 ms 140562306a36Sopenharmony_ci * @prtsusp: Port Suspend (PrtSusp) 140662306a36Sopenharmony_ci * The application sets this bit to put this port in Suspend 140762306a36Sopenharmony_ci * mode. The core only stops sending SOFs when this is set. 140862306a36Sopenharmony_ci * To stop the PHY clock, the application must set the Port 140962306a36Sopenharmony_ci * Clock Stop bit, which will assert the suspend input pin of 141062306a36Sopenharmony_ci * the PHY. 141162306a36Sopenharmony_ci * The read value of this bit reflects the current suspend 141262306a36Sopenharmony_ci * status of the port. This bit is cleared by the core after a 141362306a36Sopenharmony_ci * remote wakeup signal is detected or the application sets 141462306a36Sopenharmony_ci * the Port Reset bit or Port Resume bit in this register or the 141562306a36Sopenharmony_ci * Resume/Remote Wakeup Detected Interrupt bit or 141662306a36Sopenharmony_ci * Disconnect Detected Interrupt bit in the Core Interrupt 141762306a36Sopenharmony_ci * register (GINTSTS.WkUpInt or GINTSTS.DisconnInt, 141862306a36Sopenharmony_ci * respectively). 141962306a36Sopenharmony_ci * * 1'b0: Port not in Suspend mode 142062306a36Sopenharmony_ci * * 1'b1: Port in Suspend mode 142162306a36Sopenharmony_ci * @prtres: Port Resume (PrtRes) 142262306a36Sopenharmony_ci * The application sets this bit to drive resume signaling on 142362306a36Sopenharmony_ci * the port. The core continues to drive the resume signal 142462306a36Sopenharmony_ci * until the application clears this bit. 142562306a36Sopenharmony_ci * If the core detects a USB remote wakeup sequence, as 142662306a36Sopenharmony_ci * indicated by the Port Resume/Remote Wakeup Detected 142762306a36Sopenharmony_ci * Interrupt bit of the Core Interrupt register 142862306a36Sopenharmony_ci * (GINTSTS.WkUpInt), the core starts driving resume 142962306a36Sopenharmony_ci * signaling without application intervention and clears this bit 143062306a36Sopenharmony_ci * when it detects a disconnect condition. The read value of 143162306a36Sopenharmony_ci * this bit indicates whether the core is currently driving 143262306a36Sopenharmony_ci * resume signaling. 143362306a36Sopenharmony_ci * * 1'b0: No resume driven 143462306a36Sopenharmony_ci * * 1'b1: Resume driven 143562306a36Sopenharmony_ci * @prtovrcurrchng: Port Overcurrent Change (PrtOvrCurrChng) 143662306a36Sopenharmony_ci * The core sets this bit when the status of the Port 143762306a36Sopenharmony_ci * Overcurrent Active bit (bit 4) in this register changes. 143862306a36Sopenharmony_ci * @prtovrcurract: Port Overcurrent Active (PrtOvrCurrAct) 143962306a36Sopenharmony_ci * Indicates the overcurrent condition of the port. 144062306a36Sopenharmony_ci * * 1'b0: No overcurrent condition 144162306a36Sopenharmony_ci * * 1'b1: Overcurrent condition 144262306a36Sopenharmony_ci * @prtenchng: Port Enable/Disable Change (PrtEnChng) 144362306a36Sopenharmony_ci * The core sets this bit when the status of the Port Enable bit 144462306a36Sopenharmony_ci * [2] of this register changes. 144562306a36Sopenharmony_ci * @prtena: Port Enable (PrtEna) 144662306a36Sopenharmony_ci * A port is enabled only by the core after a reset sequence, 144762306a36Sopenharmony_ci * and is disabled by an overcurrent condition, a disconnect 144862306a36Sopenharmony_ci * condition, or by the application clearing this bit. The 144962306a36Sopenharmony_ci * application cannot set this bit by a register write. It can only 145062306a36Sopenharmony_ci * clear it to disable the port. This bit does not trigger any 145162306a36Sopenharmony_ci * interrupt to the application. 145262306a36Sopenharmony_ci * * 1'b0: Port disabled 145362306a36Sopenharmony_ci * * 1'b1: Port enabled 145462306a36Sopenharmony_ci * @prtconndet: Port Connect Detected (PrtConnDet) 145562306a36Sopenharmony_ci * The core sets this bit when a device connection is detected 145662306a36Sopenharmony_ci * to trigger an interrupt to the application using the Host Port 145762306a36Sopenharmony_ci * Interrupt bit of the Core Interrupt register (GINTSTS.PrtInt). 145862306a36Sopenharmony_ci * The application must write a 1 to this bit to clear the 145962306a36Sopenharmony_ci * interrupt. 146062306a36Sopenharmony_ci * @prtconnsts: Port Connect Status (PrtConnSts) 146162306a36Sopenharmony_ci * * 0: No device is attached to the port. 146262306a36Sopenharmony_ci * * 1: A device is attached to the port. 146362306a36Sopenharmony_ci */ 146462306a36Sopenharmony_ci struct cvmx_usbcx_hprt_s { 146562306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_19_31 : 13, 146662306a36Sopenharmony_ci __BITFIELD_FIELD(u32 prtspd : 2, 146762306a36Sopenharmony_ci __BITFIELD_FIELD(u32 prttstctl : 4, 146862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 prtpwr : 1, 146962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 prtlnsts : 2, 147062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 reserved_9_9 : 1, 147162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 prtrst : 1, 147262306a36Sopenharmony_ci __BITFIELD_FIELD(u32 prtsusp : 1, 147362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 prtres : 1, 147462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 prtovrcurrchng : 1, 147562306a36Sopenharmony_ci __BITFIELD_FIELD(u32 prtovrcurract : 1, 147662306a36Sopenharmony_ci __BITFIELD_FIELD(u32 prtenchng : 1, 147762306a36Sopenharmony_ci __BITFIELD_FIELD(u32 prtena : 1, 147862306a36Sopenharmony_ci __BITFIELD_FIELD(u32 prtconndet : 1, 147962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 prtconnsts : 1, 148062306a36Sopenharmony_ci ;))))))))))))))) 148162306a36Sopenharmony_ci } s; 148262306a36Sopenharmony_ci}; 148362306a36Sopenharmony_ci 148462306a36Sopenharmony_ci/** 148562306a36Sopenharmony_ci * cvmx_usbc#_hptxfsiz 148662306a36Sopenharmony_ci * 148762306a36Sopenharmony_ci * Host Periodic Transmit FIFO Size Register (HPTXFSIZ) 148862306a36Sopenharmony_ci * 148962306a36Sopenharmony_ci * This register holds the size and the memory start address of the Periodic 149062306a36Sopenharmony_ci * TxFIFO, as shown in Figures 310 and 311. 149162306a36Sopenharmony_ci */ 149262306a36Sopenharmony_ciunion cvmx_usbcx_hptxfsiz { 149362306a36Sopenharmony_ci u32 u32; 149462306a36Sopenharmony_ci /** 149562306a36Sopenharmony_ci * struct cvmx_usbcx_hptxfsiz_s 149662306a36Sopenharmony_ci * @ptxfsize: Host Periodic TxFIFO Depth (PTxFSize) 149762306a36Sopenharmony_ci * This value is in terms of 32-bit words. 149862306a36Sopenharmony_ci * * Minimum value is 16 149962306a36Sopenharmony_ci * * Maximum value is 32768 150062306a36Sopenharmony_ci * @ptxfstaddr: Host Periodic TxFIFO Start Address (PTxFStAddr) 150162306a36Sopenharmony_ci */ 150262306a36Sopenharmony_ci struct cvmx_usbcx_hptxfsiz_s { 150362306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ptxfsize : 16, 150462306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ptxfstaddr : 16, 150562306a36Sopenharmony_ci ;)) 150662306a36Sopenharmony_ci } s; 150762306a36Sopenharmony_ci}; 150862306a36Sopenharmony_ci 150962306a36Sopenharmony_ci/** 151062306a36Sopenharmony_ci * cvmx_usbc#_hptxsts 151162306a36Sopenharmony_ci * 151262306a36Sopenharmony_ci * Host Periodic Transmit FIFO/Queue Status Register (HPTXSTS) 151362306a36Sopenharmony_ci * 151462306a36Sopenharmony_ci * This read-only register contains the free space information for the Periodic 151562306a36Sopenharmony_ci * TxFIFO and the Periodic Transmit Request Queue 151662306a36Sopenharmony_ci */ 151762306a36Sopenharmony_ciunion cvmx_usbcx_hptxsts { 151862306a36Sopenharmony_ci u32 u32; 151962306a36Sopenharmony_ci /** 152062306a36Sopenharmony_ci * struct cvmx_usbcx_hptxsts_s 152162306a36Sopenharmony_ci * @ptxqtop: Top of the Periodic Transmit Request Queue (PTxQTop) 152262306a36Sopenharmony_ci * This indicates the entry in the Periodic Tx Request Queue that 152362306a36Sopenharmony_ci * is currently being processes by the MAC. 152462306a36Sopenharmony_ci * This register is used for debugging. 152562306a36Sopenharmony_ci * * Bit [31]: Odd/Even (micro)frame 152662306a36Sopenharmony_ci * - 1'b0: send in even (micro)frame 152762306a36Sopenharmony_ci * - 1'b1: send in odd (micro)frame 152862306a36Sopenharmony_ci * * Bits [30:27]: Channel/endpoint number 152962306a36Sopenharmony_ci * * Bits [26:25]: Type 153062306a36Sopenharmony_ci * - 2'b00: IN/OUT 153162306a36Sopenharmony_ci * - 2'b01: Zero-length packet 153262306a36Sopenharmony_ci * - 2'b10: CSPLIT 153362306a36Sopenharmony_ci * - 2'b11: Disable channel command 153462306a36Sopenharmony_ci * * Bit [24]: Terminate (last entry for the selected 153562306a36Sopenharmony_ci * channel/endpoint) 153662306a36Sopenharmony_ci * @ptxqspcavail: Periodic Transmit Request Queue Space Available 153762306a36Sopenharmony_ci * (PTxQSpcAvail) 153862306a36Sopenharmony_ci * Indicates the number of free locations available to be written 153962306a36Sopenharmony_ci * in the Periodic Transmit Request Queue. This queue holds both 154062306a36Sopenharmony_ci * IN and OUT requests. 154162306a36Sopenharmony_ci * * 8'h0: Periodic Transmit Request Queue is full 154262306a36Sopenharmony_ci * * 8'h1: 1 location available 154362306a36Sopenharmony_ci * * 8'h2: 2 locations available 154462306a36Sopenharmony_ci * * n: n locations available (0..8) 154562306a36Sopenharmony_ci * * Others: Reserved 154662306a36Sopenharmony_ci * @ptxfspcavail: Periodic Transmit Data FIFO Space Available 154762306a36Sopenharmony_ci * (PTxFSpcAvail) 154862306a36Sopenharmony_ci * Indicates the number of free locations available to be written 154962306a36Sopenharmony_ci * to in the Periodic TxFIFO. 155062306a36Sopenharmony_ci * Values are in terms of 32-bit words 155162306a36Sopenharmony_ci * * 16'h0: Periodic TxFIFO is full 155262306a36Sopenharmony_ci * * 16'h1: 1 word available 155362306a36Sopenharmony_ci * * 16'h2: 2 words available 155462306a36Sopenharmony_ci * * 16'hn: n words available (where 0..32768) 155562306a36Sopenharmony_ci * * 16'h8000: 32768 words available 155662306a36Sopenharmony_ci * * Others: Reserved 155762306a36Sopenharmony_ci */ 155862306a36Sopenharmony_ci struct cvmx_usbcx_hptxsts_s { 155962306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ptxqtop : 8, 156062306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ptxqspcavail : 8, 156162306a36Sopenharmony_ci __BITFIELD_FIELD(u32 ptxfspcavail : 16, 156262306a36Sopenharmony_ci ;))) 156362306a36Sopenharmony_ci } s; 156462306a36Sopenharmony_ci}; 156562306a36Sopenharmony_ci 156662306a36Sopenharmony_ci/** 156762306a36Sopenharmony_ci * cvmx_usbn#_clk_ctl 156862306a36Sopenharmony_ci * 156962306a36Sopenharmony_ci * USBN_CLK_CTL = USBN's Clock Control 157062306a36Sopenharmony_ci * 157162306a36Sopenharmony_ci * This register is used to control the frequency of the hclk and the 157262306a36Sopenharmony_ci * hreset and phy_rst signals. 157362306a36Sopenharmony_ci */ 157462306a36Sopenharmony_ciunion cvmx_usbnx_clk_ctl { 157562306a36Sopenharmony_ci u64 u64; 157662306a36Sopenharmony_ci /** 157762306a36Sopenharmony_ci * struct cvmx_usbnx_clk_ctl_s 157862306a36Sopenharmony_ci * @divide2: The 'hclk' used by the USB subsystem is derived 157962306a36Sopenharmony_ci * from the eclk. 158062306a36Sopenharmony_ci * Also see the field DIVIDE. DIVIDE2<1> must currently 158162306a36Sopenharmony_ci * be zero because it is not implemented, so the maximum 158262306a36Sopenharmony_ci * ratio of eclk/hclk is currently 16. 158362306a36Sopenharmony_ci * The actual divide number for hclk is: 158462306a36Sopenharmony_ci * (DIVIDE2 + 1) * (DIVIDE + 1) 158562306a36Sopenharmony_ci * @hclk_rst: When this field is '0' the HCLK-DIVIDER used to 158662306a36Sopenharmony_ci * generate the hclk in the USB Subsystem is held 158762306a36Sopenharmony_ci * in reset. This bit must be set to '0' before 158862306a36Sopenharmony_ci * changing the value os DIVIDE in this register. 158962306a36Sopenharmony_ci * The reset to the HCLK_DIVIDERis also asserted 159062306a36Sopenharmony_ci * when core reset is asserted. 159162306a36Sopenharmony_ci * @p_x_on: Force USB-PHY on during suspend. 159262306a36Sopenharmony_ci * '1' USB-PHY XO block is powered-down during 159362306a36Sopenharmony_ci * suspend. 159462306a36Sopenharmony_ci * '0' USB-PHY XO block is powered-up during 159562306a36Sopenharmony_ci * suspend. 159662306a36Sopenharmony_ci * The value of this field must be set while POR is 159762306a36Sopenharmony_ci * active. 159862306a36Sopenharmony_ci * @p_rtype: PHY reference clock type 159962306a36Sopenharmony_ci * On CN50XX/CN52XX/CN56XX the values are: 160062306a36Sopenharmony_ci * '0' The USB-PHY uses a 12MHz crystal as a clock source 160162306a36Sopenharmony_ci * at the USB_XO and USB_XI pins. 160262306a36Sopenharmony_ci * '1' Reserved. 160362306a36Sopenharmony_ci * '2' The USB_PHY uses 12/24/48MHz 2.5V board clock at the 160462306a36Sopenharmony_ci * USB_XO pin. USB_XI should be tied to ground in this 160562306a36Sopenharmony_ci * case. 160662306a36Sopenharmony_ci * '3' Reserved. 160762306a36Sopenharmony_ci * On CN3xxx bits 14 and 15 are p_xenbn and p_rclk and values are: 160862306a36Sopenharmony_ci * '0' Reserved. 160962306a36Sopenharmony_ci * '1' Reserved. 161062306a36Sopenharmony_ci * '2' The PHY PLL uses the XO block output as a reference. 161162306a36Sopenharmony_ci * The XO block uses an external clock supplied on the 161262306a36Sopenharmony_ci * XO pin. USB_XI should be tied to ground for this 161362306a36Sopenharmony_ci * usage. 161462306a36Sopenharmony_ci * '3' The XO block uses the clock from a crystal. 161562306a36Sopenharmony_ci * @p_com_on: '0' Force USB-PHY XO Bias, Bandgap and PLL to 161662306a36Sopenharmony_ci * remain powered in Suspend Mode. 161762306a36Sopenharmony_ci * '1' The USB-PHY XO Bias, Bandgap and PLL are 161862306a36Sopenharmony_ci * powered down in suspend mode. 161962306a36Sopenharmony_ci * The value of this field must be set while POR is 162062306a36Sopenharmony_ci * active. 162162306a36Sopenharmony_ci * @p_c_sel: Phy clock speed select. 162262306a36Sopenharmony_ci * Selects the reference clock / crystal frequency. 162362306a36Sopenharmony_ci * '11': Reserved 162462306a36Sopenharmony_ci * '10': 48 MHz (reserved when a crystal is used) 162562306a36Sopenharmony_ci * '01': 24 MHz (reserved when a crystal is used) 162662306a36Sopenharmony_ci * '00': 12 MHz 162762306a36Sopenharmony_ci * The value of this field must be set while POR is 162862306a36Sopenharmony_ci * active. 162962306a36Sopenharmony_ci * NOTE: if a crystal is used as a reference clock, 163062306a36Sopenharmony_ci * this field must be set to 12 MHz. 163162306a36Sopenharmony_ci * @cdiv_byp: Used to enable the bypass input to the USB_CLK_DIV. 163262306a36Sopenharmony_ci * @sd_mode: Scaledown mode for the USBC. Control timing events 163362306a36Sopenharmony_ci * in the USBC, for normal operation this must be '0'. 163462306a36Sopenharmony_ci * @s_bist: Starts bist on the hclk memories, during the '0' 163562306a36Sopenharmony_ci * to '1' transition. 163662306a36Sopenharmony_ci * @por: Power On Reset for the PHY. 163762306a36Sopenharmony_ci * Resets all the PHYS registers and state machines. 163862306a36Sopenharmony_ci * @enable: When '1' allows the generation of the hclk. When 163962306a36Sopenharmony_ci * '0' the hclk will not be generated. SEE DIVIDE 164062306a36Sopenharmony_ci * field of this register. 164162306a36Sopenharmony_ci * @prst: When this field is '0' the reset associated with 164262306a36Sopenharmony_ci * the phy_clk functionality in the USB Subsystem is 164362306a36Sopenharmony_ci * help in reset. This bit should not be set to '1' 164462306a36Sopenharmony_ci * until the time it takes 6 clocks (hclk or phy_clk, 164562306a36Sopenharmony_ci * whichever is slower) has passed. Under normal 164662306a36Sopenharmony_ci * operation once this bit is set to '1' it should not 164762306a36Sopenharmony_ci * be set to '0'. 164862306a36Sopenharmony_ci * @hrst: When this field is '0' the reset associated with 164962306a36Sopenharmony_ci * the hclk functioanlity in the USB Subsystem is 165062306a36Sopenharmony_ci * held in reset.This bit should not be set to '1' 165162306a36Sopenharmony_ci * until 12ms after phy_clk is stable. Under normal 165262306a36Sopenharmony_ci * operation, once this bit is set to '1' it should 165362306a36Sopenharmony_ci * not be set to '0'. 165462306a36Sopenharmony_ci * @divide: The frequency of 'hclk' used by the USB subsystem 165562306a36Sopenharmony_ci * is the eclk frequency divided by the value of 165662306a36Sopenharmony_ci * (DIVIDE2 + 1) * (DIVIDE + 1), also see the field 165762306a36Sopenharmony_ci * DIVIDE2 of this register. 165862306a36Sopenharmony_ci * The hclk frequency should be less than 125Mhz. 165962306a36Sopenharmony_ci * After writing a value to this field the SW should 166062306a36Sopenharmony_ci * read the field for the value written. 166162306a36Sopenharmony_ci * The ENABLE field of this register should not be set 166262306a36Sopenharmony_ci * until AFTER this field is set and then read. 166362306a36Sopenharmony_ci */ 166462306a36Sopenharmony_ci struct cvmx_usbnx_clk_ctl_s { 166562306a36Sopenharmony_ci __BITFIELD_FIELD(u64 reserved_20_63 : 44, 166662306a36Sopenharmony_ci __BITFIELD_FIELD(u64 divide2 : 2, 166762306a36Sopenharmony_ci __BITFIELD_FIELD(u64 hclk_rst : 1, 166862306a36Sopenharmony_ci __BITFIELD_FIELD(u64 p_x_on : 1, 166962306a36Sopenharmony_ci __BITFIELD_FIELD(u64 p_rtype : 2, 167062306a36Sopenharmony_ci __BITFIELD_FIELD(u64 p_com_on : 1, 167162306a36Sopenharmony_ci __BITFIELD_FIELD(u64 p_c_sel : 2, 167262306a36Sopenharmony_ci __BITFIELD_FIELD(u64 cdiv_byp : 1, 167362306a36Sopenharmony_ci __BITFIELD_FIELD(u64 sd_mode : 2, 167462306a36Sopenharmony_ci __BITFIELD_FIELD(u64 s_bist : 1, 167562306a36Sopenharmony_ci __BITFIELD_FIELD(u64 por : 1, 167662306a36Sopenharmony_ci __BITFIELD_FIELD(u64 enable : 1, 167762306a36Sopenharmony_ci __BITFIELD_FIELD(u64 prst : 1, 167862306a36Sopenharmony_ci __BITFIELD_FIELD(u64 hrst : 1, 167962306a36Sopenharmony_ci __BITFIELD_FIELD(u64 divide : 3, 168062306a36Sopenharmony_ci ;))))))))))))))) 168162306a36Sopenharmony_ci } s; 168262306a36Sopenharmony_ci}; 168362306a36Sopenharmony_ci 168462306a36Sopenharmony_ci/** 168562306a36Sopenharmony_ci * cvmx_usbn#_usbp_ctl_status 168662306a36Sopenharmony_ci * 168762306a36Sopenharmony_ci * USBN_USBP_CTL_STATUS = USBP Control And Status Register 168862306a36Sopenharmony_ci * 168962306a36Sopenharmony_ci * Contains general control and status information for the USBN block. 169062306a36Sopenharmony_ci */ 169162306a36Sopenharmony_ciunion cvmx_usbnx_usbp_ctl_status { 169262306a36Sopenharmony_ci u64 u64; 169362306a36Sopenharmony_ci /** 169462306a36Sopenharmony_ci * struct cvmx_usbnx_usbp_ctl_status_s 169562306a36Sopenharmony_ci * @txrisetune: HS Transmitter Rise/Fall Time Adjustment 169662306a36Sopenharmony_ci * @txvreftune: HS DC Voltage Level Adjustment 169762306a36Sopenharmony_ci * @txfslstune: FS/LS Source Impedance Adjustment 169862306a36Sopenharmony_ci * @txhsxvtune: Transmitter High-Speed Crossover Adjustment 169962306a36Sopenharmony_ci * @sqrxtune: Squelch Threshold Adjustment 170062306a36Sopenharmony_ci * @compdistune: Disconnect Threshold Adjustment 170162306a36Sopenharmony_ci * @otgtune: VBUS Valid Threshold Adjustment 170262306a36Sopenharmony_ci * @otgdisable: OTG Block Disable 170362306a36Sopenharmony_ci * @portreset: Per_Port Reset 170462306a36Sopenharmony_ci * @drvvbus: Drive VBUS 170562306a36Sopenharmony_ci * @lsbist: Low-Speed BIST Enable. 170662306a36Sopenharmony_ci * @fsbist: Full-Speed BIST Enable. 170762306a36Sopenharmony_ci * @hsbist: High-Speed BIST Enable. 170862306a36Sopenharmony_ci * @bist_done: PHY Bist Done. 170962306a36Sopenharmony_ci * Asserted at the end of the PHY BIST sequence. 171062306a36Sopenharmony_ci * @bist_err: PHY Bist Error. 171162306a36Sopenharmony_ci * Indicates an internal error was detected during 171262306a36Sopenharmony_ci * the BIST sequence. 171362306a36Sopenharmony_ci * @tdata_out: PHY Test Data Out. 171462306a36Sopenharmony_ci * Presents either internally generated signals or 171562306a36Sopenharmony_ci * test register contents, based upon the value of 171662306a36Sopenharmony_ci * test_data_out_sel. 171762306a36Sopenharmony_ci * @siddq: Drives the USBP (USB-PHY) SIDDQ input. 171862306a36Sopenharmony_ci * Normally should be set to zero. 171962306a36Sopenharmony_ci * When customers have no intent to use USB PHY 172062306a36Sopenharmony_ci * interface, they should: 172162306a36Sopenharmony_ci * - still provide 3.3V to USB_VDD33, and 172262306a36Sopenharmony_ci * - tie USB_REXT to 3.3V supply, and 172362306a36Sopenharmony_ci * - set USBN*_USBP_CTL_STATUS[SIDDQ]=1 172462306a36Sopenharmony_ci * @txpreemphasistune: HS Transmitter Pre-Emphasis Enable 172562306a36Sopenharmony_ci * @dma_bmode: When set to 1 the L2C DMA address will be updated 172662306a36Sopenharmony_ci * with byte-counts between packets. When set to 0 172762306a36Sopenharmony_ci * the L2C DMA address is incremented to the next 172862306a36Sopenharmony_ci * 4-byte aligned address after adding byte-count. 172962306a36Sopenharmony_ci * @usbc_end: Bigendian input to the USB Core. This should be 173062306a36Sopenharmony_ci * set to '0' for operation. 173162306a36Sopenharmony_ci * @usbp_bist: PHY, This is cleared '0' to run BIST on the USBP. 173262306a36Sopenharmony_ci * @tclk: PHY Test Clock, used to load TDATA_IN to the USBP. 173362306a36Sopenharmony_ci * @dp_pulld: PHY DP_PULLDOWN input to the USB-PHY. 173462306a36Sopenharmony_ci * This signal enables the pull-down resistance on 173562306a36Sopenharmony_ci * the D+ line. '1' pull down-resistance is connected 173662306a36Sopenharmony_ci * to D+/ '0' pull down resistance is not connected 173762306a36Sopenharmony_ci * to D+. When an A/B device is acting as a host 173862306a36Sopenharmony_ci * (downstream-facing port), dp_pulldown and 173962306a36Sopenharmony_ci * dm_pulldown are enabled. This must not toggle 174062306a36Sopenharmony_ci * during normal operation. 174162306a36Sopenharmony_ci * @dm_pulld: PHY DM_PULLDOWN input to the USB-PHY. 174262306a36Sopenharmony_ci * This signal enables the pull-down resistance on 174362306a36Sopenharmony_ci * the D- line. '1' pull down-resistance is connected 174462306a36Sopenharmony_ci * to D-. '0' pull down resistance is not connected 174562306a36Sopenharmony_ci * to D-. When an A/B device is acting as a host 174662306a36Sopenharmony_ci * (downstream-facing port), dp_pulldown and 174762306a36Sopenharmony_ci * dm_pulldown are enabled. This must not toggle 174862306a36Sopenharmony_ci * during normal operation. 174962306a36Sopenharmony_ci * @hst_mode: When '0' the USB is acting as HOST, when '1' 175062306a36Sopenharmony_ci * USB is acting as device. This field needs to be 175162306a36Sopenharmony_ci * set while the USB is in reset. 175262306a36Sopenharmony_ci * @tuning: Transmitter Tuning for High-Speed Operation. 175362306a36Sopenharmony_ci * Tunes the current supply and rise/fall output 175462306a36Sopenharmony_ci * times for high-speed operation. 175562306a36Sopenharmony_ci * [20:19] == 11: Current supply increased 175662306a36Sopenharmony_ci * approximately 9% 175762306a36Sopenharmony_ci * [20:19] == 10: Current supply increased 175862306a36Sopenharmony_ci * approximately 4.5% 175962306a36Sopenharmony_ci * [20:19] == 01: Design default. 176062306a36Sopenharmony_ci * [20:19] == 00: Current supply decreased 176162306a36Sopenharmony_ci * approximately 4.5% 176262306a36Sopenharmony_ci * [22:21] == 11: Rise and fall times are increased. 176362306a36Sopenharmony_ci * [22:21] == 10: Design default. 176462306a36Sopenharmony_ci * [22:21] == 01: Rise and fall times are decreased. 176562306a36Sopenharmony_ci * [22:21] == 00: Rise and fall times are decreased 176662306a36Sopenharmony_ci * further as compared to the 01 setting. 176762306a36Sopenharmony_ci * @tx_bs_enh: Transmit Bit Stuffing on [15:8]. 176862306a36Sopenharmony_ci * Enables or disables bit stuffing on data[15:8] 176962306a36Sopenharmony_ci * when bit-stuffing is enabled. 177062306a36Sopenharmony_ci * @tx_bs_en: Transmit Bit Stuffing on [7:0]. 177162306a36Sopenharmony_ci * Enables or disables bit stuffing on data[7:0] 177262306a36Sopenharmony_ci * when bit-stuffing is enabled. 177362306a36Sopenharmony_ci * @loop_enb: PHY Loopback Test Enable. 177462306a36Sopenharmony_ci * '1': During data transmission the receive is 177562306a36Sopenharmony_ci * enabled. 177662306a36Sopenharmony_ci * '0': During data transmission the receive is 177762306a36Sopenharmony_ci * disabled. 177862306a36Sopenharmony_ci * Must be '0' for normal operation. 177962306a36Sopenharmony_ci * @vtest_enb: Analog Test Pin Enable. 178062306a36Sopenharmony_ci * '1' The PHY's analog_test pin is enabled for the 178162306a36Sopenharmony_ci * input and output of applicable analog test signals. 178262306a36Sopenharmony_ci * '0' THe analog_test pin is disabled. 178362306a36Sopenharmony_ci * @bist_enb: Built-In Self Test Enable. 178462306a36Sopenharmony_ci * Used to activate BIST in the PHY. 178562306a36Sopenharmony_ci * @tdata_sel: Test Data Out Select. 178662306a36Sopenharmony_ci * '1' test_data_out[3:0] (PHY) register contents 178762306a36Sopenharmony_ci * are output. '0' internally generated signals are 178862306a36Sopenharmony_ci * output. 178962306a36Sopenharmony_ci * @taddr_in: Mode Address for Test Interface. 179062306a36Sopenharmony_ci * Specifies the register address for writing to or 179162306a36Sopenharmony_ci * reading from the PHY test interface register. 179262306a36Sopenharmony_ci * @tdata_in: Internal Testing Register Input Data and Select 179362306a36Sopenharmony_ci * This is a test bus. Data is present on [3:0], 179462306a36Sopenharmony_ci * and its corresponding select (enable) is present 179562306a36Sopenharmony_ci * on bits [7:4]. 179662306a36Sopenharmony_ci * @ate_reset: Reset input from automatic test equipment. 179762306a36Sopenharmony_ci * This is a test signal. When the USB Core is 179862306a36Sopenharmony_ci * powered up (not in Susned Mode), an automatic 179962306a36Sopenharmony_ci * tester can use this to disable phy_clock and 180062306a36Sopenharmony_ci * free_clk, then re-enable them with an aligned 180162306a36Sopenharmony_ci * phase. 180262306a36Sopenharmony_ci * '1': The phy_clk and free_clk outputs are 180362306a36Sopenharmony_ci * disabled. "0": The phy_clock and free_clk outputs 180462306a36Sopenharmony_ci * are available within a specific period after the 180562306a36Sopenharmony_ci * de-assertion. 180662306a36Sopenharmony_ci */ 180762306a36Sopenharmony_ci struct cvmx_usbnx_usbp_ctl_status_s { 180862306a36Sopenharmony_ci __BITFIELD_FIELD(u64 txrisetune : 1, 180962306a36Sopenharmony_ci __BITFIELD_FIELD(u64 txvreftune : 4, 181062306a36Sopenharmony_ci __BITFIELD_FIELD(u64 txfslstune : 4, 181162306a36Sopenharmony_ci __BITFIELD_FIELD(u64 txhsxvtune : 2, 181262306a36Sopenharmony_ci __BITFIELD_FIELD(u64 sqrxtune : 3, 181362306a36Sopenharmony_ci __BITFIELD_FIELD(u64 compdistune : 3, 181462306a36Sopenharmony_ci __BITFIELD_FIELD(u64 otgtune : 3, 181562306a36Sopenharmony_ci __BITFIELD_FIELD(u64 otgdisable : 1, 181662306a36Sopenharmony_ci __BITFIELD_FIELD(u64 portreset : 1, 181762306a36Sopenharmony_ci __BITFIELD_FIELD(u64 drvvbus : 1, 181862306a36Sopenharmony_ci __BITFIELD_FIELD(u64 lsbist : 1, 181962306a36Sopenharmony_ci __BITFIELD_FIELD(u64 fsbist : 1, 182062306a36Sopenharmony_ci __BITFIELD_FIELD(u64 hsbist : 1, 182162306a36Sopenharmony_ci __BITFIELD_FIELD(u64 bist_done : 1, 182262306a36Sopenharmony_ci __BITFIELD_FIELD(u64 bist_err : 1, 182362306a36Sopenharmony_ci __BITFIELD_FIELD(u64 tdata_out : 4, 182462306a36Sopenharmony_ci __BITFIELD_FIELD(u64 siddq : 1, 182562306a36Sopenharmony_ci __BITFIELD_FIELD(u64 txpreemphasistune : 1, 182662306a36Sopenharmony_ci __BITFIELD_FIELD(u64 dma_bmode : 1, 182762306a36Sopenharmony_ci __BITFIELD_FIELD(u64 usbc_end : 1, 182862306a36Sopenharmony_ci __BITFIELD_FIELD(u64 usbp_bist : 1, 182962306a36Sopenharmony_ci __BITFIELD_FIELD(u64 tclk : 1, 183062306a36Sopenharmony_ci __BITFIELD_FIELD(u64 dp_pulld : 1, 183162306a36Sopenharmony_ci __BITFIELD_FIELD(u64 dm_pulld : 1, 183262306a36Sopenharmony_ci __BITFIELD_FIELD(u64 hst_mode : 1, 183362306a36Sopenharmony_ci __BITFIELD_FIELD(u64 tuning : 4, 183462306a36Sopenharmony_ci __BITFIELD_FIELD(u64 tx_bs_enh : 1, 183562306a36Sopenharmony_ci __BITFIELD_FIELD(u64 tx_bs_en : 1, 183662306a36Sopenharmony_ci __BITFIELD_FIELD(u64 loop_enb : 1, 183762306a36Sopenharmony_ci __BITFIELD_FIELD(u64 vtest_enb : 1, 183862306a36Sopenharmony_ci __BITFIELD_FIELD(u64 bist_enb : 1, 183962306a36Sopenharmony_ci __BITFIELD_FIELD(u64 tdata_sel : 1, 184062306a36Sopenharmony_ci __BITFIELD_FIELD(u64 taddr_in : 4, 184162306a36Sopenharmony_ci __BITFIELD_FIELD(u64 tdata_in : 8, 184262306a36Sopenharmony_ci __BITFIELD_FIELD(u64 ate_reset : 1, 184362306a36Sopenharmony_ci ;))))))))))))))))))))))))))))))))))) 184462306a36Sopenharmony_ci } s; 184562306a36Sopenharmony_ci}; 184662306a36Sopenharmony_ci 184762306a36Sopenharmony_ci#endif /* __OCTEON_HCD_H__ */ 1848