USB Host Failure - Gen8 General

There have been a high number of USB host failures on the A101, I have had two bad units now. I started trying to troubleshoot, but have almost no linux experience.
I have attached a LogCat file and have run the LS /proc/bus/usb command and have gotten:
001 devices
So two requests:
1)Could someone with a working USB try the same command and see what they get?
2)Start a log cat and insert a USB device and see what they get?

A101IT with working usb results: 001 002 devices

What about this line in a bug report?
Mine:
[ro.board.usb_host_suspend]: [yes]

Moved to general as not android development

hi, why need logcat for usb_host?
what device you plug into your 101?
um..I can use my usb_host to read my card reader and usb stick(thin one), but need to turn the power management into "Overdrive"...

LeoNg628 said:
hi, why need logcat for usb_host?
what device you plug into your 101?
um..I can use my usb_host to read my card reader and usb stick(thin one), but need to turn the power management into "Overdrive"...
Click to expand...
Click to collapse
If you notice in my Log cat you can see the disabled 2nd port. Any USB device I plug in now fails.
Overdrive does nothing for me.

Could someone else with a working USB host run the adb shell test? (also let me know if you are running SDE or not) I have formated and got the same issue, there is no 002 folder where there should be. I am guessing this is the issue. Since the file system is not write-able even in root (non-SDE) and I can not copy 001 and rename it 002.

you cannot just copy or rename 001 to 002. this listing gives you the ability to read the usb tree of your linux device.
if there is no 002 there is no secondary usb host device which means it's not getting recognized for whatever reason (for example when it's broken)

USB host mode driver
check with lsmod from TerminalEmulator is the kernel module musb_hdrc loaded ....
If you have root (su) then you can try (re)loading it from terminal emulator:
Unload it with:
su
rmmod musb_hdrc.ko
Generaly, USB host mode is activated by loading musb_hdrc with param mode_default=1
su
insmod /lib/modules/musb_hdrc.ko mode_default=1
With properly loaded musb_hdrc.ko, ls -l /proc/bus/usb gives:
total 0
dr-xr-xr-x 2 storage root 0 Jan 1 1970 001
dr-xr-xr-x 2 storage root 0 Feb 19 08:35 002
-r--r--r-- 1 storage root 0 Feb 19 08:35 devices
(and in this case my host USB port on A101IT is empty - no devices plugged in)

nenadr said:
check with lsmod from TerminalEmulator is the kernel module musb_hdrc loaded ....
If you have root (su) then you can try (re)loading it from terminal emulator:
Unload it with:
su
rmmod musb_hdrc.ko
Generaly, USB host mode is activated by loading musb_hdrc with param mode_default=1
su
insmod /lib/modules/musb_hdrc.ko mode_default=1
With properly loaded musb_hdrc.ko, ls -l /proc/bus/usb gives:
total 0
dr-xr-xr-x 2 storage root 0 Jan 1 1970 001
dr-xr-xr-x 2 storage root 0 Feb 19 08:35 002
-r--r--r-- 1 storage root 0 Feb 19 08:35 devices
(and in this case my host USB port on A101IT is empty - no devices plugged in)
Click to expand...
Click to collapse
What do you get in dmesg after you do the insmod
Code:
musb_hdrc: USB Host mode controller at fa0ab000 using DMA, IRQ 92
musb_hdrc musb_hdrc: MUSB HDRC host driver
/mnt/flash/releases/G8A/AX08_r2.1.2/arcbuild/linux/drivers/usb/core/inode.c: creating file '002'
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 2
usb usb2: default language 0x0409
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.29-omap1 musb-hcd
usb usb2: SerialNumber: musb_hdrc
usb usb2: uevent
usb usb2: usb_probe_device
usb usb2: configuration #1 chosen from 1 choice
usb usb2: adding 2-0:1.0 (config #1, interface 0)
usb 2-0:1.0: uevent
hub 2-0:1.0: usb_probe_interface
hub 2-0:1.0: usb_probe_interface - got id
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
hub 2-0:1.0: standalone hub
hub 2-0:1.0: individual port power switching
hub 2-0:1.0: no over-current protection
hub 2-0:1.0: power on to power good time: 10ms
hub 2-0:1.0: local power source is good
hub 2-0:1.0: enabling power on all ports
/mnt/flash/releases/G8A/AX08_r2.1.2/arcbuild/linux/drivers/usb/core/inode.c: creating file '001'
hub 2-0:1.0: state 7 ports 1 chg 0000 evt 0000
hub 2-0:1.0: hub_suspend
usb usb2: bus auto-suspend

Thanks WDL this is what I got:
# ls -i /proc/bus/usb
555 001 389674 002 554 devices
#ls -l /proc/bus/usb
dr-xr-xr-x 2 1000 root 0 Jan 1 1970 001
dr-xr-xr-x 2 1000 root 0 Feb 19 13:52 002
-r--r--r-- 1 1000 root 0 Feb 19 13:52 devices
<code>
Code:
von_early_suspend: taking wake lock
hub 1-0:1.0: hub_suspend
usb usb1: bus auto-suspend
ohci-omap ohci-omap.0: suspend root hub
hanvon_early_suspend_work
hanvon_early_suspend_work: releasing wake lock
hanvon_early_suspend_work
hanvon_early_suspend_work: releasing wake lock
request_suspend_state: wakeup (3->0) at 175100579427151 (2011-02-19 02:21:41.669057246 UTC)
omapdss omapdss: regulator_enable omapdss-vdds_dsi enabled 0
panel_enable [lcd]
mma7660fc_ctrl_ioctl: Set polling delay 200
usb usb1: usb auto-resume
ohci-omap ohci-omap.0: resume root hub
hub 1-0:1.0: hub_resume
hub 1-0:1.0: port 2: status 0107 change 0000
usb 1-2: usb resume
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00040103 PSSC PPS PES CCS
usb 1-2: finish resume
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
ohci-omap ohci-omap.0: urb c4cae3c0 path 2 ep0in 5ec20000 cc 5 --> status -62
usb 1-2: retry with reset-resume
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00100103 PRSC PPS PES CCS
usb 1-2: reset full speed USB device using ohci-omap and address 2
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00100103 PRSC PPS PES CCS
usb 1-2: ep0 maxpacket = 16
Configure McBSP for 1 phase
Configure McBSP TX FIFO threshold to 1260
Configure McBSP for 1 phase
Configure McBSP TX FIFO threshold to 1260
Configure McBSP for 1 phase
Configure McBSP TX FIFO threshold to 1260
Configure McBSP for 1 phase
Configure McBSP TX FIFO threshold to 1260
request_suspend_state: sleep (0->3) at 175723751485243 (2011-02-19 02:32:04.841084820 UTC)
omapdss omapdss: regulator_enable omapdss-vdds_dsi enabled 0
usb 1-2: usb suspend
hanvon_early_suspend: taking wake lock
hanvon_early_suspend: taking wake lock
hub 1-0:1.0: hub_suspend
usb usb1: bus auto-suspend
ohci-omap ohci-omap.0: suspend root hub
hanvon_early_suspend_work
hanvon_early_suspend_work: releasing wake lock
hanvon_early_suspend_work
hanvon_early_suspend_work: releasing wake lock
Configure McBSP for 1 phase
Configure McBSP TX FIFO threshold to 1260
Configure McBSP for 1 phase
Configure McBSP TX FIFO threshold to 1260
request_suspend_state: wakeup (3->0) at 176172694447885 (2011-02-19 02:39:33.784077980 UTC)
omapdss omapdss: regulator_enable omapdss-vdds_dsi enabled 0
panel_enable [lcd]
mma7660fc_ctrl_ioctl: Set polling delay 200
usb usb1: usb auto-resume
ohci-omap ohci-omap.0: resume root hub
hub 1-0:1.0: hub_resume
hub 1-0:1.0: port 2: status 0107 change 0000
usb 1-2: usb resume
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00040103 PSSC PPS PES CCS
usb 1-2: finish resume
ohci-omap ohci-omap.0: urb c3cf6540 path 2 ep0in 5ec20000 cc 5 --> status -62
usb 1-2: retry with reset-resume
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00100103 PRSC PPS PES CCS
usb 1-2: reset full speed USB device using ohci-omap and address 2
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00100103 PRSC PPS PES CCS
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
usb 1-2: ep0 maxpacket = 16
request_suspend_state: sleep (0->3) at 176277971089749 (2011-02-19 02:41:19.060719844 UTC)
omapdss omapdss: regulator_enable omapdss-vdds_dsi enabled 0
usb 1-2: usb suspend
hanvon_early_suspend: taking wake lock
hanvon_early_suspend: taking wake lock
hub 1-0:1.0: hub_suspend
usb usb1: bus auto-suspend
ohci-omap ohci-omap.0: suspend root hub
hanvon_early_suspend_work
hanvon_early_suspend_work: releasing wake lock
hanvon_early_suspend_work
hanvon_early_suspend_work: releasing wake lock
request_suspend_state: wakeup (3->0) at 176483468500015 (2011-02-19 02:44:44.558099607 UTC)
omapdss omapdss: regulator_enable omapdss-vdds_dsi enabled 0
panel_enable [lcd]
mma7660fc_ctrl_ioctl: Set polling delay 200
usb usb1: usb auto-resume
ohci-omap ohci-omap.0: resume root hub
hub 1-0:1.0: hub_resume
hub 1-0:1.0: port 2: status 0107 change 0000
usb 1-2: usb resume
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00040103 PSSC PPS PES CCS
usb 1-2: finish resume
ohci-omap ohci-omap.0: urb ca5904c0 path 2 ep0in 5ec20000 cc 5 --> status -62
usb 1-2: retry with reset-resume
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00100103 PRSC PPS PES CCS
usb 1-2: reset full speed USB device using ohci-omap and address 2
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00100103 PRSC PPS PES CCS
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
usb 1-2: ep0 maxpacket = 16
request_suspend_state: sleep (0->3) at 176510816112781 (2011-02-19 02:45:11.905742876 UTC)
omapdss omapdss: regulator_enable omapdss-vdds_dsi enabled 0
usb 1-2: usb suspend
hanvon_early_suspend: taking wake lock
hanvon_early_suspend: taking wake lock
hub 1-0:1.0: hub_suspend
usb usb1: bus auto-suspend
ohci-omap ohci-omap.0: suspend root hub
hanvon_early_suspend_work
hanvon_early_suspend_work: releasing wake lock
hanvon_early_suspend_work
hanvon_early_suspend_work: releasing wake lock
Configure McBSP for 1 phase
Configure McBSP TX FIFO threshold to 1260
request_suspend_state: wakeup (3->0) at 177074474626811 (2011-02-19 02:54:35.564256906 UTC)
omapdss omapdss: regulator_enable omapdss-vdds_dsi enabled 0
panel_enable [lcd]
mma7660fc_ctrl_ioctl: Set polling delay 200
usb usb1: usb auto-resume
ohci-omap ohci-omap.0: resume root hub
hub 1-0:1.0: hub_resume
hub 1-0:1.0: port 2: status 0107 change 0000
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
usb 1-2: usb resume
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00040103 PSSC PPS PES CCS
usb 1-2: finish resume
ohci-omap ohci-omap.0: urb c5756840 path 2 ep0in 5ec20000 cc 5 --> status -62
usb 1-2: retry with reset-resume
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00100103 PRSC PPS PES CCS
usb 1-2: reset full speed USB device using ohci-omap and address 2
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00100103 PRSC PPS PES CCS
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
usb 1-2: ep0 maxpacket = 16
Configure McBSP for 1 phase
Configure McBSP TX FIFO threshold to 1260
Configure McBSP for 1 phase
Configure McBSP TX FIFO threshold to 1260
Configure McBSP for 1 phase
Configure McBSP TX FIFO threshold to 1260
Configure McBSP for 1 phase
Configure McBSP TX FIFO threshold to 1260
Configure McBSP for 1 phase
Configure McBSP TX FIFO threshold to 1260
binder: 1315:1488 transaction failed 29189, size1584-12
Configure McBSP for 1 phase
Configure McBSP TX FIFO threshold to 1260
request_suspend_state: sleep (0->3) at 178647702348969 (2011-02-19 03:20:48.791979064 UTC)
omapdss omapdss: regulator_enable omapdss-vdds_dsi enabled 0
usb 1-2: usb suspend
hanvon_early_suspend: taking wake lock
hanvon_early_suspend: taking wake lock
hub 1-0:1.0: hub_suspend
usb usb1: bus auto-suspend
ohci-omap ohci-omap.0: suspend root hub
hanvon_early_suspend_work
hanvon_early_suspend_work: releasing wake lock
hanvon_early_suspend_work
hanvon_early_suspend_work: releasing wake lock
dcin_read_dc_detect_delayed
request_suspend_state: wakeup (3->0) at 178915982225293 (2011-02-19 03:25:17.071855388 UTC)
omapdss omapdss: regulator_enable omapdss-vdds_dsi enabled 0
panel_enable [lcd]
mma7660fc_ctrl_ioctl: Set polling delay 200
usb usb1: usb auto-resume
ohci-omap ohci-omap.0: resume root hub
hub 1-0:1.0: hub_resume
hub 1-0:1.0: port 2: status 0107 change 0000
usb 1-2: usb resume
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00040103 PSSC PPS PES CCS
usb 1-2: finish resume
ohci-omap ohci-omap.0: urb c74416c0 path 2 ep0in 5ec20000 cc 5 --> status -62
usb 1-2: retry with reset-resume
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00100103 PRSC PPS PES CCS
usb 1-2: reset full speed USB device using ohci-omap and address 2
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00100103 PRSC PPS PES CCS
usb 1-2: ep0 maxpacket = 16
Enabling CTS wakeup for UART1
kim kim: firmware: requesting TIInit_7.2.31.bts
init: untracked pid 1172 exited
Configure McBSP for 1 phase
Configure McBSP TX FIFO threshold to 1260
Configure McBSP for 1 phase
Configure McBSP TX FIFO threshold to 1260
mma7660fc_ctrl_ioctl: Set polling delay 60
mma7660fc_ctrl_ioctl: Set polling delay 60
mma7660fc_ctrl_ioctl: Set polling delay 60
mma7660fc_ctrl_ioctl: Set polling delay 200
mma7660fc_ctrl_ioctl: Set polling delay 60
mma7660fc_ctrl_ioctl: Set polling delay 60
mma7660fc_ctrl_ioctl: Set polling delay 60
mma7660fc_ctrl_ioctl: Set polling delay 200
mma7660fc_ctrl_ioctl: Set polling delay 60
mma7660fc_ctrl_ioctl: Set polling delay 60
mma7660fc_ctrl_ioctl: Set polling delay 60
mma7660fc_ctrl_ioctl: Set polling delay 200
mma7660fc_ctrl_ioctl: Set polling delay 60
mma7660fc_ctrl_ioctl: Set polling delay 60
mma7660fc_ctrl_ioctl: Set polling delay 60
mma7660fc_ctrl_ioctl: Set polling delay 200
mma7660fc_ctrl_ioctl: Set polling delay 60
mma7660fc_ctrl_ioctl: Set polling delay 60
mma7660fc_ctrl_ioctl: Set polling delay 60
mma7660fc_ctrl_ioctl: Set polling delay 200
request_suspend_state: sleep (0->3) at 184534331679729 (2011-02-19 04:58:55.421309824 UTC)
omapdss omapdss: regulator_enable omapdss-vdds_dsi enabled 0
usb 1-2: usb suspend
hanvon_early_suspend: taking wake lock
hanvon_early_suspend: taking wake lock
hub 1-0:1.0: hub_suspend
usb usb1: bus auto-suspend
ohci-omap ohci-omap.0: suspend root hub
hanvon_early_suspend_work
hanvon_early_suspend_work: releasing wake lock
hanvon_early_suspend_work
hanvon_early_suspend_work: releasing wake lock
Configure McBSP for 1 phase
Configure McBSP TX FIFO threshold to 1260
request_suspend_state: wakeup (3->0) at 213819761458747 (2011-02-19 13:07:00.851088842 UTC)
omapdss omapdss: regulator_enable omapdss-vdds_dsi enabled 0
panel_enable [lcd]
mma7660fc_ctrl_ioctl: Set polling delay 200
usb usb1: usb auto-resume
ohci-omap ohci-omap.0: resume root hub
hub 1-0:1.0: hub_resume
hub 1-0:1.0: port 2: status 0107 change 0000
usb 1-2: usb resume
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00040103 PSSC PPS PES CCS
usb 1-2: finish resume
ohci-omap ohci-omap.0: urb cde73bc0 path 2 ep0in 5ec20000 cc 5 --> status -62
usb 1-2: retry with reset-resume
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00100103 PRSC PPS PES CCS
usb 1-2: reset full speed USB device using ohci-omap and address 2
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00100103 PRSC PPS PES CCS
usb 1-2: ep0 maxpacket = 16
Configure McBSP for 1 phase
Configure McBSP TX FIFO threshold to 1260
dcin_read_dc_detect_delayed
init: untracked pid 27684 exited
init: untracked pid 5529 exited
init: untracked pid 5570 exited
init: untracked pid 5569 exited
init: untracked pid 5571 exited
init: untracked pid 5573 exited
init: untracked pid 5527 exited
init: untracked pid 5585 exited
init: untracked pid 5540 exited
init: untracked pid 5564 exited
init: untracked pid 5562 exited
init: untracked pid 5572 exited
musb_hdrc musb_hdrc: remove, state 4
musb_hdrc musb_hdrc: roothub graceful disconnect
usb usb2: USB disconnect, address 1
usb usb2: unregistering device
usb usb2: usb_disable_device nuking all URBs
usb usb2: unregistering interface 2-0:1.0
usb 2-0:1.0: uevent
usb usb2: uevent
musb_hdrc musb_hdrc: USB bus 2 deregistered
twl4030_usb twl4030_usb: regulator_enable twl4030_usb-usb1v5 enabled 0
twl4030_usb twl4030_usb: regulator_enable twl4030_usb-usb1v8 enabled 0
twl4030_usb twl4030_usb: regulator_enable twl4030_usb-usb3v1 enabled 0
musb_hdrc: version 6.0, musb-dma, peripheral, debug=0
twl4030_usb twl4030_usb: regulator_enable twl4030_usb-usb3v1 enabled 1
twl4030_usb twl4030_usb: regulator_enable twl4030_usb-usb1v8 enabled 1
twl4030_usb twl4030_usb: regulator_enable twl4030_usb-usb1v5 enabled 1
musb_hdrc: USB Host mode controller at fa0ab000 using DMA, IRQ 92
musb_hdrc musb_hdrc: MUSB HDRC host driver
/mnt/flash/releases/G8A/AX08_r2.1.2/arcbuild/linux/drivers/usb/core/inode.c: creating file '002'
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 2
usb usb2: default language 0x0409
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.29-omap1 musb-hcd
usb usb2: SerialNumber: musb_hdrc
usb usb2: uevent
usb usb2: usb_probe_device
usb usb2: configuration #1 chosen from 1 choice
usb usb2: adding 2-0:1.0 (config #1, interface 0)
usb 2-0:1.0: uevent
hub 2-0:1.0: usb_probe_interface
hub 2-0:1.0: usb_probe_interface - got id
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
hub 2-0:1.0: standalone hub
hub 2-0:1.0: individual port power switching
hub 2-0:1.0: no over-current protection
hub 2-0:1.0: power on to power good time: 10ms
hub 2-0:1.0: local power source is good
hub 2-0:1.0: enabling power on all ports
/mnt/flash/releases/G8A/AX08_r2.1.2/arcbuild/linux/drivers/usb/core/inode.c: creating file '001'
hub 2-0:1.0: state 7 ports 1 chg 0000 evt 0000
hub 2-0:1.0: hub_suspend
usb usb2: bus auto-suspend
request_suspend_state: sleep (0->3) at 216776333465109 (2011-02-19 13:56:17.423095204 UTC)
omapdss omapdss: regulator_enable omapdss-vdds_dsi enabled 0
usb 1-2: usb suspend
hanvon_early_suspend: taking wake lock
hanvon_early_suspend: taking wake lock
hub 1-0:1.0: hub_suspend
usb usb1: bus auto-suspend
ohci-omap ohci-omap.0: suspend root hub
hanvon_early_suspend_work
hanvon_early_suspend_work: releasing wake lock
hanvon_early_suspend_work
hanvon_early_suspend_work: releasing wake lock
Configure McBSP for 1 phase
Configure McBSP TX FIFO threshold to 1260
request_suspend_state: wakeup (3->0) at 217144598174576 (2011-02-19 14:02:25.687804671 UTC)
omapdss omapdss: regulator_enable omapdss-vdds_dsi enabled 0
panel_enable [lcd]
mma7660fc_ctrl_ioctl: Set polling delay 200
usb usb1: usb auto-resume
ohci-omap ohci-omap.0: resume root hub
hub 1-0:1.0: hub_resume
hub 1-0:1.0: port 2: status 0107 change 0000
usb 1-2: usb resume
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00040103 PSSC PPS PES CCS
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
usb 1-2: finish resume
ohci-omap ohci-omap.0: urb ceb24a40 path 2 ep0in 5ec20000 cc 5 --> status -62
usb 1-2: retry with reset-resume
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00100103 PRSC PPS PES CCS
usb 1-2: reset full speed USB device using ohci-omap and address 2
hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
ohci-omap ohci-omap.0: GetStatus roothub.portstatus [1] = 0x00100103 PRSC PPS PES CCS
usb 1-2: ep0 maxpacket = 16
</code>

Holy moly! The usb host port of my A101IT (fw 2.1.08, downgrading to 2.1.04 made no difference) stopped working today
Reloading the musb_hdrc module hasn't fixed it. I got the same dmesg output as wdl1908 has.
edit: and after some minutes (display off -> standby) dmesg gives me the same output as vertig0730 has.
This is a real bummer because I can't continue developing on my dvb-t project

chulri said:
Holy moly! The usb host port of my A101IT (fw 2.1.08, downgrading to 2.1.04 made no difference) stopped working today
Reloading the musb_hdrc module hasn't fixed it. I got the same dmesg output as wdl1908 has.
edit: and after some minutes (display off -> standby) dmesg gives me the same output as vertig0730 has.
This is a real bummer because I can't continue developing on my dvb-t project
Click to expand...
Click to collapse
Did this happen when you upgraded or downgraded the firmware? or did it just stopped working. At this point this is still not very clear when it happens.

wdl1908 said:
Did this happen when you upgraded or downgraded the firmware? or did it just stopped working. At this point this is still not very clear when it happens.
Click to expand...
Click to collapse
I don't know. I only know it worked earlier this week, maybe pre-2.1.08, maybe after upgrade, I can't remember.

chulri said:
I don't know. I only know it worked earlier this week, maybe pre-2.1.08, maybe after upgrade, I can't remember.
Click to expand...
Click to collapse
A pitty we can't rule out the firmware upgrade process.
Mine is exibiting another thing after the usb host died. It does not go into sleep anymore. The led always stays on. I'v even tried a full reset with no extra apps installed and the led won't go out. Do you have the same thing?

True. I press pwrbutton for less than a second so it should go to standby, right? Led doesnt turn off.

chulri said:
True. I press pwrbutton for less than a second so it should go to standby, right? Led doesnt turn off.
Click to expand...
Click to collapse
I suspect the power control chip that controls the power to the usb port and is in change of the sleep deep-sleep function is damaged. And that is has nothing to do with firmware upgrade at all.
I distinctly remember copying stuff from a usb stick and later on hooking up a non powered usb hub. After that when I tried to hook up a keyboard it did not function anymore. The problem is I don't remember if this was after a firmware upgrade or not.

devices connected to the usb port of my A101IT are served with power. I just tested it with a usb pen drive and my HTC mobile phone. The usb pen drive has an led which lights up when it gets power and my HTC mobile phone started charging
so: power yes, data no.
edit: powered usb hub doesn't make any difference. definitly no data over host usb port

Hey chulri,
its a shame this USB prob stopps you with your great dvb-t project!
FYI: you are not alone with it, in the archosfans forum there are tens of ppl having this problem also. http://forum.archosfans.com/viewtopic.php?f=74&t=43962 (sorry no solutions in that thread also only opinions and theories)
I actually was wondering that yours was working that long since you are for sure someone who is using the USB host a lot more than the average user...
I had mine RMAed for this problem and will pick up my new unit tomorrow. (took forever)
/schaze

@schaze thx, I've already subscribed to the thread on archosfans.com

Related

USB OTG or HOST on the incredible.

Now that the 2.6.32 kernel is out. Can we patch the kernel with Sven's patch to enable ush host on the incredible?
Patch Applies...
The patch applies cleanly to the source for the latest HTC 2.6.32 kernel we have on our phones. I have the equipment to test this, but the weather is too nice today to stay inside to configure and compile a kernel. I'll start building later.
This will be my first time modifying a kernel on an Android device. Fastboot sounds like it would be helpful here, but last I checked the Incredible doesn't have fastboot.
Any Incredible kernel hackers out there have links or advice for how to go about testing an updated kernel?
Cheers,
-Slick
Still working on it...
Unfortunately, getting the kernel to compile with EHCI (host controller) instead of USB gadget support is not as easy. HTC's patches to the kernel assume USB gadget support and all the callbacks that it provides (e.g. usb_register_notifier, usb_get_connect_type).
(If these callbacks were required for charging to occur (e.g. in htc_battery.c) when USB is plugged, that would kind of stink.)
Progress
Even after I got the kernel compiling, the new EHCI driver wouldn't load (probe() wasn't being called). Then I realized -- after several hours -- that the USB device was no longer being registered (thanks to more HTC-kernel awesomeness). So, I had to carefully go in and set CONFIG_USB_ANDROID to be Y without enabling any other USB gadget drivers. This allows the USB controller device to be registered with the Linux kernel, but without a driver claiming it yet. That's the EHCI driver's job. And then you see:
Code:
<6>[ 247.267852] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
<7>[ 247.268096] ehci_hcd: block sizes: qh 60 qtd 96 itd 160 sitd 96
<7>[ 247.268615] msm_hsusb msm_hsusb: initializing MSM7201/QSD8X50 USB Controller
<6>[ 247.287658] msm_hsusb msm_hsusb: Qualcomm MSM7201/QSD8X50 On-Chip EHCI Host Controller
<7>[ 247.287994] drivers/usb/core/inode.c: creating file 'devices'
<7>[ 247.288391] drivers/usb/core/inode.c: creating file '001'
<6>[ 247.288604] msm_hsusb msm_hsusb: new USB bus registered, assigned bus number 1
<7>[ 247.288970] msm_hsusb msm_hsusb: reset command 080002 (park)=0 ithresh=8 period=1024 Reset HALT
<7>[ 247.289733] msm_hsusb msm_hsusb: park 0
<7>[ 247.289947] msm_hsusb msm_hsusb: reset command 080b02 park=3 ithresh=8 period=1024 Reset HALT
<6>[ 247.290313] msm_hsusb_phy_reset
<7>[ 247.347717] msm_hsusb msm_hsusb: ...powerdown ports...
<6>[ 247.377807] msm_hsusb msm_hsusb: irq 58, io mem 0xa0800000
<7>[ 247.397918] usb usb1: default language 0x0409
<7>[ 247.398406] usb usb1: udev 1, busnum 1, minor = 0
<6>[ 247.399108] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
<6>[ 247.399505] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
<6>[ 247.400207] usb usb1: Product: Qualcomm MSM7201/QSD8X50 On-Chip EHCI Host Controller
<6>[ 247.400939] usb usb1: Manufacturer: Linux 2.6.32.15-hg000000000000 ehci_hcd
<6>[ 247.401306] usb usb1: SerialNumber: msm_hsusb
<7>[ 247.402893] usb usb1: uevent
<7>[ 247.409057] usb usb1: usb_probe_device
<6>[ 247.409484] usb usb1: configuration #1 chosen from 1 choice
<7>[ 247.410278] usb usb1: adding 1-0:1.0 (config #1, interface 0)
<7>[ 247.410980] usb 1-0:1.0: uevent
<7>[ 247.417358] hub 1-0:1.0: usb_probe_interface
<7>[ 247.417938] hub 1-0:1.0: usb_probe_interface - got id
<6>[ 247.418304] hub 1-0:1.0: USB hub found
<6>[ 247.419189] hub 1-0:1.0: 1 port detected
<7>[ 247.419586] hub 1-0:1.0: standalone hub
<7>[ 247.419982] hub 1-0:1.0: individual port power switching
<7>[ 247.420684] hub 1-0:1.0: individual port over-current protection
<7>[ 247.421051] hub 1-0:1.0: Single TT
<7>[ 247.421752] hub 1-0:1.0: TT requires at most 8 FS bit times (666 ns)
<7>[ 247.422149] hub 1-0:1.0: power on to power good time: 20ms
<7>[ 247.422882] hub 1-0:1.0: local power source is good
<7>[ 247.423278] hub 1-0:1.0: enabling power on all ports
<7>[ 247.428955] drivers/usb/core/inode.c: creating file '001'
<4>[ 247.429718] ------------[ cut here ]------------
<4>[ 247.430175] WARNING: at kernel/irq/manage.c:274 enable_irq+0x4c/0xa0()
<4>[ 247.430877] Unbalanced enable for IRQ 58
<4>[ 247.431274] Modules linked in: ehci_hcd(+) usbcore bcm4329
<4>[ 247.433502] [<c002d7f8>] (unwind_backtrace+0x0/0xd8) from [<c0063e34>] (warn_slowpath_common+0x48/0x60)
<4>[ 247.434265] [<c0063e34>] (warn_slowpath_common+0x48/0x60) from [<c0063e84>] (warn_slowpath_fmt+0x24/0x30)
<4>[ 247.434997] [<c0063e84>] (warn_slowpath_fmt+0x24/0x30) from [<c00979f0>] (enable_irq+0x4c/0xa0)
<4>[ 247.435516] [<c00979f0>] (enable_irq+0x4c/0xa0) from [<bf064988>] (usb_hcd_msm7201_probe+0x23c/0x2fc [ehci_hcd])
<4>[ 247.436279] [<bf064988>] (usb_hcd_msm7201_probe+0x23c/0x2fc [ehci_hcd]) from [<c01b2dc4>] (platform_drv_probe+0x18/0x1c)
<4>[ 247.437042] [<c01b2dc4>] (platform_drv_probe+0x18/0x1c) from [<c01b1f84>] (driver_probe_device+0xa0/0x14c)
<4>[ 247.437805] [<c01b1f84>] (driver_probe_device+0xa0/0x14c) from [<c01b2090>] (__driver_attach+0x60/0x84)
<4>[ 247.438568] [<c01b2090>] (__driver_attach+0x60/0x84) from [<c01b17f8>] (bus_for_each_dev+0x48/0x84)
<4>[ 247.439331] [<c01b17f8>] (bus_for_each_dev+0x48/0x84) from [<c01b114c>] (bus_add_driver+0x9c/0x218)
<4>[ 247.440093] [<c01b114c>] (bus_add_driver+0x9c/0x218) from [<c01b235c>] (driver_register+0xa8/0x134)
<4>[ 247.440551] [<c01b235c>] (driver_register+0xa8/0x134) from [<bf0700ac>] (ehci_hcd_init+0xac/0x12c [ehci_hcd])
<4>[ 247.441314] [<bf0700ac>] (ehci_hcd_init+0xac/0x12c [ehci_hcd]) from [<c002836c>] (do_one_initcall+0x5c/0x1b4)
<4>[ 247.442077] [<c002836c>] (do_one_initcall+0x5c/0x1b4) from [<c008d368>] (sys_init_module+0xb0/0x1dc)
<4>[ 247.442840] [<c008d368>] (sys_init_module+0xb0/0x1dc) from [<c0028f00>] (ret_fast_syscall+0x0/0x2c)
<4>[ 247.443542] ---[ end trace 1b75b31a2719ed1f ]---
<7>[ 247.518524] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000
A comment in the code seems to indicate that the WARNING from the kernel is normal (?).
So the USB controller is up, but it's not detecting any devices plugged into it. Rather, when I plug a hub in, the Incredible detects it as a start-charging-the-battery event.
(Note: When I removed the callbacks, plugging in the phone to upstream power doesn't necessarily cause it to start charging. But when an attached hub is disconnected and reconnected, it sometimes starts charging. But then I see things like:
Code:
<6>[ 2183.727874] batt: M2A_RPC: set_charging: 1 at 2180262071950 (2010-08-17 06:08:47.707000720 UTC)
<6>[ 2183.742767] batt: M2A_RPC: cable_update: USB at 2180276934011 (2010-08-17 06:08:47.721923817 UTC)
<6>[ 2183.743865] batt: htc_cable_status_update: 1 -> 1
<6>[ 2183.744323] batt: batt:(htc_cable_status_update)power_supply_changed: OverVoltage at 2180278520925 (2010-08-17 06:08:47.723510731 UTC)
<6>[ 2183.749298] batt: SMEM_BATT: get_batt_info: batt_id=2, batt_vol=3966, batt_temp=324, batt_current=417, eval_current=92, level=75, charging_source=1, charging_enabled=1, full_bat=1300000, over_vchg=0 at 2180283892020 (2010-08-17 06:08:47.728454579 UTC)
<6>[ 2183.751159] batt: SMEM_BATT: get_batt_info: batt_id=2, batt_vol=3966, batt_temp=324, batt_current=417, eval_current=92, level=75, charging_source=1, charging_enabled=1, full_bat=1300000, over_vchg=0 at 2180285723074 (2010-08-17 06:08:47.730316152 UTC)
<6>[ 2183.752838] batt: SMEM_BATT: get_batt_info: batt_id=2, batt_vol=3966, batt_temp=324, batt_current=417, eval_current=92, level=75, charging_source=1, charging_enabled=1, full_bat=1300000, over_vchg=0 at 2180287401541 (2010-08-17 06:08:47.731994618 UTC)
OverVoltage? That doesn't sound good -- I hope I'm not killing the poor USB port!
Thanks, for the update. I have another friend of mine, who is taking as shot at this. Can you post the changes you made. Maybe its helpful for other ppl trying to get this to work.
Sent from my ADR6300 using XDA App
I would like to help.
Let me know the steps to get the lastest kernal and what setup you are using.
I got a USB OTG cable, Y cable, Kenington USB HUB. Looking to get Keyboard, Mouse (Could we use the port of the mouse pointer from x86 port in CM6 ROM), USB Drive and I hope USB VGA out.
Sure, here's the "link":
linuxbeast.net/incredible_host
You'll need:
- the "stock" 2.6.32 Incredible kernel from HTC's website (unpack it)
- sonic74's patch (apply it with 'patch -p1' in the kernel directory)
- the config file from the above link as '.config'
Then apply one of the two patches from the above link, again with 'patch -p1'. One of the patches modifies the EHCI driver files to give you more debug output (#define DEBUG -- so you get the same output I did above), while the other does not.
As you can see, it didn't take too many changes to get the kernel to compile. The harder part was figuring out that I still needed to select CONFIG_USB_ANDROID to get the msm_hsusb platform device (i.e. the USB controller hardware interface) defined... and then avoid selecting/compiling the USB gadget driver (msm72k_udc), which would have then claimed that resource (as in stock).
Thanks so much for your interest. I won't have time to work on this for at least several days, so... good luck!
-Slick
P.S. I also included two kernel updater .ZIPs for the impatient. One lets you try the current state of things, and the other reverts back to stock. Use at your own risk!
Will try to load the new kernel and try to debug. If you need help in testing the changes, i am more that happy to risk my incredible. I got an extra one to play with.
It would be nice to at least see confirmation of the behavior I'm seeing; it's painfully close to working. Once you insmod the usbcore and echi-hcd modules, the USB controller appears to initialize and recognize the internal USB (host) port. But it doesn't seem to recognize the presence of any USB devices I plug in (besides, say, beginning to charge once I plug in a hub).
I recompiled the kernel by applying you patch. Here is the dmesg output.
Code:
<6>[ 241.454376] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
<7>[ 241.454650] ehci_hcd: block sizes: qh 60 qtd 96 itd 160 sitd 96
<7>[ 241.455200] initializing MSM7201/QSD8X50 USB Controller
<6>[ 241.471252] msm_hsusb msm_hsusb: Qualcomm MSM7201/QSD8X50 On-Chip EHCI Host Controller
<7>[ 241.472045] drivers/usb/core/inode.c: creating file 'devices'
<7>[ 241.472412] drivers/usb/core/inode.c: creating file '001'
<6>[ 241.473083] msm_hsusb msm_hsusb: new USB bus registered, assigned bus number 1
<7>[ 241.473785] msm_hsusb msm_hsusb: reset command 080002 (park)=0 ithresh=8 period=1024 Reset HALT
<7>[ 241.474548] msm_hsusb msm_hsusb: park 0
<7>[ 241.475189] msm_hsusb msm_hsusb: reset command 080b02 park=3 ithresh=8 period=1024 Reset HALT
<6>[ 241.475555] msm_hsusb_phy_reset
<7>[ 241.531097] msm_hsusb msm_hsusb: ...powerdown ports...
<6>[ 241.561157] msm_hsusb msm_hsusb: irq 58, io mem 0xa0800000
<7>[ 241.581268] usb usb1: default language 0x0409
<7>[ 241.581390] usb usb1: udev 1, busnum 1, minor = 0
<6>[ 241.581512] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
<6>[ 241.581695] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
<6>[ 241.581909] usb usb1: Product: Qualcomm MSM7201/QSD8X50 On-Chip EHCI Host Controller
<6>[ 241.582000] usb usb1: Manufacturer: Linux 2.6.32.15-g7507bb0 ehci_hcd
<6>[ 241.582214] usb usb1: SerialNumber: msm_hsusb
<7>[ 241.582550] usb usb1: uevent
<7>[ 241.584045] usb usb1: usb_probe_device
<6>[ 241.584167] usb usb1: configuration #1 chosen from 1 choice
<7>[ 241.584289] usb usb1: adding 1-0:1.0 (config #1, interface 0)
<7>[ 241.584564] usb 1-0:1.0: uevent
<7>[ 241.585845] hub 1-0:1.0: usb_probe_interface
<7>[ 241.586059] hub 1-0:1.0: usb_probe_interface - got id
<6>[ 241.586181] hub 1-0:1.0: USB hub found
<6>[ 241.586364] hub 1-0:1.0: 1 port detected
<7>[ 241.586547] hub 1-0:1.0: standalone hub
<7>[ 241.586639] hub 1-0:1.0: individual port power switching
<7>[ 241.586761] hub 1-0:1.0: individual port over-current protection
<7>[ 241.586944] hub 1-0:1.0: Single TT
<7>[ 241.587066] hub 1-0:1.0: TT requires at most 8 FS bit times (666 ns)
<7>[ 241.587249] hub 1-0:1.0: power on to power good time: 20ms
<7>[ 241.587371] hub 1-0:1.0: local power source is good
<7>[ 241.587585] hub 1-0:1.0: enabling power on all ports
<7>[ 241.588592] drivers/usb/core/inode.c: creating file '001'
<4>[ 241.588897] ------------[ cut here ]------------
<4>[ 241.589019] WARNING: at kernel/irq/manage.c:274 enable_irq+0x4c/0xa0()
<4>[ 241.589202] Unbalanced enable for IRQ 58
<4>[ 241.589324] Modules linked in: ehci_hcd(+) usbcore
<4>[ 241.589782] [<c002d7f8>] (unwind_backtrace+0x0/0xd8) from [<c0063e34>] (warn_slowpath_common+0x48/0x60)
<4>[ 241.589996] [<c0063e34>] (warn_slowpath_common+0x48/0x60) from [<c0063e84>] (warn_slowpath_fmt+0x24/0x30)
<4>[ 241.590209] [<c0063e84>] (warn_slowpath_fmt+0x24/0x30) from [<c00979f0>] (enable_irq+0x4c/0xa0)
<4>[ 241.590423] [<c00979f0>] (enable_irq+0x4c/0xa0) from [<bf021978>] (usb_hcd_msm7201_probe+0x22c/0x2cc [ehci_hcd])
<4>[ 241.590637] [<bf021978>] (usb_hcd_msm7201_probe+0x22c/0x2cc [ehci_hcd]) from [<c01b2dc4>] (platform_drv_probe+0x18/0x1c)
<4>[ 241.590850] [<c01b2dc4>] (platform_drv_probe+0x18/0x1c) from [<c01b1f84>] (driver_probe_device+0xa0/0x14c)
<4>[ 241.591064] [<c01b1f84>] (driver_probe_device+0xa0/0x14c) from [<c01b2090>] (__driver_attach+0x60/0x84)
<4>[ 241.591186] [<c01b2090>] (__driver_attach+0x60/0x84) from [<c01b17f8>] (bus_for_each_dev+0x48/0x84)
<4>[ 241.591400] [<c01b17f8>] (bus_for_each_dev+0x48/0x84) from [<c01b114c>] (bus_add_driver+0x9c/0x218)
<4>[ 241.591613] [<c01b114c>] (bus_add_driver+0x9c/0x218) from [<c01b235c>] (driver_register+0xa8/0x134)
<4>[ 241.591827] [<c01b235c>] (driver_register+0xa8/0x134) from [<bf02d0ac>] (ehci_hcd_init+0xac/0x108 [ehci_hcd])
<4>[ 241.592041] [<bf02d0ac>] (ehci_hcd_init+0xac/0x108 [ehci_hcd]) from [<c002836c>] (do_one_initcall+0x5c/0x1b4)
<4>[ 241.592254] [<c002836c>] (do_one_initcall+0x5c/0x1b4) from [<c008d368>] (sys_init_module+0xb0/0x1dc)
<4>[ 241.592376] [<c008d368>] (sys_init_module+0xb0/0x1dc) from [<c0028f00>] (ret_fast_syscall+0x0/0x2c)
<4>[ 241.592590] ---[ end trace 1b75b31a2719ed1f ]---
<7>[ 241.681396] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000
OK good, so you're seeing the same behavior I was.
Do you have the right cables to test plugging anything in? If so, what (if anything) happens when you plug in, say, a hub?
This would let us plug SD card readers externally and read/write to it right?
Sent from my ADR6300 using XDA App
drawde said:
This would let us plug SD card readers externally and read/write to it right?
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
Yes, pretty much any USB device (that Linux supports) would work.
No interrupts yet
Check out this line from /proc/interrupts:
Code:
58: 0 msm ehci_hcd:usb1
Yeah, we're not getting any interrupts sent to the driver. That would be one reason why it's not working yet...
sorry, i have not been able to test, was busy. from monday, i can help you test any new changes.
That's assuming that a) I find time to work on this, and b) I figure out why the EHCI driver isn't receiving interrupts
Sent from my ADR6300 using XDA App
Very cool. I am very interested in this. I have an idea for a project in my security class and if I could get usb host working on my incredible it would have much more impact then using a netbook.
I look forward to seeing a how to.
Slick1123 said:
Yes, pretty much any USB device (that Linux supports) would work.
Click to expand...
Click to collapse
i'm assuming that anything that can work in linux but isn't supported by default would have to have a custom compiled kernel with those drivers included right?
i'm very interested in this, i've been trying to find some way to enable rs232-usb communication on a droid device and im pretty sure the ftdi based ones work with linux
Using a USB Keyboard?
what does one have to do to use an HID device with Incredible?
From the HTC support forum, it appears the device has the correct type port
and the hardware support. Would I need special support in the kernal?
I was told Android's std kernal had support for USB-OTG (both device
and Host mode port use).
http://community.htc.com/na/htc-forums/android/f/91/t/2122.aspx
My problem is that the soft keyboards are too small for my fingers
and Incredible doesn't come with a stylus.
Thanks
<Deleted> 1234567890

Archos 70 FTDI driver

Hi Guys!
I have a self powered: FTDI(FT232R) - micro USB-A (Nokia OTG CA-157) - Archos 70
with custom kernel. It works like a charm BUT
The driver picks the FT232R only if I connect it in the following sequence:
1. First connect the micro USB-A dongle (FT232 not attached)
2. As second connect FT232R to the USB dongle
Then I got the following dmesg:
1.
Code:
Code:
usb_switch_print_state: 3 ATTACHED_HOST
usb_switch_print_state: 3 ATTACHED_HOST
twl4030_usb twl4030_usb: regulator_enable twl4030_usb-usb1v5 enabled 0
twl4030_usb twl4030_usb: regulator_enable twl4030_usb-usb1v8 enabled 0
twl4030_usb twl4030_usb: regulator_enable twl4030_usb-usb3v1 enabled 0
musb_hdrc: version 6.0, musb-dma, peripheral, debug=0
twl4030_usb twl4030_usb: regulator_enable twl4030_usb-usb3v1 enabled 1
twl4030_usb twl4030_usb: regulator_enable twl4030_usb-usb1v8 enabled 1
twl4030_usb twl4030_usb: regulator_enable twl4030_usb-usb1v5 enabled 1
musb_hdrc: USB Host mode controller at fa0ab000 using DMA, IRQ 92
musb_hdrc musb_hdrc: MUSB HDRC host driver
/home/archos/kernel/gen8/gen8-gpl-froyo/linux/drivers/usb/core/inode.c: creating file '002'
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 2
usb usb2: default language 0x0409
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.29-omap1 musb-hcd
usb usb2: SerialNumber: musb_hdrc
usb usb2: uevent
usb usb2: usb_probe_device
usb usb2: configuration #1 chosen from 1 choice
usb usb2: adding 2-0:1.0 (config #1, interface 0)
usb 2-0:1.0: uevent
hub 2-0:1.0: usb_probe_interface
hub 2-0:1.0: usb_probe_interface - got id
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
hub 2-0:1.0: standalone hub
hub 2-0:1.0: individual port power switching
hub 2-0:1.0: no over-current protection
hub 2-0:1.0: power on to power good time: 10ms
hub 2-0:1.0: 100mA bus power budget for each child
hub 2-0:1.0: local power source is good
hub 2-0:1.0: enabling power on all ports
/home/archos/kernel/gen8/gen8-gpl-froyo/linux/drivers/usb/core/inode.c: creating file '001'
hub 2-0:1.0: state 7 ports 1 chg 0000 evt 0000
hub 2-0:1.0: hub_suspend
usb usb2: bus auto-suspend
2.
Code:
Code:
usb usb2: usb resume
hub 2-0:1.0: hub_resume
hub 2-0:1.0: port 1: status 0101 change 0001
hub 2-0:1.0: state 7 ports 1 chg 0002 evt 0000
hub 2-0:1.0: port 1, status 0101, change 0000, 12 Mb/s
usb 2-1: new full speed USB device using musb_hdrc and address 2
usb 2-1: ep0 maxpacket = 8
usb 2-1: default language 0x0409
usb 2-1: New USB device found, idVendor=0403, idProduct=6001
usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1: Product: RFID_EM
usb 2-1: Manufacturer: FTDI
usb 2-1: SerialNumber: A9UMG98I
usb 2-1: uevent
usb 2-1: usb_probe_device
usb 2-1: configuration #1 chosen from 1 choice
usb 2-1: adding 2-1:1.0 (config #1, interface 0)
usb 2-1:1.0: uevent
usbserial_generic 2-1:1.0: usb_probe_interface
usbserial_generic 2-1:1.0: usb_probe_interface - got id
ftdi_sio 2-1:1.0: usb_probe_interface
ftdi_sio 2-1:1.0: usb_probe_interface - got id
ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
usb 2-1: Detected FT232RL
usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0
/home/archos/kernel/gen8/gen8-gpl-froyo/linux/drivers/usb/core/inode.c: creating file '002'
hub 2-0:1.0: 100mA power budget left
hub 2-0:1.0: state 7 ports 1 chg 0000 evt 0002
hub 2-0:1.0: port 1 enable change, status 00000103
This is a very verbose fine dmesg showing ttyUSB0 is created.
My problem is that if I connect the micro-A dongle with FT232R already connected, then just the 1st sequence runs (till bus suspend) the second not. The same thing is with soft reboot, it is not working I need to manually disconnect then connect dongle first then FT232R.
I tried to tune msusb_hdrc config but with no sucess. What is the problem, what causes to stuck at suspend when it is not attached in 2 step??????
I have a pic from the hw look but yet I can't post it (till 8 posts) if needed I can in private.
UPDATE is that I tried to disable auto suspend and it is still not working. The general thing is that the musb_hdrc host driver recognizes the OTG as a hub with one port and if the peripherial (FT232R in this case) is already attached it is not enumarated and picked by the FTDI driver. Furthermore the state switching is not done properly. If the periph. is not attached it goes to a_idle but if yes it stays in b_idle mode (sys/devices/platform/musb_hdrc/mode).
Thanks, cheers
sodjas

Strange problem with USB-Port

Well, somehow my USB-Port is only usable for charging and the device doesn't recognize it if i connect it to my pc and only starts charging...
It still recognizes the difference beetween USB and AC though... Both times using the same cable...
Please check your dmesg after connecting to your pc and post it here to see the differences... thx :good:
My dmesg output when connecting to AC-Charger:
<6>[ 580.288909] [BATT] M2A_RPC: cable_update: USB at 576624105588 (2012-07-18 15:24:15.213511024 UTC)
<6>[ 580.289916] [BATT] htc_cable_status_update: 0 -> 1
<6>[ 580.290283] [USB] msm_hsusb_set_vbus_state: 1
<6>[ 580.290985] [USB] hsusb: OFFLINE -> ONLINE
<6>[ 580.291503] [USB] lpm exit
<6>[ 580.293701] [USB] hsusb: reset controller
<6>[ 580.330566] msm_hsusb_phy_reset
<6>[ 580.481384] [USB] ulpi: write 0x06 to 0x36
<6>[ 580.481689] [USB] ulpi: write 0x0c to 0x31
<6>[ 580.482238] [USB] ulpi: write 0x31 to 0x32
<6>[ 580.482543] [USB] ulpi: write 0x01 to 0x0d
<6>[ 580.482849] [USB] ulpi: write 0x01 to 0x10
<6>[ 580.483367] [USB] handle_notify_offline: notify offline
<6>[ 580.483673] [USB] msm_hsusb: enable pullup
<6>[ 580.495513] [USB] AC charger
<6>[ 580.516510] [USB] lpm enter
<6>[ 580.516632] [USB] usb_suspend_phy
<6>[ 580.518096] [USB] send connect type 2
<6>[ 580.518310] Touch: cable change to 2
<6>[ 580.519958] [BATT] online=2
<6>[ 580.520080] [BATT] Update SMEM: cable type 2 at 576854910031 (2012-07-18 15:24:15.444681678 UTC)
When connecting to USB:
<6>[ 698.052825] [BATT] M2A_RPC: cable_update: USB at 694388143675 (2012-07-18 15:26:12.977396524 UTC)
<6>[ 698.053985] [BATT] htc_cable_status_update: 0 -> 1
<6>[ 698.054351] [USB] msm_hsusb_set_vbus_state: 1
<6>[ 698.054992] [USB] hsusb: OFFLINE -> ONLINE
<6>[ 698.055328] [USB] lpm exit
<6>[ 698.058166] [USB] hsusb: reset controller
<6>[ 698.100616] msm_hsusb_phy_reset
<6>[ 698.245544] [USB] ulpi: write 0x06 to 0x36
<6>[ 698.245849] [USB] ulpi: write 0x0c to 0x31
<6>[ 698.246429] [USB] ulpi: write 0x31 to 0x32
<6>[ 698.246704] [USB] ulpi: write 0x01 to 0x0d
<6>[ 698.247009] [USB] ulpi: write 0x01 to 0x10
<6>[ 698.247558] [USB] handle_notify_offline: notify offline
<6>[ 698.247863] [USB] msm_hsusb: enable pullup
<6>[ 698.251434] [USB] suspend
<6>[ 698.265594] [USB] not AC charger
<6>[ 698.565582] [USB] send connect type -1
<6>[ 698.565887] Touch: cable change to 1
<6>[ 698.568237] [BATT] online=1
<6>[ 698.568542] [BATT] Update SMEM: cable type 1 at 694903646604 (2012-07-18 15:26:13.493143593 UTC)
Matze5800 said:
Well, somehow my USB-Port is only usable for charging and the device doesn't recognize it if i connect it to my pc and only starts charging...
It still recognizes the difference beetween USB and AC though... Both times using the same cable...
Please check your dmesg after connecting to your pc and post it here to see the differences... thx :good:
Click to expand...
Click to collapse
When I had this happen, changing ROMs didn't help. It also didn't work in recovery. Ended up warranty replacing.
Since then, I've read people saying that a good cleaning with canned air can cure it. Of the port on the phone.
Oh yeah, also rule out bad cable.
If cable and port are good, then it's also possible that the computer isn't providing enough amperage out of it's port in order to trigger on charging. Kind of like how an iPad won't charge off most typical computer USB ports.
Edit: computer shut down before I could type the rest.
If what you are having is the opposite, charges by PC but the PC can't see it then list out:
1) Your Rom/Android Version
2) Your Computer and it's OS
3) If you've installed drivers for your phone.
---------- Post added at 03:24 PM ---------- Previous post was at 03:19 PM ----------
For me:
AC Charger
Code:
<6>[27657.786621] [BATT] M2A_RPC: cable_update: USB at 27654512211799 (2012-07-18 19:20:21.656324155 UTC)
<6>[27657.786956] [BATT] htc_cable_status_update: 0 -> 1
<6>[27657.787048] [USB] msm_hsusb_set_vbus_state: 1
<6>[27657.787261] [USB] hsusb: OFFLINE -> ONLINE
<6>[27657.787353] [USB] lpm exit
<6>[27657.788787] [USB] hsusb: reset controller
<6>[27657.829589] msm_hsusb_phy_reset
<6>[27657.974823] [USB] ulpi: write 0x06 to 0x36
<6>[27657.975372] [USB] ulpi: write 0x0c to 0x31
<6>[27657.976379] [USB] ulpi: write 0x31 to 0x32
<6>[27657.976928] [USB] ulpi: write 0x01 to 0x0d
<6>[27657.977447] [USB] ulpi: write 0x01 to 0x10
<6>[27657.978424] [USB] handle_notify_offline: notify offline
<6>[27657.978973] [USB] msm_hsusb: enable pullup
<6>[27657.994750] [USB] AC charger
<6>[27658.014770] [USB] lpm enter
<6>[27658.015319] [USB] usb_suspend_phy
<6>[27658.017517] [USB] send connect type 2
<6>[27658.018554] Touch: cable change to 2
<6>[27658.021209] [BATT] online=2
<6>[27658.021789] [BATT] Update SMEM: cable type 2 at 27654748661994 (2012-07-18 19:20:21.891462094 UTC)
PC Connection
Code:
<6>[27672.502075] [BATT] M2A_RPC: cable_update: USB at 27669227574348 (2012-07-18 19:20:36.371778257 UTC)
<6>[27672.502410] [BATT] htc_cable_status_update: 0 -> 1
<6>[27672.502532] [USB] msm_hsusb_set_vbus_state: 1
<6>[27672.502746] [USB] hsusb: OFFLINE -> ONLINE
<6>[27672.502838] [USB] lpm exit
<6>[27672.504333] [USB] hsusb: reset controller
<6>[27672.539703] msm_hsusb_phy_reset
<6>[27672.684997] [USB] ulpi: write 0x06 to 0x36
<6>[27672.685577] [USB] ulpi: write 0x0c to 0x31
<6>[27672.686096] [USB] ulpi: write 0x31 to 0x32
<6>[27672.687072] [USB] ulpi: write 0x01 to 0x0d
<6>[27672.687622] [USB] ulpi: write 0x01 to 0x10
<6>[27672.688598] [USB] handle_notify_offline: notify offline
<6>[27672.689147] [USB] msm_hsusb: enable pullup
<6>[27672.692687] [USB] suspend
<6>[27672.704803] [USB] not AC charger
<6>[27672.809844] [USB] reset
<6>[27672.810485] [USB] send connect type 1
<6>[27672.811035] Touch: cable change to 1
<6>[27672.812103] [USB] portchange USB_SPEED_HIGH
<6>[27672.814605] [BATT] online=1
<6>[27672.815551] [BATT] Update SMEM: cable type 1 at 27669542302132 (2012-07-18 19:20:36.685224302 UTC)
Noticed yours didn't seem to set to USB_SPEED_HIGH. Are you using USB 1.1 or a low-speed port?
Well, i actually tried everything already, using different cables, another pc, different roms, even flashed the latest radio, i'm an addicted linux user so there can't be a driver issue
Really seems like an hw issue, i was just curios to see what the dmesg output should look like thx
Gesendet von meinem HTC Vision mit Tapatalk 2
Matze5800 said:
Well, i actually tried everything already, using different cables, another pc, different roms, even flashed the latest radio, i'm an addicted linux user so there can't be a driver issue
Click to expand...
Click to collapse
Have you tried another host (aka PC)?
Matze5800 said:
Well, i actually tried everything already, using different cables, another pc, different roms, even flashed the latest radio, i'm an addicted linux user so there can't be a driver issue
Really seems like an hw issue, i was just curios to see what the dmesg output should look like thx
Gesendet von meinem HTC Vision mit Tapatalk 2
Click to expand...
Click to collapse
GinoAMelone said:
Have you tried another host (aka PC)?
Click to expand...
Click to collapse
Note the bold.
Well, the usb is not that important as long as it keeps charging and wifi works, thanks for your help
Gesendet von meinem HTC Vision mit Tapatalk 2

[HW MOD][UPDATE][JB] USB OTG + Charging on the Galaxy S3

Good news everyone,
I got OTG + Charging working on Samsung JB ROMs Apologies to everyone how's been asking me about this, but it's a bad case of not having time to research and actually not needing the cable during the winter months. Anyway, I found some time, went again through the latest kernel sources (Update7), did some more soldering and testing and so here are the goods:
Actually, it turns out there are two methods to achieve USB Host + charging in JB. Samsung introduced a new dock type in the kernel code - AUDIODOCK, but I'm not sure they've actually release the dock itself.
Method 1 (AUDIODOCK, Easier):
Ok, so this is the easier method. It's similar the the old SMARTDOCK, it simply emulates the new dock type. Follow the old instructions for creating the cable, just change the 40.2K ohm resistor with a 64.9K ohm one. This is all you need. Some of the old notes apply:
You still need to connect the power source first, before connecting the cable to the phone.
You need a Samsung based kernel. I've been running this setup on Perseus, but should also work on Boeffla and Siyah. I think all of them have the necessary config options set on compile. This should also work on stock NoteII kernel, but not sure about stock SIII.
Charging is done at wall charger levels (1000mA, if unchanged in kernel). This is an improvement compared to the old ICS solution where it charged at USB levels. I haven't actually tested this with a multimeter, rather this is what the kernel reports.
Screen will be constantly on unless you press the power button to turn it of manually. There seems to be a user-space daemon (DockObserver) that listens for dock events from the kernel and when the phone is docked it takes a wakelock to keep the screen on.
Method 2 (SMARTDOCK, Harder but enables MHL):
This second method is quite a bit harder to actually implement and also took me quite some time to reverse-engineer. Ironically, it was the first method I found, because I was so focused on getting the smart dock mode back to work. The resistor value is the old 40.2K ohm, but now the detection is a two step process. Here's the kernel workflow:
First a cable attach is detected and the resistor value is checked to be 40.2K ohm for smart dock.
Then VBUS is check, meaning voltage is present on the cable.
Here comes the interesting part, which I think is new in the JB kernel. The two data lines D+ and D- are checked to be shorted. This is a standard configuration for wall adapters. They have their data pins shorted internally as a way to detect that this is not a USB port on a PC and the phone can draw more power. So when the data pins are shorted, in the kernel this indicates a dedicated charger and a dedicated charger plus a 40.2K ohm resistor on the ID pin means a smart dock (makes sense, right). I don't remember if this check was present in the old source, maybe it was but the code was written poorly and worked without it (but remember it charged as USB, so there may have been more to it).
Within 500ms (half a second) after this, the kernel expects a new hardware event to indicate the data pins are disconnected (as they should be, to be able to communicate with the phone). I've also tried keeping the data pins shorted for longer and it still worked. There were just some duplicate checks and messages in the log. Either way, be sure to disconnect the data pins, before connecting anything else besides the phone to the cable.
After all this, the kernel configures the USB controller in host mode and switches the battery controller to charging (AC mode).
MHL is also enabled, but throws an error in my case (same as in ICS), because I didn't have those pins connected.
So this is how you enable SMARTDOCK mode. For the purpose of this test, I did the data pin shorting by hand (actually several hands as I had some help ), but to implement this in a functional cable, you will need some active electronics to detect the phone being connected (a current sensing circuit maybe) and delay a bit before disconnecting the two data lines (initially shorted).
I'll be quite interested if someone else tries this approach, but for the moment I'm happy with the results of the first method. It's simple and does the job for me. I don't need MHL. Maybe someone will be interested in getting the full smart dock experience for less than the $100 Samsung are asking for it. Don't get me wrong, the smart dock looks like a very nice and functional accessory, but I just don't need it.
Old post, for ICS plus detailed background
SHORT: I got USB Host and charging working at the same time on my Galaxy S3 (will probably work on other Samsung devices though). What you need is a 40.2K ohm resistor across the ID(pin 4) and Ground(pin 5) on your microUSB connector (compared to normal OTG cable where they are shorted) and one of those USB Y cables that ship with some external hard drives that require a second USB port just for power (or make your own by splitting out the +5v and Ground lines, plenty of guides online). That's all
LONG: I've been working on a small project of mine to connect my phone to an external device that accepts GPS NMEA messages over a serial interface. At first I was thinking of doing it with a board like the AndroidADK or IOIO which have USB Host controller and several UARTs. In that scenario the board would act as the USB Host and provide power to the phone enabling simultaneous communication with the external device and charging. But this setup was looking too bulky and overly complicated. The boards were too big for my application as I'm very constrained in size and weight for this project. So then I found this great little board:
https://www.sparkfun.com/products/9716
I thought, OK, my phone has USB host capability, this should be solvable with software alone. A couple of weeks later, reading about kernel support and the drivers, I had a working prototype application, no kernel recompiling or module compiling, just a plain old Java written app. With this done, now the only problem left was POWER. As my phone would be running with screen at full brightness, GPS enabled, plus powering the USB to Serial converter through USB OTG, external power was a must. I could use just a normal USB Y cable, but this would only supply power to the converter, which I'm guessing isn't all that much power hungry. What I really needed was for the phone to charge, which doesn't happen out of the box with a standard USB OTG cable.
Again I started digging through the kernel code. At one time I found an article (I think it was for the Galaxy Nexus) that suggested commenting out some code in the kernel that was responsible for switching the battery charger from charging mode to the so called "boost" mode where it was outputting up to 100mA for external devices. However, I could find this code. Maybe because it was for a AOSP ROM kernel, not Samsung kernel, or a device with a different charger circuit. Plus I really didn't want to have to setup a toolchain and recompile the kernel.
Luckily, while going through the kernel code, I came across an interesting enumeration what was listing some integer values with corresponding resistance values in the comments. That's where I saw the 40.2Kohm value. As far as I can understand, when put across the ID and GND pins of the microUSB, it's used to identify a "SMARTDOCK", I'm guessing some premium Samsung accessory that's capable of charging the phone while providing USB host ports (and MHL/HDMI I think).
Following were a couple of hours of painful soldering of SMD (very tiny) resistors, as these where the only ones I could find lying around the house, to get the right resistance value. Note the phone can be a bit picky about the exact value. I did it with 4x10Kohm, which were in abundance on an old HiFi's PCB I had. I added them up to get 40.15Kohm (I guess those were not very precise resistors). This did the trick
USB OTG works as usual, plus the phone is charging. Here's a excerpt from the kernel log upon connecting the cable:
Code:
<3>[ 7601.289051] c0 [HOTPLUG IN] check_up 200000>=600000 && 0>200
<3>[ 7601.289439] c0 CPU_UP 1
<4>[ 7601.293467] c1 CPU1: Booted secondary processor
<6>[ 7601.293757] c1 notifier_call_chain : NOTIFY BAD tick_notify
<6>[ 7601.295315] c1 Switched to NOHz mode on CPU #1
<6>[ 7601.951462] c0 cm36651_work_func_light, red = 376 green = 404 blue = 216 white = 388
<3>[ 7602.610492] c0 [HOTPLUG OUT] check_down 700000<=500000 && 300<200
<3>[ 7602.610736] c0 CPU_DOWN 1
<5>[ 7602.615338] c0 CPU1: shutdown
<6>[ 7603.660803] c0 max77693_irq_thread: interrupt source(0x08)
<6>[ 7603.662066] c0 max77693_irq_thread: muic interrupt(0x00, 0x12, 0x00)
<6>[ 7603.662254] c0 max77693-muic max77693-muic: max77693_muic_irq: irq:445
<6>[ 7603.663205] c0 max77693-muic max77693-muic: func:max77693_muic_detect_dev CONTROL1:3f
<6>[ 7603.664338] c0 max77693-muic max77693-muic: func:max77693_muic_detect_dev irq:445 ret:0
<6>[ 7603.664536] c0 max77693-muic max77693-muic: max77693_muic_detect_dev: STATUS1:0x3f, 2:0x48
<6>[ 7603.664727] c0 max77693-muic max77693-muic: adc:1f adcerr:0 chgtyp:0cable_type:0
<6>[ 7603.664896] c0 max77693-muic max77693-muic: max77693_muic_detect_dev: DETACHED
<6>[ 7603.665072] c0 max77693-muic max77693-muic: func:max77693_muic_handle_detach
<6>[ 7603.669386] c0 max77693-muic max77693-muic: max77693_muic_handle_detach: CNTL2(0x3b)
<6>[ 7603.669568] c0 max77693-muic max77693-muic: max77693_muic_handle_detach: duplicated(NONE)
<6>[ 7603.675052] c0 max77693_irq_thread: interrupt source(0x08)
<6>[ 7603.676364] c0 max77693_irq_thread: muic interrupt(0x01, 0x00, 0x00)
<6>[ 7603.676535] c0 max77693-muic max77693-muic: max77693_muic_irq: irq:437
<6>[ 7603.677472] c0 max77693-muic max77693-muic: func:max77693_muic_detect_dev CONTROL1:3f
<6>[ 7603.678607] c0 max77693-muic max77693-muic: func:max77693_muic_detect_dev irq:437 ret:0
<6>[ 7603.678798] c0 max77693-muic max77693-muic: max77693_muic_detect_dev: STATUS1:0x30, 2:0x48
<6>[ 7603.678990] c0 max77693-muic max77693-muic: func:max77693_muic_handle_dock_vol_key status1:30 adc:10 cable_type:0
<6>[ 7603.679223] c0 max77693-muic max77693-muic: adc:10 adcerr:0 chgtyp:0cable_type:0
<6>[ 7603.679402] c0 max77693-muic max77693-muic: max77693_muic_detect_dev: ATTACHED
<6>[ 7603.679577] c0 max77693-muic max77693-muic: func:max77693_muic_handle_attach st1:30 st2:48 cable_type:0
<6>[ 7603.679793] c0 max77693-muic max77693-muic: func:max77693_muic_handle_attach Attach SmartDock
<6>[ 7603.679996] c0 max77693-muic max77693-muic: func:max77693_muic_set_usb_path path:0
<6>[ 7603.680163] c0 MUIC safeout path=0
<6>[ 7603.680379] c0 regulator regulator.2: func:max77693_reg_is_enabled
<6>[ 7603.680530] c0 regulator regulator.2: func:max77693_get_rid
<6>[ 7603.680667] c0 regulator regulator.2: func:max77693_get_enable_register
<6>[ 7603.681628] c0 regulator regulator.3: func:max77693_reg_is_enabled
<6>[ 7603.681783] c0 regulator regulator.3: func:max77693_get_rid
<6>[ 7603.681917] c0 regulator regulator.3: func:max77693_get_enable_register
<6>[ 7603.682864] c0 max77693-muic max77693-muic: max77693_muic_set_usb_path: AP_USB_MODE
<6>[ 7603.683042] c0 max77693-muic max77693-muic: max77693_muic_set_usb_path: Set manual path
<6>[ 7603.686819] c0 max77693-muic max77693-muic: max77693_muic_set_usb_path: CNTL1(0x3f)
<6>[ 7603.687788] c0 max77693-muic max77693-muic: max77693_muic_set_usb_path: CNTL2(0x3e)
<6>[ 7603.730374] c0 MUIC usb_cb:5
<6>[ 7603.730460] c0 usb: muic: invalid mode5
<6>[ 7603.730573] c0 max77693_powered_otg_control: enable(1)
<6>[ 7603.731882] c0 otg_accessory_powered_booster: otg accessory power = 1
<6>[ 7603.732038] c0 host_notifier: start usbhostd notify
<6>[ 7603.732162] c0 host_notify: ndev name=usb_otg: from state=2 -> to state=1
<7>[ 7603.734407] c3 mif: set_hsic_lpa_states: 215: called(s5p_usb_phy_resume+0x514/0x534):
<6>[ 7603.734597] c3 mif: set hsic lpa wake: pda active (1)
<6>[ 7603.755687] c0 MUIC attached:1
<6>[ 7603.755809] c0 MHL Attached !!
<6>[ 7603.755916] c0 sii9234_wake_lock()
<6>[ 7603.756034] c0 sii9234: mhl_onoff_ex(on)
<6>[ 7603.756151] c0 sii9234_power_onoff(1)
<6>[ 7603.756282] c0 sii9234_reset()
<6>[ 7603.775375] c0 sii9234: detection started d3
<6>[ 7603.775501] c0 mhl_hpd_handler() state is aready off
<6>[ 7603.953645] c0 sii9234 : go_to d3 mode!!!
<6>[ 7603.953706] c0 goto_d3() : enable_irq(1)
<6>[ 7603.953746] c0 max77693-muic max77693-muic: func:max77693_muic_set_charging_type force_disable:0
<6>[ 7603.953818] c0 max77693_muic_charger_cb: 13
<6>[ 7603.953852] c0 max77693_set_muic_cb_type: muic cable type(13)
<5>[ 7603.953907] c0 melfas-ts 3-0048: melfas_ta_cb
<5>[ 7603.953941] c0 melfas-ts 3-0048: TA connect!!!
<3>[ 7603.985700] c0 [ERROR] sii9234 : mhl_tx_read_reg(0x71)
<3>[ 7603.985729] c0 [ERROR] sii9234_irq_thread():3121 read MHL_TX_INTR1_REG failed !
<6>[ 7603.985765] c0 sii9234_irq_thread(): i2c error exit
<6>[ 7603.985790] c0 sii9234: wake_up
<6>[ 7604.454668] c0 max77693_get_cable_type: CDR(0x1)
<3>[ 7604.454716] c0 max77693_get_cable_type: chgtyp detect err, retry 1, CHGIN(0x3). MU_ST2(0x48), CDR(0x1), VB(0x1), CHGTYP(0x0)
<6>[ 7604.560636] c3 max77693_irq_thread: interrupt source(0x08)
<6>[ 7604.561801] c3 max77693_irq_thread: muic interrupt(0x00, 0x07, 0x00)
<6>[ 7604.561925] c3 max77693-muic max77693-muic: max77693_muic_irq: irq:441
<6>[ 7604.562785] c3 max77693-muic max77693-muic: func:max77693_muic_detect_dev CONTROL1:9
<6>[ 7604.563819] c3 max77693-muic max77693-muic: func:max77693_muic_detect_dev irq:441 ret:0
<6>[ 7604.563958] c3 max77693-muic max77693-muic: max77693_muic_detect_dev: STATUS1:0x30, 2:0x41
<6>[ 7604.564102] c3 max77693-muic max77693-muic: adc:10 adcerr:0 chgtyp:1cable_type:d
<6>[ 7604.564223] c3 max77693-muic max77693-muic: max77693_muic_detect_dev: ATTACHED
<6>[ 7604.564350] c3 max77693-muic max77693-muic: func:max77693_muic_handle_attach st1:30 st2:41 cable_type:13
<6>[ 7604.564495] c3 max77693-muic max77693-muic: max77693_muic_handle_attach: duplicated(SMARTDOCK)
<3>[ 7604.656888] c0 max77693_get_cable_type: CHGIN(0x3). MU_ST2(0x41), CDR(0x0), VB(0x1), CHGTYP(0x1)
<3>[ 7604.657055] c0 max77693_get_cable_type: chgtyp detect ok, CHGIN(0x3). MU_ST2(0x41), CDR(0x0), VB(0x1), CHGTYP(0x1)
<3>[ 7604.657231] c0 max77693_get_cable_type: cable type(3)
<6>[ 7604.677259] c0 battery_update_info: state(1), type(3), health(1), present(1), cable(3), curr(466), soc(96), raw(9548), vol(4245000), ocv(4264000), tmp(291)
<3>[ 7604.677486] c0 battery_monitor_work: Updated Cable State(3)
<3>[ 7604.883067] c0 battery_charge_control: charge enabled, current as 466/460mA @52286
<6>[ 7604.884009] c0 battery_interval_calulation: v diff(19000), weight(120)
<6>[ 7604.884138] c0 battery_interval_calulation: weight(120)
<6>[ 7604.884258] c0 battery_monitor_interval: apply weight(120), 30 -> 36
<6>[ 7604.884439] c0 [997] bat: s(96, 0), v(4245, -19), b(1), t(29.1), h(1), cs(1, 1), cb(3), cr(466, 460), a(0), f(0), r(0), t(52286)
<7>[ 7605.126794] c0 Motor:tspdrv: ImmVibeSPI_ForceOut_AmpEnable (1)
<7>[ 7605.213586] c0 Motor:tspdrv: ImmVibeSPI_ForceOut_AmpDisable (0)
<3>[ 7607.105308] c0 [HOTPLUG IN] check_up 200000>=600000 && 0>200
<3>[ 7607.105368] c0 CPU_UP 1
<4>[ 7607.107141] c1 CPU1: Booted secondary processor
<6>[ 7607.107246] c1 notifier_call_chain : NOTIFY BAD tick_notify
<6>[ 7607.110239] c1 Switched to NOHz mode on CPU #1
<3>[ 7608.150538] c0 [HOTPLUG OUT] check_down 500000<=500000 && 391<200
<3>[ 7608.150745] c0 CPU_DOWN 1
<6>[ 7608.151774] c0 cm36651_work_func_light, red = 376 green = 405 blue = 216 white = 388
<5>[ 7608.157231] c0 CPU1: shutdown
If you look at the log carefully, you'll notice there are a couple of lines going about MHL failing to enable. I guess this SMARTDOCK I'm emulating also has a HDMI port for video out and uses some of the additional pins on the Galaxy's connector. The S3 has a non standard 11-pin microUSB connector exactly for this purpose (USB OTG + Power + Video out + maybe audio). Nevertheless, this setup works for me and there are no visible side effects.
NOTES:
1. Connect power before connecting the cable to the phone. The driver switches charging on only if power is present on the VBUS upon connecting the cable and it doesn't monitor the VBUS state actively. So if you plug in the power supply after connecting the cable to the phone, it won't start charging. You have to disconnect and reconnect it.
2. Requires a Sammy kernel. Not 100% sure, haven't tested with CM9/10, but since the code is about a Samsung accessory and is in the driver for the switching circuit used in S3 (\drivers\misc\max77693-muic.c) this is a high probability.
3. Charge is done at 460 mA. At least that's what the log states at one point. Then again at another place it reads "TA connect!!!" which I think means that a wall adapter is connected. Measuring the actual current is on my todo list.
4. MHL failed to enable - this shouldn't be a big issue. I think it's from the fact that I emulate a SMARTDOCK being connected, that (possibly) has HDMI out.
5. I haven't tried using a 124Kohm resistor with is the standard for enabling USB OTG + charging called "Accessory Charger Adapter". I have a hunch that maybe this won't work as a found a datasheet for the switching circuit used in older Samsung devices and in there is a table that lists all the resistance values that can be used on the ID pin. There's one at around 120Kohm that's pretty close to the 124Kohm value and it has nothing to do with USB OTG or charging. For comparison the 40.2K value is listed as being for additional accessories (vendor specific), which is what Samsung use it for.
[HW MOD] USB OTG + Charging on the Galaxy S3
Diagram
NOTE: I used a miniUSB connector instead of female Type A for the end that goes to external devices for several reasons:
1. I simply didn't have one lying around and at the local electronic components store they were out of stock (go figure).
2. I'm really space constrained for the application I'm going to use it, I need everything as light and simple as possible. No place for extra cables.
3. Most of the devices I may connect are with miniUSB port (GoPro camera, external hard drive, even PS3 controller).
If you decide to make your own cable I would suggest using a female Type A connector instead, so it would be compatible with more devices like keyboards, mice and anything with a normal USB cable.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I heard something about certain firmwares/kernels sometimes using different transistor values (or at least, this seems to be the case with some other devices). Do you know if that 40,2 kOhm transistor trick works on custom ROMs as well?
Mass produce it, sell it, I will probably buy, I'm lazy
Amanoo said:
I heard something about certain firmwares/kernels sometimes using different transistor values (or at least, this seems to be the case with some other devices). Do you know if that 40,2 kOhm transistor trick works on custom ROMs as well?
Click to expand...
Click to collapse
There's a standard defined called USB Accessory Charger Adapter that uses 124Kohm resistor on the ID pin pulled to ground. I haven't tried that, because it was a bit hard for me to get resistors for that particular value (I had to chain even more resistors). As I mentioned, I think it's not supported by the S3, but that's just my speculation based on a datasheet of the switching circuit used in previous Samsung models.
About ROMs, as my signature says, I'm on a custom ICS ROM, CheckROM specifically and I'm using Siyah kernel. As far as I know it should work on any Samsung based ROM (I think JB leaks also). I'm not sure it'll work on AOSP ROMs though. Only way to find is to try, which I haven't done yet. But because this solution is based on some code added to the kernel by Samsung for their accessories, I think there's a big chance it won't work.
TheCraig said:
Mass produce it, sell it, I will probably buy, I'm lazy
Click to expand...
Click to collapse
The first cable did turn out pretty good, but believe me, you have no idea what a pain in the a** it was to solder those surface mount resistors.
Don't be lazy, grab a soldering iron and try it. The final result can be quite satisfying. It isn't a very difficult project, it's just two normal cables with an added resistor. I did it because I really needed it. At first I asked gokhanmoral (the kernel dev) if he could enable charging in the kernel with a normal USB OTG cable, but at that time he was busy getting a working kernel for the JB leaks. That drove me to find another solution (plus other interesting stuff, like the fact that you can simulate media buttons with other resistor values).
Thanks for sharing this!
Do you tink is possivel doa 2 in 1 (ogt/hmdi)?
vladmir said:
Thanks for sharing this!
Do you tink is possivel doa 2 in 1 (ogt/hmdi)?
Click to expand...
Click to collapse
Not without one of those new Samsung 11-pin microUSB connectors and I don't think you can get them anywhere but from Samsung accessories for the S3 and Note2
Do you happen to know how accurate these resistors must be?
triffonovm said:
Not without one of those new Samsung 11-pin microUSB connectors and I don't think you can get them anywhere but from Samsung accessories for the S3 and Note2
Click to expand...
Click to collapse
Maybe conect this piace with your cable? will make 2 on 1?
http://www.monoprice.com/products/p...=10833&cs_id=1083314&p_id=9716&seq=1&format=2
Amanoo said:
Do you happen to know how accurate these resistors must be?
Click to expand...
Click to collapse
In this thread http://forum.xda-developers.com/showthread.php?t=1108096 AdamOutler has posted the datasheet for the switching chip in the Galaxy S. In there is a table with the recognized resistance values with min/max limits. Now the S3 uses a different chip, but I think this table is still valid. I'd say get as close as you can, maybe within 1-2%. I managed to get mine to 40.1K-40.2K just by chaining four 10Kohm resistors.
vladmir said:
Maybe conect this piace with your cable? will make 2 on 1?
http://www.monoprice.com/products/p...=10833&cs_id=1083314&p_id=9716&seq=1&format=2
Click to expand...
Click to collapse
Possibly yes, if you rip it open a take the 11-pin connector you can make a Samsung to standard MHL adapter + USB OTG + Charging. For now I don't have the need fot TV out on my phone. I have a HTPC running XBMC for my viewing pleasure
There are many interesting usages for the ID pin: JIG, USB OTG, car/desk dock, handsfree + remote. I even think it may be possible to use the UART mode that devs use to debug bootloaders and kernels as a standard serial port (just add a TTL to RS232 converter) to control devices directly (without the USB to Serial converter that I'm using) from the phone.
triffonovm said:
Possibly yes, if you rip it open a take the 11-pin connector you can make a Samsung to standard MHL adapter + USB OTG + Charging. For now I don't have the need fot TV out on my phone. I have a HTPC running XBMC for my viewing pleasure
There are many interesting usages for the ID pin: JIG, USB OTG, car/desk dock, handsfree + remote. I even think it may be possible to use the UART mode that devs use to debug bootloaders and kernels as a standard serial port (just add a TTL to RS232 converter) to control devices directly (without the USB to Serial converter that I'm using) from the phone.
Click to expand...
Click to collapse
Only we need to now a value of the resistor for the mhl!! Any clue?
Thanks
vladmir said:
Only we need to now a value of the resistor for the mhl!! Any clue?
Thanks
Click to expand...
Click to collapse
As I mentioned in the OP, the kernel log shows that mhl is also enabled, but fails (maybe because of missing cable). I think with this same resistance value should be possible too. Maybe you just need to connect the extra pins in the 11-pin connector to a mhl adapter.
How so does the S3 have 11 pins? My cables seem to have only the standard 5.
Also,it might be worth reverse engineering mhl cables. Last time I checked they were expensive, though. The S3 needs a very specific cable, due to the nonstandard implementation of mhl.
Amanoo said:
How so does the S3 have 11 pins? My cables seem to have only the standard 5.
Also,it might be worth reverse engineering mhl cables. Last time I checked they were expensive, though. The S3 needs a very specific cable, due to the nonstandard implementation of mhl.
Click to expand...
Click to collapse
Yes, it has 11-pins. You have to look very hard and with a flashlight into the microUSB port to see them. Also, that's the reason why standard mhl cable do not work with the Galaxy S3.
triffonovm said:
Possibly yes, if you rip it open a take the 11-pin connector you can make a Samsung to standard MHL adapter + USB OTG + Charging.
Click to expand...
Click to collapse
This is what I plan to do, waiting a while for things to settle down, perhaps someone with more time will post a guide Should be completely possible in $20 using monoprice stuff.
The 11 to 5 adapter passes through the ID pin unchanged, so instead we would have to break that connection and solder a 40.2kohm resistor. MHL adapters themselves have a 347K -> 383K resistor between ID and ground. xda (showthread.php?t=1741583) has tolerances for resistor values.
Alternatively, parallel resistor law states total resistance is 1/(1/r1 + 1/r2). So 45.2Kohms in parallel with an existing 365Kohm MHL cable ID pin would work.
The MHL adapter also has a female micro USB for charging, so that is taken care of.
The 4 pins (power + data) of OTG would have to then be spliced into the 11 to 5 adapter to the proper pins (tricky), a guy on xda already broken his adapter apart (showpost.php?p=32549672&postcount=86)
Thanks for This...
I was going to look at supplying external power and no battery but now pulled apart my host cable and just added 2 X 20K (1/4 W) Resistors in series.
Works perfect and as soon as i plug it in comes up as "charging USB"
Very happy as i work away from home now i can watch movies at night via Hdd whilst on the run...
Hmm...today having problems...
remade cable again.All Good...
Then playing up now...
re checked cable and cant find anything wrong...eg wiring all good..
everything heat shrunk etc except last wire number 4. with resistors.
Edit..
playing around with it now and measured have 39.8 K ohms
will try add some smaller ones i have laying around..
I think you are right about getting it exact..
kevinf28 said:
This is what I plan to do, )
Click to expand...
Click to collapse
just to follow up with you Kevin, did you end up trying this? I started a thread back up here (showthread.php?t=1762817) regarding why I'm looking to have an 11 pin mhl cable setup to output hdmi +usb otg + charge and I'd like to see how your attempt went (hopefully i'll be trying the same soon)
MRBR7 said:
Hmm...today having problems...
remade cable again.All Good...
Click to expand...
Click to collapse
MRBR7 - are you using the 11 pin to 5pin adapter? or the 5 pin otg cable? or the 11 pin mhl cable?
I'm just curious to ask for clarity as your prior post stated you were using the phone to watch video on your hdd with charge enabled - I just wanted to know if that was with the otg cable or the mhl cable...
Yeah i just made my own otg cable (5 pin)...
Micro USB and opened it up to get to the unused pin 4.
then just soldered my own wires to it to make otg cable.
worked good at first but now stopped host mode?...
have checked my cable again by applying power to all wires and using test light at cable end.have power on all 5 pins but for some reason its playing up?
maybe my phone? or it doesnt like charge and usb host at same time?
also tried that 124K resistor and did go into usb charge but some reason host not work now.need some time to play with it more...

External WiFi Drivers for Storm

Hello,
I'm trying to get my WiFi stick running @ Wileyfox Storm (Kernel-Version: 3.10.49-cyanogenmod-ge4cc700).
I have a common TL-WN725N WiFi-Stick. This one was running natively under my Nexus 7. But the Storm doesn't recognize it:
Here is my log output:
Code:
# dmesg
[ 273.600313] msm_otg 78d9000.usb: USB exited from low power mode
[ 273.721272] msm_hsusb_host msm_hsusb_host: EHCI Host Controller
[ 273.721867] msm_hsusb_host msm_hsusb_host: new USB bus registered, assigned bus number 1
[ 273.730389] msm_hsusb_host msm_hsusb_host: irq 166, io mem 0x078d9000
[ 273.750879] msm_hsusb_host msm_hsusb_host: USB 2.0 started, EHCI 1.00
[ 273.751001] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 273.751016] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 273.751027] usb usb1: Product: EHCI Host Controller
[ 273.751037] usb usb1: Manufacturer: Linux 3.10.49-cyanogenmod-ge4cc700 ehci_hcd
[ 273.751047] usb usb1: SerialNumber: msm_hsusb_host
[ 273.752350] hub 1-0:1.0: USB hub found
[ 273.752389] hub 1-0:1.0: 1 port detected
[ 274.071367] usb 1-1: new high-speed USB device number 2 using msm_hsusb_host
[ 274.226882] usb 1-1: New USB device found, idVendor=0bda, idProduct=8179
[ 274.226900] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 274.226909] usb 1-1: Product: 802.11n NIC
[ 274.226917] usb 1-1: Manufacturer: Realtek
[ 274.226925] usb 1-1: SerialNumber: 00E04C0001
# iwconfig
r_rmnet_data3 no wireless extensions.
rmnet_data7 no wireless extensions.
rmnet_data6 no wireless extensions.
rmnet_data5 no wireless extensions.
rmnet_data4 no wireless extensions.
rmnet_data3 no wireless extensions.
rmnet_data2 no wireless extensions.
rmnet_data1 no wireless extensions.
rmnet_data0 no wireless extensions.
p2p0 Qcom:802.11n ESSID:off/any Nickname:""
Mode:Managed Channel:0 Access Point: Not-Associated
Bit Rate:0 kb/s Tx-Power=0 dBm
RTS thr=2347 B Fragment thr=8000 B
Encryption key:off
r_rmnet_data8 no wireless extensions.
rmnet0 no wireless extensions.
r_rmnet_data0 no wireless extensions.
r_rmnet_data5 no wireless extensions.
dummy0 no wireless extensions.
r_rmnet_data2 no wireless extensions.
lo no wireless extensions.
r_rmnet_data7 no wireless extensions.
r_rmnet_data4 no wireless extensions.
sit0 no wireless extensions.
wlan0 Qcom:802.11n ESSID:"AVNGR" Nickname:""
Mode:Managed Frequency:2.437 GHz Access Point: DC:53:7C:CA:B2:E8
Bit Rate=72 Mb/s Tx-Power=16 dBm
RTS thr=2347 B Fragment thr=8000 B
r_rmnet_data1 no wireless extensions.
r_rmnet_data6 no wireless extensions.
# lsusb
Bus 001 Device 002: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Do you have any idea how to get this stick working and fully recognized by my phone? I already tried to push the compiled driver (8188eu.ko) to /system/lib/modules, but that doesn't work.
Bets regards
Avenger

Categories

Resources