How to handle the USB_OTG_ID pin when I want Host only operation?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to handle the USB_OTG_ID pin when I want Host only operation?

2,101件の閲覧回数
dougbailey
Contributor III

I am using an iMX6 where I have configured it to have a USB port for two purposes:

  1. A connection point for the MFGTool to do the initial programming of the device.
  2. A receptacle for a USB stick that I will use for firmware updates and troubleshooting

I am using a standard A receptacle and I am using the iMX6's OTG USB controller to drive the port.

My question is what to do about the OTG ID pin that indicates the role of the OTG controller. The pin is not called out on the A connector so I need to treat it externally.

My plan is to use the USB port as a host at all times except for the MFGTool operation.

Do I need to bring the ID pin to a pad of the iMX6 and then terminate it with a pull down resistor? (Or can I leave it unterminated at the IOMUXc connection?)

Does it affect my decision if I don't want to modify the standard Linux USB driver?

Thanks for your input,
Doug Bailey

ラベル(1)
0 件の賞賛
2 返答(返信)

1,542件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Doug

for configuring driver in host mode one can check attached Linux Manual

sect.39.3.8 Changing the Controller Operation Mode, ID pin can be letf

unterminated configuring it as pull down in IOMUXc pad register.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛

1,542件の閲覧回数
dougbailey
Contributor III

Thanks for the information.  It was a simple addition into the dts file for my board.  

I removed the IOMUXC reference for the OTG_ID pin and then added 

dr_mode = "host"; 

to the otg device definition.

Since I needed to use the USB in u-boot, I had to modify u-boot source as well.  

I removed the MX6_PAD_ENET_RX_ER__USB_OTG_ID | MUX_PAD_CTRL(OTG_ID_PAD_CTRL), definition in the usb_otg_pads pin definition. 

I also added an override of the board_usb_phy_mode function. 

int board_usb_phy_mode(int port)
{
   return USB_INIT_HOST;
}

Both were added to my board source code file.

0 件の賞賛