summaryrefslogtreecommitdiff
path: root/include/configs/stm32mp1.h
AgeCommit message (Collapse)Author
2020-05-14board: stm32mp1: support boot from spi-nandPatrick Delaunay
Manage BOOT_FLASH_SPINAND, with boot_device="spi-nand" and treat this value in bootcmd_stm32mp. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-05-14board: stm32mp1: reserve memory for OP-TEE in device treePatrick Delaunay
Add reserve memory for OP-TEE in U-Boot and in kernel device tree: - no more reduce the DDR size in "memory" node: CONFIG_SYS_MEM_TOP_HIDE is no more used - U-Boot device-tree defines the needed "reserved-memory" for OP-TEE and U-Boot should not use this reserved memory: board_get_usable_ram_top use lmb lib to found the first free region, the not reserved memory, enough to relocate U-Boot: the needed size of U-Boot is estimated with gd->mon_len + CONFIG_SYS_MALLOC_LEN. - the optee node ("optee@...": firmware with compatible "linaro,optee-tz") and the associated "reserved-memory" are deactivated in kernel device tree when OP-TEE is not detected by U-Boot to prevent kernel issue (memory is reserved but not used, optee driver probe failed). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-05-14stm32mp1: move MTDPART configuration in KconfigPatrick Delaunay
This patch reduces the stm32mp1 environment size and builds dynamically the MTD partitions with information from defconfig (CONFIG_MTDPARTS_...). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-05-14stm32mp1: dynamically build DFU_ALT_INFOPatrick Delaunay
This patch reduces the stm32mp1 environment size and builds dynamically the DFU board configuration with gpt and mtd partitions and information from defconfig (CONFIG_DFU_ALT_RAM0). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-05-08treewide: mem: Move mtest related defines to KconfigAshok Reddy Soma
Move below defines which are used by mtest utility to Kconfig. CONFIG_SYS_MEMTEST_START CONFIG_SYS_MEMTEST_END Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> [trini: Fix kmcoge5ne board, re-run migration as well] Signed-off-by: Tom Rini <trini@konsulko.com>
2020-05-08cmd: mem: Remove CONFIG_SYS_MEMTEST_SCRATCH mappingMichal Simek
There is no real need to exactly define space for saving patterns for alternate memory test. It is much easier to allocate space on the stack and use it instead of trying to find out space where pattern should be saved. For example if you want to test the whole DDR memory you can't save patter to DDR and you need to find it out. On Xilinx devices DDR or OCM addresses were chosen but that means that OCM needs to be mapped and U-Boot has access permission there. It is easier to remove this limitation and simply save it on stack because it is very clear that memory test can't rewrite U-Boot and U-Boot has also full access to memory where runs from. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
2020-05-08configs: migrate CONFIG_SYS_MTDPARTS_RUNTIME to defconfigsPatrick Delaunay
Move CONFIG_SYS_MTDPARTS_RUNTIME into Kconfig done by moveconfig.py. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-05-08configs: migrate CONFIG_SET_DFU_ALT_INFO to defconfigsPatrick Delaunay
Move CONFIG_SET_DFU_ALT_INFO into Kconfig done by moveconfig.py. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Acked-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-04-15configs: stm32mp1: replace STM32MP1_TRUSTED by TFABOOTPatrick Delaunay
Activate ARCH_SUPPORT_TFABOOT and replace the arch stm32mp specific config CONFIG_STM32MP1_TRUSTED by the generic CONFIG_TFABOOT introduced by the commit 535d76a12150 ("armv8: layerscape: Add TFABOOT support"). This config CONFIG_TFABOOT is activated for the trusted boot chain, when U-Boot is loaded by TF-A. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-02-13stm32mp1: remove fdt_high and initrd_high in environmentPatrick Delaunay
Remove fdt_high and initrd_high (set to 0xffffffff) in stm32mp1 board enviromnent, and U-Boot always relocate FDT and initrd in bootm command. This relocation is limited by CONFIG_SYS_BOOTMAPSZ which indicates the size of the memory region where it is safe to place data passed to the Linux kernel (DTB, initrd), it is a) Less than or equal to RAM size. b) not within the kernel's highmem region So 256M seems large enough in most circumstances and users can override this value via environment variable "bootm_mapsize" if needed. This modification increases the boot time but avoid assumption on aligned address for bootm command. A user can still define this variables themselves if the FDT or initrd is either left in-place or copied to a specific location. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2020-01-17ARM: stm32: Fill in missing loadaddrMarek Vasut
Since CONFIG_LOADADDR is not set, the default value of $loadaddr variable is not set in the environment either. Set the default load address to 32 MiB from the start of DRAM (same value than kernel_addr_r). Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2020-01-17stm32mp1: configs: Make all boot devices in distro boot conditionalMarek Vasut
Not all systems have all the boot devices enabled, e.g. not all systems have MTD devices and thus do not enable UBI. Make all the boot devices in the distro bootcmd conditional to avoid failures. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrick Delaunay <patrick.delaunay@st.com> Cc: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-11-26stm32mp1: board: add spi nand supportPatrick Delaunay
This patch adds the support of the spi nand device in mtdparts command and in dfu_alt_info. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2019-11-26stm32mp1: activate SET_DFU_ALT_INFOPatrick Delaunay
Generate automatically dfu_alt_info for the supported device. The simple command "dfu 0" allows to start the dfu stack on usb 0 for the supported devices: - dfu mtd for nand0 - dfu mtd for nor0 - dfu mmc for SDCard - dfu mmc for eMMC - dfu ram for images in DDR The DUF alternate use the "part", "partubi" and "mmcpart" options to select the correct MTD or GPT partition or the eMMC hw boot partition. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2019-10-13stm32mp1: configs: update videoYannick Fertré
Update video configs to support bitmap 16bpp, 24bpp, 32bpp & RLE8. Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-08-27stm32mp1: configs: Set bootdelay to 1Patrice Chotard
This allows to display splashcreen without waiting an extra delay of 2 seconds due to default value of bootdelay. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27stm32mp1: configs: add altbootcmdPatrick Delaunay
Add altbootcmad as it is used for - bootcountlimit - in mach-stm32mp/cpu.c for BOOT_RECOVERY mode Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27stm32mp1: configs: support MTDPARTS only if neededPatrick Delaunay
MTD is only use if NAND or NOR driver is activated. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27stm32mp1: configs: remove CONFIG_SYS_HZPatrick Delaunay
Use the default value from lib/Kconfig. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27stm32mp1: cosmetic: remove commentPatrick Delaunay
Remove unnecessary comment. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: Add UBIFS boot capabilityPatrick Delaunay
Add support for boot from NAND in generic ditribution command. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: add configuration op-teePatrick Delaunay
Add support of Trusted boot chain with OP-TEE - reserved 32MB at the end of the DDR for OP-TEE Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: reorder some CONFIG in stm32mp1.hPatrick Delaunay
Change config not directly linked to CONFIG_DISTRO_DEFAULTS. Allow to deactivate CONFIG_SYS_MTDPARTS_RUNTIME when CONFIG_MTDPARTS_DEFAULT is defined in defconfig. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: force boot_net_usb_startPatrick Delaunay
Prevent USB enumeration and avoid unnecessary delay in bootcmd_pxe as Ethernet device is not attached to USB. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: add check for presence of environment in boot devicePatrick Delaunay
For boot from flash, check presence of default environment to force save env. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Tested-by: Pierre-Jean Texier <pjtexier@koncepto.io>
2019-07-12stm32mp1: move CONFIG_ENV in KconfigPatrick Delaunay
Move 2 ENV configuration flags in board Kconfig - CONFIG_ENV_SECT_SIZE - CONFIG_ENV_OFFSET Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-09env: ubi: KConfig: add CONFIG_ENV_UBI_VOLUME_REDUNDMarkus Klotzbuecher
Introduce the KConfig option CONFIG_ENV_UBI_VOLUME_REDUND for defining the name of the UBI volume used to store the redundant environment. Signed-off-by: Markus Klotzbuecher <markus.klotzbuecher@kistler.com> Reviewed-by: Heiko Schocher <hs@denx.de> Cc: Kyungmin Park <kmpark@infradead.org> hs: get rid of stm32mp1* build errors
2019-06-06stm32mp1: Add Ethernet support for stm32mp1 boardChristophe Roullier
Add default SERVERIP address Enable noncached memory region required by ethernet driver Add PXE support Signed-off-by: Christophe Roullier <christophe.roullier@st.com>
2019-06-06configs: stm32mp15: Enable ENV_IS_SPI_FLASHPatrice Chotard
Add all relative flags needed by ENV_IS_IN_SPI_FLASH Reserved a 256KB partition in NOR to save the U-Boot environment. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-06-06configs: stm32mp15: Enable ENV_IS_IN_UBIPatrice Chotard
Add all relative flags needed by ENV_IS_IN_UBI Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-06-06stm32mp1: support dynamic MTDPARTSPatrice Chotard
This patch configure the default value for mtdids and mtparts dynamically according the presence of nor and nand in the board device tree Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-06-06stm32mp1: activate NAND and NOR support on EV1Patrick Delaunay
Add the necessary configuration to have NAND and NOR support on ev1 board for BASIC boot (with SPL) or for TRUSTED boot (with TF-A). STM32MP> nand info Device 0: nand0, sector size 256 KiB Page size 4096 b OOB size 224 b Erase size 262144 b subpagesize 4096 b options 0x00184200 bbt options 0x00060000 STM32MP> sf probe SF: Detected mx66l51235l with page size 256 Bytes, erase size 64 KiB, total 64 MiB Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-05-23stm32mp1: migrate PREBOOT to KconfigPatrick Delaunay
Use Kconfig to activate CONFIG_PREBOOT (empty by default). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-05-23stm32mp1: Move ENV_SIZE and ENV_OFFSET to KconfigPatrick Delaunay
Add arch stm32mp for ENV migration step and drop more items from include/configs/xxx.h. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-05-23stm32mp1: Move config SYS_MALLOC_LEN to KconfigPatrick Delaunay
This patch moves the the config SYS_MALLOC_LEN to Kconfig as it is already done for zynq arch in commit 01aa5b8f0503 ("Kconfig: Move config SYS_MALLOC_LEN to Kconfig for zynq") Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-05-04Convert CONFIG_SUPPORT_EMMC_BOOT to KconfigAlex Kiernan
This converts the following to Kconfig: CONFIG_SUPPORT_EMMC_BOOT As requested by Michal Simek <michal.simek@xilinx.com>, these boards have no eMMC so CONFIG_SUPPORT_EMMC_BOOT has not been migrated: xilinx_zynqmp_zc1275_revB xilinx_zynqmp_zc1751_xm018_dc4 xilinx_zynqmp_zc1751_xm019_dc5 xilinx_zynqmp_zcu100_revC xilinx_zynqmp_zcu102_rev1_0 xilinx_zynqmp_zcu102_revA xilinx_zynqmp_zcu102_revB xilinx_zynqmp_zcu104_revA xilinx_zynqmp_zcu104_revC xilinx_zynqmp_zcu106_revA xilinx_zynqmp_zcu111_revA Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Acked-by: Lukasz Majewski <lukma@denx.de> Acked-by: Patrick Delaunay <patrick.delaunay@st.com> Acked-by: Ramon Fried <ramon.fried@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
2019-04-29configs: move CONFIG_SPL_TEXT_BASE to KconfigSimon Goldschmidt
Moved CONFIG_SPL_TEXT_BASE to common/spl/Kconfig and migrate existing values. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> [trini: Re-run migration] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-04-12stm32mp1: activated some configurationPatrick Delaunay
Add configuration useful for test - FIT support - MEMTEST - DFU - CACHE - TIME - TIMER Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-04-12stm32mp1: update memory layoutPatrick Delaunay
Update the memory layout to be aligned with other platform and avoid overlap with 32MB Linux kernel (multiv7 image). + Kernel => 32MiB offset = 0xC2000000 and increase the bootm size to 32MiB + FDT => 64MiB offset = 0xc4000000 + SCRIPT => 65Mib offset = 0xc4100000 + PXESCRIPT => 66Mib offset = 0xc4200000 + SPLASHIMAGE => 67Mib offset = 0xc4300000 + RAMDISK => 68Mib offset = 0xc4400000 (not limited size) In sources/boot/u-boot/doc/README.distro + kernel_addr_r: A size of 16MB for the kernel is likely adequate. + pxefile_addr_r: A size of 1MB for extlinux.conf is more than adequate. + fdt_addr_r: A size of 1MB for the FDT/DTB seems reasonable. + ramdisk_addr_r: It is recommended that this location be highest in RAM out of fdt_addr_, kernel_addr_r, and ramdisk_addr_r, so that the RAM disk can vary in size and use any available RAM. + pxefile_addr_r: A size of 1MB for extlinux.conf is more than adequate. + scriptaddr: A size of 1MB for extlinux.conf is more than adequate. For suggestions on memory locations for ARM systems, you must follow the guidelines specified in Documentation/arm/Booting in the Linux kernel tree. And in sources/linux-stm32mp/Documentation/arm/Booting The zImage may also be placed in system RAM and called there. The kernel should be placed in the first 128MiB of RAM. It is recommended that it is loaded above 32MiB in order to avoid the need to relocate prior to decompression, which will make the boot process slightly faster. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-04-12stm32mp1: update bootcmdPatrick Delaunay
Clearly separate bootcmd for stm32mp1 board (bootcmd_stm32mp) and preboot management. That solve issue for fastboot continue command. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-04-12stm32mp1: add trusted boot with TF-APatrick Delaunay
Add support of trusted boot, using TF-A as first stage bootloader, The boot sequence is BootRom >=> TF-A.stm32 (clock & DDR) >=> U-Boot.stm32 The TF-A monitor provides secure monitor with support of SMC - proprietary to manage secure devices (BSEC for example) - PSCI for power The same device tree is used for STMicroelectronics boards with basic boot and with trusted boot. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-08-16configs: Migrate CONFIG_NR_DRAM_BANKSTom Rini
We have the following cases: - CONFIG_NR_DRAM_BANKS was defined, migrate normally - CONFIG_NR_DRAM_BANKS_MAX was defined and then used for CONFIG_NR_DRAM_BANKS after a check, just migrate it over now. - CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 + 2), set this to 8. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-05-07arm: stm32mp1: add PSCI supportPatrick Delaunay
Add PSCI v1.0 support for Linux and manage PSCI state for each CPU (affinity 0 level) with all mandatory functions: - PSCI_VERSION - CPU_SUSPEND - CPU_OFF - CPU_ON - AFFINITY_INFO - SYSTEM_OFF - SYSTEM_RESET - PSCI_FEATURES and 1 optional to avoid Linux warning - MIGRATE_INFO_TYPE Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: CITOOLS <smet-aci-reviews@lists.codex.cro.st.com>
2018-05-07SPDX: Convert all of our multiple license tags to Linux Kernel styleTom Rini
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have multiple licenses (in these cases, dual license) declared in the SPDX-License-Identifier tag. In this case we change from listing "LICENSE-A LICENSE-B" or "LICENSE-A or LICENSE-B" or "(LICENSE-A OR LICENSE-B)" to "LICENSE-A OR LICENSE-B" as per the Linux Kernel style document. Note that parenthesis are allowed so when they were used before we continue to use them. Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-28arm: move SYS_ARCH_TIMER to KConfigAndre Przywara
SYS_ARCH_TIMER guards the usage of the ARM Generic Timer (aka arch timer) in U-Boot. At the moment it is mandatory for ARMv8 and used by a few ARMv7 boards. Add a proper Kconfig symbol to express this dependency properly, allowing certain board configuration to later disable arch timer in case there are any problems with it. Signed-off-by: Andre Przywara <andre.przywara@arm.com> [tuomas: rebase + fix conflicts and resync with moveconfig & use select] Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2018-04-06stm32mp1: change STGEN clock source to HSEPatrick Delaunay
No more use static frequency HSI = 64MHz for STGEN clock but HSE (with higher accurency) by default. Need to remove CONFIG_SYS_HZ_CLOCK as arch timer frequency is provided at boot by BootRom and cp15 cntfrq and modified during clock tree initialization if needed. When HSI is no more used by any device, this internal oscillator can be switched off to reduce consumption. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-04-06stm32mp1: select boot device and partitionPatrick Delaunay
Bootrom loads SPL from SDCARD or eMMC according BootPin selection. Then SPL loads U-Boot on the same mmc device with the following predefined GPT partitioning: on SDCARD: gpt partitioning 1: SPL 2: SPL#2 3: U-Boot 4: bootable partition on eMMC: The 2 boot partitions are used for SPL (2 copy) boot1: SPL boot2: SPL#2 The user partition use gpt partitioning 1: U-Boot 2: bootable partition This patch select the correct SPL partition (3 for SDCARD on mmc0 and 1 for eMMC on mmc1) according the BootRom information saved in TAMP register and based on configuration flasg: - CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION => for BOOT_DEVICE_MMC1 or mmc 0 in U-Boot - CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_MMC2 (new) => for BOOT_DEVICE_MMC2 or mmc 1 in U-Boot And the correct boot_targets is selected according the environment variables boot_device and boot_instance, with preboot command, to search the bootable partition with kernel on this device (generic distro support). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-04-06stm32mp1: add eMMC support for ED1Patrick Delaunay
Add command GPT support Add EMMC boot support Add the 2 other SDMMC instances for ED1: - SDMMC2 = mmc 1, eMMC on the ED1 board - SDMMC3 = extension connector, deactivated by default Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-19board: st: add generic board for STM32MP1 familyPatrick Delaunay
Add first support for STM32MP157C-ED1 board with "Basic" boot chain 1/ Boot Rom: load SPL with STM32 image header in SYSRAM 2/ SPL: power up and initialize the DDR and load U-Boot image from SDCARD in DDR 3/ U-Boot: search and load extlinux.conf in SDCARD (DISTRO activated) Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>