Jump to content

Advent Vega kernel source code now available!


Guest PaulOBrien

Recommended Posts

Guest rebel1

Please, do me a favor. Use the old board-shuttle-clocks.c for the booting kernel, and also change the following line in board-shuttle-pinmux.c:

in the line:

{TEGRA_PINGROUP_CDEV1, TEGRA_MUX_OSC, ...

Change

TEGRA_MUX_OSC to TEGRA_MUX_PLLA_OUT

The .36 kernel requires TEGRA_PINGROUP_CDEV1 to output TEGRA_MUX_PLLA_OUT . otherwise, audio stops working. The previous .32 kernel seems not to require it. You should get no ALSA related errors with those modifications

Hi,

i tested it with old and new clock table, and can confirm that the alsa device is now online. Unfortunately you can hear it when it is initialized and i can´t see that message about tegra_hifi_hw_params(). ;)

But i found another different problem, the sdcard is not detected by the kernel.

Link to comment
Share on other sites

Guest ejtagle

Hi,

i tested it with old and new clock table, and can confirm that the alsa device is now online. Unfortunately you can hear it when it is initialized and i can´t see that message about tegra_hifi_hw_params(). ;)

But i found another different problem, the sdcard is not detected by the kernel.

I am tempted to tell you to also try the older board-shuttle-pinmux.c file ... The problems preventing the kernel to boot was in board-shuttle-power.c - nowadays i don't think the pinmux had something to do with the nonbooting kernel :) -- It was just a voltage regulator turning off :D

Thanks a lot for your patience :D

Link to comment
Share on other sites

Guest a_appleby

I am tempted to tell you to also try the older board-shuttle-pinmux.c file ... The problems preventing the kernel to boot was in board-shuttle-power.c - nowadays i don't think the pinmux had something to do with the nonbooting kernel :) -- It was just a voltage regulator turning off :D

Thanks a lot for your patience :D

I've tried it and the bars are back. It's just like the working one with some random patches applied.

Link to comment
Share on other sites

Guest ejtagle

So, seems there is a problem with pinmux, after all. Now, that i remember, when i peeked the .32 configuration (using the new written module), i wasn't using the SD card at that time .. :( -- Perhaps, that is the cause for the SDcard not working.. One of the problems with capturing the config of the .32 kernel is that any device not being used, is not enabled, so the pinmux configuration for that device is not set properly... guess i will have to capture it again :(

Link to comment
Share on other sites

Guest a_appleby

So, seems there is a problem with pinmux, after all. Now, that i remember, when i peeked the .32 configuration (using the new written module), i wasn't using the SD card at that time .. :( -- Perhaps, that is the cause for the SDcard not working.. One of the problems with capturing the config of the .32 kernel is that any device not being used, is not enabled, so the pinmux configuration for that device is not set properly... guess i will have to capture it again :(

Eduardo, did you have any time to look into this?

I tried the patches from you on 11.2.11 and it dies at the garbled screen, I can't get an ADB connection.

Link to comment
Share on other sites

Guest rebel1

Eduardo, did you have any time to look into this?

I tried the patches from you on 11.2.11 and it dies at the garbled screen, I can't get an ADB connection.

What patches did you try ?

The kernel boots with the latest patches from eduardo fine here.

Link to comment
Share on other sites

Guest a_appleby

What patches did you try ?

The kernel boots with the latest patches from eduardo fine here.

You mean 11.2.11 boots Android 3.0 for you? Can you please post the the system.img?

It's possible my device is damaged. This is why I want the system.img you got to work to check if it's the case.

Thank you.

Link to comment
Share on other sites

Guest rebel1

You mean 11.2.11 boots Android 3.0 for you? Can you please post the the system.img?

It's possible my device is damaged. This is why I want the system.img you got to work to check if it's the case.

Thank you.

Hi,

no, i doesn´t mean that Android 3.0 boot´s with this kernel, but the kernel itself should boot.

I think the goal for the 11.2.11 kernel is not a booting 3.0 image. ;)

Link to comment
Share on other sites

Guest ejtagle

You mean 11.2.11 boots Android 3.0 for you? Can you please post the the system.img?

It's possible my device is damaged. This is why I want the system.img you got to work to check if it's the case.

Thank you.

Yesterday i was testing the patches. And at the same time, fixing the clock issues (clocks not being able to be initialized). I found out that there is a bug in the 11.2.11 kernel (seems to be a merge problem.. 2 lines of code are swapped) tah is causing part of the clock initialization errors. I fixed all those problems. The kernel boots, but (there is always a one of those :( ) ... the SDcard is not recognized. But the SDIO wifi is working. I enabled MMC stack debugging information, and it just seems that the SDcard (we are talking about the external MMC) was totally absent. All the other devices seem to work perfectly.

I have to find out why the SDcard is not working ... Either, again, is a very silly thing, or it is a very complex one (or perhaps a kernel bug?)

Rebel1, could you check if the external mmc card is properly recognized in your tablet ? -- I do suspect this issue is just another config problem (probably a speed related one... 11.2.11 is running the mmc at nearly 2x speed than the .32 kernel, and it should work perfectly (it is not an overclock)... But perhaps, some MMC delay settings are not working ( guessed them... so i suspect they could be the culprits)

Just for reference, attached the latest patches i am trying against 11.2.11 nvidia kernel

latest-11.2.11.rar

Link to comment
Share on other sites

Guest ejtagle

Well... finally! - I found the problem preventing the mmc card to be recognized: They added a parameter to the nvidia sdhci host platform data that needs to be set (it is the card detect polarity) so the card is detected and initialized properly. So... here we are, again.. 11.2.11 booting OK!

I have enabled LP0 power saving mode, but i don't know if it works... if someone tries this kernel with the android image, and then notices the device suspends and never returns back, please disable LP0 (at board-shuttle.c, replace TEGRA_SUSPEND_LP0 by TEGRA_SUSPEND_LP1) and try again

There is something still pending: The extreme volume setting. I have run out of time today, but tomorrow ill do the measurements and post the results. In the meantime, please dont use the device at maximum volume

Regards,

Eduardo

11.2.11-with LP0 and MMC.rar

Link to comment
Share on other sites

Guest brucelee666

Just wondering why this was not changed as it looks part of the 11.2.11 commit hdmi i2c2 value change

In this change they amended (copy of diff):-

static struct tegra_i2c_platform_data harmony_i2c2_platform_data = {

.adapter_nr = 1,

.bus_count = 2,

old- .bus_clk_rate = { 400000, 100000 },

new+ .bus_clk_rate = { 100000, 100000 },

.bus_mux = { &i2c2_ddc, &i2c2_gen2 },

.bus_mux_len = { 1, 1 },

};

But in your latest board-shuttle-i2c.c this value still says:-

static struct tegra_i2c_platform_data shuttle_i2c2_platform_data = {

.adapter_nr = 1,

.bus_count = 2,

.bus_clk_rate = { 400000, 100000 },

.bus_mux = { &i2c2_ddc, &i2c2_gen2 },

.bus_mux_len = { 1, 1 },

};

Was this value not changed because (1) You missed it (easily done when trying to get something else working) ? or (2) The value in your shuttle file is correct and should be left as it is for the shuttle based tablets ?

Edited by brucelee666
Link to comment
Share on other sites

Guest ejtagle

Just wondering why this was not changed as it looks part of the 11.2.11 commit hdmi i2c2 value change

In this change they amended (copy of diff):-

static struct tegra_i2c_platform_data harmony_i2c2_platform_data = {

.adapter_nr = 1,

.bus_count = 2,

old- .bus_clk_rate = { 400000, 100000 },

new+ .bus_clk_rate = { 100000, 100000 },

.bus_mux = { &i2c2_ddc, &i2c2_gen2 },

.bus_mux_len = { 1, 1 },

};

But in your latest board-shuttle-i2c.c this value still says:-

static struct tegra_i2c_platform_data shuttle_i2c2_platform_data = {

.adapter_nr = 1,

.bus_count = 2,

.bus_clk_rate = { 400000, 100000 },

.bus_mux = { &i2c2_ddc, &i2c2_gen2 },

.bus_mux_len = { 1, 1 },

};

Was this value not changed because (1) You missed it (easily done when trying to get something else working) ? or (2) The value in your shuttle file is correct and should be left as it is for the shuttle based tablets ?

Good point.. i recall seeing it, but i missed it. If i remember well, DDC is used to read the external monitor ID. And the maximum allowable speed is 100khz. I haven't tested the HDMI out yet ... And i don't know if even using 400khz would work. But, in this case, better play safe than sorry. Let's lower it to the standard speed of 100khz. This speed is not critical at alll or related to performance in any way

Congrats, Good catch! :D

Eduardo

Link to comment
Share on other sites

Guest stiggy2011

I've been testing this out, trying to get something to boot and I've ran into a bit of an issue. I've compiled the latest kernel posted above by Eduardo, which is booting fine via fastboot with the kernel commandlne: "mem=512M@0M video=tegrafb console=tty0 mtdparts=tegra_nand:2048K@6784K(misc),5120K@9344K(recovery),8192K@14976K(boot),155008K@23680K(system),32768K@179200K(cache),4096K@212480K(staging),306688K@217088K(userdata)"

I'm booting using the ramdisk and system partition from newbe5's test build 48.

However, I'm getting error during boot:

"request_suspend_state: wakeup (0->0) at 199971752002"

This error (along with a load of userland stuff such as "init: Cannot execute(`/system/bin/dbus-daemon`): Permission Denied") is cycling repeatedly.

Is this a kernel fault, kernel .config related issue or something in the ramdisk/system.img? Just trying to narrow down where to look at the moment! I've tried the .config from rebel1's git repository also but I don't get anything but a black screen. I've also tried changing TEGRA_SUSPEND_LP0 to TEGRA_SUSPEND_LP1 in board-shuttle.c, which made no difference.

Thanks for any help. Also, I will state as I'm rambling that Eduardo you're a genius!

EDIT:

2 further things I've noticed:

The crackle normally coming from the speakers when the sound device is initialised is missing. Not sure if that's because it's been fixed?

If left for a while, the tablet does seem to suspend fine. Obviously on resume all I'm getting is a console window though!

Edited by stiggy2011
Link to comment
Share on other sites

Guest Cass67

I'm booting using the ramdisk and system partition from newbe5's test build 48.

Doubt this will boot 3.0 Android ... Needs a later build id suspect, 3.1/3.2 probably ..

Edit, at least you can test this theory, i cant even compile the damn thing ;)

Edited by Cass67
Link to comment
Share on other sites

Guest stiggy2011

Doubt this will boot 3.0 Android ... Needs a later build id suspect, 3.1/3.2 probably ..

Edit, at least you can test this theory, i cant even compile the damn thing ;)

Ah, I see! Any idea where I get get a 3.1/3.2 image from?

Wierd... it 'just compiled' for me. I can sent you the kernel compiled if you like?

Thanks,

Link to comment
Share on other sites

Guest Cass67

Ah, I see! Any idea where I get get a 3.1/3.2 image from?

Wierd... it 'just compiled' for me. I can sent you the kernel compiled if you like?

Thanks,

Doubt you'll get an image that boots on Vega, maybe a TF or Iconia image you could doctor, none created yet for vega, that boot, always failed with EGL errors ...

Thanks on the kernel, but ill pass, more fun to fight with it :)

Cheers

Cass

Link to comment
Share on other sites

Guest ejtagle

I've been testing this out, trying to get something to boot and I've ran into a bit of an issue. I've compiled the latest kernel posted above by Eduardo, which is booting fine via fastboot with the kernel commandlne: "mem=512M@0M video=tegrafb console=tty0 mtdparts=tegra_nand:2048K@6784K(misc),5120K@9344K(recovery),8192K@14976K(boot),155008K@23680K(system),32768K@179200K(cache),4096K@212480K(staging),306688K@217088K(userdata)"

I'm booting using the ramdisk and system partition from newbe5's test build 48.

However, I'm getting error during boot:

"request_suspend_state: wakeup (0->0) at 199971752002"

This error (along with a load of userland stuff such as "init: Cannot execute(`/system/bin/dbus-daemon`): Permission Denied") is cycling repeatedly.

Is this a kernel fault, kernel .config related issue or something in the ramdisk/system.img? Just trying to narrow down where to look at the moment! I've tried the .config from rebel1's git repository also but I don't get anything but a black screen. I've also tried changing TEGRA_SUSPEND_LP0 to TEGRA_SUSPEND_LP1 in board-shuttle.c, which made no difference.

Thanks for any help. Also, I will state as I'm rambling that Eduardo you're a genius!

EDIT:

2 further things I've noticed:

The crackle normally coming from the speakers when the sound device is initialised is missing. Not sure if that's because it's been fixed?

If left for a while, the tablet does seem to suspend fine. Obviously on resume all I'm getting is a console window though!

You could try to backport the latest patch to the original 11.2.4 kernel, that is working with Android 3.0..(i have tried it, and it works... but 11.2.11 seems much more stable ... maybe a better idea is to go with android image 3.2 ;) -- Specially, as android 3.0 has some memory leaks that 3.2 does not have.. And as vega has a less memory than optimal, every bit that can be improved regarding memory management helps a lot ;)

And, seems, btw, nividia has released a new 11.2.12 kernel. Hopefully, no changes to the posted patches will be required to boot it :) -- Seems 11.2.12 fixes some hdmi related problems, and also some USB host related problems...

Link to comment
Share on other sites

Guest Cass67

You could try to backport the latest patch to the original 11.2.4 kernel, that is working with Android 3.0..(i have tried it, and it works... but 11.2.11 seems much more stable ... maybe a better idea is to go with android image 3.2 ;) -- Specially, as android 3.0 has some memory leaks that 3.2 does not have.. And as vega has a less memory than optimal, every bit that can be improved regarding memory management helps a lot ;)

And, seems, btw, nividia has released a new 11.2.12 kernel. Hopefully, no changes to the posted patches will be required to boot it :) -- Seems 11.2.12 fixes some hdmi related problems, and also some USB host related problems...

Can i ask how you chaps are pulling the 11.2.11 branch ?

i have pulled latest Nvidia git head and switched branches to 11.2.11, applied your patches and it fails to compile for various reasons ... wondering if there is a comparison in the way your doing it from me..

Cheers

Cass

Link to comment
Share on other sites

Guest rebel1

Hi,and one time more, i need to say great work from eduardo.HC 3.2 runs very smooth with the 11.2.11 kernel.I upload in this moment my Testimage.

rene

Link to comment
Share on other sites

Guest ejtagle

Hi,and one time more, i need to say great work from eduardo.HC 3.2 runs very smooth with the 11.2.11 kernel.I upload in this moment my Testimage.

rene

Excelent rebel1! :D -- Today (but a little bit later) i will do the measurements to determine the maximum safe volume settings for the audio codec driver. And probably will also check the 11.2.12 kernel... There are interesting HDMI fixes there :) -- I'd guess there won't be any problems porting to it the patches :)

Regards,

Eduardo

Link to comment
Share on other sites

Guest a_appleby

Hi,and one time more, i need to say great work from eduardo.HC 3.2 runs very smooth with the 11.2.11 kernel.I upload in this moment my Testimage.

rene

I can't believe this. :) That will be very cool to play with.

Looking forward to testing it.

Good work, ejtagle and rebel1!

Link to comment
Share on other sites

I can't believe this. :) That will be very cool to play with.

Looking forward to testing it.

Good work, ejtagle and rebel1!

+1

Amazing...

Can't wait :)

Edited by d1dd1
Link to comment
Share on other sites

Guest nappomat

@rebel1:

does this work on the vega? which board...harmony or shuttle?

and a last question...does the host mode for the usb3 port (fullsize port on the side) work? when yes, then how to enable?

greetings

Link to comment
Share on other sites

Guest ejtagle

Well... I did the measurements regarding speakers. No, the ALC codec is not configured in a bad way. There is no DC across the speaker terminals. The only thing that has happened here is that we are sending, if volume is set to maximum, way more power than the speakers could handle. I still have to figure out the maximum safe volume, but no ALC codecs were harmed. Just the speakers.

Regarding kernel 11.2.12, i ported the patches and complited the new kernel. It works without issues. No problems at all. I have attached my latest patches against 11.2.12 nvidia kernel. There are some misc changes also:

-Enabled dithering in video, so it should improve shadows and improve color transitions

-An attempt to let the user switch between device and host mode at runtime, for the USB bus. check /sysfs/usbbus ... But i am not sure it is working or not... Seems something is still missing there...

Well, thats all for now,

Eduardo

11.2.12-LP0-MMC-DITHER.rar

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.