FORUMS
Remove All Ads from XDA

Galaxy young GT-S35360 OTG driver (usb host mode) help please

44 posts
Thanks Meter: 68
 
Post Reply Email Thread
Hi,

I am now working on the usb OTG driver for galaxy-y
I almost sure that this device is a OTG capable device, (I found this from its service manual http://forum.xda-developers.com/show....php?t=1489767)

After some work I compiled otg supported usb driver as loadable module (dwc_otg.ko).
In the original firm ware this driver is 'in-built' and host support is diabled

and I could load the module
The dmesg is ...
Code:
[hari]# 
[hari]# insmod /sdcard/otgg/j/dwc_otg.ko     
<6>[ 2688.406677] dwc_otg: version 2.60a 22-NOV-2006
<6>[ 2688.406829] lm_driver_register()
<6>[ 2688.406890] lm_match()
<6>[ 2688.406951] lm_bus_probe()
<3>[ 2688.406982] Debug level= 17
<3>[ 2688.407012] dwc_otg lm-2: dwc_otg_driver_probe, version 020-10-01-09
<6>[ 2688.407318] It is Ok to create charging current work queue...
<4>[ 2688.407592] DWC_otg: 1
<4>[ 2688.407623] DWC_otg: 2
<4>[ 2688.407653] DWC_otg: dwc_otg_core_reset() GRSTCTL=80000000
<4>[ 2688.407684] DWC_otg: dwc_otg_core_reset() value to set=80000001
<4>[ 2688.517852] DWC_otg: b
<4>[ 2688.517913] DWC_otg: dwc_otg_core_reset() HANG! Soft Reset GRSTCTL=80000001
<6>[ 2688.517944] DWC_otg: Core Global Registers
<6>[ 2688.517974] DWC_otg: GOTGCTL       @0xD8400000 : 0x00110000
<6>[ 2688.518005] DWC_otg: GOTGINT       @0xD8400004 : 0x00000000
<6>[ 2688.518035] DWC_otg: GAHBCFG       @0xD8400008 : 0x00000000
<6>[ 2688.518066] DWC_otg: GUSBCFG       @0xD840000C : 0x00001400
<6>[ 2688.518096] DWC_otg: GRSTCTL       @0xD8400010 : 0x80000001
<6>[ 2688.518127] DWC_otg: GINTSTS       @0xD8400014 : 0x04000021
<6>[ 2688.518157] DWC_otg: GINTMSK       @0xD8400018 : 0x00000000
<6>[ 2688.518188] DWC_otg: GRXSTSR       @0xD840001C : 0xFFFFFFFF
<6>[ 2688.518188] DWC_otg: GRXFSIZ       @0xD8400024 : 0x00001000
<6>[ 2688.518218] DWC_otg: GNPTXFSIZ     @0xD8400028 : 0x10001000
<6>[ 2688.518615] DWC_otg: GNPTXSTS      @0xD840002C : 0x00081000
<6>[ 2688.518646] DWC_otg: GI2CCTL       @0xD8400030 : 0x00000000
<6>[ 2688.518676] DWC_otg: GPVNDCTL      @0xD8400034 : 0x00000000
<6>[ 2688.518707] DWC_otg: GGPIO         @0xD8400038 : 0x00000000
<6>[ 2688.518737] DWC_otg: GUID  @0xD840003C : 0x00000000
<6>[ 2688.518768] DWC_otg: GSNPSID       @0xD8400040 : 0x4F54281A
<6>[ 2688.518798] DWC_otg: GHWCFG1       @0xD8400044 : 0x00000000
<6>[ 2688.518829] DWC_otg: GHWCFG2       @0xD8400048 : 0x229FFDD0
<6>[ 2688.518859] DWC_otg: GHWCFG3       @0xD840004C : 0x0F8007E8
<6>[ 2688.518859] DWC_otg: GHWCFG4       @0xD8400050 : 0xFFF08030
<6>[ 2688.518890] DWC_otg: HPTXFSIZ      @0xD8400100 : 0x02001020
<4>[ 2688.518920] DWC_otg: 3
<4>[ 2688.627838] DWC_otg: 1
<4>[ 2688.627899] DWC_otg: 2
<4>[ 2688.627929] DWC_otg: dwc_otg_core_reset() GRSTCTL=80000001
<4>[ 2688.627960] DWC_otg: dwc_otg_core_reset() value to set=80000001
<4>[ 2688.737762] DWC_otg: b
<4>[ 2688.737823] DWC_otg: dwc_otg_core_reset() HANG! Soft Reset GRSTCTL=80000001
<4>[ 2688.737854] DWC_otg: 3
<4>[ 2688.846557] dwc_otg_pcd_init(d2a03460)
<4>[ 2688.846618] Dedicated Tx FIFOs mode
<4>[ 2688.846740] registering handler for irq21
<6>[ 2688.846832] DWC_otg: pcd->setup_pkt=0xff6b3000, pcd->setup_pkt_dma_handle=0x92985000
<6>[ 2688.846893] DWC_otg: pcd->status_buf=0xff6b4000, pcd->status_buf_dma_handle=0x92984000
<4>[ 2688.846923] pcd->setup_pkt=0xff6b3000, pcd->setup_pkt_dma_handle=0x92985000
<4>[ 2688.846954] pcd->status_buf=0xff6b4000, pcd->status_buf_dma_handle=0x92984000
<6>[ 2688.846984] DWC_otg: Using DMA mode
<6>[ 2688.847015] dwc_otg lm-2: DWC OTG Controller
<6>[ 2688.847076] dwc_otg lm-2: new USB bus registered, assigned bus number 1
<6>[ 2688.847137] dwc_otg lm-2: irq 21, io mem 0x00000000
<6>[ 2688.847198] DWC_otg: Init: Port Power? op_state=1
<6>[ 2688.847229] DWC_otg: Init: Power Port (0)
<7>[ 2688.847351] usb usb1: default language 0x0409
<7>[ 2688.847412] usb usb1: udev 1, busnum 1, minor = 0
<6>[ 2688.847442] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
<6>[ 2688.847473] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
<6>[ 2688.847503] usb usb1: Product: DWC OTG Controller
<6>[ 2688.847534] usb usb1: Manufacturer: Linux 2.6.35.7 dwc_otg_hcd
<6>[ 2688.847564] usb usb1: SerialNumber: lm-2
<7>[ 2688.849395] usb usb1: usb_probe_device
<7>[ 2688.849456] usb usb1: configuration #1 chosen from 1 choice
<7>[ 2688.849517] usb usb1: adding 1-0:1.0 (config #1, interface 0)
<7>[ 2688.850860] hub 1-0:1.0: usb_probe_interface
<7>[ 2688.850891] hub 1-0:1.0: usb_probe_interface - got id
<6>[ 2688.850921] hub 1-0:1.0: USB hub found
<6>[ 2688.850952] hub 1-0:1.0: 1 port detected
<7>[ 2688.850982] hub 1-0:1.0: standalone hub
<7>[ 2688.850982] hub 1-0:1.0: ganged power switching
<7>[ 2688.851013] hub 1-0:1.0: individual port over-current protection
<7>[ 2688.851043] hub 1-0:1.0: power on to power good time: 2ms
<7>[ 2688.851074] hub 1-0:1.0: local power source is good
<7>[ 2688.851074] hub 1-0:1.0: enabling power on all ports
[hari]# <7>[ 2688.948211] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000                    

[hari]# cat /sys/devices/lm-2/mode 
<1>[ 2760.955230] Unable to handle kernel paging request at virtual address 73656300
<1>[ 2760.955291] pgd = c7640000
<1>[ 2760.955322] [73656300] *pgd=00000000
Connection closed by foreign host.


The problem is that when i tried to view or change the the mode , here (cat /sys/devices/lm-2/mode ), the phone reboots!!!!!!!!

I am a beginner in kernel development and this is my first experiment with kernel modules.
In the current situation I cant get (I dont know how to get) any log or something from the kernel. I dont know how to bug this kernel module

So any one has experience in kernel debugging please help me

In the kernel configuration I found a feature 'KGDB seial debugger' but... I dont know how to get a 'seial port' on my galaxy-y

Any one please help me
The Following 6 Users Say Thank You to harish2704 For This Useful Post: [ View ] Gift harish2704 Ad-Free
 
 
27th March 2012, 01:58 PM |#2  
Senior Member
Imphal
Thanks Meter: 104
 
More
Good start,even Im crazy for that .But sorry can't help you.Plz contact Maroc-Os, but he is busy with kernel.
The Following User Says Thank You to PREMOLIKES For This Useful Post: [ View ] Gift PREMOLIKES Ad-Free
27th March 2012, 02:33 PM |#3  
OP Member
Flag Thrissur
Thanks Meter: 68
 
Donate to Me
More
May I know who is Maroc-Os
Please give his details.
The Following User Says Thank You to harish2704 For This Useful Post: [ View ] Gift harish2704 Ad-Free
27th March 2012, 02:47 PM |#4  
Senior Member
Thanks Meter: 505
 
More
wow, i thinking the same think after read that file. and while browsing i find other product from broadcom bcm2153 also have usb otg. i still can't find usb otg cable to try it.

your log, look like memory issue. do you already recompile (and boot) your kernel without dw_otg ?
27th March 2012, 02:47 PM |#5  
kurotsugi's Avatar
Senior Member
Flag yogyakarta
Thanks Meter: 1,816
 
More
you may also contact vivekalady. you can find him in vivek kernel post in this section
The Following User Says Thank You to kurotsugi For This Useful Post: [ View ] Gift kurotsugi Ad-Free
27th March 2012, 02:53 PM |#6  
mai77's Avatar
Senior Member
Thanks Meter: 582
 
More
Red face cool
wow. excellent research. usb host mode would be a kickass feature
raspberry also uses that driver
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: DWC OTG Controller usb usb1: Manufacturer: Linux 2.6.35.7 dwc_otg_hcd

usb usb1: SerialNumber: bcm2708_usb

http://www.raspberrypi.se/specifikation

maybe there are some similarities or people have experience with that hardware
The Following 2 Users Say Thank You to mai77 For This Useful Post: [ View ] Gift mai77 Ad-Free
27th March 2012, 02:57 PM |#7  
vivekkalady's Avatar
Recognized Developer
Flag Trivandrum
Thanks Meter: 1,755
 
Donate to Me
More
How did you connect the hardware ??
the phone does not supply for the device so power must be given separately.so that hardware mechanism must be made.then only we can start.I hope you are doing this way.you can contact DoomLord for OTG supports
The Following User Says Thank You to vivekkalady For This Useful Post: [ View ]
27th March 2012, 03:56 PM |#8  
OP Member
Flag Thrissur
Thanks Meter: 68
 
Donate to Me
More
To:mai77


Hai,
the source code for product you specified is released???
I just looked the the site and i couldn't find
thanks.....
The Following User Says Thank You to harish2704 For This Useful Post: [ View ] Gift harish2704 Ad-Free
27th March 2012, 04:01 PM |#9  
mai77's Avatar
Senior Member
Thanks Meter: 582
 
More
Quote:
Originally Posted by harish2704

In the kernel configuration I found a feature 'KGDB seial debugger' but... I dont know how to get a 'serial port' on my galaxy-y

sounds like kernel debugger,

but I wonder what specialty it would offer at all, if transmit over serial instead of USB or whatever. I am assuming we can run the regular kernel debugger in SGY

http://docs.blackfin.uclinux.org/dok...nel:debug:kgdb

maybe Maroc can build a debug kernel for us ...
27th March 2012, 04:17 PM |#10  
OP Member
Flag Thrissur
Thanks Meter: 68
 
Donate to Me
More
Quote:
Originally Posted by vivekkalady

How did you connect the hardware ??
the phone does not supply for the device so power must be given separately.so that hardware mechanism must be made.then only we can start.I hope you are doing this way.you can contact DoomLord for OTG supports

hai,
I didn't connected the hardware. I just rmmod'd the module (which doesn't support host mode)
and inserted the new module with host support.
The kmesg is posted in my post
then I tried to view the current mode (whether host or slave) by using
Code:
cat /sys/devices/lm-2/mode
then the phone rebooted suddenly
I run this commands as a remote session using telnetd
Thats how I got this logs

sorry for my language
The Following User Says Thank You to harish2704 For This Useful Post: [ View ] Gift harish2704 Ad-Free
27th March 2012, 04:30 PM |#11  
mai77's Avatar
Senior Member
Thanks Meter: 582
 
More
Quote:
Originally Posted by harish2704

I run this commands as a remote session using telnetd

does telnetd offer any advantages over "adb shell" ?
Post Reply Subscribe to Thread

Tags
dwc_otg, dwc_otg_hcd, galaxy-y, gt-s5360, otg, usb host

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes