summaryrefslogtreecommitdiff
path: root/board/samsung
AgeCommit message (Collapse)Author
2026-03-09Merge tag 'v2026.04-rc4' into nextTom Rini
Prepare v2026.04-rc4
2026-02-25board: samsung: exynos-mobile: add EFI capsule update supportKaustabh Chakraborty
Add support for EFI capsule updates via U-Boot's DFU. This flashes the boot partition with the new image provided in the capsule. Signed-off-by: Kaustabh Chakraborty <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2026-02-25board: samsung: exynos-mobile: use blkmap for booting from userdata ↵Kaustabh Chakraborty
subpartitions Some distributions tend to provide a single combined image with EFS and the system root filesystem. Flashing it as-is in a single partition (usually done in userdata partition as it is the largest) is not bootable as U-Boot does not understand subpartitions. Use blkmap to map the userdata partition into its own block device. Signed-off-by: Kaustabh Chakraborty <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2026-02-23board: samsung: exynos-mobile: enable OF_BOARD supportKaustabh Chakraborty
OF_BOARD allows to choose the internal device tree in runtime. Use it to pass the external FDT as an internal one if it is not present. This approach is also used by qcom-phone, and it reduces boot image size. It is expected that an external FDT is present as U-Boot is packaged as an Android boot image. Signed-off-by: Kaustabh Chakraborty <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2026-02-23board: samsung: exynos-mobile: disable MULTI_DTB_FIT supportKaustabh Chakraborty
MULTI_DTB_FIT allowed a single U-Boot image to be booted in multiple devices, but it was not a scalable solution; as more devices are added, the U-Boot binary is bound to increase, space taken up by devicetrees which are not even used. The other approach is to be able to build separate images for multiple devices using the same "board" defined in U-Boot. This is used by qcom_phone to support muitiple devices. Follow the said approach for Exynos devices as well, disable MULTI_DTB_FIT for this board. Signed-off-by: Kaustabh Chakraborty <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2026-02-23board: samsung: exynos-mobile: resolve env vars without board_info dataKaustabh Chakraborty
Move environment variable setup procedure to exynos_env_setup(). This function is independent of data from exynos_board_info as it is due for removal in the succeding commits. Signed-off-by: Kaustabh Chakraborty <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2026-02-23board: samsung: exynos-mobile: simplify parsing RAM banks from device treeKaustabh Chakraborty
Remove the baked-in bank addresses used for figuring out RAM banks from device tree. Instead, sequentially fill in the bank addresses and sizes, and doing away with an extra array for specifying bases. Signed-off-by: Kaustabh Chakraborty <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2026-02-17treewide: Clean up DECLARE_GLOBAL_DATA_PTR usagePeng Fan
Remove DECLARE_GLOBAL_DATA_PTR from files where gd is not used, and drop the unnecessary inclusion of asm/global_data.h. Headers should be included directly by the files that need them, rather than indirectly via global_data.h. Reviewed-by: Patrice Chotard <[email protected]> #STMicroelectronics boards and STM32MP1 ram test driver Tested-by: Anshul Dalal <[email protected]> #TI boards Acked-by: Yao Zi <[email protected]> #TH1520 Signed-off-by: Peng Fan <[email protected]>
2026-01-20arm: Update linker scripts to ensure appended device tree is alignedTom Rini
With commit 0535e46d55d7 ("scripts/dtc: Update to upstream version v1.7.2-35-g52f07dcca47c") it is now a fatal error to U-Boot if our device tree is not 8-byte aligned. In commit 85f586035d75 ("ARM: OMAP2+: Pad SPL binary to 8-byte alignment before DTB") Beleswar Padhi explains that we must have ALIGN(x) statements inside of a section to ensure that padding is included and not simply that the linker address counter is incremented. To that end, this patch: - Expands some linker sections to be more readable when adding a second statement to the section. - Aligns the final section before _end (for U-Boot) or _image_binary_end or __bss_end (for xPL phases) by 8-bytes by adding '. = ALIGN(8);' to the final section before the symbol. - Ensure that we do have alignment by adding an ASSERT so that when not aligned we fail to link (and explain why). - Remove now-spurious '. = ALIGN(x);' statements that were intended to provide the above alignments. Tested-by: Michal Simek <[email protected]> # Zynq Reviewed-by: Ilias Apalodimas <[email protected]> [trini: Also update arch/arm/cpu/armv8/u-boot.lds as Ilas requested] Signed-off-by: Tom Rini <[email protected]>
2026-01-02kbuild: Bump the build system to 6.1Sughosh Ganu
Our last sync with the kernel was 5.1. We are so out of sync now, that tracking the patches and backporting them one by one makes little sense and it's going to take ages. This is an attempt to sync up Makefiles to 6.1. Unfortunately due to sheer amount of patches this is not easy to review, but that's what we decided during a community call for the bump to 5.1, so we are following the same guidelines here. Signed-off-by: Sughosh Ganu <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]>a #rebased on -next
2025-12-02board: samsung: exynos-mobile: add exynos7870 support and three devicesKaustabh Chakraborty
Add basic support for the Exynos7870 SoC, this includes device tree match logic using multiple boards, where devices use a stub dtb in Samsung's QCDT format. S-BOOT, the previous stage bootloader, places its cmdline arguments there, which has identifying information. This is added with support for three devices: * Samsung Galaxy A2 Core (codename: a2corelte) * Samsung Galaxy J6 (codename: j6lte) * Samsung Galaxy J7 Prime (codename: on7xelte) Add their device trees in the defconfig, and also enable the clock and pin controller drivers. Signed-off-by: Kaustabh Chakraborty <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-12-02board: samsung: add support for Samsung Exynos mobile device boardsKaustabh Chakraborty
Add support for a generic platform which intends to support multiple boards powered by ARMv8 Samsung Exynos SoCs. Some important features include: * Fastboot: This is present to provide an open alternative to Samsung's proprietary Odin protocol. The board file configures certain features for fastboot, such as a dynamically allocated fastboot buffer, and standardized (lowercase) partition aliases. * EFI: Kernel image can be loaded from an EFI partition. This adopts a standard booting process, which multiple OS distributions can rely on. Signed-off-by: Kaustabh Chakraborty <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-11-26board: samsung: e850-96: Enter DFU automatically on USB bootSam Protsenko
Doing USB boot on E850-96 is most useful in two cases: 1. For unbricking the board 2. During the bootloader development In both cases a U-Boot binary is being re-flashed to eMMC. The most convenient way to update U-Boot in eMMC is by using DFU. Implement entering DFU flashing mode automatically when U-Boot is executed on USB boot. That makes it easier for users to re-flash U-Boot without even having serial console running, e.g.: $ ./smdk-usbdl $ dfu-util -D u-boot.bin -a bootloader See [1,2] for details. Entering DFU mode is implemented by setting corresponding environment variables: bootcmd="dfu 0 mmc 0" bootdelay=0 Do not save the U-Boot environment though, to avoid falling through to DFU mode on a regular eMMC boot. [1] doc/board/samsung/e850-96.rst [2] https://gitlab.com/LinaroLtd/e850-96/tools/dltool/-/tree/uboot Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-11-26board: samsung: e850-96: Load firmwares over USB on USB bootSam Protsenko
During USB boot it's expected that the bootloader (U-Boot) should download LDFW and TZSW firmware binaries over USB, using corresponding SMC call. Once it's done, the Boot ROM code can release the USB block, so that it can be used in U-Boot (e.g. for flashing images to eMMC using DFU or fastboot). Otherwise USB wouldn't be accessible in U-Boot, and any attempt to access USB PHY or DWC3 registers will lead to abort. Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-11-26board: samsung: e850-96: Add routine for loading images over USBSam Protsenko
During USB boot U-Boot is supposed to download some firmware over USB. It's done by EL3 software, so it has to be requested via corresponding SMC call. Implement a routine for doing that. No functional change. Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-11-26board: samsung: e850-96: Split LDFW loading and initSam Protsenko
The LDFW firmware loading is done in two steps: 1. Read the firmware binary from some block device 2. Provide it to EL3 monitor software via an SMC call, so it can copy it to a Secure World memory and start using it Let's split the load_ldfw() function by two functions correspondingly, to reflect that process better: - load_ldfw_from_blk() - init_ldfw() It can be useful in case when the LDFW binary should be obtained from some different media, e.g. downloaded over USB during USB boot. No functional change. Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-11-26board: samsung: e850-96: Add routines for checking boot devSam Protsenko
Implement functionality to check the current boot device (a device where the SoC ROM code is loading the bootloaders from). The boot device order can be changed using the SW1 DIP switch on the E850-96 board (which controls XOM SoC lines), as stated in [1]. The boot device information is requested from EL3 software using the corresponding SMC call, which in turn reads it from iRAM memory, which was written by the ROM code. New routines decode that data and allow the user to check the current boot device, boot order, etc. That API can be used further to implement different code flows depending on the current boot device, e.g.: - on eMMC boot: obtain the firmware binaries from eMMC - on USB boot: download the firmware over USB instead No functional change; this patch only adds new functionality but it's not used yet. [1] doc/board/samsung/e850-96.rst Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-11-26board: samsung: e850-96: Keep public functions togetherSam Protsenko
Move DRAM init functions close to other public functions, to make things visually distinct and improve the readability. No functional change. Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-09-08Merge tag 'v2025.10-rc4' into nextTom Rini
Prepare v2025.10-rc4
2025-09-01configs: e850-96: Disable CONFIG_DEFAULT_FDT_FILESam Protsenko
Linux kernel should use some separate device tree obtained from another source anyway. For example the dtb file can be read from /boot directory in eMMC rootfs partition, either by GRUB or U-Boot. Using U-Boot's device tree blob to provide it to the kernel (when CONFIG_DEFAULT_FDT_FILE is set and nobody else overrides this choice) might lead to undesired effects when booting the OS. For example, if a user sets "dr_mode" property to "host" value in U-Boot's dts to enable USB host capabilities in U-Boot, it might confuse usb-conn-gpio driver in Linux kernel later like this: platform connector: deferred probe pending: usb-conn-gpio: failed to get role switch Disable CONFIG_DEFAULT_FDT_FILE option to avoid any possible confusion. Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-09-01board: samsung: e850-96: Add bootdev var to choose boot deviceSam Protsenko
Provide a way for the user to select which storage to load the LDFW firmware from, by setting the corresponding environment variables: - bootdev: block device interface name - bootdevnum: block device number - bootdevpart: partition number This might be useful when the OS is flashed and booted from a different storage device than eMMC (e.g. USB flash drive). In this case it should be sufficient to just set: => setenv bootdev usb => env save assuming that the USB drive layout follows the same partitioning scheme as defined in $partitions. Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-09-01board: samsung: e850-96: Extract device info from fw loading codeSam Protsenko
Make it possible to provide the information about storage device where LDFW firmware resides to the firmware loading routine. The firmware loader code shouldn't have that data hard-coded anyway, and it also allows for implementing more dynamic behavior later, like choosing the storage device containing LDFW via some environment variables. No functional change. Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-09-01board: samsung: e850-96: Configure PMIC regulatorsSam Protsenko
Make use of PMIC configuration routines and enable all LDOs that might be useful for bootloader and kernel. The most crucial regulator being enabled at the moment is LDO24 which provides power to LAN9514 chip. That makes Ethernet controller and USB hub functional. Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-09-01board: samsung: e850-96: Add PMIC codeSam Protsenko
Add functions for configuring voltage regulators on S2MPU12 PMIC chip for E850-96 board. The chip is accessed by commanding APM core (via ACPM IPC protocol) to perform corresponding transfers over I3C bus. The most important regulator being set up is LDO24 used for LAN9514 chip power. As LAN9514 implements USB hub and Ethernet controller functionality, it's crucial to enable and configure LDO24 to be able to use it further. While at it, configure the rest of regulators that might be needed later, both in the bootloader and in kernel. Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-09-01board: samsung: e850-96: Add ACPM codeSam Protsenko
Add functions to access I3C bus via APM (Active Power Management) core by using ACPM IPC protocol. It will be further used for configuring PMIC chip voltage regulators. Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-09-01board: samsung: e850-96: Set ethaddrSam Protsenko
Set the environment variable for Ethernet MAC address (ethaddr). Use the SoC ID to make sure it's unique. It'll be formatted in a way that follows the consecutive style of the serial number ("serial#" variable), i.e.: OTP_CHIPID0 = 0xf51c8113 OTP_CHIPID1 = 0x236 get_chip_id() = 0x236f51c8113 serial# = 00000236f51c8113 ethaddr = 02:36:f5:1c:81:13 where corresponding bytes of the MAC address are: mac_addr[0] = 0x02 // OTP_CHIPID1[15:8] mac_addr[1] = 0x36 // OTP_CHIPID1[7:0] mac_addr[2] = 0xf5 // OTP_CHIPID0[31:24] mac_addr[3] = 0x1c // OTP_CHIPID0[23:16] mac_addr[4] = 0x81 // OTP_CHIPID0[15:8] mac_addr[5] = 0x13 // OTP_CHIPID0[7:0] because OTP_CHIPID1 has only 16 significant bits (with actual ID values), and all 32 bits of OTP_CHIPID0 are significant. Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-09-01board: samsung: odroid: drop exynos_power_initHenrik Grimler
exynos_power_init sets up regulators for the emmc and sdcard, but these regulators are already marked as always-on and boot-on and hence are handled already by the regulator-uclass. Since we currently try to set them up twice we get error -114 (EALREADY) from exynos_power_init on every boot: LDO20@VDDQ_EMMC_1.8V: set 1800000 uV; enabling (ret: -114) LDO22@VDDQ_EMMC_2.8V: set 2800000 uV; enabling (ret: -114) LDO21@TFLASH_2.8V: set 2800000 uV; enabling (ret: -114) Remove the superfluous exynos_power_init to silence these errors. Signed-off-by: Henrik Grimler <[email protected]> Reviewed-by: Anand Moon <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-08-01board: samsung: add Samsung Galaxy R (GT-I9103) and Captivate Glide ↵Ion Agorria
(SGH-i927) support The Galaxy R (GT-I9103) and Captivate Glide (SGH-i927) are both Tegra 2 based Samsung smartphones released in 2011. They both feature 1 GB of RAM and 8 GB of expandable flash memory. The key difference is that the Captivate Glide has an OLED panel (contrary to LCD in Galaxy R) and a QWERTY keyboard in form factor of a slider. Signed-off-by: Ion Agorria <[email protected]> Reviewed-by: Svyatoslav Ryhel <[email protected]> Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-07-25Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-samsungTom Rini
- Enhanced e850-96 support
2025-07-25board: samsung: e850-96: Enable EFI Capsule Update mechanismSam Protsenko
Make it possible to update E850-96 firmware binaries using EFI Capsule Update mechanism. For example, to update the U-Boot binary, the capsule file can be generated like this: $ ./tools/mkeficapsule --index 4 \ --guid 629578c3-ffb3-4a89-ac0c-611840727779 \ u-boot.bin capsule4.bin The resulting 'capsule4.bin' should be copied to ESP partition (in /boot/efi/EFI/UpdateCapsule/ directory). Then after reboot U-Boot will update the 'bootloader' area in eMMC Boot Partition A (boot0) and remove the capsule file, by EFI boot manager executed as a part of Standard Boot: Applying capsule capsule4.bin succeeded. Reboot after firmware update. The kernel will also expose the ESRT table information via SysFS in /sys/firmware/efi/esrt/entries. Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-07-25board: samsung: e850-96: Add Android partitionsSam Protsenko
Matches downstream Android-Q partition table created by flashing the modified gpt.img [1], with added ESP partition (EFI System Partition). It's an A/B slotted Android partition table, so it's possible to boot Android from this table using Android GBL EFI app. Tested using AOSP/main images for E850-96 with booting via GBL app. [1] https://gitlab.com/Linaro/96boards/e850-96/tools/gpt/-/blob/master/gpt_layout_uboot_q_ab Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-07-25board: samsung: e850-96: Add dfu_alt_infoSam Protsenko
Add 'dfu_alt_info' environment variable which contains: - Linux eMMC partitions ('esp' and 'rootfs') - eMMC Boot Partition A layout, where all the firmware reside It makes it possible to update the bootloader (U-Boot). All sizes in 'dfu_alt_info' are given in 512B blocks (LBA). eMMC size is 58.2 GiB. The eMMC Boot Partition A (mmc0boot0) layout looks like this: boot0 partition (4 MiB) 0x0 +----------------------------------+ | fwbl1 (12 KiB) | 0x18 +----------------------------------+ | epbl (76 KiB) | 0xb0 +----------------------------------+ | bl2 (256 KiB) | 0x2b0 +----------------------------------+ | dram_train (16 KiB) | 0x2d0 +----------------------------------+ | ect_test (50 KiB) | 0x334 +----------------------------------+ | acpm_test (130 KiB) | 0x438 +----------------------------------+ | bootloader (2 MiB) | 0x1438 +----------------------------------+ | el3_mon (256 KiB) | 0x1638 +----------------------------------+ where U-Boot should be flashed into 'bootloader' partition. So U-Boot binary size should be 2 MiB or less. The whole boot0 partition is 4 MiB, but only 2.8 MiB is currently used. With this change, the U-Boot binary can be updated on eMMC like this: => dfu 0 mmc 0 $ dfu-util -D u-boot.bin -a bootloader Looking at E850-96 booting diagram at [1,2], it's easy to see how these binaries are being executed in the same order they are placed in mmc0boot0 area. E.g. fwbl1 is definitely BL1 (software part of Boot ROM). So it's obvious the ROM code just reads the binary from eMMC at 0x0 offset into RAM (SRAM?) and executes it. All mentioned images can be found at [3], as stated in E850-96 U-Boot documentation. 'dram_train', 'ect_test' and 'acpm_test' areas should be ignored -- they are not flashed with real images. [1] doc/board/samsung/e850-96.rst [2] https://docs.u-boot.org/en/latest/board/samsung/e850-96.html [3] https://gitlab.com/Linaro/96boards/e850-96/images/-/tree/master/images Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-07-25board: samsung: e850-96: Setup serial# env varSam Protsenko
Setup "serial#" environment variable from the chip ID. The chip ID is read from Exynos850 SoC OTP (One Time Programmable) memory, which acts like an EEPROM and contains unique SoC ID. This "serial#" variable is further used for "fastboot devices" serial number, etc. Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-07-24treewide: Remove empty board_init() function from all boardsSam Protsenko
Commit 86acdce2ba88 ("common: add config for board_init() call") introduced CONFIG_BOARD_INIT option. This option can be disabled for the boards where board_init() function is not needed. Remove empty board_init() calls for all boards where it's possible, and disable CONFIG_BOARD_INIT in all related defconfigs. This cleanup was made semi-automatically using these scripts: [1]. No functional change, but the binary size for the modified boards is reduced a bit. [1] https://github.com/joe-skb7/uboot-convert-scripts/tree/master/remove-board-init Signed-off-by: Sam Protsenko <[email protected]> Tested-by: Adam Ford <[email protected]> #imx8mm_beacon Tested-by: Bryan Brattlof <[email protected]> Acked-by: Peng Fan <[email protected]> #NXP boards
2025-07-08Merge patch series "kbuild: Update Makefile.extrawarn to 5.1"Tom Rini
This series from Ilias Apalodimas <[email protected]> largely finishes the re-sync with the Linux Kernel v5.1 kbuild system. Link: https://lore.kernel.org/r/[email protected]
2025-07-08kbuild: Bump the build system to 5.1Ilias Apalodimas
Our last sync with the kernel was 5.1. Even that was a partial one as some patches from 4.x kernels were already missing making the transition to a modern kbuild infeasible. We are so out of sync now, that tracking the patches and backporting them one by one makes little sense and it's going to take ages. This is an attempt to sync up Makefile[.lib/.kbuild]. Unfortunately due to sheer amount of patches this is not easy to review, but that's what we decided during a community call. One of the biggest changes is get rid of partial linking entirely and build .a archives isntead of .o. We diaviate from the kernel on that. Instead of calling a custom script to create the archive symbol table, we call ar with rcTP (isntead of rcSTP) since we want a resulting archive that's sauble with the linker. The only affected platforms are PPC ones. Unfortunately I don't have any of them around to test, but the objdump of the resulting files -- arch/powerpc/lib/built-in.[oa] looks identical. Signed-off-by: Ilias Apalodimas <[email protected]>
2025-06-26mailmap: Update email for Duje MihanovićDuje Mihanović
I'm moving to a new address, so map my old one to it. Also update the MAINTAINERS entries. Signed-off-by: Duje Mihanović <[email protected]>
2025-06-22board: samsung: e850-96: Load LDFW in board_late_init()Sam Protsenko
As stated in 5e847f7729b3 ("efi_loader: call efi_init_early() earlier"): efi_init_early() creates an event hook for block device probing. It has to be called before any block device is probed. Indeed, efi_bl_init() registers EVT_DM_POST_PROBE event, which calls efi_disk_probe() whenever any block device is probed. And to make that hook work, the initialization of all block devices was put after efi_init_early() in initcall_run_r(): INITCALL(efi_init_early); INITCALL(initr_nand); INITCALL(initr_onenand); INITCALL(initr_mmc); Because LDFW firmware is being read from MMC, attempt to load LDFW in board_init() causes MMC driver to be probed. And because board_init() is executed before efi_init_early(), the hook mentioned above won't work for MMC devices anymore. So EFI disk objects won't be created, which in turn makes the EFI subsystem non-functional, showing next symptoms: - 'efidebug dh' output is empty - attempt to add boot devices in 'eficonfig' shows this message: "No block device found!" - 'bootefi selftest $fdtcontroladdr' shows this warning: "Cannot persist EFI variables without system partition" - booting GRUB with 'bootefi' runs minimal GRUB shell which doesn't see any block devices as well, probably because EFI vars weren't passed Load LDFW in board_late_init() instead, as it's called after efi_init_early(). This fixes the described problem and makes it possible to run EFI apps like GRUB correctly, add entries in 'eficonfig', and makes 'efivar --list' command in Linux rootfs actually show EFI variables. The only user of LDFW at the moment is the TRNG driver, and it's probed later, only when it's going to be used (e.g. on "rng" command). So it's fine to load LDFW in board_late_init(). Now the corresponding call order will look like this: efi_init_early() initr_mmc() mmc_probe() EVT_DM_POST_PROBE -> efi_disk_probe() board_late_init() load_ldfw() -> fs_read(), blk_dread() exynos_trng_probe() Fixes: ccfd8de541a8 ("board: samsung: e850-96: Report LDFW loading failures") Fixes: f04e58cc9788 ("board: samsung: e850-96: Load LDFW firmware on board init") Signed-off-by: Sam Protsenko <[email protected]>
2025-02-05board: samsung: e850-96: Provide bootstd default envSam Protsenko
Add default environment variables needed for Standard Boot enablement as described in [1]. Also rework the eMMC partition table for Linux boot so it only has two partitions: 1. EFI System Partition (EFI vars, GRUB efi app, firmware files) 2. rootfs partition (Debian rootfs, /boot, extlinux.conf, boot.scr) Both partitions are made bootable so that 'bootflow' command can detect all loader files (rootfs might contain extlinux.conf and boot.scr). 'ldfw' partition is removed too, as ldfw.bin can be loaded from ESP now (from /EFI/firmware/ldfw.bin). Android partitons will be added later, once Android boot is actually enabled for E850-96. Notes: - $kernel_comp_addr_r uses the same address (0x88000000) as LDFW buffer (in board/samsung/e850-96/fw.c), but that's fine, as LDFW will be copied to another RAM location (Secure World) by SMC command, so it's only used temporarily on startup - addition assignment (+=) operation is used for $partitions to avoid spaces added by newlines, so that $partitions can be used in the shell with no quotes Now it's possible to successfully automatically boot Debian rootfs: => env default -f -a => env save => gpt write mmc 0 $partitions => reset [1] doc/develop/bootstd/overview.rst Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-02-05board: samsung: e850-96: Report LDFW loading failuresSam Protsenko
LDFW firmware loading can fail, e.g. in case if user forgot to upload the binary to the appropriate location (/EFI/firmware/ldfw.bin on ESP partition). Report such errors explicitly, so that the user can notice it early and take necessary actions. But don't return error code from board_init() in this case, as LDFW firmware is not mandatory for board operation and is only required for some features like TRNG. Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-02-05board: samsung: e850-96: Load LDFW from EFI partitionSam Protsenko
In case when EFI System Partition is present it can be used to store firmware binaries, instead of keeping those on separate dedicated partitions. That simplifies the partition table and makes it more standard. Rework the firmware loader code to look for LDFW binary at /EFI/firmware/ldfw.bin on ESP first, and if either the partition or the file doesn't exist -- fallback to reading it from 'ldfw' partition. This way backward compatibility can be kept, and Android partition tables without ESP partition can be handled too. Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2025-01-28board: samsung: add initial support for coreprimevelte boardDuje Mihanović
Samsung Galaxy Core Prime VE LTE is an entry-level PXA1908-based smartphone. It has 1GB of DRAM, 8GB eMMC and USB connectivity. Signed-off-by: Duje Mihanović <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2024-10-11Merge patch series "Tidy up use of 'SPL' and CONFIG_SPL_BUILD"Tom Rini
Simon Glass <[email protected]> says: When the SPL build-phase was first created it was designed to solve a particular problem (the need to init SDRAM so that U-Boot proper could be loaded). It has since expanded to become an important part of U-Boot, with three phases now present: TPL, VPL and SPL Due to this history, the term 'SPL' is used to mean both a particular phase (the one before U-Boot proper) and all the non-proper phases. This has become confusing. For a similar reason CONFIG_SPL_BUILD is set to 'y' for all 'SPL' phases, not just SPL. So code which can only be compiled for actual SPL, for example, must use something like this: #if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD) In Makefiles we have similar issues. SPL_ has been used as a variable which expands to either SPL_ or nothing, to chose between options like CONFIG_BLK and CONFIG_SPL_BLK. When TPL appeared, a new SPL_TPL variable was created which expanded to 'SPL_', 'TPL_' or nothing. Later it was updated to support 'VPL_' as well. This series starts a change in terminology and usage to resolve the above issues: - The word 'xPL' is used instead of 'SPL' to mean a non-proper build - A new CONFIG_XPL_BUILD define indicates that the current build is an 'xPL' build - The existing CONFIG_SPL_BUILD is changed to mean SPL; it is not now defined for TPL and VPL phases - The existing SPL_ Makefile variable is renamed to SPL_ - The existing SPL_TPL Makefile variable is renamed to PHASE_ It should be noted that xpl_phase() can generally be used instead of the above CONFIGs without a code-space or run-time penalty. This series does not attempt to convert all of U-Boot to use this new terminology but it makes a start. In particular, renaming spl.h and common/spl seems like a bridge too far at this point. The series is fully bisectable. It has also been checked to ensure there are no code-size changes on any commit.
2024-10-11board: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILDSimon Glass
Use the new symbol to refer to any 'SPL' build, including TPL and VPL Signed-off-by: Simon Glass <[email protected]>
2024-09-30power: regulator: Drop regulators_enable_boot_on/off()Marek Vasut
Both regulators_enable_boot_on/off() are unused and superseded by regulator uclass regulator_post_probe(). Remove both functions. Signed-off-by: Marek Vasut <[email protected]>
2024-07-24board: samsung: e850-96: Load LDFW firmware on board initSam Protsenko
LDFW is a Loadable Firmware which provides additional security capabilities in EL3 monitor. For example, True Random Number Generator (TRNG) block registers can't be accessed from EL1 (where U-Boot and Linux kernel are running), but it's possible to access TRNG capabilities via corresponding SMC calls, which in turn are handled by LDFW. To do so, LDFW firmware has to be loaded first. It's stored on a raw eMMC partition, so it has to be read into NWD (Normal World) RAM buffer, and then loaded to SWD (Secure World) memory using the special SMC call to EL3 monitor program. EL3_MON will load LDFW to SWD memory, more specifically to the area starting at 0xbf700000 (with size of 7.5 MiB). That memory area is reserved in device tree, so there shouldn't be any collisions. After that LDFW becomes functional. Implement LDFW firmware loading on board init. While at it, fix the copyright date in header comments, as this board support was actually added in 2024, not in 2020: it was probably a copy-paste mistake. Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2024-07-24board: samsung: e850-96: Add default partitionsSam Protsenko
Add an environment file for E850-96 board with default eMMC partition list. It follows the Samsung's partition list used for Android-Q on Exynos850 devices. It was verified on E850-96 board with: => gpt verify mmc 0 "$partitions" Verify GPT: success! Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2024-07-15odroid: Fix target platform compilation issue on Odroid-XU3Anand Moon
Resolved a compilation issue where the build system attempted to compile for the Odroid-XU3 platform instead of the specified Exynos4412 platform due to an incorrect CONFIG_SYS_BOARD setting. Updated the Makefile to ensure that compilation only occurs for the Odroid-XU3 specified target platform. Now, object files will be generated only when building for the TARGET_ODROID platform. Signed-off-by: Anand Moon <[email protected]> Reviewed-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2024-07-15dm: exynos: Correct CONFIG_SYS_BOARD setting for Odroid XU3 boardsAnand Moon
Fix the issue where CONFIG_SYS_BOARD was incorrectly set on Odroid XU3 boards, causing boot failure. This was resolved by correcting the SYS_BOARD entry in Kconfig to load the correct device tree source (dts) for the Odroid Exynos5422 Platforms. Fixes: f76750d11133 ("Convert CONFIG_CONS_INDEX et al to Kconfig") Signed-off-by: Anand Moon <[email protected]> Reviewed-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2024-06-07arm: move _end to linker symbolsIlias Apalodimas
commit 6e2228fb052b ("Merge patch series "Clean up arm linker scripts") was cleaning up linker scripts for armv7 and v8 but was leaving _end and __secure_stack_start/end. commit d0b5d9da5de2 ("arm: make _end compiler-generated") was moving _end to be compiler generated. _end is defined as c variable in its own section to force the compiler emit relative a reference. However, defining those in the linker script will do the same thing since [0]. So let's remove the special sections from the linker scripts, the variable definitions from sections.c and define them as a symbols. It's worth noting that _image_binary_end symbol is now redundant and can be removed in the future. - SPL The .end section has been removed from the new binary [ 5] .end PROGBITS 00000000fffdf488 000000000002f488 0 0000000000000000 0000000000000000 0 1 [0000000000000003]: WRITE, ALLOC $~ bloat-o-meter kria_old/spl/u-boot-spl krina_new/spl/u-boot-spl add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0 (0) Function old new delta Total: Before=115980, After=115980, chg +0.00% $~ readelf -sW kria_old/u-boot kria_new/u-boot | grep -w _end 12047: 000000000813a0f0 0 OBJECT GLOBAL DEFAULT 11 _end 12047: 000000000813a118 0 NOTYPE GLOBAL DEFAULT 11 _end $~ readelf -sW kria_old/spl/u-boot-spl kria_new/spl/u-boot-spl | grep -w _end 1605: 00000000fffdf488 0 OBJECT GLOBAL DEFAULT 5 _end 1603: 00000000fffdf498 0 NOTYPE GLOBAL DEFAULT 4 _end $~ readelf -sW old/u-boot new/u-boot | grep -w _end 8847: 0000000000103710 0 OBJECT GLOBAL DEFAULT 11 _end 8847: 0000000000103738 0 NOTYPE GLOBAL DEFAULT 11 _end $~ readelf -sW old_v7/u-boot new_v7/u-boot | grep -w _end 10638: 000da824 0 OBJECT GLOBAL DEFAULT 10 _end 10637: 000da84c 0 NOTYPE GLOBAL DEFAULT 10 _end - For both QEMU instances $~ bloat-o-meter old/u-boot new/u-boot add/remove: 0/0 grow/shrink: 1/0 up/down: 20/0 (20) Function old new delta version_string 50 70 +20 Total: Before=656915, After=656935, chg +0.00% [0] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object") Signed-off-by: Ilias Apalodimas <[email protected]>