aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-04-26Merge tag 'u-boot-at91-2022.07-b' of ↵WIP/26Apr2022Tom Rini63-90/+652
https://source.denx.de/u-boot/custodians/u-boot-at91 Second set of u-boot-at91 features for the 2022.07 cycle: This feature set includes the new driver for the AT91 reset controller, a new board called sam9x60 curiosity, and several other fixes and clean-ups (sama7g5ek qspi clock, impedance; remove unused code, introduce Kconfig symbols for SPL timers)
2022-04-26ARM: dts: at91: sama7g5ek: Align the impedance of the QSPI0's HSIO and PCB linesTudor Ambarus1-1/+1
The impedance of the QSPI PCB lines on the sama7g5ek is 50 Ohms. Align the output impedance of the QSPI0 HSIOs by setting a medium drive strength which corresponds to an impedance of 56 Ohms when VDD is in the 3.0V - 3.6V range. The high drive strength setting corresponds to an output impedance of 42 Ohms on the QSPI0 HSIOs. This is just a fine tunning. The memory that we have populated on sama7g5ek works fine even with high drive strength, but it's better to adjust it and use medium instead, in case some other flashes with higher frequencies are tested. Suggested-by: Mihai Sain <mihai.sain@microchip.com> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
2022-04-26ARM: dts: at91: sama7g5: Fix QSPI1 clockTudor Ambarus1-1/+1
QSPI1 used the clock of QSPI0, fix it. Fixes: 5eecc37bb1 ("ARM: dts: at91: sama7g5: Add QSPI0 and OSPI1 nodes") Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
2022-04-26spi: atmel-quadspi: Fix the buswidth adjustment between spi-mem and controllerTudor Ambarus1-0/+3
Use the spi_mem_default_supports_op() core helper in order to take into account the buswidth specified by the user in device tree. Fixes: 24c8ff4684 ("spi: Add Atmel QuadSPI driver") Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
2022-04-26include: configs: at91/sam: remove stray #ifdef/#elseEugen Hristev6-52/+0
With the commit that moves the BOOTCOMMAND to Kconfig: 970bf8603b ("Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig") some stray ifdefs have been left in the header files which are now useless. Clean up the include files to remove these lines. Fixes: 970bf8603b ("Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig") Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2022-04-26ARM: dts: sam9x60: Add pit64b nodeDurai Manickam KR1-0/+7
Add DT node for pit64b support. Signed-off-by: Durai Manickam KR <durai.manickamkr@microchip.com>
2022-04-26timers: atmel_pit: introduce CONFIG_SPL_ATMEL_PIT_TIMEREugen Hristev20-1/+29
This commit allows the ATMEL_PIT_TIMER driver to be unselected in SPL and be selected in u-boot proper. The SPL can use a different timer. By having a separate Kconfig for ATMEL_TCB in SPL, the size of the SPL decreases by 0.3 KBytes. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2022-04-26timers: atmel_tcb: introduce CONFIG_SPL_ATMEL_TCBEugen Hristev7-1/+14
This commit allows the ATMEL_TCB driver to be unselected in SPL and be selected in u-boot proper. The SPL can use a different timer. By having a separate Kconfig for ATMEL_TCB in SPL, the size of the SPL decreases by 1 KByte. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2022-04-26ARM: mach-at91: armv7: Remove default reset driverSergiu Moga2-34/+0
This commit removes the default reset driver for armv7, since it is no longer needed due to the presence of the SYSRESET driver. Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
2022-04-26ARM: mach-at91: arm926ejs: Add SYSRESET conditionalSergiu Moga1-0/+2
This commit adds a condition to the Makefile so that whenever the SYSRESET option is chosen in the configuration, the default reset driver is ignored. Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
2022-04-26configs: at91: Enable SYSRESET for Atmel/Microchip's platformsSergiu Moga34-0/+124
This commit enables SYSRESET in the defconfigs for the Atmel/Microchip platforms. Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
2022-04-26sysreset: Add Atmel/Microchip sysreset driverSergiu Moga3-0/+87
This patch adds a sysreset driver for Atmel/Microchip platforms. Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
2022-04-26ARM: dts: at91: Add RSTC nodeSergiu Moga2-0/+13
Add node for RSTC. Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
2022-04-26configs: Add sam9x60_curiosity_mmc_defconfigDurai Manickam KR2-0/+75
Add boot from SDMMC (sdcard) support for sam9x60_curiosity. Signed-off-by: Durai Manickam KR <durai.manickamkr@microchip.com>
2022-04-26ARM: dts: Add device tree files for sam9x60_curiosityDurai Manickam KR3-0/+155
Add dts and dtsi files. Signed-off-by: Durai Manickam KR <durai.manickamkr@microchip.com>
2022-04-26board: Add sam9x60_curiosity supportDurai Manickam KR6-0/+141
Add board files, Kconfig, Makefile and MAINTAINERS. Signed-off-by: Durai Manickam KR <durai.manickamkr@microchip.com>
2022-04-25Prepare v2022.07-rc1v2022.07-rc1Tom Rini1-2/+2
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-25configs: Resync with savedefconfigTom Rini22-76/+0
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-25nds32: Remove the architectureWIP/25Apr2022Tom Rini89-5659/+15
As removal of nds32 has been ack'd for the Linux kernel, remove support here as well. Cc: Rick Chen <rick@andestech.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Rick Chen <rick@andestech.com>
2022-04-25Merge branch '2022-04-25-initial-implementation-of-stdboot'Tom Rini86-110/+7188
To quote the author: The bootflow feature provide a built-in way for U-Boot to automatically boot an Operating System without custom scripting and other customisation. This is called 'standard boot' since it provides a standard way for U-Boot to boot a distro, without scripting. It introduces the following concepts: - bootdev - a device which can hold a distro - bootmeth - a method to scan a bootdev to find bootflows (owned by U-Boot) - bootflow - a description of how to boot (owned by the distro) This series provides an implementation of these, enabled to scan for bootflows from MMC, USB and Ethernet. It supports the existing distro boot as well as the EFI loader flow (bootefi/bootmgr). It works similiarly to the existing script-based approach, but is native to U-Boot. With this we can boot on a Raspberry Pi 3 with just one command: bootflow scan -lb which means to scan, listing (-l) each bootflow and trying to boot each one (-b). The final patch shows this. With a standard way to identify boot devices, booting become easier. It also should be possible to support U-Boot scripts, for backwards compatibility only. ... The design is described in these two documents: https://drive.google.com/file/d/1ggW0KJpUOR__vBkj3l61L2dav4ZkNC12/view?usp=sharing https://drive.google.com/file/d/1kTrflO9vvGlKp-ZH_jlgb9TY3WYG6FF9/view?usp=sharing
2022-04-25Merge branch '2022-04-23-binman-updates'Tom Rini13-15/+440
- Assorted binman updates, and add Alper as a maintainer, after talking with Simon.
2022-04-25binman: don't import deprecated distutils packageCI/2022-04-23-binman-updatesHeinrich Schuchardt1-7/+0
'make tests' fails on Ubuntu 22.04 with: binman: ./tools/binman/binman:12: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives from distutils.sysconfig import get_python_lib ./tools/binman/binman:12: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead from distutils.sysconfig import get_python_lib <unittest.result.TestResult run=428 errors=0 failures=4> AssertionError: 0 != 468 As we don't use Ubuntu 16.04 for our CI anymore drop the import. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-04-25MAINTAINERS: Add Alper as a binman maintainerAlper Nebi Yasak1-0/+1
I ended up learning most of binman internals while trying to add a few features to it, and I recently started reviewing binman series that would not affect me personally. I'll keep working on it and try to do more reviews. Add myself as a maintainer for binman. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Acked-by: Tom Rini <trini@konsulko.com>
2022-04-25binman: Refuse to replace sections for nowAlper Nebi Yasak3-0/+35
Binman interfaces allow attempts to replace any entry in the image with arbitrary data. When trying to replace sections, the changes in the section entry's data are not propagated to its child entries. This, combined with how sections rebuild their contents from its children, eventually causes the replaced contents to be silently overwritten by rebuilt contents equivalent to the original data. Add a simple test for replacing a section that is currently failing due to this behaviour, and mark it as an expected failure. Also, raise an error when replacing a section instead of silently pretending it was replaced. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-25binman: Test replacing non-section entries in FIT subsectionsAlper Nebi Yasak1-0/+38
A previous patch fixes binman to correctly extract FIT subentries. This makes it easier to test replacing these entries as we can write tests using an existing helper function that relies on extracting the replaced entry. Add tests that replace leaf entries in FIT subsections with data of various sizes. Replacing the subsections or the whole FIT section does not work yet due to the section contents being re-built from unreplaced subentries' data. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-25binman: Create FIT subentries in the FIT section, not its parentAlper Nebi Yasak3-1/+110
When reading images from a file, each entry's data is read from its parent section as specified in the Entry.Create() call that created it. The FIT entry type has been creating its subentries under its parent (their grandparent), as creating them under the FIT entry resulted in an error until FIT was converted into a proper section. FIT subentries have their offsets relative to the FIT section, and reading those offsets in the parent section results in wrong data. The subentries rightfully belong under the FIT entries, so create them there. Add tests checking that we can extract the correct data for a FIT entry and its subentries. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-25binman: Remove '/images/' fragment from FIT subentry pathsAlper Nebi Yasak2-5/+15
Binman FIT entry nodes describe their subentries in an 'images' subnode, same as how they would be written for the mkimage executable. The entry type initially manually managed its subentries keyed by their node paths relative to its base node. It was later converted to a proper section while still keeping the same keys for subentries. These subentry keys of sections are used as path fragments, so they must not contain the path separator character '/'. Otherwise, they won't be addressable by binman extract/replace commands. Change these keys from the '/images/foo' forms to the subentry node names. Extend the simple FIT tests to check for this. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-04-25binman: Don't reset offset/size if image doesn't allow repackingAlper Nebi Yasak2-1/+22
When an image has the 'allow-repack' property, binman includes the original offset and size properties from the image description in the fdtmap. These are later used as the packing constraints when replacing entries in an image, so other unconstrained entries can be freely positioned. Replacing an entry in an image without 'allow-repack' (and therefore the original offsets) follows the same logic and results in entries being merely concatenated. Instead, skip resetting the calculated offsets and sizes to the missing originals for these images so that every entry is constrained to its existing offset/size. Add tests that replace an entry with smaller or equal-sized data, in an image that doesn't allow repacking. Attempting to do so with bigger-size data is already an error that is already being tested. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-25binman: Collect bintools for images when replacing entriesAlper Nebi Yasak4-0/+115
Binman entries can use other executables to compute their data, usually in their ObtainContents() methods. Subclasses of Entry_section would use bintools in their BuildSectionData() method instead, which is called from several places including their Pack(). These binary tools are resolved correctly while building an image from a device-tree description so that they can be used from these methods. However, this is not being done when replacing entries in an image, which can result in an error as the Pack() methods attempt to use them. Collect and resolve entries' bintools also when replacing entries to fix Pack() errors. Add a way to mock bintool usage in the testing entry type and tests that check bintools are being resolved for such an entry. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-25binman: Fix unique names having '/.' for images read from filesAlper Nebi Yasak4-1/+104
Binman can embed a copy of the image description into the images it builds as a fdtmap entry, but it omits the /binman/<image-name> prefix from the node paths while doing so. When reading an already-built image file, entries are reconstructed using this fdtmap and their associated nodes still lack that prefix. Some entries like fit and vblock create intermediate files whose names are based on an entry unique name. This name is constructed from their node's path by concatenating the parents with dots up to the binman node, e.g. /binman/image/foo/bar becomes 'image.foo.bar'. However, we don't have this /binman/image prefix when replacing entries in such an image. The /foo/bar entry we read when doing so erroneously has the unique name of '/.foo.bar', causing permission errors when the entry attempts to create files based on that. Fix the unique-name generation by stopping at the '/' node like how it stops at the binman node. As the unique names are used as filenames, add tests that check if they're safe to use as filenames. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: doc: Add documentationWIP/2022-04-25-initial-implementation-of-stdbootSimon Glass11-0/+1376
Add documentation for this feature, including the commands and full devicetree bindings. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Provide a default commandSimon Glass1-1/+16
We would like to use bootstd by default when EFI boot manager is not enabled. But so far bootstd does not support all the of distro-boot fetures. So for now, add an option to select this. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add setup for the bootflow testsSimon Glass2-0/+103
We need to create a disk image with a partition table and a DOS-format filesystem containing a few files. Provide a fallback binary for CI since it does not seem able to detect the loopback partitions. Add this to a dm_init test so that it happens when needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add tests for bootstd including all uclassesSimon Glass13-2/+845
Add a set of combined tests for the bootdev, bootflow and bootmeth commands, along with associated functionality. Expand the sandbox console-recording limit so that these can work. These tests rely on a filesystem script which is not yet added to the Python tests. It is included here as a shell script. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: usb: Add a bootdev driverSimon Glass3-0/+76
Add a bootdev driver for USB host. It can use the distro boot mechanism to locate a file, or any other available bootmeth. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add an implementation of script bootSimon Glass3-0/+151
Add a bootmeth driver which handles distro boot from a disk via a U-Boot script, so we can boot a bootflow using this commonly used mechanism. This is required by Armbian, for example. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: sandbox: Add a hostfs bootdevSimon Glass6-0/+70
It is helpful to be able to try out bootstd on sandbox, using host files. This is easier than using a block device, which must have a filesystem, partition table, etc. Add a new driver which provides this feature. For now it is not used in tests, but it is likely to be useful. Add notes in the devicetree also, but don't disturb the tests. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add a sandbox bootmeth driverSimon Glass3-0/+77
Add a bootmeth driver for sandbox, used for testing. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add an implementation of EFI bootmgrSimon Glass2-0/+89
Add a bootmeth driver which handles EFI boot manager, using EFI_LOADER. In effect, this provides the same functionality as the 'bootefi bootmgr' command and shares the same code. But the interface into it is via a bootmeth, so it does not require any special scripts, etc. For now this requires the 'bootefi' command be enabled. Future work may tidy this up so that it can be used without CONFIG_CMDLINE being enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add a system bootdev for strange boot methodsSimon Glass3-1/+73
Some boot methods don't act on a single bootdev but instead do their own thing. An example is EFI bootmgr which scan various devices using its own logic. Add a bootdev to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add an implementation of EFI bootSimon Glass3-0/+210
Add a bootmeth driver which handles EFI boot, using EFI_LOADER. In effect, this provides the same functionality as the 'bootefi' command and shares the same code. But the interface into it is via a bootmeth, so it does not require any special scripts, etc. For now this requires the 'bootefi' command be enabled. Future work may tidy this up so that it can be used without CONFIG_CMDLINE being enabled. There was much discussion about whether this is needed, but it seems that it is, at least for now. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add an implementation of distro PXE bootSimon Glass3-0/+197
Add a bootmeth driver which handles distro boot from a network device, so we can boot a bootflow using this commonly used mechanism. In effect, this provides the same functionality as the 'pxe' command and shares the same code. But the interface into it is via a bootmeth. For now this requires the 'pxe' command be enabled. Future work may tidy this up so that it can be used without CONFIG_CMDLINE being enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: ethernet: Add a bootdev driverSimon Glass5-0/+120
Add a bootdev driver for Ethernet. It can use the PXE boot mechanism to locate a file, added later. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: mmc: Add a bootdev driverSimon Glass5-1/+102
Add a bootdev driver for MMC. It mostly just calls the bootdev helper function. Add a function to obtain the block device for an MMC controller. Fix up the comment for mmc_get_blk_desc() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add an implementation of distro bootSimon Glass5-1/+186
Add a bootmeth driver which handles distro boot from a disk, so we can boot a bootflow using this commonly used mechanism. In effect, this provides the same functionality as the 'sysboot' command and shares the same code. But the interface into it is via a bootmeth. For now this requires the 'pxe' command be enabled. Future work may tidy this up so that it can be used without CONFIG_CMDLINE being enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add a bootmeth commandSimon Glass3-0/+125
Add a 'bootmeth' command to handle listing and ordering of boot methods. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add a bootflow commandSimon Glass3-0/+423
Add a 'bootflow' command to handle listing and selection of bootflow. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add a bootdev commandSimon Glass6-0/+134
Add a 'bootdev' command to handle listing and selection of bootdevs. Disable standard boot for a few boards which otherwise run out of space. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add support for bootflowsSimon Glass6-3/+475
Add support for bootflows, including maintaining a list of them and iterating to find them. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add the bootmeth uclass and helpersSimon Glass7-2/+605
A bootmeth is a method of locating an operating system. For now, just add the uclass itself. Drivers for particular bootmeths are added later. If no bootmeths devices are included in the devicetree, create them automatically. This avoids the need for boilerplate in the devicetree files. Signed-off-by: Simon Glass <sjg@chromium.org>