<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18928">
<STYLE>@font-face {
        font-family: 宋体;
}
@font-face {
        font-family: Verdana;
}
@font-face {
        font-family: @宋体;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; layout-grid: 15.6pt; }
P.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
LI.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
DIV.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        FONT-STYLE: normal; FONT-FAMILY: Verdana; COLOR: windowtext; FONT-WEIGHT: normal; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
UNKNOWN {
        FONT-SIZE: 10pt
}
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</STYLE>
</HEAD>
<BODY style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt">
<DIV><FONT color=#000080 size=2 face=Verdana>Hi, Igor,</FONT></DIV>
<DIV><FONT color=#000080></FONT>&nbsp;</DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080>Thank you very much for your 
warm and professional help!</FONT></DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080>I will try to upgrade the 
codes for ohci-pxa27x first.</FONT></DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080></FONT>&nbsp;</DIV>
<DIV style="TEXT-INDENT: 2em">&nbsp;</DIV>
<DIV style="TEXT-INDENT: 2em">&gt; 
Do&nbsp;you&nbsp;really&nbsp;have&nbsp;sl811&nbsp;and&nbsp;r8a66597&nbsp;usb&nbsp;host&nbsp;controllers&nbsp;on&nbsp;your&nbsp;board?<FONT 
color=#000080></FONT></DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080 size=2 face=Verdana>I think no 
real IC installed on my board, I just configure it on menuconfig by choose 
something </FONT></DIV>
<DIV><FONT color=#000080>seems related to USB (--blindly<IMG 
src="cid:__0@Foxmail.net">)</FONT></DIV>
<DIV><FONT color=#000080></FONT>&nbsp;</DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080></FONT>&nbsp;</DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080>Actually, my board use a 
ISP1105 as the PHY interface,the schematic is :</FONT></DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080></FONT>&nbsp;</DIV>
<DIV style="TEXT-INDENT: 2em"><A 
href="http://picasaweb.google.com/114830881710721561783/Public#5502732460750351090">http://picasaweb.google.com/114830881710721561783/Public#5502732460750351090</A> 
</DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080></FONT>&nbsp;</DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080></FONT>&nbsp;</DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080>Do you think there is anything 
wrong?</FONT></DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080></FONT>&nbsp;</DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080></FONT>&nbsp;</DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080>GPIO setting is :</FONT></DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080>//file: 
mfp-pxa300.h</FONT></DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080></FONT>&nbsp;</DIV>
<DIV style="TEXT-INDENT: 2em">
<DIV>/*&nbsp;USB&nbsp;P3&nbsp;*/</DIV>
<DIV>#define&nbsp;GPIO77_USB_P3_1 MFP_CFG(GPIO77,&nbsp;&nbsp;AF2)</DIV>
<DIV>#define&nbsp;GPIO78_USB_P3_2 MFP_CFG(GPIO78,&nbsp;&nbsp;AF2)</DIV>
<DIV>#define&nbsp;GPIO79_USB_P3_3 MFP_CFG(GPIO79,&nbsp;&nbsp;AF2)</DIV>
<DIV>#define&nbsp;GPIO80_USB_P3_4 MFP_CFG(GPIO80,&nbsp;&nbsp;AF2)</DIV>
<DIV>#define&nbsp;GPIO81_USB_P3_5 MFP_CFG(GPIO81,&nbsp;&nbsp;AF2)</DIV>
<DIV>#define&nbsp;GPIO82_USB_P3_6 MFP_CFG(GPIO82,&nbsp;&nbsp;AF2)</DIV>
<DIV>&nbsp;</DIV>
<DIV>#define&nbsp;GPIO126_USB_SPEED&nbsp;&nbsp;&nbsp;MFP_CFG_LPM(GPIO126,&nbsp;AF5,&nbsp;PULL_HIGH)&nbsp;&nbsp;</DIV></DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080></FONT>&nbsp;</DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080></FONT>&nbsp;</DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080>I will upgrade the driver and 
test it again. </FONT></DIV>
<DIV><FONT color=#000080></FONT>&nbsp;</DIV>
<DIV style="TEXT-INDENT: 2em"><FONT color=#000080 size=2 face=Verdana>Thank you 
very very much!</FONT></DIV>
<DIV><FONT color=#000080></FONT>&nbsp;</DIV>
<DIV><FONT color=#c0c0c0 size=2 face=Verdana>2010-08-08 </FONT></DIV><FONT 
color=#000080 size=2 face=Verdana>
<HR style="WIDTH: 100px" align=left color=#b5c4df SIZE=1>
</FONT>
<DIV><FONT color=#c0c0c0 size=2 face=Verdana><SPAN>Chen 
Wenjie</SPAN></FONT></DIV>
<HR color=#b5c4df SIZE=1>

<DIV><FONT size=2 face=Verdana><STRONG>发件人:</STRONG> Igor Grinberg </FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>发送时间:</STRONG> 2010-08-07&nbsp; 21:42:57 
</FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>收件人:</STRONG> Chen Wenjie </FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>抄送:</STRONG> linux-arm-kernel 
</FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>主题:</STRONG> Re: usb host port3 on 
pxa310? </FONT></DIV>
<DIV><FONT size=2 face=Verdana></FONT> </DIV>
<DIV><FONT size=2 face=Verdana>
<DIV>On&nbsp;08/06/10&nbsp;21:43,&nbsp;Chen&nbsp;Wenjie&nbsp;wrote:</DIV>
<DIV>&gt;&nbsp;I&nbsp;want&nbsp;to&nbsp;use&nbsp;PXA310&nbsp;to&nbsp;realize&nbsp;a&nbsp;USB&nbsp;HOST.</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;&nbsp;(My&nbsp;kernel&nbsp;version:&nbsp;2.6.27)</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;</DIV>
<DIV></DIV>
<DIV>There&nbsp;was&nbsp;a&nbsp;relatively&nbsp;big&nbsp;change&nbsp;in&nbsp;ohci-pxa27x&nbsp;driver,&nbsp;I&nbsp;think</DIV>
<DIV>around&nbsp;2.6.28-rc1.&nbsp;May&nbsp;be&nbsp;you&nbsp;should&nbsp;consider&nbsp;upgrading...</DIV>
<DIV>&nbsp;</DIV>
<DIV>&gt;&nbsp;Zylonite&nbsp;have&nbsp;implemented&nbsp;a&nbsp;USB&nbsp;host&nbsp;through&nbsp;USBH_N(USBH1_N)&nbsp;USBH_P(USBH1_P).</DIV>
<DIV>&gt;&nbsp;Unfortunatly,&nbsp;In&nbsp;PXA310,&nbsp;the&nbsp;pins&nbsp;of&nbsp;USBH1_N&nbsp;and&nbsp;USBH1_P&nbsp;does&nbsp;not&nbsp;exist.</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;&nbsp;So&nbsp;I&nbsp;have&nbsp;to&nbsp;use&nbsp;&nbsp;"usb&nbsp;host&nbsp;port3&nbsp;"&nbsp;described&nbsp;in&nbsp;the&nbsp;manual&nbsp;"Vol.&nbsp;IV:&nbsp;Monahans&nbsp;</DIV>
<DIV>&gt;&nbsp;L&nbsp;Processor&nbsp;and</DIV>
<DIV>&gt;&nbsp;Monahans&nbsp;LV&nbsp;Processor&nbsp;Developers&nbsp;Manual"</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;&nbsp;GPIO</DIV>
<DIV>&gt;&nbsp;Alternate</DIV>
<DIV>&gt;&nbsp;Function</DIV>
<DIV>&gt;&nbsp;Port UP3OCR[CFG]</DIV>
<DIV>&gt;&nbsp; 0x0&nbsp; &nbsp;&nbsp;&nbsp;0x2&nbsp; </DIV>
<DIV>&gt;&nbsp;USB_P3_1 UHC&nbsp;Rx&nbsp;Data (RCV&nbsp;-&nbsp;in) — 
UHC&nbsp;Rx&nbsp;Data (RCV&nbsp;-&nbsp;</DIV>
<DIV>&gt;&nbsp;out) —</DIV>
<DIV>&gt;&nbsp;USB_P3_2 UHC&nbsp;OE (OE_n&nbsp;-&nbsp;out) — UHC&nbsp;OE 
(OE_n&nbsp;-&nbsp;in)</DIV>
<DIV>&gt;&nbsp; —</DIV>
<DIV>&gt;&nbsp;USB_P3_3 UHC&nbsp;Rx&nbsp;D– (VM&nbsp;-&nbsp;in) — 
UHC&nbsp;Rx&nbsp;D- (VM&nbsp;-&nbsp;</DIV>
<DIV>&gt;&nbsp;out) —</DIV>
<DIV>&gt;&nbsp;USB_P3_4 UHC&nbsp;Tx&nbsp;D– (VMO&nbsp;-&nbsp;out) — 
UHC&nbsp;Tx&nbsp;D- (VMO&nbsp;-&nbsp;</DIV>
<DIV>&gt;&nbsp;in) —</DIV>
<DIV>&gt;&nbsp;USB_P3_5 UHC&nbsp;Rx&nbsp;D+ (VP&nbsp;-&nbsp;in) — 
UHC&nbsp;Rx&nbsp;D+ (VP&nbsp;-&nbsp;</DIV>
<DIV>&gt;&nbsp;out) —</DIV>
<DIV>&gt;&nbsp;USB_P3_6 UHC&nbsp;Tx&nbsp;D+ (VPO&nbsp;-&nbsp;out) — 
UHC&nbsp;Tx&nbsp;D+ (VPO&nbsp;-&nbsp;</DIV>
<DIV>&gt;&nbsp;in) —</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;&nbsp;In&nbsp;the&nbsp;schematic,&nbsp;I&nbsp;have&nbsp;connected&nbsp;GPIO77~82&nbsp;to&nbsp;USB_P3_1&nbsp;~&nbsp;USB_P3_6.</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;</DIV>
<DIV></DIV>
<DIV>You&nbsp;need&nbsp;also&nbsp;to&nbsp;configure&nbsp;those&nbsp;gpios&nbsp;to&nbsp;alternate&nbsp;function&nbsp;2&nbsp;in&nbsp;the&nbsp;MFPRs.</DIV>
<DIV>If&nbsp;you&nbsp;use&nbsp;a&nbsp;transceiver&nbsp;mode,&nbsp;then&nbsp;may&nbsp;be&nbsp;you&nbsp;need&nbsp;USBHPEN&nbsp;signal</DIV>
<DIV>connected&nbsp;to&nbsp;your&nbsp;PHY&nbsp;and&nbsp;configured&nbsp;accordingly&nbsp;in&nbsp;MFPR.</DIV>
<DIV>Also,&nbsp;in&nbsp;pxa310&nbsp;there&nbsp;is&nbsp;a&nbsp;U2DP3CR&nbsp;register,&nbsp;which&nbsp;controls&nbsp;output</DIV>
<DIV>and&nbsp;serial&nbsp;mode&nbsp;selection&nbsp;of&nbsp;the&nbsp;usb&nbsp;port3.</DIV>
<DIV></DIV>
<DIV>&gt;</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;&nbsp;However,&nbsp;The&nbsp;USB&nbsp;port&nbsp;3&nbsp;does&nbsp;not&nbsp;work.</DIV>
<DIV>&gt;&nbsp;Here&nbsp;is&nbsp;the&nbsp;log:</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;&nbsp;======================================</DIV>
<DIV>&gt;&nbsp;pxa27x-ohci&nbsp;pxa27x-ohci:&nbsp;PXA27x&nbsp;OHCI</DIV>
<DIV>&gt;&nbsp;pxa27x-ohci&nbsp;pxa27x-ohci:&nbsp;new&nbsp;USB&nbsp;bus&nbsp;registered,&nbsp;assigned&nbsp;bus&nbsp;number&nbsp;1</DIV>
<DIV>&gt;&nbsp;pxa27x-ohci&nbsp;pxa27x-ohci:&nbsp;irq&nbsp;3,&nbsp;io&nbsp;mem&nbsp;0x4c000000</DIV>
<DIV>&gt;&nbsp;usb&nbsp;usb1:&nbsp;configuration&nbsp;#1&nbsp;chosen&nbsp;from&nbsp;1&nbsp;choice</DIV>
<DIV>&gt;&nbsp;hub&nbsp;1-0:1.0:&nbsp;USB&nbsp;hub&nbsp;found</DIV>
<DIV>&gt;&nbsp;hub&nbsp;1-0:1.0:&nbsp;3&nbsp;ports&nbsp;detected</DIV>
<DIV>&gt;&nbsp;usb&nbsp;usb1:&nbsp;New&nbsp;USB&nbsp;device&nbsp;found,&nbsp;idVendor=1d6b,&nbsp;idProduct=0001</DIV>
<DIV>&gt;&nbsp;usb&nbsp;usb1:&nbsp;New&nbsp;USB&nbsp;device&nbsp;strings:&nbsp;Mfr=3,&nbsp;Product=2,&nbsp;SerialNumber=1</DIV>
<DIV>&gt;&nbsp;usb&nbsp;usb1:&nbsp;Product:&nbsp;PXA27x&nbsp;OHCI</DIV>
<DIV>&gt;&nbsp;usb&nbsp;usb1:&nbsp;Manufacturer:&nbsp;Linux&nbsp;2.6.27-dirty&nbsp;ohci_hcd</DIV>
<DIV>&gt;&nbsp;usb&nbsp;usb1:&nbsp;SerialNumber:&nbsp;pxa27x</DIV>
<DIV>&gt;&nbsp;sl811:&nbsp;driver&nbsp;sl811-hcd,&nbsp;19&nbsp;May&nbsp;2005</DIV>
<DIV>&gt;&nbsp;r8a66597_hcd:&nbsp;driver&nbsp;r8a66597_hcd,&nbsp;10&nbsp;Apr&nbsp;2008</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;</DIV>
<DIV></DIV>
<DIV>Do&nbsp;you&nbsp;really&nbsp;have&nbsp;sl811&nbsp;and&nbsp;r8a66597&nbsp;usb&nbsp;host&nbsp;controllers&nbsp;on&nbsp;your&nbsp;board?</DIV>
<DIV></DIV>
<DIV>&gt;&nbsp;usb&nbsp;1-3:&nbsp;new&nbsp;full&nbsp;speed&nbsp;USB&nbsp;device&nbsp;using&nbsp;pxa27x-ohci&nbsp;and&nbsp;address&nbsp;2</DIV>
<DIV>&gt;&nbsp;usb&nbsp;1-3:&nbsp;device&nbsp;descriptor&nbsp;read/64,&nbsp;error&nbsp;-62</DIV>
<DIV>&gt;&nbsp;usb&nbsp;1-3:&nbsp;device&nbsp;descriptor&nbsp;read/64,&nbsp;error&nbsp;-62</DIV>
<DIV>&gt;&nbsp;usb&nbsp;1-3:&nbsp;new&nbsp;full&nbsp;speed&nbsp;USB&nbsp;device&nbsp;using&nbsp;pxa27x-ohci&nbsp;and&nbsp;address&nbsp;3</DIV>
<DIV>&gt;&nbsp;usb&nbsp;1-3:&nbsp;device&nbsp;descriptor&nbsp;read/64,&nbsp;error&nbsp;-62</DIV>
<DIV>&gt;&nbsp;usb&nbsp;1-3:&nbsp;device&nbsp;descriptor&nbsp;read/64,&nbsp;error&nbsp;-62</DIV>
<DIV>&gt;&nbsp;usb&nbsp;1-3:&nbsp;new&nbsp;full&nbsp;speed&nbsp;USB&nbsp;device&nbsp;using&nbsp;pxa27x-ohci&nbsp;and&nbsp;address&nbsp;4</DIV>
<DIV>&gt;&nbsp;usb&nbsp;1-3:&nbsp;device&nbsp;not&nbsp;accepting&nbsp;address&nbsp;4,&nbsp;error&nbsp;-62</DIV>
<DIV>&gt;&nbsp;usb&nbsp;1-3:&nbsp;new&nbsp;full&nbsp;speed&nbsp;USB&nbsp;device&nbsp;using&nbsp;pxa27x-ohci&nbsp;and&nbsp;address&nbsp;5</DIV>
<DIV>&gt;&nbsp;usb&nbsp;1-3:&nbsp;device&nbsp;not&nbsp;accepting&nbsp;address&nbsp;5,&nbsp;error&nbsp;-62</DIV>
<DIV>&gt;&nbsp;hub&nbsp;1-0:1.0:&nbsp;unable&nbsp;to&nbsp;enumerate&nbsp;USB&nbsp;device&nbsp;on&nbsp;port&nbsp;3</DIV>
<DIV>&gt;&nbsp;======================================</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;&nbsp;Then&nbsp;I&nbsp;found&nbsp;a&nbsp;bit&nbsp;in&nbsp;UP2OCR&nbsp;--&nbsp;(VPMBlockEnbN).</DIV>
<DIV>&gt;&nbsp;It&nbsp;is&nbsp;quite&nbsp;strange&nbsp;(if&nbsp;not&nbsp;ugly:(&nbsp;)&nbsp;the&nbsp;this&nbsp;bit&nbsp;is&nbsp;to&nbsp;control&nbsp;port&nbsp;3</DIV>
<DIV>&gt;&nbsp;(In&nbsp;UP2OCR--a&nbsp;register&nbsp;for&nbsp;port&nbsp;2,&nbsp;while&nbsp;there&nbsp;is&nbsp;too&nbsp;many&nbsp;unused&nbsp;bits&nbsp;in&nbsp;</DIV>
<DIV>&gt;&nbsp;UP3OCR)</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;&nbsp;But&nbsp;I&nbsp;am&nbsp;not&nbsp;very&nbsp;sure&nbsp;how&nbsp;to&nbsp;use&nbsp;this&nbsp;bit.</DIV>
<DIV>&gt;&nbsp;I&nbsp;grep&nbsp;the&nbsp;source&nbsp;tree,&nbsp;but&nbsp;found&nbsp;nothing&nbsp;about&nbsp;VPMBlockEnbN.</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;&nbsp;Can&nbsp;anyone&nbsp;tell&nbsp;me&nbsp;that&nbsp;how&nbsp;to&nbsp;write&nbsp;a&nbsp;driver&nbsp;for&nbsp;USB-host-port-3?</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;</DIV>
<DIV></DIV>
<DIV>As&nbsp;far&nbsp;as&nbsp;I&nbsp;know&nbsp;pxa310&nbsp;usb&nbsp;port3&nbsp;does&nbsp;not&nbsp;need&nbsp;any&nbsp;special&nbsp;driver</DIV>
<DIV>to&nbsp;work&nbsp;in&nbsp;host&nbsp;mode,&nbsp;ohci-pxa27x&nbsp;is&nbsp;enough.</DIV>
<DIV>Currently,&nbsp;the&nbsp;setup&nbsp;of&nbsp;registers,&nbsp;which&nbsp;are&nbsp;not&nbsp;related&nbsp;to&nbsp;UHC</DIV>
<DIV>(UP2OCR,&nbsp;UP3OCR,&nbsp;etc.),&nbsp;is&nbsp;done&nbsp;in&nbsp;the&nbsp;board&nbsp;code,&nbsp;in&nbsp;the&nbsp;ohci</DIV>
<DIV>callback.</DIV>
<DIV></DIV>
<DIV>&gt;&nbsp;High&nbsp;appreciation&nbsp;for&nbsp;your&nbsp;kind&nbsp;help!</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;&nbsp;_______________________________________________</DIV>
<DIV>&gt;&nbsp;linux-arm-kernel&nbsp;mailing&nbsp;list</DIV>
<DIV>&gt;&nbsp;linux-arm-kernel@lists.infradead.org</DIV>
<DIV>&gt;&nbsp;http://lists.infradead.org/mailman/listinfo/linux-arm-kernel</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;</DIV>
<DIV></DIV>
<DIV>--&nbsp;</DIV>
<DIV>Regards,</DIV>
<DIV>Igor.</DIV>
<DIV></DIV></FONT></DIV></BODY></HTML>