From 6fc33f125eadc47b4908474b4b0cc7ea192cb7d4 Mon Sep 17 00:00:00 2001 From: Oleksij Rempel Date: Fri, 12 Jul 2013 10:56:49 -0700 Subject: [PATCH] Created usb regs (markdown) --- usb-regs.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 usb-regs.md diff --git a/usb-regs.md b/usb-regs.md new file mode 100644 index 0000000..a49c074 --- /dev/null +++ b/usb-regs.md @@ -0,0 +1,70 @@ +# 0x00 ZM_MAIN_CTRL_OFFSET +# 0x01 ZM_DEVICE_ADDRESS_OFFSET +# 0x02 ZM_TEST_OFFSET +# 0x08 ZM_PHY_TEST_SELECT_OFFSET +# 0x0A ZM_VDR_SPECIFIC_MODE_OFFSET +# 0x0B ZM_CX_CONFIG_STATUS_OFFSET +# 0x0C ZM_EP0_DATA1_OFFSET +# 0x0D ZM_EP0_DATA2_OFFSET +# 0x0C ZM_EP0_DATA_OFFSET + +# 0x11 ZM_INTR_MASK_BYTE_0_OFFSET +# 0x12 ZM_INTR_MASK_BYTE_1_OFFSET +# 0x13 ZM_INTR_MASK_BYTE_2_OFFSET +# 0x14 ZM_INTR_MASK_BYTE_3_OFFSET +# 0x15 ZM_INTR_MASK_BYTE_4_OFFSET +# 0x16 ZM_INTR_MASK_BYTE_5_OFFSET +# 0x17 ZM_INTR_MASK_BYTE_6_OFFSET +# 0x18 ZM_INTR_MASK_BYTE_7_OFFSET + +# 0x20 ZM_INTR_GROUP_OFFSET +# 0x21 ZM_INTR_SOURCE_0_OFFSET +# 0x22 ZM_INTR_SOURCE_1_OFFSET +# 0x23 ZM_INTR_SOURCE_2_OFFSET +# 0x24 ZM_INTR_SOURCE_3_OFFSET +# 0x25 ZM_INTR_SOURCE_4_OFFSET +# 0x26 ZM_INTR_SOURCE_5_OFFSET +# 0x27 ZM_INTR_SOURCE_6_OFFSET +# 0x28 ZM_INTR_SOURCE_7_OFFSET + +# 0x3F ZM_EP_IN_MAX_SIZE_HIGH_OFFSET +# 0x3E ZM_EP_IN_MAX_SIZE_LOW_OFFSET + +# 0x5F ZM_EP_OUT_MAX_SIZE_HIGH_OFFSET +# 0x5E ZM_EP_OUT_MAX_SIZE_LOW_OFFSET + +# 0xAE ZM_EP3_BYTE_COUNT_HIGH_OFFSET + BIT3 - 1 xfer done? + comments: after sending data from target to host, set BIT3 +# 0xBE ZM_EP3_BYTE_COUNT_LOW_OFFSET +# 0xAF ZM_EP4_BYTE_COUNT_HIGH_OFFSET + BIT4 - 1 - reset fifo; 0 - disable reset? + comments: probably compatible with +# 0xBF ZM_EP4_BYTE_COUNT_LOW_OFFSET + size of data in fifo buffer + +# 0xF8 ZM_EP3_DATA_OFFSET +# 0xFC ZM_EP4_DATA_OFFSET + +# 0x108 ZM_SOC_USB_MODE_CTRL_OFFSET + BIT10 - 1 - enable MP (EP6) downstream stream mode + BIT9 - 1 - enable MP (EP6) downstream DMA mode + BIT8 - 1 - enable HP (EP5) downstream DMA mode + BIT7 - 1 - enable HP (EP5) downstream stream mode + BIT6 - 1 - enable LP downstream stream mode + BIT5 - define the host dma buffer size - 4096(00) 8192 (01) 16384(10) 32768(11) bytes + BIT4 - ^ + BIT3 - 0 - enable upstream stream mode: 1 - enable upstream packed mode; + BIT2 - 0 - Set into 64 byte mode (full speed) 1 - Set into 512 byte mode (usb highspeed) + BIT1 - 0 - disable upstream dma mode; 1 - enable upstream dma mode + BIT0 - 0 - disable LP down stream dma mode; 1 - eanble LP down stream dma mode +comments: +ryan: 04/01: bit0 could disable lpdn dma, which is good at debugging while async_fifo have problem, we could disable this and check the fifo_rcv_size to see if we have correct at fifo or not +LP - lo priotiry; MP - middle priority; HP - High priority; + + +# 0x110 ZM_SOC_USB_MAX_AGGREGATE_OFFSET + set stream mode packet buffer critirea + 0x0 = disable stream mode or 1 packet. So 0x9 is 10 packets? +# 0x114 ZM_SOC_USB_TIME_CTRL_OFFSET + set stream mode timeout critirea. the unit is 32 USB (30Mhz) clock cycles. -- 2.25.1