summaryrefslogtreecommitdiff
path: root/board/ste
AgeCommit message (Collapse)AuthorFilesLines
2021-09-02board: stemmy: Update documentationStephan Gerhold2-51/+2
Over the time, the "stemmy" U-Boot board was tested on several other Samsung smartphones based on ST-Ericsson NovaThor Ux500. Convert the documentation to reStructuredText at doc/board/ste/stemmy.rst and make the device list complete. Also note that the board now boots into USB Fastboot instead of just ending up at the U-Boot prompt. The device table is mostly taken from the postmarketOS wiki article (https://wiki.postmarketos.org/wiki/ST-Ericsson_NovaThor_U8500). All the newly added devices were tested by Linus Walleij. Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
2021-07-14board: stemmy: Copy atags for booting downstream/vendor kernelStephan Gerhold1-0/+87
The U-Boot "stemmy" board is mainly intended to simplify booting mainline Linux on various smartphones from Samsung based on ST-Ericsson Ux500. While the mainline kernel is working great, there are still some features missing there. In particular, it is currently not possible to charge the battery when using the mainline kernel. This means that it is still necessary to boot the downstream/vendor kernel from Samsung sometimes to charge the device. That kernel is ancient, still uses board files + ATAGS instead of device trees and relies on a strange very long kernel command line hardcoded in the Samsung bootloader. Actually, since mainline is booted with device trees there is a very simple way to make the old downstream kernel work as well: We can simply take most of the ATAGS passed to U-Boot from the Samsung bootloader and copy them as-is when booting a kernel without device tree. That way the long command line and other needed ATAGS are copied as-is without having to bother with them. The only exception is the ATAG_INITRD - since the initrd is loaded by U-Boot, the atag for that should be generated in U-Boot so it points to the correct address. All other ATAGS are copied as-is and not generated in U-Boot. Also use the chance and provide a serial# for U-Boot by parsing the ATAG_SERIAL that is also passed by the Samsung bootloader. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2021-07-14board: stemmy: Parse atags to get available memoryStephan Gerhold2-1/+62
At the moment the "stemmy" board attempts to detect the RAM size with a simple memory test (get_ram_size()). Unfortunately, this does not work correctly for devices with 768 MiB RAM (e.g. Samsung Galaxy Ace 2 (GT-I8160), "codina"). Reading/writing memory after the 768 MiB RAM succeeds but actually overwrites some earlier parts of the memory. For U-Boot this does not result in any major problems, but on Linux this will eventually lead to strange crashes because of the memory corruption. Since the "stemmy" U-Boot port is designed to be chainloaded from the original Samsung bootloader, the most reliable way to get the available amount of RAM is to look at the ATAGS passed by the Samsung bootloader. Fortunately, the header used to generate ATAGS in U-Boot (asm/setup.h) can also be easily used to parse them. Also clarify and simplify stemmy.h a bit to make it more clear where some of the magic values in there are actually coming from. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass1-0/+1
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2020-05-19common: Drop init.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-23board: Add new Samsung "stemmy" board based on ST-Ericsson U8500Stephan Gerhold5-0/+87
The ST-Ericsson U8500 SoC has been used in mass-production for some Android smartphones released around 2012. In particular, Samsung has released more than 5 different smartphones based on U8500, e.g. - Samsung Galaxy S III mini (GT-I8190) "golden" - Samsung Galaxy S Advance (GT-I9070) "janice" - Samsung Galaxy Xcover 2 (GT-S7710) "skomer" and a few others. Mainline Linux has great support for the Ux500 SoC, so these smartphones can also run Linux mainline quite well. Unfortunately, the original Samsung bootloader used on these devices has limitations that prevent booting Linux mainline directly. It keeps the L2 cache enabled, which causes Linux to crash very early, shortly after decompressing the kernel. Using U-Boot allows to circumvent these limitations. We can let the Samsung bootloader chain-load U-Boot and U-Boot locks the L2 cache before booting into Linux. U-Boot has several other advantages - it supports device-trees directly and we are no longer limited to flashing Android boot images through Samsung's proprietary download mode. The Samsung "stemmy" board covers all Samsung devices based on U8500. Add minimal support for "stemmy". For now only UART is supported but this will be extended later. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>