Skip to contentSkip to conversation

usb host port3 on pxa310?

DISCUSSION Chen Wenjie 5 participants 13 messages Aug 6, 2010 – Mar 22, 2011

lore
Share & tools
lore
#0 lore raw

I want to use PXA310 to realize a USB HOST.

(My kernel version: 2.6.27)

Zylonite have implemented a USB host through USBH_N(USBH1_N) USBH_P(USBH1_P). Unfortunatly, In PXA310, the pins of USBH1_N and USBH1_P does not exist.

So I have to use "usb host port3 " described in the manual "Vol. IV: Monahans L Processor and
Monahans LV Processor Developers Manual"

GPIO
Alternate
Function
Port UP3OCR[CFG]

			0x0 					   0x2 	
USB_P3_1	UHC Rx Data	(RCV - in)	?	UHC Rx Data	(RCV - 
out)	?
USB_P3_2	UHC OE	(OE_n - out)	?	UHC OE		(OE_n - in)
	?

USB_P3_3 UHC Rx D? (VM - in) ? UHC Rx D- (VM -
out) ?
USB_P3_4 UHC Tx D? (VMO - out) ? UHC Tx D- (VMO -
in) ?
USB_P3_5 UHC Rx D+ (VP - in) ? UHC Rx D+ (VP -
out) ?
USB_P3_6 UHC Tx D+ (VPO - out) ? UHC Tx D+ (VPO -
in) ?

In the schematic, I have connected GPIO77~82 to USB_P3_1 ~ USB_P3_6.

However, The USB port 3 does not work.
Here is the log:

======================================
pxa27x-ohci pxa27x-ohci: PXA27x OHCI
pxa27x-ohci pxa27x-ohci: new USB bus registered, assigned bus number 1 pxa27x-ohci pxa27x-ohci: irq 3, io mem 0x4c000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001 usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb1: Product: PXA27x OHCI
usb usb1: Manufacturer: Linux 2.6.27-dirty ohci_hcd
usb usb1: SerialNumber: pxa27x
sl811: driver sl811-hcd, 19 May 2005
r8a66597_hcd: driver r8a66597_hcd, 10 Apr 2008
usb 1-3: new full speed USB device using pxa27x-ohci and address 2 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 3 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 4 usb 1-3: device not accepting address 4, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 5 usb 1-3: device not accepting address 5, error -62
hub 1-0:1.0: unable to enumerate USB device on port 3
======================================

Then I found a bit in UP2OCR -- (VPMBlockEnbN).
It is quite strange (if not ugly:( ) the this bit is to control port 3 (In UP2OCR--a register for port 2, while there is too many unused bits in UP3OCR)

But I am not very sure how to use this bit.
I grep the source tree, but found nothing about VPMBlockEnbN.

Can anyone tell me that how to write a driver for USB-host-port-3?

High appreciation for your kind help!

#1 lore raw
Quoted 4 lines · Chen Wenjie

I want to use PXA310 to realize a USB HOST.

(My kernel version: 2.6.27)

There was a relatively big change in ohci-pxa27x driver, I think around 2.6.28-rc1. May be you should consider upgrading...

Quoted 27 lines

Zylonite have implemented a USB host through USBH_N(USBH1_N) USBH_P(USBH1_P). Unfortunatly, In PXA310, the pins of USBH1_N and USBH1_P does not exist.

So I have to use "usb host port3 " described in the manual "Vol. IV: Monahans L Processor and
Monahans LV Processor Developers Manual"

GPIO
Alternate
Function
Port UP3OCR[CFG]

			0x0 					   0x2 	
USB_P3_1	UHC Rx Data	(RCV - in)	?	UHC Rx Data	(RCV - 
out)	?
USB_P3_2	UHC OE	(OE_n - out)	?	UHC OE		(OE_n - in)
	?

USB_P3_3 UHC Rx D? (VM - in) ? UHC Rx D- (VM -
out) ?
USB_P3_4 UHC Tx D? (VMO - out) ? UHC Tx D- (VMO -
in) ?
USB_P3_5 UHC Rx D+ (VP - in) ? UHC Rx D+ (VP -
out) ?
USB_P3_6 UHC Tx D+ (VPO - out) ? UHC Tx D+ (VPO -
in) ?

Quoted 2 lines

In the schematic, I have connected GPIO77~82 to USB_P3_1 ~ USB_P3_6.

You need also to configure those gpios to alternate function 2 in the MFPRs. If you use a transceiver mode, then may be you need USBHPEN signal connected to your PHY and configured accordingly in MFPR.
Also, in pxa310 there is a U2DP3CR register, which controls output and serial mode selection of the usb port3.

Quoted 5 lines

However, The USB port 3 does not work.
Here is the log:

Quoted 15 lines

======================================
pxa27x-ohci pxa27x-ohci: PXA27x OHCI
pxa27x-ohci pxa27x-ohci: new USB bus registered, assigned bus number 1 pxa27x-ohci pxa27x-ohci: irq 3, io mem 0x4c000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001 usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb1: Product: PXA27x OHCI
usb usb1: Manufacturer: Linux 2.6.27-dirty ohci_hcd
usb usb1: SerialNumber: pxa27x
sl811: driver sl811-hcd, 19 May 2005
r8a66597_hcd: driver r8a66597_hcd, 10 Apr 2008

Do you really have sl811 and r8a66597 usb host controllers on your board?

Quoted 19 lines

usb 1-3: new full speed USB device using pxa27x-ohci and address 2 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 3 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 4 usb 1-3: device not accepting address 4, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 5 usb 1-3: device not accepting address 5, error -62
hub 1-0:1.0: unable to enumerate USB device on port 3
======================================

Then I found a bit in UP2OCR -- (VPMBlockEnbN).
It is quite strange (if not ugly:( ) the this bit is to control port 3 (In UP2OCR--a register for port 2, while there is too many unused bits in UP3OCR)

Quoted 6 lines

But I am not very sure how to use this bit.
I grep the source tree, but found nothing about VPMBlockEnbN.

Can anyone tell me that how to write a driver for USB-host-port-3?

As far as I know pxa310 usb port3 does not need any special driver to work in host mode, ohci-pxa27x is enough.
Currently, the setup of registers, which are not related to UHC (UP2OCR, UP3OCR, etc.), is done in the board code, in the ohci callback.

Quoted 10 lines

High appreciation for your kind help!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Signature · 2 lines
Regards,
Igor.
author
#2 lore raw
In reply to Chen Wenjie

Hi, Igor,

Thank you very much for your warm and professional help! I will try to upgrade the codes for ohci-pxa27x first.

Quoted 1 line

Do you really have sl811 and r8a66597 usb host controllers on your board?

I think no real IC installed on my board, I just configure it on menuconfig by choose something seems related to USB (--blindly)

Actually, my board use a ISP1105 as the PHY interface?the schematic is :

http://picasaweb.google.com/114830881710721561783/Public#5502732460750351090

Do you think there is anything wrong?

GPIO setting is :
//file: mfp-pxa300.h

/* USB P3 */

#define GPIO77_USB_P3_1 MFP_CFG(GPIO77,  AF2)
#define GPIO78_USB_P3_2 MFP_CFG(GPIO78,  AF2)
#define GPIO79_USB_P3_3 MFP_CFG(GPIO79,  AF2)
#define GPIO80_USB_P3_4 MFP_CFG(GPIO80,  AF2)
#define GPIO81_USB_P3_5 MFP_CFG(GPIO81,  AF2)
#define GPIO82_USB_P3_6 MFP_CFG(GPIO82,  AF2)

#define GPIO126_USB_SPEED MFP_CFG_LPM(GPIO126, AF5, PULL_HIGH)

I will upgrade the driver and test it again.

Thank you very very much!

2010-08-08

Chen Wenjie

???? Igor Grinberg
????? 2010-08-07 21:42:57
???? Chen Wenjie
??? linux-arm-kernel
??? Re: usb host port3 on pxa310?

Quoted 4 lines · Chen Wenjie

I want to use PXA310 to realize a USB HOST.

(My kernel version: 2.6.27)

There was a relatively big change in ohci-pxa27x driver, I think around 2.6.28-rc1. May be you should consider upgrading...

Quoted 27 lines

Zylonite have implemented a USB host through USBH_N(USBH1_N) USBH_P(USBH1_P). Unfortunatly, In PXA310, the pins of USBH1_N and USBH1_P does not exist.

So I have to use "usb host port3 " described in the manual "Vol. IV: Monahans L Processor and
Monahans LV Processor Developers Manual"

GPIO
Alternate
Function
Port UP3OCR[CFG]
0x0 0x2
USB_P3_1 UHC Rx Data (RCV - in) ? UHC Rx Data (RCV - out) ?
USB_P3_2 UHC OE (OE_n - out) ? UHC OE (OE_n - in)
?
USB_P3_3 UHC Rx D? (VM - in) ? UHC Rx D- (VM - out) ?
USB_P3_4 UHC Tx D? (VMO - out) ? UHC Tx D- (VMO - in) ?
USB_P3_5 UHC Rx D+ (VP - in) ? UHC Rx D+ (VP - out) ?
USB_P3_6 UHC Tx D+ (VPO - out) ? UHC Tx D+ (VPO - in) ?

Quoted 2 lines

In the schematic, I have connected GPIO77~82 to USB_P3_1 ~ USB_P3_6.

You need also to configure those gpios to alternate function 2 in the MFPRs. If you use a transceiver mode, then may be you need USBHPEN signal connected to your PHY and configured accordingly in MFPR.
Also, in pxa310 there is a U2DP3CR register, which controls output and serial mode selection of the usb port3.

Quoted 5 lines

However, The USB port 3 does not work.
Here is the log:

Quoted 15 lines

======================================
pxa27x-ohci pxa27x-ohci: PXA27x OHCI
pxa27x-ohci pxa27x-ohci: new USB bus registered, assigned bus number 1 pxa27x-ohci pxa27x-ohci: irq 3, io mem 0x4c000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001 usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb1: Product: PXA27x OHCI
usb usb1: Manufacturer: Linux 2.6.27-dirty ohci_hcd
usb usb1: SerialNumber: pxa27x
sl811: driver sl811-hcd, 19 May 2005
r8a66597_hcd: driver r8a66597_hcd, 10 Apr 2008

Do you really have sl811 and r8a66597 usb host controllers on your board?

Quoted 19 lines

usb 1-3: new full speed USB device using pxa27x-ohci and address 2 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 3 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 4 usb 1-3: device not accepting address 4, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 5 usb 1-3: device not accepting address 5, error -62
hub 1-0:1.0: unable to enumerate USB device on port 3
======================================

Then I found a bit in UP2OCR -- (VPMBlockEnbN).
It is quite strange (if not ugly:( ) the this bit is to control port 3 (In UP2OCR--a register for port 2, while there is too many unused bits in UP3OCR)

Quoted 6 lines

But I am not very sure how to use this bit.
I grep the source tree, but found nothing about VPMBlockEnbN.

Can anyone tell me that how to write a driver for USB-host-port-3?

As far as I know pxa310 usb port3 does not need any special driver to work in host mode, ohci-pxa27x is enough.
Currently, the setup of registers, which are not related to UHC (UP2OCR, UP3OCR, etc.), is done in the board code, in the ohci callback.

Quoted 10 lines

High appreciation for your kind help!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Signature · 12 lines
Regards,
Igor.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100807/fa4be103/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1237 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100807/fa4be103/attachment.gif>
#3 lore raw
In reply to Chen Wenjie

Hi, Igor,

Thank you very much for your warm and professional help! I will try to upgrade the codes for ohci-pxa27x first.

Quoted 1 line

Do you really have sl811 and r8a66597 usb host controllers on your board?

I think no real IC installed on my board, I just configure it on menuconfig by choose something seems related to USB (--blindly)

Actually, my board use a ISP1105 as the PHY interface???the schematic is :

http://picasaweb.google.com/114830881710721561783/Public#5502732460750351090

Do you think there is anything wrong?

GPIO setting is :
//file: mfp-pxa300.h

/* USB P3 */

#define GPIO77_USB_P3_1 MFP_CFG(GPIO77,  AF2)
#define GPIO78_USB_P3_2 MFP_CFG(GPIO78,  AF2)
#define GPIO79_USB_P3_3 MFP_CFG(GPIO79,  AF2)
#define GPIO80_USB_P3_4 MFP_CFG(GPIO80,  AF2)
#define GPIO81_USB_P3_5 MFP_CFG(GPIO81,  AF2)
#define GPIO82_USB_P3_6 MFP_CFG(GPIO82,  AF2)

#define GPIO126_USB_SPEED MFP_CFG_LPM(GPIO126, AF5, PULL_HIGH)

I will upgrade the driver and test it again.

Thank you very very much!

2010-08-08

Chen Wenjie

???????????? Igor Grinberg
??????????????? 2010-08-07 21:42:57
???????????? Chen Wenjie
????????? linux-arm-kernel
????????? Re: usb host port3 on pxa310?

Quoted 4 lines · Chen Wenjie

I want to use PXA310 to realize a USB HOST.

(My kernel version: 2.6.27)

There was a relatively big change in ohci-pxa27x driver, I think around 2.6.28-rc1. May be you should consider upgrading...

Quoted 27 lines

Zylonite have implemented a USB host through USBH_N(USBH1_N) USBH_P(USBH1_P). Unfortunatly, In PXA310, the pins of USBH1_N and USBH1_P does not exist.

So I have to use "usb host port3 " described in the manual "Vol. IV: Monahans L Processor and
Monahans LV Processor Developers Manual"

GPIO
Alternate
Function
Port UP3OCR[CFG]
0x0 0x2
USB_P3_1 UHC Rx Data (RCV - in) ??? UHC Rx Data (RCV - out) ???
USB_P3_2 UHC OE (OE_n - out) ??? UHC OE (OE_n - in)
???
USB_P3_3 UHC Rx D??? (VM - in) ??? UHC Rx D- (VM - out) ???
USB_P3_4 UHC Tx D??? (VMO - out) ??? UHC Tx D- (VMO - in) ???
USB_P3_5 UHC Rx D+ (VP - in) ??? UHC Rx D+ (VP - out) ???
USB_P3_6 UHC Tx D+ (VPO - out) ??? UHC Tx D+ (VPO - in) ???

Quoted 2 lines

In the schematic, I have connected GPIO77~82 to USB_P3_1 ~ USB_P3_6.

You need also to configure those gpios to alternate function 2 in the MFPRs. If you use a transceiver mode, then may be you need USBHPEN signal connected to your PHY and configured accordingly in MFPR.
Also, in pxa310 there is a U2DP3CR register, which controls output and serial mode selection of the usb port3.

Quoted 5 lines

However, The USB port 3 does not work.
Here is the log:

Quoted 15 lines

======================================
pxa27x-ohci pxa27x-ohci: PXA27x OHCI
pxa27x-ohci pxa27x-ohci: new USB bus registered, assigned bus number 1 pxa27x-ohci pxa27x-ohci: irq 3, io mem 0x4c000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001 usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb1: Product: PXA27x OHCI
usb usb1: Manufacturer: Linux 2.6.27-dirty ohci_hcd
usb usb1: SerialNumber: pxa27x
sl811: driver sl811-hcd, 19 May 2005
r8a66597_hcd: driver r8a66597_hcd, 10 Apr 2008

Do you really have sl811 and r8a66597 usb host controllers on your board?

Quoted 19 lines

usb 1-3: new full speed USB device using pxa27x-ohci and address 2 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 3 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 4 usb 1-3: device not accepting address 4, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 5 usb 1-3: device not accepting address 5, error -62
hub 1-0:1.0: unable to enumerate USB device on port 3
======================================

Then I found a bit in UP2OCR -- (VPMBlockEnbN).
It is quite strange (if not ugly:( ) the this bit is to control port 3 (In UP2OCR--a register for port 2, while there is too many unused bits in UP3OCR)

Quoted 6 lines

But I am not very sure how to use this bit.
I grep the source tree, but found nothing about VPMBlockEnbN.

Can anyone tell me that how to write a driver for USB-host-port-3?

As far as I know pxa310 usb port3 does not need any special driver to work in host mode, ohci-pxa27x is enough.
Currently, the setup of registers, which are not related to UHC (UP2OCR, UP3OCR, etc.), is done in the board code, in the ohci callback.

Quoted 10 lines

High appreciation for your kind help!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Signature · 12 lines
Regards,
Igor.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100808/1449bdf4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1237 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100808/1449bdf4/attachment-0001.gif>
#4 lore raw
Quoted 8 lines · Chen Wenjie

Hi, Igor,
Thank you very much for your warm and professional help! I will try to upgrade the codes for ohci-pxa27x first.

Quoted 1 line

Do you really have sl811 and r8a66597 usb host controllers on your

board?
I think no real IC installed on my board, I just configure it on menuconfig by choose something
seems related to USB (--blindly)

I'd rather remove the unused drivers from the configuration, then have them built-in and do something with the missing hardware...

Quoted 3 lines

Actually, my board use a ISP1105 as the PHY interface???the schematic is :
http://picasaweb.google.com/114830881710721561783/Public#5502732460750351090

As far as I know DNP, stands for "Do Not Populate". It states: "ISP1105BS(DNP)" - is it assembled at all?

Quoted 11 lines

Do you think there is anything wrong?
GPIO setting is :
//file: mfp-pxa300.h
/* USB P3 */
#define GPIO77_USB_P3_1 MFP_CFG(GPIO77, AF2)
#define GPIO78_USB_P3_2 MFP_CFG(GPIO78, AF2)
#define GPIO79_USB_P3_3 MFP_CFG(GPIO79, AF2)
#define GPIO80_USB_P3_4 MFP_CFG(GPIO80, AF2)
#define GPIO81_USB_P3_5 MFP_CFG(GPIO81, AF2)
#define GPIO82_USB_P3_6 MFP_CFG(GPIO82, AF2)
#define GPIO126_USB_SPEED MFP_CFG_LPM(GPIO126, AF5, PULL_HIGH)

Indeed, those are the defines, but you need to do the actual configuration for them, by calling pxa3xx_mfp_config() with appropriate parameters.

Quoted 120 lines

I will upgrade the driver and test it again.
Thank you very very much!
2010-08-08
------------------------------------------------------------------------
Chen Wenjie
------------------------------------------------------------------------
*????????????* Igor Grinberg
*???????????????* 2010-08-07 21:42:57
*????????????* Chen Wenjie
*?????????* linux-arm-kernel
*?????????* Re: usb host port3 on pxa310?

Quoted 4 lines · Chen Wenjie

I want to use PXA310 to realize a USB HOST.

(My kernel version: 2.6.27)

There was a relatively big change in ohci-pxa27x driver, I think around 2.6.28-rc1. May be you should consider upgrading...

Quoted 1 line

Zylonite have implemented a USB host through USBH_N(USBH1_N)

USBH_P(USBH1_P).

Quoted 3 lines

Unfortunatly, In PXA310, the pins of USBH1_N and USBH1_P does not exist.

So I have to use "usb host port3 " described in the manual "Vol. IV:

Monahans

Quoted 23 lines

L Processor and
Monahans LV Processor Developers Manual"

GPIO
Alternate
Function
Port UP3OCR[CFG]
0x0 0x2
USB_P3_1 UHC Rx Data (RCV - in) ??? UHC Rx Data (RCV - out) ???
USB_P3_2 UHC OE (OE_n - out) ??? UHC OE (OE_n - in) ???
USB_P3_3 UHC Rx D??? (VM - in) ??? UHC Rx D- (VM - out) ???
USB_P3_4 UHC Tx D??? (VMO - out) ??? UHC Tx D- (VMO - in) ???
USB_P3_5 UHC Rx D+ (VP - in) ??? UHC Rx D+ (VP - out) ???
USB_P3_6 UHC Tx D+ (VPO - out) ??? UHC Tx D+ (VPO - in) ???

Quoted 2 lines

In the schematic, I have connected GPIO77~82 to USB_P3_1 ~ USB_P3_6.

You need also to configure those gpios to alternate function 2 in the MFPRs.
If you use a transceiver mode, then may be you need USBHPEN signal connected to your PHY and configured accordingly in MFPR. Also, in pxa310 there is a U2DP3CR register, which controls output and serial mode selection of the usb port3.

Quoted 5 lines

However, The USB port 3 does not work.
Here is the log:

Quoted 15 lines

======================================
pxa27x-ohci pxa27x-ohci: PXA27x OHCI
pxa27x-ohci pxa27x-ohci: new USB bus registered, assigned bus number 1 pxa27x-ohci pxa27x-ohci: irq 3, io mem 0x4c000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001 usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb1: Product: PXA27x OHCI
usb usb1: Manufacturer: Linux 2.6.27-dirty ohci_hcd
usb usb1: SerialNumber: pxa27x
sl811: driver sl811-hcd, 19 May 2005
r8a66597_hcd: driver r8a66597_hcd, 10 Apr 2008

Do you really have sl811 and r8a66597 usb host controllers on your board?

Quoted 14 lines

usb 1-3: new full speed USB device using pxa27x-ohci and address 2 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 3 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 4 usb 1-3: device not accepting address 4, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 5 usb 1-3: device not accepting address 5, error -62
hub 1-0:1.0: unable to enumerate USB device on port 3
======================================

Quoted 3 lines

Then I found a bit in UP2OCR -- (VPMBlockEnbN).
It is quite strange (if not ugly:( ) the this bit is to control port 3 (In UP2OCR--a register for port 2, while there is too many unused

bits in

Quoted 8 lines

UP3OCR)

But I am not very sure how to use this bit.
I grep the source tree, but found nothing about VPMBlockEnbN.

Can anyone tell me that how to write a driver for USB-host-port-3?

As far as I know pxa310 usb port3 does not need any special driver to work in host mode, ohci-pxa27x is enough.
Currently, the setup of registers, which are not related to UHC (UP2OCR, UP3OCR, etc.), is done in the board code, in the ohci callback.

Quoted 10 lines

High appreciation for your kind help!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Signature · 2 lines
Regards,
Igor.
Signature · 2 lines
Regards,
Igor.
#5 lore raw
In reply to Chen Wenjie

Hi, Igor and all,

Thank you very much for giving me such valuable help.

Now I have upgrade the ohci part (drivers/usb/host/ohci-pxa270.c ..)
to 2.6.29. (I am failed on upgrade the total branch from 2.6.27 to 2.6.29 :( )

But the problem still exist.
(the isp1105 was really assembled; and the GPIO pins are initialized with pxa3xx_mfp_config() ).

when I insert a usb-disk, it output
-----------------------------------------------------------------------------------------
usb 1-3: new full speed USB device using pxa27x-ohci and address 2 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 3 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 4 usb 1-3: device not accepting address 4, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 5 usb 1-3: device not accepting address 5, error -62
hub 1-0:1.0: unable to enumerate USB device on port 3
----------------------------------------------------------------------------------------

and dmesg shows this info continuesly.:
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0000
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0000
...
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0000

a detailed log file is attached.

Is there any hardware problem?
maybe the connection of ISP1105 was wrong.

and I found the VCC voltage is only 3.0v, it is lower than 3.3v (in the spec). Is this a fatal issue?

Thank you very much!

------------------
Chen Wenjie
2010-08-22

-------------------------------------------------------------
From?Igor Grinberg
Date?2010-08-08 14:03:02
To?Chen Wenjie
CC?linux-arm-kernel
Subject?Re: usb host port3 on pxa310?

Quoted 8 lines · Chen Wenjie

Hi, Igor,
Thank you very much for your warm and professional help! I will try to upgrade the codes for ohci-pxa27x first.

Quoted 1 line

Do you really have sl811 and r8a66597 usb host controllers on your

board?
I think no real IC installed on my board, I just configure it on menuconfig by choose something
seems related to USB (--blindly)

I'd rather remove the unused drivers from the configuration, then have them built-in and do something with the missing hardware...

Quoted 3 lines

Actually, my board use a ISP1105 as the PHY interface???the schematic is :
http://picasaweb.google.com/114830881710721561783/Public#5502732460750351090

As far as I know DNP, stands for "Do Not Populate". It states: "ISP1105BS(DNP)" - is it assembled at all?

Quoted 11 lines

Do you think there is anything wrong?
GPIO setting is :
//file: mfp-pxa300.h
/* USB P3 */
#define GPIO77_USB_P3_1 MFP_CFG(GPIO77, AF2)
#define GPIO78_USB_P3_2 MFP_CFG(GPIO78, AF2)
#define GPIO79_USB_P3_3 MFP_CFG(GPIO79, AF2)
#define GPIO80_USB_P3_4 MFP_CFG(GPIO80, AF2)
#define GPIO81_USB_P3_5 MFP_CFG(GPIO81, AF2)
#define GPIO82_USB_P3_6 MFP_CFG(GPIO82, AF2)
#define GPIO126_USB_SPEED MFP_CFG_LPM(GPIO126, AF5, PULL_HIGH)

Indeed, those are the defines, but you need to do the actual configuration for them, by calling pxa3xx_mfp_config() with appropriate parameters.

Quoted 120 lines

I will upgrade the driver and test it again.
Thank you very very much!
2010-08-08
------------------------------------------------------------------------
Chen Wenjie
------------------------------------------------------------------------
*????????????* Igor Grinberg
*???????????????* 2010-08-07 21:42:57
*????????????* Chen Wenjie
*?????????* linux-arm-kernel
*?????????* Re: usb host port3 on pxa310?

Quoted 4 lines · Chen Wenjie

I want to use PXA310 to realize a USB HOST.

(My kernel version: 2.6.27)

There was a relatively big change in ohci-pxa27x driver, I think around 2.6.28-rc1. May be you should consider upgrading...

Quoted 1 line

Zylonite have implemented a USB host through USBH_N(USBH1_N)

USBH_P(USBH1_P).

Quoted 3 lines

Unfortunatly, In PXA310, the pins of USBH1_N and USBH1_P does not exist.

So I have to use "usb host port3 " described in the manual "Vol. IV:

Monahans

Quoted 23 lines

L Processor and
Monahans LV Processor Developers Manual"

GPIO
Alternate
Function
Port UP3OCR[CFG]
0x0 0x2
USB_P3_1 UHC Rx Data (RCV - in) ??? UHC Rx Data (RCV - out) ???
USB_P3_2 UHC OE (OE_n - out) ??? UHC OE (OE_n - in) ???
USB_P3_3 UHC Rx D??? (VM - in) ??? UHC Rx D- (VM - out) ???
USB_P3_4 UHC Tx D??? (VMO - out) ??? UHC Tx D- (VMO - in) ???
USB_P3_5 UHC Rx D+ (VP - in) ??? UHC Rx D+ (VP - out) ???
USB_P3_6 UHC Tx D+ (VPO - out) ??? UHC Tx D+ (VPO - in) ???

Quoted 2 lines

In the schematic, I have connected GPIO77~82 to USB_P3_1 ~ USB_P3_6.

You need also to configure those gpios to alternate function 2 in the MFPRs.
If you use a transceiver mode, then may be you need USBHPEN signal connected to your PHY and configured accordingly in MFPR. Also, in pxa310 there is a U2DP3CR register, which controls output and serial mode selection of the usb port3.

Quoted 5 lines

However, The USB port 3 does not work.
Here is the log:

Quoted 15 lines

======================================
pxa27x-ohci pxa27x-ohci: PXA27x OHCI
pxa27x-ohci pxa27x-ohci: new USB bus registered, assigned bus number 1 pxa27x-ohci pxa27x-ohci: irq 3, io mem 0x4c000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001 usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb1: Product: PXA27x OHCI
usb usb1: Manufacturer: Linux 2.6.27-dirty ohci_hcd
usb usb1: SerialNumber: pxa27x
sl811: driver sl811-hcd, 19 May 2005
r8a66597_hcd: driver r8a66597_hcd, 10 Apr 2008

Do you really have sl811 and r8a66597 usb host controllers on your board?

Quoted 14 lines

usb 1-3: new full speed USB device using pxa27x-ohci and address 2 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 3 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 4 usb 1-3: device not accepting address 4, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 5 usb 1-3: device not accepting address 5, error -62
hub 1-0:1.0: unable to enumerate USB device on port 3
======================================

Quoted 3 lines

Then I found a bit in UP2OCR -- (VPMBlockEnbN).
It is quite strange (if not ugly:( ) the this bit is to control port 3 (In UP2OCR--a register for port 2, while there is too many unused

bits in

Quoted 8 lines

UP3OCR)

But I am not very sure how to use this bit.
I grep the source tree, but found nothing about VPMBlockEnbN.

Can anyone tell me that how to write a driver for USB-host-port-3?

As far as I know pxa310 usb port3 does not need any special driver to work in host mode, ohci-pxa27x is enough.
Currently, the setup of registers, which are not related to UHC (UP2OCR, UP3OCR, etc.), is done in the board code, in the ohci callback.

Quoted 10 lines

High appreciation for your kind help!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Signature · 2 lines
Regards,
Igor.
Signature · 11 lines
Regards,
Igor.

.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0822-0026-usb-insert-disk.log
Type: application/octet-stream
Size: 88752 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100822/ba7b9ea3/attachment-0001.obj>
#6 lore raw
In reply to Chen Wenjie

Hi, Igor and all,

Thank you very much for giving me such valuable help.

Now I have upgrade the ohci part (drivers/usb/host/ohci-pxa270.c ..)
to 2.6.29. (I am failed on upgrade the total branch from 2.6.27 to 2.6.29 :( )

But the problem still exist.
(the isp1105 was really assembled; and the GPIO pins are initialized with pxa3xx_mfp_config() ).

when I insert a usb-disk, it output
-----------------------------------------------------------------------------------------
usb 1-3: new full speed USB device using pxa27x-ohci and address 2 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 3 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 4 usb 1-3: device not accepting address 4, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 5 usb 1-3: device not accepting address 5, error -62
hub 1-0:1.0: unable to enumerate USB device on port 3
----------------------------------------------------------------------------------------

and dmesg shows this info continuesly.:
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0000
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0000
...
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0000

a detailed log file is attached.

Is there any hardware problem?
maybe the connection of ISP1105 was wrong.

and I found the VCC voltage is only 3.0v, it is lower than 3.3v (in the spec). Is this a fatal issue?

Thank you very much!

------------------
Chen Wenjie
2010-08-22

-------------------------------------------------------------
From?Igor Grinberg
Date?2010-08-08 14:03:02
To?Chen Wenjie
CC?linux-arm-kernel
Subject?Re: usb host port3 on pxa310?

Quoted 8 lines · Chen Wenjie

Hi, Igor,
Thank you very much for your warm and professional help! I will try to upgrade the codes for ohci-pxa27x first.

Quoted 1 line

Do you really have sl811 and r8a66597 usb host controllers on your

board?
I think no real IC installed on my board, I just configure it on menuconfig by choose something
seems related to USB (--blindly)

I'd rather remove the unused drivers from the configuration, then have them built-in and do something with the missing hardware...

Quoted 3 lines

Actually, my board use a ISP1105 as the PHY interface???the schematic is :
http://picasaweb.google.com/114830881710721561783/Public#5502732460750351090

As far as I know DNP, stands for "Do Not Populate". It states: "ISP1105BS(DNP)" - is it assembled at all?

Quoted 11 lines

Do you think there is anything wrong?
GPIO setting is :
//file: mfp-pxa300.h
/* USB P3 */
#define GPIO77_USB_P3_1 MFP_CFG(GPIO77, AF2)
#define GPIO78_USB_P3_2 MFP_CFG(GPIO78, AF2)
#define GPIO79_USB_P3_3 MFP_CFG(GPIO79, AF2)
#define GPIO80_USB_P3_4 MFP_CFG(GPIO80, AF2)
#define GPIO81_USB_P3_5 MFP_CFG(GPIO81, AF2)
#define GPIO82_USB_P3_6 MFP_CFG(GPIO82, AF2)
#define GPIO126_USB_SPEED MFP_CFG_LPM(GPIO126, AF5, PULL_HIGH)

Indeed, those are the defines, but you need to do the actual configuration for them, by calling pxa3xx_mfp_config() with appropriate parameters.

Quoted 120 lines

I will upgrade the driver and test it again.
Thank you very very much!
2010-08-08
------------------------------------------------------------------------
Chen Wenjie
------------------------------------------------------------------------
*????????????* Igor Grinberg
*???????????????* 2010-08-07 21:42:57
*????????????* Chen Wenjie
*?????????* linux-arm-kernel
*?????????* Re: usb host port3 on pxa310?

Quoted 4 lines · Chen Wenjie

I want to use PXA310 to realize a USB HOST.

(My kernel version: 2.6.27)

There was a relatively big change in ohci-pxa27x driver, I think around 2.6.28-rc1. May be you should consider upgrading...

Quoted 1 line

Zylonite have implemented a USB host through USBH_N(USBH1_N)

USBH_P(USBH1_P).

Quoted 3 lines

Unfortunatly, In PXA310, the pins of USBH1_N and USBH1_P does not exist.

So I have to use "usb host port3 " described in the manual "Vol. IV:

Monahans

Quoted 23 lines

L Processor and
Monahans LV Processor Developers Manual"

GPIO
Alternate
Function
Port UP3OCR[CFG]
0x0 0x2
USB_P3_1 UHC Rx Data (RCV - in) ??? UHC Rx Data (RCV - out) ???
USB_P3_2 UHC OE (OE_n - out) ??? UHC OE (OE_n - in) ???
USB_P3_3 UHC Rx D??? (VM - in) ??? UHC Rx D- (VM - out) ???
USB_P3_4 UHC Tx D??? (VMO - out) ??? UHC Tx D- (VMO - in) ???
USB_P3_5 UHC Rx D+ (VP - in) ??? UHC Rx D+ (VP - out) ???
USB_P3_6 UHC Tx D+ (VPO - out) ??? UHC Tx D+ (VPO - in) ???

Quoted 2 lines

In the schematic, I have connected GPIO77~82 to USB_P3_1 ~ USB_P3_6.

You need also to configure those gpios to alternate function 2 in the MFPRs.
If you use a transceiver mode, then may be you need USBHPEN signal connected to your PHY and configured accordingly in MFPR. Also, in pxa310 there is a U2DP3CR register, which controls output and serial mode selection of the usb port3.

Quoted 5 lines

However, The USB port 3 does not work.
Here is the log:

Quoted 15 lines

======================================
pxa27x-ohci pxa27x-ohci: PXA27x OHCI
pxa27x-ohci pxa27x-ohci: new USB bus registered, assigned bus number 1 pxa27x-ohci pxa27x-ohci: irq 3, io mem 0x4c000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001 usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb1: Product: PXA27x OHCI
usb usb1: Manufacturer: Linux 2.6.27-dirty ohci_hcd
usb usb1: SerialNumber: pxa27x
sl811: driver sl811-hcd, 19 May 2005
r8a66597_hcd: driver r8a66597_hcd, 10 Apr 2008

Do you really have sl811 and r8a66597 usb host controllers on your board?

Quoted 14 lines

usb 1-3: new full speed USB device using pxa27x-ohci and address 2 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 3 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 4 usb 1-3: device not accepting address 4, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 5 usb 1-3: device not accepting address 5, error -62
hub 1-0:1.0: unable to enumerate USB device on port 3
======================================

Quoted 3 lines

Then I found a bit in UP2OCR -- (VPMBlockEnbN).
It is quite strange (if not ugly:( ) the this bit is to control port 3 (In UP2OCR--a register for port 2, while there is too many unused

bits in

Quoted 8 lines

UP3OCR)

But I am not very sure how to use this bit.
I grep the source tree, but found nothing about VPMBlockEnbN.

Can anyone tell me that how to write a driver for USB-host-port-3?

As far as I know pxa310 usb port3 does not need any special driver to work in host mode, ohci-pxa27x is enough.
Currently, the setup of registers, which are not related to UHC (UP2OCR, UP3OCR, etc.), is done in the board code, in the ohci callback.

Quoted 10 lines

High appreciation for your kind help!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Signature · 2 lines
Regards,
Igor.
Signature · 11 lines
Regards,
Igor.

.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0822-0026-usb-insert-disk.log
Type: application/octet-stream
Size: 43338 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100822/603656f5/attachment-0001.obj>
#7 lore raw
Quoted 35 lines · Chen Wenjie

Hi, Igor and all,

Thank you very much for giving me such valuable help.

Now I have upgrade the ohci part (drivers/usb/host/ohci-pxa270.c ..)
to 2.6.29. (I am failed on upgrade the total branch from 2.6.27 to 2.6.29 :( )

But the problem still exist.
(the isp1105 was really assembled; and the GPIO pins are initialized with pxa3xx_mfp_config() ).

when I insert a usb-disk, it output
-----------------------------------------------------------------------------------------
usb 1-3: new full speed USB device using pxa27x-ohci and address 2 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 3 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 4 usb 1-3: device not accepting address 4, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 5 usb 1-3: device not accepting address 5, error -62
hub 1-0:1.0: unable to enumerate USB device on port 3
----------------------------------------------------------------------------------------

and dmesg shows this info continuesly.:
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0000
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0000
...
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0000

Quoted 5 lines

a detailed log file is attached.

Is there any hardware problem?
maybe the connection of ISP1105 was wrong.

Indeed, this can be a h/w problem.

Quoted 2 lines

and I found the VCC voltage is only 3.0v, it is lower than 3.3v (in the spec). Is this a fatal issue?

May be not fatal, but could bring issues...
I'd check the VBUS on that usb port and also the pull ups on DP/DM. If those are not by the spec. then the chances of getting it work are poor.

Quoted 165 lines

Thank you very much!

------------------
Chen Wenjie
2010-08-22

-------------------------------------------------------------
From?Igor Grinberg
Date?2010-08-08 14:03:02
To?Chen Wenjie
CC?linux-arm-kernel
Subject?Re: usb host port3 on pxa310?

Quoted 8 lines · Chen Wenjie

Hi, Igor,
Thank you very much for your warm and professional help! I will try to upgrade the codes for ohci-pxa27x first.

Quoted 1 line

Do you really have sl811 and r8a66597 usb host controllers on your

board?
I think no real IC installed on my board, I just configure it on menuconfig by choose something
seems related to USB (--blindly)

I'd rather remove the unused drivers from the configuration, then have them built-in and do something with the missing hardware...

Quoted 3 lines

Actually, my board use a ISP1105 as the PHY interface???the schematic is :
http://picasaweb.google.com/114830881710721561783/Public#5502732460750351090

As far as I know DNP, stands for "Do Not Populate". It states: "ISP1105BS(DNP)" - is it assembled at all?

Quoted 11 lines

Do you think there is anything wrong?
GPIO setting is :
//file: mfp-pxa300.h
/* USB P3 */
#define GPIO77_USB_P3_1 MFP_CFG(GPIO77, AF2)
#define GPIO78_USB_P3_2 MFP_CFG(GPIO78, AF2)
#define GPIO79_USB_P3_3 MFP_CFG(GPIO79, AF2)
#define GPIO80_USB_P3_4 MFP_CFG(GPIO80, AF2)
#define GPIO81_USB_P3_5 MFP_CFG(GPIO81, AF2)
#define GPIO82_USB_P3_6 MFP_CFG(GPIO82, AF2)
#define GPIO126_USB_SPEED MFP_CFG_LPM(GPIO126, AF5, PULL_HIGH)

Indeed, those are the defines, but you need to do the actual configuration for them, by calling pxa3xx_mfp_config() with appropriate parameters.

Quoted 119 lines

I will upgrade the driver and test it again.
Thank you very very much!
2010-08-08
------------------------------------------------------------------------
Chen Wenjie
------------------------------------------------------------------------
*????????????* Igor Grinberg
*???????????????* 2010-08-07 21:42:57
*????????????* Chen Wenjie
*?????????* linux-arm-kernel
*?????????* Re: usb host port3 on pxa310?

Quoted 4 lines · Chen Wenjie

I want to use PXA310 to realize a USB HOST.

(My kernel version: 2.6.27)

There was a relatively big change in ohci-pxa27x driver, I think around 2.6.28-rc1. May be you should consider upgrading...

Quoted 1 line

Zylonite have implemented a USB host through USBH_N(USBH1_N)

USBH_P(USBH1_P).

Quoted 3 lines

Unfortunatly, In PXA310, the pins of USBH1_N and USBH1_P does not exist.

So I have to use "usb host port3 " described in the manual "Vol. IV:

Monahans

Quoted 23 lines

L Processor and
Monahans LV Processor Developers Manual"

GPIO
Alternate
Function
Port UP3OCR[CFG]
0x0 0x2
USB_P3_1 UHC Rx Data (RCV - in) ??? UHC Rx Data (RCV - out) ???
USB_P3_2 UHC OE (OE_n - out) ??? UHC OE (OE_n - in) ???
USB_P3_3 UHC Rx D??? (VM - in) ??? UHC Rx D- (VM - out) ???
USB_P3_4 UHC Tx D??? (VMO - out) ??? UHC Tx D- (VMO - in) ???
USB_P3_5 UHC Rx D+ (VP - in) ??? UHC Rx D+ (VP - out) ???
USB_P3_6 UHC Tx D+ (VPO - out) ??? UHC Tx D+ (VPO - in) ???

Quoted 2 lines

In the schematic, I have connected GPIO77~82 to USB_P3_1 ~ USB_P3_6.

You need also to configure those gpios to alternate function 2 in the MFPRs.
If you use a transceiver mode, then may be you need USBHPEN signal connected to your PHY and configured accordingly in MFPR. Also, in pxa310 there is a U2DP3CR register, which controls output and serial mode selection of the usb port3.

Quoted 4 lines

However, The USB port 3 does not work.
Here is the log:

Quoted 15 lines

======================================
pxa27x-ohci pxa27x-ohci: PXA27x OHCI
pxa27x-ohci pxa27x-ohci: new USB bus registered, assigned bus number 1 pxa27x-ohci pxa27x-ohci: irq 3, io mem 0x4c000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001 usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb1: Product: PXA27x OHCI
usb usb1: Manufacturer: Linux 2.6.27-dirty ohci_hcd
usb usb1: SerialNumber: pxa27x
sl811: driver sl811-hcd, 19 May 2005
r8a66597_hcd: driver r8a66597_hcd, 10 Apr 2008

Do you really have sl811 and r8a66597 usb host controllers on your board?

Quoted 14 lines

usb 1-3: new full speed USB device using pxa27x-ohci and address 2 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 3 usb 1-3: device descriptor read/64, error -62
usb 1-3: device descriptor read/64, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 4 usb 1-3: device not accepting address 4, error -62
usb 1-3: new full speed USB device using pxa27x-ohci and address 5 usb 1-3: device not accepting address 5, error -62
hub 1-0:1.0: unable to enumerate USB device on port 3
======================================

Quoted 3 lines

Then I found a bit in UP2OCR -- (VPMBlockEnbN).
It is quite strange (if not ugly:( ) the this bit is to control port 3 (In UP2OCR--a register for port 2, while there is too many unused

bits in

Quoted 8 lines

UP3OCR)

But I am not very sure how to use this bit.
I grep the source tree, but found nothing about VPMBlockEnbN.

Can anyone tell me that how to write a driver for USB-host-port-3?

As far as I know pxa310 usb port3 does not need any special driver to work in host mode, ohci-pxa27x is enough.
Currently, the setup of registers, which are not related to UHC (UP2OCR, UP3OCR, etc.), is done in the board code, in the ohci callback.

Quoted 10 lines

High appreciation for your kind help!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Signature · 2 lines
Regards,
Igor.
Signature · 2 lines
Regards,
Igor.
#8 lore raw
Quoted 7 lines · Igor Grinberg
Quoted 2 lines · Chen Wenjie

and I found the VCC voltage is only 3.0v, it is lower than 3.3v (in the spec). Is this a fatal issue?

May be not fatal, but could bring issues...
I'd check the VBUS on that usb port and also the pull ups on DP/DM. If those are not by the spec. then the chances of getting it work are

poor.

The host USB transceiver (ISP1105) should have external 15K pull-downs on both DP and DM. The device will have a pull-up on one signal to distinguish low speed vs. full speed.

You didn't mention what USB device you're test with. Is it actually full speed as the kernel logs indicate?

Do you mean VCC on ISP1105 is only 3.0V? That's the minimum, so it may still be functional. Hopefully the supply is adjustable.

ISP1105 supports both single-ended and differential input modes, as selected by the ISP1105's MODE pin. Can you confirm the PXA310 is set for the right mode? That'll be (digging thru the Dev Man) the P3SS bits in the U2DP3CR register in the U2D (Yes, the USB 2.0 Device Controller must be configured to use the USB Host Port 3. Thanks, Intel.) There's other important settings there, can't think of them off the top of my head. If that doesn't help, I'll share some code when my PXA310 box comes back online.

-Dave

#9 lore raw
Quoted 9 lines · David Hunter
Quoted 7 lines · Igor Grinberg
Quoted 2 lines · Chen Wenjie

and I found the VCC voltage is only 3.0v, it is lower than 3.3v (in the spec). Is this a fatal issue?

May be not fatal, but could bring issues...
I'd check the VBUS on that usb port and also the pull ups on DP/DM. If those are not by the spec. then the chances of getting it work are poor.

Quoted 7 lines

The host USB transceiver (ISP1105) should have external 15K pull-downs on both DP and DM. The device will have a pull-up on one signal to distinguish low speed vs. full speed.

You didn't mention what USB device you're test with. Is it actually full speed as the kernel logs indicate?

Do you mean VCC on ISP1105 is only 3.0V? That's the minimum, so it may still be functional. Hopefully the supply is adjustable.

ISP1105 supports both single-ended and differential input modes, as selected by the ISP1105's MODE pin. Can you confirm the PXA310 is set for the right mode? That'll be (digging thru the Dev Man) the P3SS bits in the U2DP3CR register in the U2D (Yes, the USB 2.0 Device Controller must be configured to use the USB Host Port 3. Thanks, Intel.) There's other important settings there, can't think of them off the top of my head. If that doesn't help, I'll share some code when my PXA310 box comes back online.

cm-x300 uses PXA310 usb port 3 in host mode (the code is in mainline). I've already mentioned the U2DP3CR register in one of my previous replies. On cm-x300 we use 6-wire single ended transceiver (TUSB1105) and the port works just fine without any special setup (the default values of U2DP3CR are fine).
So there indeed could be a mismatch between the port configuration (U2DP3CR) and the ISP1105's MODE pin wiring (although I think "grounded" is 6-wire s/e), or the pull ups on DP/DM or VBUS or the VCC to the transceiver.

Quoted 3 lines

-Dave

Signature · 2 lines
Regards,
Igor.
#10 lore raw

[Q] Booting kernel from NFS?

In reply to Chen Wenjie

Hi, Experts!

I am debuging some issues on an arm-arch board.
now, I have to compile the whole kernel, download zImage to the target board and reboot the board again and again. Since the relations between the source files are complex, it is difficult to just write a module for insmod/rmmod.

My question is: is there any way to boot the kernel from NFS? so we can
use zImage on the host machine through an ethernet/USB cable. Then we needn't download the zImage file to the target board when we debug it.

Is there any bootloader with this feature? Any comments?
(now I use bootloader LK("Little Kernel"))

Thank you!

Wenjie

#11 lore raw

[Q] Booting kernel from NFS?

Quoted 11 lines · Chen Wenjie

I am debuging some issues on an arm-arch board.
now, I have to compile the whole kernel, download zImage to the target board and reboot the board again and again. Since the relations between the source files are complex, it is difficult to just write a module for insmod/rmmod.

My question is: is there any way to boot the kernel from NFS? so we can
use zImage on the host machine through an ethernet/USB cable. Then we needn't download the zImage file to the target board when we debug it.

Is there any bootloader with this feature? Any comments?
(now I use bootloader LK("Little Kernel"))

U-Boot can download the kernel over TFTP.

With kind regards,

Signature · 2 lines
Baurzhan Ismagulov
http://www.kz-easy.com/
#12 lore raw

[Q] Booting kernel from NFS?

Quoted 6 lines · Baurzhan Ismagulov
Quoted 5 lines · Chen Wenjie

? ? ? I am debuging some issues on an arm-arch board.
now, I have to compile the whole kernel, download zImage to the target board and reboot the board again and again. Since the relations between the source files are complex, it is difficult to just write a module for insmod/rmmod.

Quoted 8 lines
Quoted 6 lines

? ? ? My question is: is there any way to boot the kernel from NFS? so we can use zImage on the host machine through an ethernet/USB cable. Then we needn't download the zImage file to the target board when we debug it.

? ? ? Is there any bootloader with this feature? Any comments? (now I use bootloader LK("Little Kernel"))

U-Boot can download the kernel over TFTP.

Yes, you can use the tftp or bootp command under u-boot. Use "help <command>" for syntax. Alternatively, you can edit /etc/dhcpd.conf on the host machine and restart dhcp server to load the kernel automatically.

Regards,

Steve