summaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)AuthorFilesLines
2021-07-23reboot-mode: read the boot mode from GPIOs statusNandor Han1-0/+8
A use case for controlling the boot mode is when the user wants to control the device boot by pushing a button without needing to go in user-space. Add a new backed for reboot mode where GPIOs are used to control the reboot-mode. The driver is able to scan a predefined list of GPIOs and return the magic value. Having the modes associated with the magic value generated based on the GPIO values, allows the reboot mode uclass to select the proper mode. Signed-off-by: Nandor Han <nandor.han@vaisala.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-07-22Merge tag 'dm-pull-21jul21' of ↵Tom Rini5-38/+83
https://gitlab.denx.de/u-boot/custodians/u-boot-dm dtoc improvements to show better warnings minor test build fixes sandbox fixes for SDL2 and running TPL bloblist resize feature binman multithreading
2021-07-22Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriqTom Rini1-3/+3
fsl-qoriq: Update mc firmware size, address in LS1088A, LS2088A, LX2 Updates on ls1043aqds, ls1043ardb Refactor I2C MUX Code on fsl-qoriq platforms.
2021-07-21sandbox: don't set SA_NODEFER in signal handlerHeinrich Schuchardt1-1/+1
The sandbox can handle signals. Due to a damaged global data pointer additional exceptions in the signal handler may occur leading to an endless loop. In this case leave the handling of the secondary exception to the operating system. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-07-21sandbox: mmc: Support fixed MMC devicesSimon Glass1-0/+1
Add support for reading devicetree flags for MMC devices. With this we can distinguish between fixed and removable drives. Note that this information is only available when the device is probed, not when it is bound, since it is read in the of_to_plat() method. This could be changed if needed later. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-07-21sandbox: Use hinting with the displaySimon Glass1-0/+3
SDL provides a hinting feature which provides a higher-quality image with the double-display option (-K). Enable it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-07-21sandbox: Add work-around for SDL2 displaySimon Glass1-1/+22
At present the display does not show on some machines, e.g. Ubunutu 20.04 but the reason is unknown. Add a work-around until this can be determined. Also include more error checking just in case. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-07-21sandbox: Support executables for more phasesSimon Glass3-36/+56
The SPL header has a function for obtaining the phase in capital letters, e.g. 'SPL'. Add one for lower-case also, as used by sandbox. Use this to generalise the sandbox logic for determining the filename of the next sandbox executable. This can provide support for VPL. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-07-21board: sifive: drop stuff related to unmatched revision 1Zong Li4-1501/+1
This patch reverts the following commits: - 4b4159d0f3 ("riscv: dts: add dts for unmatched rev1") - ffe9a394df ("board: sifive: support spl multi-dtb on unmatched board") We won't plan to support unmatched that the revision below 3 in u-boot, so they can be dropped because they might be useless. Changed in v2: - rebase codebase to the latest master branch Signed-off-by: Zong Li <zong.li@sifive.com> Suggested-by: David Abdurachmanov <david.abdurachmanov@sifive.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-07-21riscv: booti: do not force relocation if force_reloc is not setVitaly Wool1-1/+6
If force_reloc flag is not set and booti is called for an address ouside RAM (i. e. QSPI NOR flash), we should honor that and not try to force relocation in a bogus fashion. Signed-off-by: Vitaly Wool <vitaly.wool@konsulko.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-07-21ARM: dts: rmobile: Disable RPC HF by defaultMarek Vasut8-8/+8
The RPC HF might be locked by ATF, and any access to its register space would result in complete hang. Disable the RPC HF by default. The ATF should be patched to set RPC node status = "okay" in the DT fragment it passes to U-Boot in case the RPC HF access is unlocked, and that way U-Boot could access the RPC HF safely. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2021-07-21ARM: rmobile: Align CPU: print with other printsMarek Vasut1-1/+1
The CPU: print only has one space after it, while the other prints from U-Boot align the value to offset 7. Align the CPU: print too. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2021-07-21ARM: dts: rmobile: Add sysinfo extras on R-Car Gen3Marek Vasut7-0/+128
Add sysinfo node and phandle to the board ID EEPROM on all boards where this functionality is described in DT, which is Salvator-X(S), ULCB and Ebisu. The u-boot,dm-pre-reloc is necessary here, since the sysinfo must be available early during boot. The V3M and V3H boards currently do not describe this board ID EEPROM in upstream DT, but that could be easily added later, once the DTs contain the necessary nodes. ULCB and Ebisu needs the full EEPROM node in the u-boot extras DT, since the EEPROM node is still missing in the upstream DTs. Ebisu also needs extra compatible string override for the i2c_dvfs. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2021-07-20arm: dts: ls1043ardb: configure the RGMII ports with rgmii-idCamelia Groza1-3/+3
The RGMII ports on LS1043ARDB platforms require both RX and TX internal delays to be enabled. The device tree reports only the TX ID because the RX ID used to be enabled by default. With the addition of RX ID support for the Realtek 8211F PHY driver in commit e32e4d0f58cb ("net: phy: realtek: add rx delay support for RTL8211F"), the RX ID is disabled by the driver if not reported explicitly. This causes the RX to no longer work. Change the phy-connection-type for the RGMII ports to "rgmii-id" in order to enable both RX and TX internal delays. Fixes: be1d75896996 ("ARM: dts: add QorIQ DPAA 1 FMan v3 to LS1043ARDB") Signed-off-by: Camelia Groza <camelia.groza@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-07-19Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini4-0/+348
- Marvell SheevaPlug: Convert Ethernet and SATA to Driver Model (Tony) - Zyxel NSA310S NAS: Convert to Driver Model (Tony) - Turris_omnia: Add `u-boot-env` NOR partition (Marek) - Turris_omnia: Fixup MTD partitions in Linux' DTB (Marek) - Espressobin: Enable 'mtd' command and define SPI NOR partitions (Pali)
2021-07-19Merge tag 'ti-v2021.10-rc1' of ↵Tom Rini15-188/+862
https://source.denx.de/u-boot/custodians/u-boot-ti - Enabled distro boot for all TI platforms. - Cleanup for AM335x Guardian Board - PRUSS rproc on AM65 platform. - Add PMIC support for J7200 - Misc fixes for Nokia RX-51 # Conflicts: # arch/arm/mach-omap2/am33xx/Kconfig
2021-07-19arm: mvebu: Espressobin: Enable 'mtd' command and define SPI NOR partitionsPali Rohár1-0/+18
U-Boot now supports parsing SPI NOR partitions from Device Tree. So enable 'mtd' command support for Espressobin board and define partition layout in U-Boot Espressobin DTS file. Access to SPI NOR via 'sf' command is old method and 'mtd' command is now preferred variant. From include file remove '#define CONFIG_MTD_PARTITIONS' as this option is now defined and enabled in defconfig file. This change is required to fix compile error: CC arch/arm/lib/asm-offsets.s In file included from include/config.h:4, from include/common.h:16, from lib/asm-offsets.c:14: include/configs/mvebu_armada-37xx.h:63: warning: "CONFIG_MTD_PARTITIONS" redefined #define CONFIG_MTD_PARTITIONS /* required for UBI partition support */ In file included from ././include/linux/kconfig.h:4, from <command-line>: include/generated/autoconf.h:44: note: this is the location of the previous definition #define CONFIG_MTD_PARTITIONS 1 After enabling support for mtd command, output from 'mtd list' on Espressobin board is: => mtd list List of MTD devices: * w25q32dw - device: spi-flash@0 - parent: spi@10600 - driver: jedec_spi_nor - path: /soc/internal-regs/spi@10600/spi-flash@0 - type: NOR flash - block size: 0x1000 bytes - min I/O: 0x1 bytes - 0x000000000000-0x000000400000 : "w25q32dw" - 0x000000000000-0x0000003f0000 : "firmware" - 0x0000003f0000-0x000000400000 : "u-boot-env" => Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Konstantin Porotchkin <kostap@marvell.com> Reviewed-by: Stefan Roese <sr@denx.de>
2021-07-19ARM: dts: armada-385-turris-omnia: add `u-boot-env` NOR partitionMarek Behún1-0/+11
Specify a separate partition `u-boot-env` for U-Boot's env settings for the Turris Omnia board. Do this only in U-Boot's specific DTS. We do not want to do this in Linux' official DTS, because Omnia's stock U-Boot stores env at a different address, and there are still boards with stock U-Boot. In a subsequent patch will add board code that fixes Linux's DTB before booting Linux. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-07-19arm: kirkwood: NSA310S: Add device tree DTS for Zyxel NSA310S boardTony Dinh2-0/+319
Add device tree kirkwood-nsa310s.dts for Zyxel NSA310S board to convert to Driver Model. Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2021-07-19usb: Enforce DM_USB migration for USB_HOST devices.Tom Rini4-16/+3
As the deadline for migration to DM_USB, when using a USB host controller has now gone two years past the deadline, enforce migration. This is done by: - Ensuring that all host controller options (other than the very legacy old MUSB ones) now select USB_HOST. USB_HOST now enforces DM_USB and OF_CONTROL. - Remove other parts of Kconfig logic that had platforms pick DM_USB. - To keep Kconfig happy, have some select statements test for USB_HOST as well. - Re-order some Kconfig entries and menus so that we can cleanly pick host or gadget roles. For the various HCD options that have platform glue options, group them together and update dependencies in some cases. - As SPL_DM_USB is not required, on platforms that had not yet enabled it, disable it. Cc: Marek Vasut <marex@denx.de> Cc: Icenowy Zheng <icenowy@aosc.io> Cc: Samuel Holland <samuel@sholland.org> Cc: FUKAUMI Naoki <naobsd@gmail.com> Cc: Andre Przywara <andre.przywara@arm.com> Cc: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-07-19m68k: Remove M52277EVB boardTom Rini9-918/+1
This board has not been converted to CONFIG_DM_MMC by the deadline. Remove it. As this is also the last in family remove the related support as well. Cc: Angelo Durgehello <angelo.dureghello@timesys.com> Cc: TsiChung Liew <Tsi-Chung.Liew@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-07-19m68k: Remove M54451EVB boardTom Rini14-1701/+1
This board has not been converted to CONFIG_DM_MMC by the deadline. Remove it. As this is also the last in family remove the related support as well. Cc: Angelo Durgehello <angelo.dureghello@timesys.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-07-19m68k: Remove M54418TWR boardTom Rini8-215/+0
This board has not been converted to CONFIG_DM_MMC by the deadline. Remove it. Cc: Angelo Durgehello <angelo.dureghello@timesys.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-07-19m68k: Remove M54455EVB boardTom Rini9-208/+2
This board has not been converted to CONFIG_DM_MMC by the deadline. Remove it. Cc: Angelo Durgehello <angelo.dureghello@timesys.com> Cc: TsiChung Liew <Tsi-Chung.Liew@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-07-18MIPS: malta: enable PCI driver modelDaniel Schwierzeck1-0/+4
Enable DM_PCI and DM_ETH on MIPS Malta. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2021-07-18MIPS: malta: add DT bindings for PCI host controllerDaniel Schwierzeck1-0/+28
Add DT binding for GT64120 and MSC01 PCI controllers. Only GT64120 is enabled by default to support Qemu. The MSC01 node will be dynamically enabled by Malta board code dependent on the plugged core card. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2021-07-17Merge tag 'u-boot-imx-20210717' of ↵Tom Rini16-199/+1633
https://gitlab.denx.de/u-boot/custodians/u-boot-imx i.MX ---- - mx7ulp : fix WDOG - imx8 : Phytec - USB3 support for i.MX8 CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/8277
2021-07-17arm: imx8mq: Add USB clock init functionYe Li2-0/+23
Add clock function to setup relevant clocks for USB3.0 controllers and PHYs on i.MX8MQ Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Patrick Wildt <patrick@blueri.se> Tested-by: Patrick Wildt <patrick@blueri.se>
2021-07-17arm: dts: imx8mq: Add alias for two usb controllersYe Li1-0/+2
Add alias for two DWC3 usb controllers to fix the seq index. Signed-off-by: Ye Li <ye.li@nxp.com> Tested-by: Patrick Wildt <patrick@blueri.se>
2021-07-16Merge branch '2021-07-15-assorted-fixes'Tom Rini1-0/+4
- Large number of Coverity reported issues addressed - m41t62 bugfix - Support more Android image compression formats - FIT + DTO bugfix
2021-07-16ARM: dts: stm32mp15: remove mmc aliasPatrick Delaunay2-3/+0
Remove the mmc alias no more required as the sequence number of mmc device is used for boot_instance. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-07-16stm32mp: use device sequence number in boot_instance variablePatrick Delaunay2-1/+19
Use the device sequence number in boot_instance variable and no more the SDMMC instance provided by ROM code/TF-A. After this patch we don't need to define the mmc alias in device tree, for example: mmc0 = &sdmmc1; mmc1 = &sdmmc2; mmc2 = &sdmmc3; to have a correct mapping between the ROM code boot device = "${boot_device}${boot_instance}" and the MMC device in U-Boot. With this patch the 'mmc0' device (used in mmc commands) is always used when only one instance sdmmc is activated in device tree, even if it is only the sdmmc2 or sdmmc3. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-07-16stm32mp: stm32prog: use defines for virtual partition sizePatrick Delaunay3-4/+5
Use the existing defines PMIC_SIZE and OTP_SIZE and a new define CMD_SIZE for virtual partition size. This patch corrects the size for OTP partition in alternate name (1024 instead of 512) and avoids other alignment issues. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-07-16stm32mp: syscon: manage clock when present in device treePatrick Delaunay1-0/+14
Enable the clocks during syscon probe when they are present in device tree. This patch avoids a freeze when the SYSCFG clock is not enabled by TF-A / OP-TEE. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-07-16arm: dts: stm32mp15: alignment with v5.13Patrick Delaunay2-14/+86
Device tree alignment with Linux kernel v5.13 - ARM: dts: stm32: Add PTP clock to Ethernet controller - ARM: dts: stm32: enable the analog filter for all I2C nodes in stm32mp151 - ARM: dts: stm32: fix usart 2 & 3 pinconf to wake up with flow control - ARM: dts: stm32: Add wakeup management on stm32mp15x UART nodes - ARM: dts: stm32: add #clock-cells property to usbphyc node on stm32mp151 - ARM: dts: stm32: Add STM32MP1 I2C6 SDA/SCL pinmux - ARM: dts: stm32: Rename mmc controller nodes to mmc@ - ARM: dts: stm32: Add additional init state for SDMMC1 pins Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-07-16stm32mp: cmd_stm32key: add subcommand closePatrick Delaunay1-2/+52
The expected sequence to close the device 1/ Load key in DDR with any supported load command 2/ Update OTP with key: STM32MP> stm32key read <addr> At this point the device is able to perform image authentication but non-authenticated images can still be used and executed. So it is the last moment to test boot with signed binary and check that the ROM code accepts them. 3/ Close the device: only signed binary will be accepted !! STM32MP> stm32key close Warning: Programming these OTP is an irreversible operation! This may brick your system if the HASH of key is invalid This command should be deactivated by default in real product. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-07-16stm32mp: cmd_stm32key: add read OTP subcommandPatrick Delaunay1-6/+87
Allow to read the OTP value and lock status with the command $> stm32key read. This patch also protects the stm32key fuse command. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-07-16stm32mp: cmd_stm32key: add get_misc_dev functionPatrick Delaunay1-6/+13
Add a helper function to access to BSEC misc driver. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-07-16stm32mp: cmd_stm32key: lock of PKH OTP after fusePatrick Delaunay1-4/+10
Lock the OTP value of key's hash after the command $> stm32key fuse <address> This operation forbids a second update of these OTP as they are ECC protected in BSEC: any update of these OTP with a different value causes a BSEC disturb error and the closed chip will be bricked. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-07-16stm32mp: cmd_stm32key: handle error in fuse_hash_valuePatrick Delaunay1-9/+15
Handle errors in fuse_hash_value function. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-07-16stm32mp: cmd_stm32key: use sub commandPatrick Delaunay1-19/+36
Simplify parsing the command argument by using the macro U_BOOT_CMD_WITH_SUBCMDS. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-07-16stm32mp: configs: activate the command stm32key only for ST boardsPatrick Delaunay1-1/+3
This command is used to evaluate the secure boot on stm32mp SOC, it is deactivated by default in real products. We activate this command only in STMicroelectronics defconfig used with the evaluation boards. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-07-16stm32mp: stm32prog: fix the content of short help messagePatrick Delaunay1-5/+5
Reduce the content of short help message for stm32prog command and removed the carriage return to fix the display of 'help' command when this command is activated. Fixes: 954bd1a923a6 ("stm32mp: add the command stm32prog") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2021-07-16sandbox: Silence coverity warning in state_read_file()Simon Glass1-0/+4
In this case the value seems save to pass to os_free(). Add a comment. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 165109)
2021-07-15Merge https://source.denx.de/u-boot/custodians/u-boot-x86Tom Rini8-16/+46
- x86: various improvements made in getting Chromium OS verified boot running on top of coreboot, booting into U-Boot.
2021-07-15arm/dts: k3-j7200-r5-common: Hook buck1_reg to vtm supplyGowtham Tammana1-0/+5
Hook buck1_reg to vtm avs supply. Signed-off-by: Gowtham Tammana <g-tammana@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Link: https://lore.kernel.org/r/20210714205300.17424-5-g-tammana@ti.com
2021-07-15arm/dts: k3-j7200-r5-common: Add VTM nodeGowtham Tammana1-0/+7
Add voltage and thermal management (VTM) node. The efuse values for the OPPs are stored under the VTM, and is needed for AVS class 0 support. Signed-off-by: Gowtham Tammana <g-tammana@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Link: https://lore.kernel.org/r/20210714205300.17424-4-g-tammana@ti.com
2021-07-15arm/dts: k3-j7200-r5-common: Add pmic lp876441 nodeGowtham Tammana1-0/+26
Add pmic lp876411 node needed for CPU AVS support. Signed-off-by: Gowtham Tammana <g-tammana@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Link: https://lore.kernel.org/r/20210714205300.17424-3-g-tammana@ti.com
2021-07-15arm: omap3: Make secure_unlock_mem() staticAdam Ford1-9/+9
secure_unlock_mem() is only used in one file, so make it static in that file. Signed-off-by: Adam Ford <aford173@gmail.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Link: https://lore.kernel.org/r/20210625192308.277136-4-aford173@gmail.com
2021-07-15arm: omap3: Make secureworld_exit() staticAdam Ford2-2/+1
secureworld_exit() is only used in one file, so make it static to that file and remove it from sys_proto.h. This may help with some further optimization in the future. Signed-off-by: Adam Ford <aford173@gmail.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Link: https://lore.kernel.org/r/20210625192308.277136-3-aford173@gmail.com