如何控制USB收发器/ HUB电源

时间:2013-07-30 18:12:59

标签: linux-kernel usb arm gpio

我在Linux 2.6.32.8中使用AM3517。 我必须从软件控制USB电源。我想写一些寄存器,使其处于挂起模式。我看了硬件原理图,基于该板具有AM3517-> USBHOST-> TIUSB1210(收发器) - > TUSB8040(集线器) - > usBport。

我可以随意使用USB端口。这是dmesg的一部分

usbcore: registered new interface driver asix
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver rtl8187
usbcore: registered new interface driver zd1201
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: OMAP-EHCI Host Controller
usb usb1: Manufacturer: Linux 2.6.32.8 ehci_hcd
usb usb1: SerialNumber: ehci-omap.0
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
g_ether gadget: using random self ethernet address
g_ether gadget: using random host ethernet address
usb0: MAC 0e:ed:d6:cc:da:53
usb0: HOST MAC f6:62:10:36:d1:ad
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
musb_hdrc musb_hdrc: MUSB HDRC host driver
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 2
usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: MUSB HDRC host driver
usb usb2: Manufacturer: Linux 2.6.32.8 musb-hcd
usb usb2: SerialNumber: musb_hdrc
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected

Bluetooth: Generic Bluetooth USB driver ver 0.6
usbcore: registered new interface driver btusb
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver

usb 1-1: new high speed USB device using ehci-omap and address 2
Empty flash at 0x011102bc ends at 0x01110800
usb 1-1: New USB device found, idVendor=0451, idProduct=8043
usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=1
usb 1-1: SerialNumber: 710208497AA3
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 1 port detected

usb 1-1: USB disconnect, address 2

我查看了ULPI接口,但认为TIUSB1210不支持它。请纠正我如果我误解了。或者我是否必须更改代码或内核配置才能启用它?

如何访问收发器和HUB的寄存器?我对所有建议持开放态度。

感谢您的回复。

1 个答案:

答案 0 :(得分:0)

您不直接访问设备寄存器。

您只需向根集线器发送适当的控制消息(请参阅USB 2.0规范的第11.24.2节);然后,这些消息由主机控制器驱动程序处理。