PXA320's udc is inactive
Hello friends,
I have a problem making udc work on our PXA320-based board.
The board is similar to Marvell Zylonite.
Here is the info of our board:
CPU - PXA320
RAM - 128MB
NAND - 128MB
Kernel - linux-2.6.32
What I'm trying to do is to enable the UDC (USB Device Controller) and connect our board to PC via g_ether.
I have confirmed that the hardware is OK by loading Windows CE on it and connected to PC via activesync.
In linux, I enabled UDC and g_ether on menuconfig. g_ether is built as a Kernel Module. RNDIS is also included in the build.
After I flushed the image to my board and launched the OS, pxa_ude_probe was called and everything was fine.
Then I run "ifup usb0" and "usb_gadget_register_driver" was called by g_ether. The D+ pull-up resistor was enabled and I measured the D+ pin and found 3.3 volts there.
However if I plug in my usb cable, PC detects the USB device and sends GET DEVICE DESCRIPTOR but there is nothing sent from USB device.
I dumped some register values in usb_gadget_register_driver function and found that UDCCR is 0x1 which means that UDC is enabled but is inactive.
The following are the register values I dumped:
+++ usb_gadget_register_driver
UDCCR(0x0) = 0x1
UDCICR0(0x4) = 0x3
UDCICR1(0x8) = 0xb8000000
UDCISR0(0xc) = 0x0
UDCISR1(0x10) = 0x0
UDCFNR(0x14) = 0x0
UDCOTGICR(0x18) = 0x0
UP2OCR(0x20) = 0xa0
UP3OCR(0x24) = 0x0
(0x100) = 0x200
(0x200) = 0x0
(0x300) = 0x63c81c5c
(0x400) = 0x0
ICPR = 0x0
ICPR2 = 0x0
ICIP = 0x0
ICIP2 = 0x0
ICFP = 0x0
ICFP2 = 0x0
ICMR = 0x6b24c08
ICMR2 = 0x2000
ICLR = 0x0
ICLR2 = 0x0
ICCR = 0x1
ACCR = 0x321f
ACSR = 0x3003321f
AICSR = 0x0
CKEN_A = 0xffbfffff
CKEN_B = 0xffffffff
--- usb_gadget_register_driver
From the register values I can see that UDC clock is enabled, UDC interrupt is enabled, and UDC registers are set properly.
I have no idea why UDC is inactive. Can anyone point out how to solve this problem?
Thanks in advance,
youyisi
|