0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _SSUSB_HW_REGS_H_
0011 #define _SSUSB_HW_REGS_H_
0012
0013
0014 #define SSUSB_DEV_BASE 0x0000
0015 #define SSUSB_EPCTL_CSR_BASE 0x0800
0016 #define SSUSB_USB3_MAC_CSR_BASE 0x1400
0017 #define SSUSB_USB3_SYS_CSR_BASE 0x1400
0018 #define SSUSB_USB2_CSR_BASE 0x2400
0019
0020
0021 #define SSUSB_SIFSLV_IPPC_BASE 0x0000
0022
0023
0024
0025 #define U3D_LV1ISR (SSUSB_DEV_BASE + 0x0000)
0026 #define U3D_LV1IER (SSUSB_DEV_BASE + 0x0004)
0027 #define U3D_LV1IESR (SSUSB_DEV_BASE + 0x0008)
0028 #define U3D_LV1IECR (SSUSB_DEV_BASE + 0x000C)
0029
0030 #define U3D_EPISR (SSUSB_DEV_BASE + 0x0080)
0031 #define U3D_EPIER (SSUSB_DEV_BASE + 0x0084)
0032 #define U3D_EPIESR (SSUSB_DEV_BASE + 0x0088)
0033 #define U3D_EPIECR (SSUSB_DEV_BASE + 0x008C)
0034
0035 #define U3D_EP0CSR (SSUSB_DEV_BASE + 0x0100)
0036 #define U3D_RXCOUNT0 (SSUSB_DEV_BASE + 0x0108)
0037 #define U3D_RESERVED (SSUSB_DEV_BASE + 0x010C)
0038 #define U3D_TX1CSR0 (SSUSB_DEV_BASE + 0x0110)
0039 #define U3D_TX1CSR1 (SSUSB_DEV_BASE + 0x0114)
0040 #define U3D_TX1CSR2 (SSUSB_DEV_BASE + 0x0118)
0041
0042 #define U3D_RX1CSR0 (SSUSB_DEV_BASE + 0x0210)
0043 #define U3D_RX1CSR1 (SSUSB_DEV_BASE + 0x0214)
0044 #define U3D_RX1CSR2 (SSUSB_DEV_BASE + 0x0218)
0045
0046 #define U3D_FIFO0 (SSUSB_DEV_BASE + 0x0300)
0047
0048 #define U3D_QCR0 (SSUSB_DEV_BASE + 0x0400)
0049 #define U3D_QCR1 (SSUSB_DEV_BASE + 0x0404)
0050 #define U3D_QCR2 (SSUSB_DEV_BASE + 0x0408)
0051 #define U3D_QCR3 (SSUSB_DEV_BASE + 0x040C)
0052 #define U3D_QFCR (SSUSB_DEV_BASE + 0x0428)
0053 #define U3D_TXQHIAR1 (SSUSB_DEV_BASE + 0x0484)
0054 #define U3D_RXQHIAR1 (SSUSB_DEV_BASE + 0x04C4)
0055
0056 #define U3D_TXQCSR1 (SSUSB_DEV_BASE + 0x0510)
0057 #define U3D_TXQSAR1 (SSUSB_DEV_BASE + 0x0514)
0058 #define U3D_TXQCPR1 (SSUSB_DEV_BASE + 0x0518)
0059
0060 #define U3D_RXQCSR1 (SSUSB_DEV_BASE + 0x0610)
0061 #define U3D_RXQSAR1 (SSUSB_DEV_BASE + 0x0614)
0062 #define U3D_RXQCPR1 (SSUSB_DEV_BASE + 0x0618)
0063 #define U3D_RXQLDPR1 (SSUSB_DEV_BASE + 0x061C)
0064
0065 #define U3D_QISAR0 (SSUSB_DEV_BASE + 0x0700)
0066 #define U3D_QIER0 (SSUSB_DEV_BASE + 0x0704)
0067 #define U3D_QIESR0 (SSUSB_DEV_BASE + 0x0708)
0068 #define U3D_QIECR0 (SSUSB_DEV_BASE + 0x070C)
0069 #define U3D_QISAR1 (SSUSB_DEV_BASE + 0x0710)
0070 #define U3D_QIER1 (SSUSB_DEV_BASE + 0x0714)
0071 #define U3D_QIESR1 (SSUSB_DEV_BASE + 0x0718)
0072 #define U3D_QIECR1 (SSUSB_DEV_BASE + 0x071C)
0073
0074 #define U3D_TQERRIR0 (SSUSB_DEV_BASE + 0x0780)
0075 #define U3D_TQERRIER0 (SSUSB_DEV_BASE + 0x0784)
0076 #define U3D_TQERRIESR0 (SSUSB_DEV_BASE + 0x0788)
0077 #define U3D_TQERRIECR0 (SSUSB_DEV_BASE + 0x078C)
0078 #define U3D_RQERRIR0 (SSUSB_DEV_BASE + 0x07C0)
0079 #define U3D_RQERRIER0 (SSUSB_DEV_BASE + 0x07C4)
0080 #define U3D_RQERRIESR0 (SSUSB_DEV_BASE + 0x07C8)
0081 #define U3D_RQERRIECR0 (SSUSB_DEV_BASE + 0x07CC)
0082 #define U3D_RQERRIR1 (SSUSB_DEV_BASE + 0x07D0)
0083 #define U3D_RQERRIER1 (SSUSB_DEV_BASE + 0x07D4)
0084 #define U3D_RQERRIESR1 (SSUSB_DEV_BASE + 0x07D8)
0085 #define U3D_RQERRIECR1 (SSUSB_DEV_BASE + 0x07DC)
0086
0087 #define U3D_CAP_EP0FFSZ (SSUSB_DEV_BASE + 0x0C04)
0088 #define U3D_CAP_EPNTXFFSZ (SSUSB_DEV_BASE + 0x0C08)
0089 #define U3D_CAP_EPNRXFFSZ (SSUSB_DEV_BASE + 0x0C0C)
0090 #define U3D_CAP_EPINFO (SSUSB_DEV_BASE + 0x0C10)
0091 #define U3D_MISC_CTRL (SSUSB_DEV_BASE + 0x0C84)
0092
0093
0094
0095
0096 #define EP_CTRL_INTR BIT(5)
0097 #define MAC2_INTR BIT(4)
0098 #define DMA_INTR BIT(3)
0099 #define MAC3_INTR BIT(2)
0100 #define QMU_INTR BIT(1)
0101 #define BMU_INTR BIT(0)
0102
0103
0104 #define LV1IECR_MSK GENMASK(31, 0)
0105
0106
0107 #define EPRISR(x) (BIT(16) << (x))
0108 #define SETUPENDISR BIT(16)
0109 #define EPTISR(x) (BIT(0) << (x))
0110 #define EP0ISR BIT(0)
0111
0112
0113 #define EP0_SENDSTALL BIT(25)
0114 #define EP0_FIFOFULL BIT(23)
0115 #define EP0_SENTSTALL BIT(22)
0116 #define EP0_DPHTX BIT(20)
0117 #define EP0_DATAEND BIT(19)
0118 #define EP0_TXPKTRDY BIT(18)
0119 #define EP0_SETUPPKTRDY BIT(17)
0120 #define EP0_RXPKTRDY BIT(16)
0121 #define EP0_MAXPKTSZ_MSK GENMASK(9, 0)
0122 #define EP0_MAXPKTSZ(x) ((x) & EP0_MAXPKTSZ_MSK)
0123 #define EP0_W1C_BITS (~(EP0_RXPKTRDY | EP0_SETUPPKTRDY | EP0_SENTSTALL))
0124
0125
0126 #define TX_DMAREQEN BIT(29)
0127 #define TX_FIFOFULL BIT(25)
0128 #define TX_FIFOEMPTY BIT(24)
0129 #define TX_SENTSTALL BIT(22)
0130 #define TX_SENDSTALL BIT(21)
0131 #define TX_TXPKTRDY BIT(16)
0132 #define TX_TXMAXPKTSZ_MSK GENMASK(10, 0)
0133 #define TX_TXMAXPKTSZ(x) ((x) & TX_TXMAXPKTSZ_MSK)
0134 #define TX_W1C_BITS (~(TX_SENTSTALL))
0135
0136
0137 #define TX_MAX_PKT_G2(x) (((x) & 0xff) << 24)
0138 #define TX_MULT_G2(x) (((x) & 0x7) << 21)
0139 #define TX_MULT_OG(x) (((x) & 0x3) << 22)
0140 #define TX_MAX_PKT_OG(x) (((x) & 0x3f) << 16)
0141 #define TX_SLOT(x) (((x) & 0x3f) << 8)
0142 #define TX_TYPE(x) (((x) & 0x3) << 4)
0143 #define TX_SS_BURST(x) (((x) & 0xf) << 0)
0144 #define TX_MULT(g2c, x) \
0145 ({ \
0146 typeof(x) x_ = (x); \
0147 (g2c) ? TX_MULT_G2(x_) : TX_MULT_OG(x_); \
0148 })
0149 #define TX_MAX_PKT(g2c, x) \
0150 ({ \
0151 typeof(x) x_ = (x); \
0152 (g2c) ? TX_MAX_PKT_G2(x_) : TX_MAX_PKT_OG(x_); \
0153 })
0154
0155
0156 #define TYPE_BULK (0x0)
0157 #define TYPE_INT (0x1)
0158 #define TYPE_ISO (0x2)
0159 #define TYPE_MASK (0x3)
0160
0161
0162 #define TX_BINTERVAL(x) (((x) & 0xff) << 24)
0163 #define TX_FIFOSEGSIZE(x) (((x) & 0xf) << 16)
0164 #define TX_FIFOADDR(x) (((x) & 0x1fff) << 0)
0165
0166
0167 #define RX_DMAREQEN BIT(29)
0168 #define RX_SENTSTALL BIT(22)
0169 #define RX_SENDSTALL BIT(21)
0170 #define RX_RXPKTRDY BIT(16)
0171 #define RX_RXMAXPKTSZ_MSK GENMASK(10, 0)
0172 #define RX_RXMAXPKTSZ(x) ((x) & RX_RXMAXPKTSZ_MSK)
0173 #define RX_W1C_BITS (~(RX_SENTSTALL | RX_RXPKTRDY))
0174
0175
0176 #define RX_MAX_PKT_G2(x) (((x) & 0xff) << 24)
0177 #define RX_MULT_G2(x) (((x) & 0x7) << 21)
0178 #define RX_MULT_OG(x) (((x) & 0x3) << 22)
0179 #define RX_MAX_PKT_OG(x) (((x) & 0x3f) << 16)
0180 #define RX_SLOT(x) (((x) & 0x3f) << 8)
0181 #define RX_TYPE(x) (((x) & 0x3) << 4)
0182 #define RX_SS_BURST(x) (((x) & 0xf) << 0)
0183 #define RX_MULT(g2c, x) \
0184 ({ \
0185 typeof(x) x_ = (x); \
0186 (g2c) ? RX_MULT_G2(x_) : RX_MULT_OG(x_); \
0187 })
0188 #define RX_MAX_PKT(g2c, x) \
0189 ({ \
0190 typeof(x) x_ = (x); \
0191 (g2c) ? RX_MAX_PKT_G2(x_) : RX_MAX_PKT_OG(x_); \
0192 })
0193
0194
0195 #define RX_BINTERVAL(x) (((x) & 0xff) << 24)
0196 #define RX_FIFOSEGSIZE(x) (((x) & 0xf) << 16)
0197 #define RX_FIFOADDR(x) (((x) & 0x1fff) << 0)
0198
0199
0200 #define QMU_RX_CS_EN(x) (BIT(16) << (x))
0201 #define QMU_TX_CS_EN(x) (BIT(0) << (x))
0202 #define QMU_CS16B_EN BIT(0)
0203
0204
0205 #define QMU_TX_ZLP(x) (BIT(0) << (x))
0206
0207
0208 #define QMU_RX_COZ(x) (BIT(16) << (x))
0209 #define QMU_RX_ZLP(x) (BIT(0) << (x))
0210
0211
0212
0213 #define QMU_LAST_DONE_PTR_HI(x) (((x) >> 16) & 0xf)
0214 #define QMU_CUR_GPD_ADDR_HI(x) (((x) >> 8) & 0xf)
0215 #define QMU_START_ADDR_HI_MSK GENMASK(3, 0)
0216 #define QMU_START_ADDR_HI(x) (((x) & 0xf) << 0)
0217
0218
0219
0220 #define QMU_Q_ACTIVE BIT(15)
0221 #define QMU_Q_STOP BIT(2)
0222 #define QMU_Q_RESUME BIT(1)
0223 #define QMU_Q_START BIT(0)
0224
0225
0226 #define QMU_RX_DONE_INT(x) (BIT(16) << (x))
0227 #define QMU_TX_DONE_INT(x) (BIT(0) << (x))
0228
0229
0230 #define RXQ_ZLPERR_INT BIT(20)
0231 #define RXQ_LENERR_INT BIT(18)
0232 #define RXQ_CSERR_INT BIT(17)
0233 #define RXQ_EMPTY_INT BIT(16)
0234 #define TXQ_LENERR_INT BIT(2)
0235 #define TXQ_CSERR_INT BIT(1)
0236 #define TXQ_EMPTY_INT BIT(0)
0237
0238
0239 #define QMU_TX_LEN_ERR(x) (BIT(16) << (x))
0240 #define QMU_TX_CS_ERR(x) (BIT(0) << (x))
0241
0242
0243 #define QMU_RX_LEN_ERR(x) (BIT(16) << (x))
0244 #define QMU_RX_CS_ERR(x) (BIT(0) << (x))
0245
0246
0247 #define QMU_RX_ZLP_ERR(n) (BIT(16) << (n))
0248
0249
0250 #define CAP_RX_EP_NUM(x) (((x) >> 8) & 0x1f)
0251 #define CAP_TX_EP_NUM(x) ((x) & 0x1f)
0252
0253
0254 #define DMA_ADDR_36BIT BIT(31)
0255 #define VBUS_ON BIT(1)
0256 #define VBUS_FRC_EN BIT(0)
0257
0258
0259
0260
0261 #define U3D_DEVICE_CONF (SSUSB_EPCTL_CSR_BASE + 0x0000)
0262 #define U3D_EP_RST (SSUSB_EPCTL_CSR_BASE + 0x0004)
0263
0264 #define U3D_DEV_LINK_INTR_ENABLE (SSUSB_EPCTL_CSR_BASE + 0x0050)
0265 #define U3D_DEV_LINK_INTR (SSUSB_EPCTL_CSR_BASE + 0x0054)
0266
0267
0268
0269
0270 #define DEV_ADDR_MSK GENMASK(30, 24)
0271 #define DEV_ADDR(x) ((0x7f & (x)) << 24)
0272 #define HW_USB2_3_SEL BIT(18)
0273 #define SW_USB2_3_SEL_EN BIT(17)
0274 #define SW_USB2_3_SEL BIT(16)
0275 #define SSUSB_DEV_SPEED(x) ((x) & 0x7)
0276
0277
0278 #define EP1_IN_RST BIT(17)
0279 #define EP1_OUT_RST BIT(1)
0280 #define EP_RST(is_in, epnum) (((is_in) ? BIT(16) : BIT(0)) << (epnum))
0281 #define EP0_RST BIT(0)
0282
0283
0284
0285 #define SSUSB_DEV_SPEED_CHG_INTR BIT(0)
0286
0287
0288
0289
0290 #define U3D_LTSSM_CTRL (SSUSB_USB3_MAC_CSR_BASE + 0x0010)
0291 #define U3D_USB3_CONFIG (SSUSB_USB3_MAC_CSR_BASE + 0x001C)
0292
0293 #define U3D_LINK_STATE_MACHINE (SSUSB_USB3_MAC_CSR_BASE + 0x0134)
0294 #define U3D_LTSSM_INTR_ENABLE (SSUSB_USB3_MAC_CSR_BASE + 0x013C)
0295 #define U3D_LTSSM_INTR (SSUSB_USB3_MAC_CSR_BASE + 0x0140)
0296
0297 #define U3D_U3U2_SWITCH_CTRL (SSUSB_USB3_MAC_CSR_BASE + 0x0170)
0298
0299
0300
0301
0302 #define FORCE_POLLING_FAIL BIT(4)
0303 #define FORCE_RXDETECT_FAIL BIT(3)
0304 #define SOFT_U3_EXIT_EN BIT(2)
0305 #define COMPLIANCE_EN BIT(1)
0306 #define U1_GO_U2_EN BIT(0)
0307
0308
0309 #define USB3_EN BIT(0)
0310
0311
0312 #define LTSSM_STATE(x) ((x) & 0x1f)
0313
0314
0315
0316 #define U3_RESUME_INTR BIT(18)
0317 #define U3_LFPS_TMOUT_INTR BIT(17)
0318 #define VBUS_FALL_INTR BIT(16)
0319 #define VBUS_RISE_INTR BIT(15)
0320 #define RXDET_SUCCESS_INTR BIT(14)
0321 #define EXIT_U3_INTR BIT(13)
0322 #define EXIT_U2_INTR BIT(12)
0323 #define EXIT_U1_INTR BIT(11)
0324 #define ENTER_U3_INTR BIT(10)
0325 #define ENTER_U2_INTR BIT(9)
0326 #define ENTER_U1_INTR BIT(8)
0327 #define ENTER_U0_INTR BIT(7)
0328 #define RECOVERY_INTR BIT(6)
0329 #define WARM_RST_INTR BIT(5)
0330 #define HOT_RST_INTR BIT(4)
0331 #define LOOPBACK_INTR BIT(3)
0332 #define COMPLIANCE_INTR BIT(2)
0333 #define SS_DISABLE_INTR BIT(1)
0334 #define SS_INACTIVE_INTR BIT(0)
0335
0336
0337 #define SOFTCON_CLR_AUTO_EN BIT(0)
0338
0339
0340
0341 #define U3D_LINK_UX_INACT_TIMER (SSUSB_USB3_SYS_CSR_BASE + 0x020C)
0342 #define U3D_LINK_POWER_CONTROL (SSUSB_USB3_SYS_CSR_BASE + 0x0210)
0343 #define U3D_LINK_ERR_COUNT (SSUSB_USB3_SYS_CSR_BASE + 0x0214)
0344 #define U3D_DEV_NOTIF_0 (SSUSB_USB3_SYS_CSR_BASE + 0x0290)
0345 #define U3D_DEV_NOTIF_1 (SSUSB_USB3_SYS_CSR_BASE + 0x0294)
0346
0347
0348
0349
0350 #define DEV_U2_INACT_TIMEOUT_MSK GENMASK(23, 16)
0351 #define DEV_U2_INACT_TIMEOUT_VALUE(x) (((x) & 0xff) << 16)
0352 #define U2_INACT_TIMEOUT_MSK GENMASK(15, 8)
0353 #define U1_INACT_TIMEOUT_MSK GENMASK(7, 0)
0354 #define U1_INACT_TIMEOUT_VALUE(x) ((x) & 0xff)
0355
0356
0357 #define SW_U2_ACCEPT_ENABLE BIT(9)
0358 #define SW_U1_ACCEPT_ENABLE BIT(8)
0359 #define UX_EXIT BIT(5)
0360 #define LGO_U3 BIT(4)
0361 #define LGO_U2 BIT(3)
0362 #define LGO_U1 BIT(2)
0363 #define SW_U2_REQUEST_ENABLE BIT(1)
0364 #define SW_U1_REQUEST_ENABLE BIT(0)
0365
0366
0367 #define CLR_LINK_ERR_CNT BIT(16)
0368 #define LINK_ERROR_COUNT GENMASK(15, 0)
0369
0370
0371 #define DEV_NOTIF_TYPE_SPECIFIC_LOW_MSK GENMASK(31, 8)
0372 #define DEV_NOTIF_VAL_FW(x) (((x) & 0xff) << 8)
0373 #define DEV_NOTIF_VAL_LTM(x) (((x) & 0xfff) << 8)
0374 #define DEV_NOTIF_VAL_IAM(x) (((x) & 0xffff) << 8)
0375 #define DEV_NOTIF_TYPE_MSK GENMASK(7, 4)
0376
0377 #define TYPE_FUNCTION_WAKE (0x1 << 4)
0378 #define TYPE_LATENCY_TOLERANCE_MESSAGE (0x2 << 4)
0379 #define TYPE_BUS_INTERVAL_ADJUST_MESSAGE (0x3 << 4)
0380 #define TYPE_HOST_ROLE_REQUEST (0x4 << 4)
0381 #define TYPE_SUBLINK_SPEED (0x5 << 4)
0382 #define SEND_DEV_NOTIF BIT(0)
0383
0384
0385
0386 #define U3D_POWER_MANAGEMENT (SSUSB_USB2_CSR_BASE + 0x0004)
0387 #define U3D_DEVICE_CONTROL (SSUSB_USB2_CSR_BASE + 0x000C)
0388 #define U3D_USB2_TEST_MODE (SSUSB_USB2_CSR_BASE + 0x0014)
0389 #define U3D_COMMON_USB_INTR_ENABLE (SSUSB_USB2_CSR_BASE + 0x0018)
0390 #define U3D_COMMON_USB_INTR (SSUSB_USB2_CSR_BASE + 0x001C)
0391 #define U3D_LINK_RESET_INFO (SSUSB_USB2_CSR_BASE + 0x0024)
0392 #define U3D_USB20_FRAME_NUM (SSUSB_USB2_CSR_BASE + 0x003C)
0393 #define U3D_USB20_LPM_PARAMETER (SSUSB_USB2_CSR_BASE + 0x0044)
0394 #define U3D_USB20_MISC_CONTROL (SSUSB_USB2_CSR_BASE + 0x004C)
0395 #define U3D_USB20_OPSTATE (SSUSB_USB2_CSR_BASE + 0x0060)
0396
0397
0398
0399
0400 #define LPM_BESL_STALL BIT(14)
0401 #define LPM_BESLD_STALL BIT(13)
0402 #define LPM_RWP BIT(11)
0403 #define LPM_HRWE BIT(10)
0404 #define LPM_MODE(x) (((x) & 0x3) << 8)
0405 #define ISO_UPDATE BIT(7)
0406 #define SOFT_CONN BIT(6)
0407 #define HS_ENABLE BIT(5)
0408 #define RESUME BIT(2)
0409 #define SUSPENDM_ENABLE BIT(0)
0410
0411
0412 #define DC_HOSTREQ BIT(1)
0413 #define DC_SESSION BIT(0)
0414
0415
0416 #define U2U3_AUTO_SWITCH BIT(10)
0417 #define LPM_FORCE_STALL BIT(8)
0418 #define FIFO_ACCESS BIT(6)
0419 #define FORCE_FS BIT(5)
0420 #define FORCE_HS BIT(4)
0421 #define TEST_PACKET_MODE BIT(3)
0422 #define TEST_K_MODE BIT(2)
0423 #define TEST_J_MODE BIT(1)
0424 #define TEST_SE0_NAK_MODE BIT(0)
0425
0426
0427
0428 #define LPM_RESUME_INTR BIT(9)
0429 #define LPM_INTR BIT(8)
0430 #define DISCONN_INTR BIT(5)
0431 #define CONN_INTR BIT(4)
0432 #define SOF_INTR BIT(3)
0433 #define RESET_INTR BIT(2)
0434 #define RESUME_INTR BIT(1)
0435 #define SUSPEND_INTR BIT(0)
0436
0437
0438 #define WTCHRP_MSK GENMASK(19, 16)
0439
0440
0441 #define LPM_BESLCK_U3(x) (((x) & 0xf) << 12)
0442 #define LPM_BESLCK(x) (((x) & 0xf) << 8)
0443 #define LPM_BESLDCK(x) (((x) & 0xf) << 4)
0444 #define LPM_BESL GENMASK(3, 0)
0445
0446
0447 #define LPM_U3_ACK_EN BIT(0)
0448
0449
0450
0451 #define U3D_SSUSB_IP_PW_CTRL0 (SSUSB_SIFSLV_IPPC_BASE + 0x0000)
0452 #define U3D_SSUSB_IP_PW_CTRL1 (SSUSB_SIFSLV_IPPC_BASE + 0x0004)
0453 #define U3D_SSUSB_IP_PW_CTRL2 (SSUSB_SIFSLV_IPPC_BASE + 0x0008)
0454 #define U3D_SSUSB_IP_PW_CTRL3 (SSUSB_SIFSLV_IPPC_BASE + 0x000C)
0455 #define U3D_SSUSB_IP_PW_STS1 (SSUSB_SIFSLV_IPPC_BASE + 0x0010)
0456 #define U3D_SSUSB_IP_PW_STS2 (SSUSB_SIFSLV_IPPC_BASE + 0x0014)
0457 #define U3D_SSUSB_OTG_STS (SSUSB_SIFSLV_IPPC_BASE + 0x0018)
0458 #define U3D_SSUSB_OTG_STS_CLR (SSUSB_SIFSLV_IPPC_BASE + 0x001C)
0459 #define U3D_SSUSB_IP_XHCI_CAP (SSUSB_SIFSLV_IPPC_BASE + 0x0024)
0460 #define U3D_SSUSB_IP_DEV_CAP (SSUSB_SIFSLV_IPPC_BASE + 0x0028)
0461 #define U3D_SSUSB_OTG_INT_EN (SSUSB_SIFSLV_IPPC_BASE + 0x002C)
0462 #define U3D_SSUSB_U3_CTRL_0P (SSUSB_SIFSLV_IPPC_BASE + 0x0030)
0463 #define U3D_SSUSB_U2_CTRL_0P (SSUSB_SIFSLV_IPPC_BASE + 0x0050)
0464 #define U3D_SSUSB_REF_CK_CTRL (SSUSB_SIFSLV_IPPC_BASE + 0x008C)
0465 #define U3D_SSUSB_DEV_RST_CTRL (SSUSB_SIFSLV_IPPC_BASE + 0x0098)
0466 #define U3D_SSUSB_HW_ID (SSUSB_SIFSLV_IPPC_BASE + 0x00A0)
0467 #define U3D_SSUSB_HW_SUB_ID (SSUSB_SIFSLV_IPPC_BASE + 0x00A4)
0468 #define U3D_SSUSB_IP_TRUNK_VERS (U3D_SSUSB_HW_SUB_ID)
0469 #define U3D_SSUSB_PRB_CTRL0 (SSUSB_SIFSLV_IPPC_BASE + 0x00B0)
0470 #define U3D_SSUSB_PRB_CTRL1 (SSUSB_SIFSLV_IPPC_BASE + 0x00B4)
0471 #define U3D_SSUSB_PRB_CTRL2 (SSUSB_SIFSLV_IPPC_BASE + 0x00B8)
0472 #define U3D_SSUSB_PRB_CTRL3 (SSUSB_SIFSLV_IPPC_BASE + 0x00BC)
0473 #define U3D_SSUSB_PRB_CTRL4 (SSUSB_SIFSLV_IPPC_BASE + 0x00C0)
0474 #define U3D_SSUSB_PRB_CTRL5 (SSUSB_SIFSLV_IPPC_BASE + 0x00C4)
0475 #define U3D_SSUSB_IP_SPARE0 (SSUSB_SIFSLV_IPPC_BASE + 0x00C8)
0476
0477
0478
0479
0480 #define SSUSB_IP_SW_RST BIT(0)
0481
0482
0483 #define SSUSB_IP_HOST_PDN BIT(0)
0484
0485
0486 #define SSUSB_IP_DEV_PDN BIT(0)
0487
0488
0489 #define SSUSB_IP_PCIE_PDN BIT(0)
0490
0491
0492 #define SSUSB_IP_SLEEP_STS BIT(30)
0493 #define SSUSB_U3_MAC_RST_B_STS BIT(16)
0494 #define SSUSB_XHCI_RST_B_STS BIT(11)
0495 #define SSUSB_SYS125_RST_B_STS BIT(10)
0496 #define SSUSB_REF_RST_B_STS BIT(8)
0497 #define SSUSB_SYSPLL_STABLE BIT(0)
0498
0499
0500 #define SSUSB_U2_MAC_SYS_RST_B_STS BIT(0)
0501
0502
0503 #define SSUSB_VBUS_VALID BIT(9)
0504
0505
0506 #define SSUSB_VBUS_INTR_CLR BIT(6)
0507
0508
0509 #define SSUSB_IP_XHCI_U2_PORT_NUM(x) (((x) >> 8) & 0xff)
0510 #define SSUSB_IP_XHCI_U3_PORT_NUM(x) ((x) & 0xff)
0511
0512
0513 #define SSUSB_IP_DEV_U3_PORT_NUM(x) ((x) & 0xff)
0514
0515
0516 #define SSUSB_VBUS_CHG_INT_A_EN BIT(7)
0517 #define SSUSB_VBUS_CHG_INT_B_EN BIT(6)
0518
0519
0520 #define SSUSB_U3_PORT_SSP_SPEED BIT(9)
0521 #define SSUSB_U3_PORT_DUAL_MODE BIT(7)
0522 #define SSUSB_U3_PORT_HOST_SEL BIT(2)
0523 #define SSUSB_U3_PORT_PDN BIT(1)
0524 #define SSUSB_U3_PORT_DIS BIT(0)
0525
0526
0527 #define SSUSB_U2_PORT_RG_IDDIG BIT(12)
0528 #define SSUSB_U2_PORT_FORCE_IDDIG BIT(11)
0529 #define SSUSB_U2_PORT_VBUSVALID BIT(9)
0530 #define SSUSB_U2_PORT_OTG_SEL BIT(7)
0531 #define SSUSB_U2_PORT_HOST BIT(2)
0532 #define SSUSB_U2_PORT_PDN BIT(1)
0533 #define SSUSB_U2_PORT_DIS BIT(0)
0534 #define SSUSB_U2_PORT_HOST_SEL (SSUSB_U2_PORT_VBUSVALID | SSUSB_U2_PORT_HOST)
0535
0536
0537 #define SSUSB_DEV_SW_RST BIT(0)
0538
0539
0540 #define IP_TRUNK_VERS(x) (((x) >> 16) & 0xffff)
0541
0542 #endif