I2C problems (kernel init freeze)

Kernel development related

Re: I2C problems (kernel init freeze)

Postby vaclavpe » Sun Nov 07, 2010 9:50 pm

vaclavpe wrote:The same - FSA9480 is detected but when I plug the USB cable in, nothing happens.

FALSE! Now, when I connect USB cable, I am getting
Code: Select all
<4>[  789.891754]  [FSA9480]fsa9480_interrupt
<4>[  790.183253]  [FSA9480]mode_switch
<4>[  790.183641]  [FSA9480]fsa9480_check_usb_connection
<4>[  790.184934]  [FSA9480] INTERRUPT1 is 0x01
<4>[  790.270363]  [FSA9480] DEVICETYPE1 is 0x04
<4>[  790.270401]  [FSA9480] MANUALSW1 is 0x00
<4>[  790.270601]  [FSA9480] MANUAL MODE.. d1:0x04, d2:0x00

and after I disconnect the cable, I get

Code: Select all
<4>[  786.911034] [FSA9480]fsa9480_interrupt
<4>[  786.911124]  [FSA9480]mode_switch
<4>[  786.916270]  [FSA9480]fsa9480_check_usb_connection
<4>[  787.025202] [FSA9480] INTERRUPT1 is 0x02
<4>[  787.025246]  [FSA9480] DEVICETYPE1 is 0x00
<4>[  790.270401]  [FSA9480] MANUALSW1 is 0x00
<4>[  787.025375]  [FSA9480] Cable is not connected
<4>[  790.270601]  [FSA9480] AUTO MODE.. d1:0x00, d2:0x00

Dopi, please change the GPIO table, JACK_nINT is on the EINT(12) pin unlike in SPICA (EINT(9)).

And now, maybe, MAX8906 works as well (as EINT9 was SCL line of the I2C for MAX8906). But I am out of energy now...

Vasek
vaclavpe
Dev Team
Dev Team
 
Posts: 116
Joined: Wed Oct 27, 2010 8:58 am
Location: Prague, Czech

Advertisement

       

Re: I2C problems (kernel init freeze)

Postby Dopi » Mon Nov 08, 2010 1:45 am

Hi Vasek,

that is really great news. I thinks this should bring us lightyears ahead! How did you manage to get this running? What did you change?

I will try to make the changes to the GPIO table some time later today. Right now I don't have access to a Linux machuine to do these changes.

Cheers,
Dopi
Ad banners support the JetDroid forum. Please consider clicking them once in a while.
User avatar
Dopi
Dev Team
Dev Team
 
Posts: 926
Joined: Sun Aug 22, 2010 9:47 pm

Re: I2C problems (kernel init freeze)

Postby Thijs » Mon Nov 08, 2010 7:07 am

Hi Vasek,

Great job! That's a big step forward :!: :!:

Best regards - Thijs
Thijs
Dev Team
Dev Team
 
Posts: 114
Joined: Fri Sep 10, 2010 6:28 pm

Re: I2C problems (kernel init freeze)

Postby Dopi » Mon Nov 08, 2010 2:23 pm

vaclavpe wrote:Dopi, please change the GPIO table, JACK_nINT is on the EINT(12) pin unlike in SPICA (EINT(9)).

And now, maybe, MAX8906 works as well (as EINT9 was SCL line of the I2C for MAX8906). But I am out of energy now...
Vasek


Mmmh. To me it seems like the settings (in arch/arm/mach-s3c6400/include/mach/jet_gpio.h) are just like you suggested.

Code: Select all
#define GPIO_PWR_I2C_SCL         S3C64XX_GPN(9)   // PWR_SCL_3.0V
#define GPIO_PWR_I2C_SCL_AF         0      

#define GPIO_PWR_I2C_SDA         S3C64XX_GPN(10)   // PWR_SDA_3.0V
#define GPIO_PWR_I2C_SDA_AF         0      

#define GPIO_EAR_SEND_END         S3C64XX_GPN(11)
#define GPIO_EAR_SEND_END_AF         2

#define GPIO_JACK_INT_N            S3C64XX_GPN(12)
#define GPIO_JACK_INT_N_AF         2


Did I missunderstand your request or are we talking about different kernel versions? I am referring to the latest experimental-2.6.29 commit.

Do you still recall how you produced the output you posted above? I am very eager to see this myself ;)

Cheers,
Dopu
Ad banners support the JetDroid forum. Please consider clicking them once in a while.
User avatar
Dopi
Dev Team
Dev Team
 
Posts: 926
Joined: Sun Aug 22, 2010 9:47 pm

Re: I2C problems (kernel init freeze)

Postby vaclavpe » Mon Nov 08, 2010 2:34 pm

Dopi wrote:
vaclavpe wrote:Dopi, please change the GPIO table, JACK_nINT is on the EINT(12) pin unlike in SPICA (EINT(9)).

Vasek

Mmmh. To me it seems like the settings (in arch/arm/mach-s3c6400/include/mach/jet_gpio.h) are just like you suggested.

Hi Dopi, I am talking about documentation here http://code.google.com/p/jetdroid/wiki/JetGPIO and here http://code.google.com/p/jetdroid/wiki/S3CGPIO . I used these two links as my GPIO reference.

As I wrote, I had to change IRQ source for JACK_nINT. It is connected to EINT12. EINT9 is used for I2C as GPIO signal. All error messages from MAX8906 in dmesg disappeared. So I think that PMU works now.

Vasek
vaclavpe
Dev Team
Dev Team
 
Posts: 116
Joined: Wed Oct 27, 2010 8:58 am
Location: Prague, Czech

Re: I2C problems (kernel init freeze)

Postby Dopi » Mon Nov 08, 2010 2:55 pm

vaclavpe wrote:Hi Dopi, I am talking about documentation here http://code.google.com/p/jetdroid/wiki/JetGPIO and here http://code.google.com/p/jetdroid/wiki/S3CGPIO . I used these two links as my GPIO reference.

Okay. Now I understand. Sorry the wiki seems to be not up-to date. The section in my previous post is actually from the current source for JetKernel 0.3pre1

vaclavpe wrote:As I wrote, I had to change IRQ source for JACK_nINT. It is connected to EINT12. EINT9 is used for I2C as GPIO signal. All error messages from MAX8906 in dmesg disappeared. So I think that PMU works now.
Vasek

To which source did you make this change? In the current source this is already fixed. GPIO_JACK_INT_N is S3C64XX_GPN(12) and GPIO_PWR_I2C_SCL and SDA are S3C64XX_GPN(9) and GPN(10). Anything else that your changed?

Cheers,
Dopi
Ad banners support the JetDroid forum. Please consider clicking them once in a while.
User avatar
Dopi
Dev Team
Dev Team
 
Posts: 926
Joined: Sun Aug 22, 2010 9:47 pm

Re: I2C problems (kernel init freeze)

Postby vaclavpe » Mon Nov 08, 2010 3:05 pm

Dopi wrote:To which source did you make this change? In the current source this is already fixed. GPIO_JACK_INT_N is S3C64XX_GPN(12) and GPIO_PWR_I2C_SCL and SDA are S3C64XX_GPN(9) and GPN(10). Anything else that your changed?

Cheers,
Dopi

Yes, directly in the code in drivers/usb/gadget/fsa9480_i2c.c - there is an allocation of EINT(9) and it should have EINT(12). I did not touch jet-gpio.h at all.

That is why I wrote that somebody should update Wiki GPIO tables. I know, plenty of work. But somebody who does not work on kernel can do that.

Vasek
vaclavpe
Dev Team
Dev Team
 
Posts: 116
Joined: Wed Oct 27, 2010 8:58 am
Location: Prague, Czech

Re: I2C problems (kernel init freeze)

Postby Dopi » Mon Nov 08, 2010 3:17 pm

vaclavpe wrote:Yes, directly in the code in drivers/usb/gadget/fsa9480_i2c.c - there is an allocation of EINT(9) and it should have EINT(12). I did not touch jet-gpio.h at all.

Now I understand and made the changes. The updated version should already be in the repo. I will test this later.

Cheers,
Dopi
Ad banners support the JetDroid forum. Please consider clicking them once in a while.
User avatar
Dopi
Dev Team
Dev Team
 
Posts: 926
Joined: Sun Aug 22, 2010 9:47 pm

Re: I2C problems (kernel init freeze)

Postby vaclavpe » Mon Nov 08, 2010 3:25 pm

Dopi wrote:Now I understand and made the changes. The updated version should already be in the repo. I will test this later.

Do not be too fast ;) I did some other changes as well in the code. I want to make some other tests and then make a patch for you.

Vasek
vaclavpe
Dev Team
Dev Team
 
Posts: 116
Joined: Wed Oct 27, 2010 8:58 am
Location: Prague, Czech

Re: I2C problems (kernel init freeze)

Postby vaclavpe » Mon Nov 08, 2010 10:16 pm

So, what I can confirm is that Vcc switching works well. FSA9480 reacts to USB cable plug-in and pull-out event. KXSD9 sensor is detected as well. These are good news.

And now the bad news. I still have some problems with registering USB interfaces of composite device. In SPICA it looks like that:
Code: Select all
<4>[    1.417117] [ADB_UMS_ACM] string_dev = 57009c407315
<6>[    1.418771] acm_function_add
<6>[    1.423997] DUN is registerd
<6>[    1.425434] android_adb_ums_acm gadget: Number of LUNs=1
<6>[    1.429803] adb_function_add
<4>[    1.433727]   interface 0 = acm/c84c7900
<4>[    1.436657]   interface 1 = acm/c84c7900
<4>[    1.440486]   interface 2 = usb_mass_storage/c84a1000
<4>[    1.445513]   interface 3 = adb/c84c7840
<6>[    1.449381] android_adb_ums_acm gadget: Android Composite USB, version: Dec  1 2009
<6>[    1.457041] android_adb_ums_acm gadget: android_adb_ums_acm ready

In Jet, I am just getting something like following:
Code: Select all
<4>[    1.417117] [ADB_UMS_ACM] string_dev = M90000000000
<6>[    1.418771] acm_function_add
<6>[    1.423997] DUN is registerd
<6>[    1.425434] android_adb_ums_acm gadget: Number of LUNs=1
<6>[    1.429803] adb_function_add
<6>[    1.449381] android_adb_ums_acm gadget: Android Composite USB, version: Dec  1 2009
<6>[    1.457041] android_adb_ums_acm gadget: android_adb_ums_acm ready

First - string_dev is wrong - there should be some non-zero ID behind "M900". Second, I don't see any messages and device of course does not enumerate. It can be because of FSA9480 is connected to some other USB pins. Or switching does not work properly. But more it is because usb_function_add ended not successfully.

Then - this should be put into the task list - in the 'dmesg' there is a plenty of
Code: Select all
sdhci_cmd_irq SDHCI_IRQ_TIMEOUT 00010001

I don't know what it does mean.

Any idea on both ?

Vasek

PS. I will make a diff of the GIT code and mine code tomorrow.
vaclavpe
Dev Team
Dev Team
 
Posts: 116
Joined: Wed Oct 27, 2010 8:58 am
Location: Prague, Czech

PreviousNext

Return to JetKernel

Who is online

Users browsing this forum: No registered users and 1 guest

  • Advertisement
cron