aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-07-12mmc: stm32_sdmmc2: avoid warnings when building with W=1 optionPatrick Delaunay
This patch solves warnings detected by setting W=1 when building. Warnings type detected: - [-Wmissing-prototypes] - [-Wimplicit-fallthrough=] Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12serial: stm32: Fix warnings when compiling with W=1Patrick Delaunay
This patch solves the following warnings: drivers/serial/serial_stm32.c: In function 'stm32_serial_probe': warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if (plat->clock_rate < 0) { ^ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12board: stm32mp1: Fix warnings when compiling with W=1Patrick Delaunay
This patch solves the following warnings: warning: no previous prototype for 'board_quiesce_devices' [-Wmissing-prototypes] void board_quiesce_devices(void) ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: Fix warnings when compiling with W=1Patrick Delaunay
This patch solves the following warnings: arch/arm/mach-stm32mp/cpu.c:378:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (instance > ARRAY_SIZE(serial_addr)) ^ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12MAINTAINERS: Add git custodians for ARM STM STM32MP entryPatrice Chotard
Add git custodians for STMicroelectronics STM32MP entry. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-07-12stm32mp1: add SPI flash support in SPLPatrick Delaunay
Allow boot from NOR with basic boot. 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: activate OF_BOARD_SETUP and FDT_FIXUP_PARTITIONSPatrick Delaunay
Update kernel MTD partition in device tree with U-Boot information. 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-12pmic: stpmic1: add support for SYSRESET_POWER_OFFPatrick Delaunay
Adds support for SYSRESET_POWER_OFF = PMIC power off used by command power off and introduced by commit 751fed426f87 ("sysreset: Add a way to find the last reset"). The driver use SYSRESET_POWER for the PMIC-level power cycle, with restart. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12ARM: dts: stm32mp1: sync device tree with v5.2-rc4Patrick Delaunay
Synchronize device tree with v5.2-rc4 label and update the associated u-boot dtsi. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Tested-by: Pierre-Jean Texier <pjtexier@koncepto.io>
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: configs: Add CONFIG_OF_SPL_REMOVE_PROPSPatrick Delaunay
Removes unused device tree property in SPL to reduce the SPL size by 1kB Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: cosmetic: remove unnecessary includePatrick Delaunay
Remove post.h include as it is used in spl.c Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: update READMEPatrick Delaunay
Add latest information and correct some information. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: key: add stm32key commandPatrick Delaunay
Add dedicated command to register in fuse a public hash key provided by keygen tool. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: add stboard commandPatrick Delaunay
Allow to update board identification in OTP 59. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: update device tree with ETZPC statusPatrick Delaunay
U-Boot should disable nodes in device tree if needed according ETZPC status in ft_system_setup(). ETZPC itself use an array on addresses to do the match between the status bits and the node. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: update package information in device treePatrick Delaunay
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: export get_cpu_package functionPatrick Delaunay
Prepare update of package information update in Linux device tree. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12dt-bindings: pinctrl: stm32: add new entry for package informationPatrick Delaunay
Add "st,package" entry. Possibles values are: -STM32MP_PKG_AA for LFBGA448 (18*18) package -STM32MP_PKG_AB for LFBGA354 (16*16) package -STM32MP_PKG_AC for TFBGA361 (12*12) package -STM32MP_PKG_AD for TFBGA257 (10*10) package see Linux commit 966d9b928f626a54a0c27c0fdae1e3dfe9bab416 for v5.2-rc1 Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: syscon: remove stgenPatrick Delaunay
Reduce difference with kernel Linux device tree. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: syscon: remove etzpc supportPatrick Delaunay
Support for ETZPC is removed as this device is not present in Linux kernel device tree. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: call regulators_enable_boot_on in board_initPatrick Delaunay
U-Boot activates regulators by reading the "regulator-boot-on" property in DT; it is requested by M4 early Boot feature. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: deactivate WATCHDOG in defconfigPatrick Delaunay
Deactivate WATCHDOG by default in u-boot to avoid issue to boot kernel and rootfs without the needed daemon to reload it. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Tested-by: Pierre-Jean Texier <pjtexier@koncepto.io>
2019-07-12sysreset: syscon: add support for power offPatrick Delaunay
The new type sysreset 'POWER_OFF', introduced by commit 751fed426f87 ("sysreset: Add a way to find the last reset") is only supported for "syscon-poweroff" compatible. For details see Linux binding: ./Documentation/devicetree/bindings/power/reset/syscon-poweroff.txt This patch removes the support of POWER_OFF for "syscon-reboot" and keeps only the COLD reset (for command reset support) and it introduces the compatible "syscon-poweroff" for the POWER_OFF case. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
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-12ARM: dts: stm32: Add ipcc mailbox support on stm32mp1Fabien Dessenne
Add IPCC mailbox support on stm32mp157 eval and disco boards. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2019-07-12configs: stm32mp15: enable IPCC mailboxFabien Dessenne
Activate the ipcc mailbox for stm32mp15 configs. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2019-07-12MAINTAINERS: Add stm32 mailbox IPPC driverFabien Dessenne
Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2019-07-12mailbox: introduce stm32-ipcc driverFabien Dessenne
On STM32 family, the IPCC peripheral allows the communication between 2 processors offering doorbells mechanism. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Signed-off-by: Loic Pallardy <loic.pallardy@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2019-07-11Merge branch '2019-07-11-master-imports'Tom Rini
- spear platform improvements - Android BCB support - Cadence PCIe endpoint driver
2019-07-11gpio: pca953x: Add TI TCA9539 compatible stringMarek Vasut
Add TI TCA9539 compatible string for yet another I2C GPIO expander. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Mario Six <mario.six@gdsys.cc> Cc: Peng Fan <van.freenix@gmail.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-07-11arm: mach-omap2: am33xx: Init pinmux before clockMarek Vasut
The board_early_init_f() inits clock before initing pinmux. However, the clock configuration code might need to adjust PMIC settings of a PMIC on I2C bus (e.g. board/ti/am335x/board.c does that). If the I2C bus pin muxing is not configured before attempting to communicate with the PMIC, the communication will silently fail and the prcm_init() may configure fast enough CPU clock that the default voltage provided by the PMIC would be insufficient and the platform would become unstable. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Jean-Jacques Hiblot <jjhiblot@ti.com> Cc: Tom Rini <trini@konsulko.com>
2019-07-11doc: relocate/rename Android README and add BCB overviewEugeniu Rosca
Rename: - doc/{README.avb2 => android/avb2.txt} - doc/{README.android-fastboot => android/fastboot.txt} Add a new file documenting the 'bcb' command: - doc/android/bcb.txt The new directory structure has been reviewed by Simon in https://patchwork.ozlabs.org/patch/1101107/#2176031 . Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-07-11cmd: Add 'bcb' command to read/modify/write BCB fieldsEugeniu Rosca
'Bootloader Control Block' (BCB) is a well established term/acronym in the Android namespace which refers to a location in a dedicated raw (i.e. FS-unaware) flash (e.g. eMMC) partition, usually called "misc", which is used as media for exchanging messages between Android userspace (particularly recovery [1]) and an Android-capable bootloader. On higher level, this allows implementing a subset of Android Bootloader Requirements [2], amongst which is the Android-specific bootloader flow [3]. Regardless how the latter is implemented in U-Boot ([3] being the most memorable example), reading/writing/dumping the BCB fields in the development process from inside the U-Boot is a convenient feature. Hence, make it available to the users. Some usage examples of the new command recorded on R-Car H3ULCB-KF ('>>>' is an overlay on top of the original console output): => bcb bcb - Load/set/clear/test/dump/store Android BCB fields Usage: bcb load <dev> <part> - load BCB from mmc <dev>:<part> bcb set <field> <val> - set BCB <field> to <val> bcb clear [<field>] - clear BCB <field> or all fields bcb test <field> <op> <val> - test BCB <field> against <val> bcb dump <field> - dump BCB <field> bcb store - store BCB back to mmc Legend: <dev> - MMC device index containing the BCB partition <part> - MMC partition index or name containing the BCB <field> - one of {command,status,recovery,stage,reserved} <op> - the binary operator used in 'bcb test': '=' returns true if <val> matches the string stored in <field> '~' returns true if <val> matches a subset of <field>'s string <val> - string/text provided as input to bcb {set,test} NOTE: any ':' character in <val> will be replaced by line feed during 'bcb set' and used as separator by upper layers => bcb dump command Error: Please, load BCB first! >>> Users must specify mmc device and partition before any other call => bcb load 1 misc => bcb load 1 1 >>> The two calls are equivalent (assuming "misc" has index 1) => bcb dump command 00000000: 62 6f 6f 74 6f 6e 63 65 2d 73 68 65 6c 6c 00 72 bootonce-shell.r 00000010: 79 00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 y.r............. >>> The output is in binary/string format for convenience >>> The output size matches the size of inspected BCB field >>> (32 bytes in case of 'command') => bcb test command = bootonce-shell && echo true true => bcb test command = bootonce-shell- && echo true => bcb test command = bootonce-shel && echo true >>> The '=' operator returns 'true' on perfect match => bcb test command ~ bootonce-shel && echo true true => bcb test command ~ bootonce-shell && echo true true >>> The '~' operator returns 'true' on substring match => bcb set command recovery => bcb dump command 00000000: 72 65 63 6f 76 65 72 79 00 73 68 65 6c 6c 00 72 recovery.shell.r 00000010: 79 00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 y.r............. >>> The new value is NULL-terminated and stored in the BCB field => bcb set recovery "msg1:msg2:msg3" => bcb dump recovery 00000040: 6d 73 67 31 0a 6d 73 67 32 0a 6d 73 67 33 00 00 msg1.msg2.msg3.. 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ >>> --- snip --- >>> Every ':' is replaced by line-feed '\n' (0xA). The latter is used >>> as separator between individual commands by Android userspace => bcb store >>> Flush/store the BCB structure to MMC [1] https://android.googlesource.com/platform/bootable/recovery [2] https://source.android.com/devices/bootloader [3] https://patchwork.ozlabs.org/patch/746835/ ("[U-Boot,5/6] Initial support for the Android Bootloader flow") Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
2019-07-11include: android_bootloader_message.h: Minimize the diff to AOSPEugeniu Rosca
Perform the following updates: - Relocate the commit id from the file to the description of U-Boot commit. The AOSP commit is c784ce50e8c10eaf70e1f97e24e8324aef45faf5. This is done to avoid stale references in the file itself. The reasoning is in https://patchwork.ozlabs.org/patch/1098056/#2170209. - Minimize the diff to AOSP, to decrease the effort of the next AOSP backports. The background can be found in: https://patchwork.ozlabs.org/patch/1080394/#2168454. - Guard the static_assert() calls by #ifndef __UBOOT__ ... #endif, to avoid compilation failures of files including the header. Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-07-11SPL: Default to disabling legacy image support when using FITTom Rini
When we have a FIT image being used by SPL by default that means the most common case is that we'll never run into a legacy image. Disable legacy image support by default in that case to reclaim space. Signed-off-by: Tom Rini <trini@konsulko.com>
2019-07-11configs: Rename CONFIG_IMAGE_FORMAT_LEGACY to CONFIG_LEGACY_IMAGE_FORMATTom Rini
The name CONFIG_LEGACY_IMAGE_FORMAT reads slightly better along with allowing us to avoid a rather nasty Kbuild/Kconfig issue down the line with CONFIG_IS_ENABLED(IMAGE_FORMAT_LEGACY). In a few places outside of cmd/ switch to using CONFIG_IS_ENABLED() to test what is set. Signed-off-by: Tom Rini <trini@konsulko.com>
2019-07-11tpm: wait for valid statusRoman Kapl
The TPM specification says that the EXPECT_DATA bit is not valid until the VALID bit is set. Wait for that bit to be set. Fixes problems with Ifineon SPI TPM. Signed-off-by: Roman Kapl <rka@sysgo.com>
2019-07-11arm: spear: Return to BootROM if failing to boot from the main deviceMiquel Raynal
Overload the weak function board_boot_order() so that besides choosing the main boot device, we can fallback on USB boot by returning in the BootROM, eg. if the NOR flash is empty while it was the primary boot medium. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de>
2019-07-11arm: spear: Do not link the _main branchMiquel Raynal
The _main call is not supposed to return at all: don't link the branch. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de>
2019-07-11arm: spear: Support returning to BootROMMiquel Raynal
Implement the weak board_return_to_bootrom() function so that when enabling the spl_bootrom.c driver, one can make use of usbboot on spear platforms. All necessary information to return to the BootROM are stored in the BootROM's stack. The SPL stack pointer is reset so we save the BootROM's stack pointer into the SPL .data section. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de>
2019-07-11arm: spear: Simplify start.S organizationMiquel Raynal
There is no reason to do the few spear-related initialization, in a different procedure than 'reset'. Spare one branching and get a linear code flow by removing this indirection. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de>
2019-07-11arm: spear: Reference the link register with LR instead of R14Miquel Raynal
The link register is stored in R14. ARM assembly code allows to use the 'lr' name to reference it instead of 'r14' which is not very meaningful. Do the substitution to ease the reading. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de>
2019-07-11arm: spear: Use PUSH/POP mnemonics when relevantMiquel Raynal
Quoting ARM "RealView Compilation Tools Assembler Guide v4.0": PUSH and POP are synonyms for STMDB and LDM (or LDMIA), with the base register sp (r13), and the adjusted address written back to the base register. PUSH and POP are the preferred mnemonic in these cases. Let's follow this recommandation to ease the reading and substitute LDMIA/STMDB operations with PUSH/POP mnemonics. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de>
2019-07-11arm: spear: Purely cosmetic changes in start.SMiquel Raynal
Before cleaning a bit further the spear/start.S file, apply a few cosmetic changes: capital letters, comment indentation and small rewriting. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de>
2019-07-11arm: spear: Fix the main comment in start.SMiquel Raynal
This comment describes the board state at the moment where we enter the SPL. The description is entirely wrong; re-write it to fit the reality. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de>