USB = Universal Serial Bus UDC = USB Device Client OTG = 'On The Go' ULPI = Low Pin Interface UTMI = USB2.0 Tranceiver Macrocell Interface UTMI+ = UTMI + OTG O OTG -> Can switch between being host and client. UTMI: Interface between PXA and USB chip on the board. ULPI = UTMI+ in less pins. = LPI for USB, LPI is more general. USB2 pin numbers on 24-pin connector: VCC: 11 verified D-: 10 D+: 9 GND: 8 +5V: 5 1 Main charge +5v 2 3 4 5 +5v Vbus-Host 6 d+ 7 d- 8 GND Client 9 D+ Client 10 D- Client 11 Vbus Client 12 13 Main charge +5v: 1 2 <--> 24 3 <--> +5v charge It seems that: GPIO18 is input, is VBUS detect: 1=off, 0=on GPIO20 is output: 1= D+ pulled high when VBUS on, 0=D+ not pulled high Hmmm, maybe not Ok, so there is the quicklogic chip aswell. GPIOS used by usbflash.S: (maybe non-usb) Inputs: 0, 113, 9, 101, 70, 93, 18 Output: 20, 6, 125, 111, 17, 2, 82 GPIOs used by qlusb20fn.dll.S: Output: 119, 94 GPIOs used by ohci2.dll.S: 90 (IO), 8 (O ?I?), 10 (O), 9 (I) All up: In: 0 113 9 called "bOpen" in ohci2.dll, is cable detect for something - 24pin connector detect, can't work out which actual pin 101 CF1 detect 70 CF2 detect 93 18 'vbus detect' Out: 20 Seems to actually be quicklogic low power mode related - see qlpowermanager.dll.1.S 6 125 Also seems to be quicklogic enable related, PXA locks if 0x00000000 read with this off 111 Seems to be Quicklogic enable, 0x00000000 reads 0's with this off 17 2 82 Is set to 1 for mini-usb connector, 0 for 24-pin (see qlpowermanager.dll.1.S:check_mini_usb()) 119 94 8 Appears to be USB host VBus 10 USB Host Related Both: 90 From usbflash.S, looks like 'Reset USB' Default GPIO settings according to usbflash.S:setupGPIOS() Inputs: 0, 113, 9, 101, 70, 93, 18 Output: 20, 6, 125, 111, 17, 2, 82 High: 20, 6, 125, 111 Set 17 high if [0xbc00059e] == 0x0103 GPIO reg:value in windows, usb ready 0 000:00000001 1 113 100:00020000 1 9 000:00000200 0 101 100:00000010 0 70 008:00000040 0 93 008:20000000 1 18 000:00040000 1 20 000:00100000 1 6 000:00000040 0 125 100:20000000 1 111 100:00008000 1 17 000:00020000 1 2 000:00000004 0 82 008:00040000 0 From haret boot into linux with no U2D configed in, the pull/down behaviour seems to work. However.. if gpio111 is set low, it dies and never recovers. UDC cable insert/remove while watching GPIOS: 000/00000200 = 9 008/00040000 = 82 000/00000500 = 10,8 100/00000100 = 104 Plug in (no usb): 9_2 off 82 off 10,8 on,on 104 on ... 104 off UDC Cable Out: 9 on MMC2 Data 0 82 on ?? 10 off MMC2 Data 1 8 off MMC1 Command 104 on WM9713 Power ... 104 off WM9713 Power 100/00020000 = 113 000/00040000 = 18 USB In, power only: 113 IRQ 113 off 113 on 18 IRQ 18 off 113 IRQ 113 off 113 on power: 113 91