On So, 2018-06-24 at 17:01 +0300, Grazvydas Ignotas wrote:
So try to change board/pandora/pyra+lc15/pyra+lc15.c line 51 #if defined(CONFIG_SPL_BUILD) {TIMER8_PWM_EVT, (PTD | IEN | M6)}, /* GPIO8_230: keyboard backlight - pulled low */ #else {TIMER8_PWM_EVT, (PTU | IEN | M6)}, /* GPIO8_230: keyboard backlight - pulled high */ #endif
I've tried this, now it loads u-boot successfully but dies before it reaches the point where it reprograms bq24297, just after printing "DRAM: 4 GiB". It seems to be dying in initr_malloc(), no idea why. A wild guess is that code in malloc init utilizes more CPU pipelines and RAM (as it's clearing memory) which uses more power, and that goes over the current limit.
Hm. Could the CPU power usage be lowered (keep it down at 500MHz with 1 CPU core only, etc.) and upped after the limit has been raised?
Or is there anything else we could do to lower the power usage on startup - I mean, even limited, we've got 5V * 0.5A which is 2.5W... and we only need to keep it lower than that until the limit has been reached.
Hm, it it hard to enable high power for the bq24297 in MLO? I mean, if we recompile the MLO anyways, why switch off the backlight instead of enabling high power mode (if that fixes it).
I've tried this too and it doesn't work (i2c errors), probably the needed i2c bus is not properly initialized yet in MLO.
I guess adding i2c to MLO is no simple task...