Other Parts Discussed in Thread: TX12
Tool/software: Linux
Hi,
i want to use the usb host controller on the am3358 in host and gadget mode. A external trigger triggers the "transformation".
The device only have a usb a female connector, so i have to override the id pin to get in gaged mode. For Tests i use the beagle bone black (a femal connecto)
I changed the usb port in the device tree to
dr_mode = "otg";
The system boots, dmesg | grep usb shows :
root@beaglebone:~# dmesg |grep usb
[ 1.532469] usbcore: registered new interface driver usbfs
[ 1.532549] usbcore: registered new interface driver hub
[ 1.532674] usbcore: registered new device driver usb
[ 2.182201] usbcore: registered new interface driver usb-storage
[ 2.184238] 47401300.usb-phy supply vcc not found, using dummy regulator
[ 2.186947] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
[ 2.186969] musb-hdrc: MHDRC RTL version 2.0
[ 2.186978] musb-hdrc: setup fifo_mode 4
[ 2.186997] musb-hdrc: 28/31 max ep, 16384/16384 memory
[ 2.187159] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
[ 2.187202] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
[ 2.187508] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.187523] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.187533] usb usb1: Product: MUSB HDRC host driver
[ 2.187542] usb usb1: Manufacturer: Linux 4.4.91-ti-r133 musb-hcd
[ 2.187551] usb usb1: SerialNumber: musb-hdrc.0.auto
[ 2.190863] 47401b00.usb-phy supply vcc not found, using dummy regulator
[ 2.193353] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
[ 2.193373] musb-hdrc: MHDRC RTL version 2.0
[ 2.193382] musb-hdrc: setup fifo_mode 4
[ 2.193398] musb-hdrc: 28/31 max ep, 16384/16384 memory
[ 2.193572] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 2.193607] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
[ 2.193876] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.193891] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.193901] usb usb2: Product: MUSB HDRC host driver
[ 2.193911] usb usb2: Manufacturer: Linux 4.4.91-ti-r133 musb-hcd
[ 2.193920] usb usb2: SerialNumber: musb-hdrc.1.auto
[ 2.283548] usbcore: registered new interface driver usbhid
[ 2.283560] usbhid: USB HID core driver
lsusb -v
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0002 2.0 root hub
bcdDevice 4.04
iManufacturer 3 Linux 4.4.91-ti-r133 musb-hcd
iProduct 2 MUSB HDRC host driver
iSerial 1 musb-hdrc.1.auto
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 1
wHubCharacteristic 0x0011
Per-port power switching
No overcurrent protection
TT think time 8 FS bits
bPwrOn2PwrGood 5 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x02
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0100 power
Device Status: 0x0001
Self Powered
I want to start in host mode and load a driver for a wifi module.But the usb power meter shows there is no power on the usb port.
What is the common way to enable power on the usb port in host mode ?
a possible solution form booting my side:
load the usb core driver in host mode ?
enable the power USB1_DRVVBUS (Signal in bbb schematic) powers the usb port with 5 volts
load the driver for the wifi stick
host to gadget:
unload wifi driver
disable power USB1_DRVVBUS
unload the host driver ?
load the rndis driver (bind to usb1 port)
gadget to host
vice versa
Is there a common solution the manage this problem ?