We are facing a reset problem on our custom AM1808 board designed using an AM1808 EVM as reference.We are using UBL code shipped with ti-sdk-am180x-evm-05.02.00.00 SDK which sets ARM and DDR clocks to 456MHz and 150MHz respectively.Cpuidle and Cpufreq are enabled and we are using the userspace governor.
Here comes the problem: if we set the operating frequency to 96MHz we are unable to reset the board, neither via console reboot commandnor via hardware reset (!).It seems that the device resets but then remains stuck somewhere in the boot process in ROM or UBL because nothing is displayedon the console.If we substitute the UBL with an old version (dumped from the EVM spi flash) which sets the initial ARM clock to 300MHz there is no problem resettingthe board even at 96MHz.We think this is what happens:- On first boot the PMIC starts with a default core voltage of 1.2V with is enough for the core to bootstrap at 456MHz- UBL boots U-UBOOT which boots the kernel, everything ok.- Then we set the operating frequency to 96MHz (echo 96000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed) and the governorthen instructs the PMIC to lower the core voltage to 1.0V- We issue a reset (via reboot command or hardware button reset)- The ARM resets BUT the PMIC is still suppling 1.0V to the core- Part of the UBL code wich sets the ARM clock to 456MHz is executed ...but the ARM core is unable to start operation at 456MHz with that voltage and the boot got stuck somewhere (Maybe PLL is not able to get a lock?)The following points seems to back the above explanation of the problem:- When we use an UBL code which sets the initial clock at 300Mhz the board is able to reset without problems even at 96MHzWe guess that at 300MHz 1.0 volts are sufficient for the ARM to bootstrap.- We patched the 96MHz opp in da850.c to fix the PMIC voltage to 1.2 volt:static const struct da850_opp da850_opp_96 = { .freq = 96000, .prediv = 1, .mult = 20, .postdiv = 5, //.cvdd_min = 1000000, //.cvdd_max = 1050000, .cvdd_min = 1200000, // <------ .cvdd_max = 1200000, // <------};and as expected with this 'fix' we were are able to reset.Questions:1. Can you confirm that this is an expected behavior and that the correct solution is torebuild UBL with a different operating point with a lower ARM clock ?2. Regarding question 1, we tried to change the UBL operating point as described here:http://processors.wiki.ti.com/index.php/OMAPL1:_Changing_the_Operating_Pointbut in our 'include/device.h' file there are no #define DEVICE_OPP_* macros as stated in the wiki page.So instead we patched the function 'DEVICE_init()' in the file 'ti-sdk-am180x-evm-05.02.00.00/host-tools/flash_utils/OMAP-L138_FlashAndBootUtils_2_31/OMAP-L138/Common/src/device.c' this way:Uint32 DEVICE_init(){ .... .... .... // System PLL Setup if (status == E_PASS) { #if defined(AM1808) // CPU(s) at 456 MHz // status |= DEVICE_PLL0Init(0, 18, 0, 0, 0, 18, 8); status |= DEVICE_PLL0Init(0, 24, 0, 1, 0, 11, 5); // <-------- patch to force 300 MHz #elif defined(AM1810) // CPU(s) at 300 MHz status |= DEVICE_PLL0Init(0, 24, 0, 1, 0, 11, 5); #else // CPU(s) at 300 MHz status |= DEVICE_PLL0Init(0, 24, 0, 1, 0, 11, 5); #endif }........And again this solves the issue, but is this a correct approach?
Waiting for your response, thanks in advance. Gabriele.
Does the UBL not configure the PMIC via I2C commands to 1.3V? Unless the PMIC defaults to 1.3V out of reset, the UBL would have to configure the PMIC even after power on before changing the PLL to 456 MHz.
Jeff
----------------------------------------------------------------------------------------------------------
Please click the Verify Answer button on this post if it answers your question.----------------------------------------------------------------------------------------------------------
Useful Links:OMAP-L1x/C674x/AM18x Debug GEL File
jc-tiDoes the UBL not configure the PMIC via I2C commands to 1.3V?
Nobody can comment or give advice for this?
Am1808 not being able to reboot (or reset) from 96MHz opp with the standard shipped UBL code is a really serous issue from my point of view... :-/
Gabriele
I have forwarded your query to the AM18xx SDK team. I would recommend if the question is not addressed, please also escalate through your local TI field support team, providing information on the end application etc.
Regards
Mukul
Don't forget to verify answers to your forum questions by using the green "Verify Answer" button.
I will respond to my own question for the benefit of all.
I found that since a certain version of UBL, the code to set the OPP in the PMIC via I2C at boot was removed (I don't understand why, maybe not everyone uses a TPS to power the AM1808/L138...)
The latest UBL version in which I was able to found such code is in the package 'armubl-03.20.00.14.tar.gz'.
So i forward-ported that code to a more recent version of UBL and everithng works flawless since then.
I've attached a patch to apply against the 'OMAP-L138_FlashAndBootUtils_2_31_a.tar.gz' source code, but I guess you can adapt it to any recent UBL version.
I hope it will be useful for others suffering same issues :-)
PLEASE NOTE: I'm not a TI FAE and this is NOT a TI approved patch, so use it at your risk (beware that it may even damage your CPU!).